/*!
 * jQuery UI Widget 1.8.5
 *
 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(e){for(var f=0,g;(g=e[f])!=null;f++){b(g).triggerHandler("remove")}c(e)}}else{var a=b.fn.remove;b.fn.remove=function(f,e){return this.each(function(){if(!e){if(!f||b.filter(f,[this]).length){b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")})}}return a.call(b(this),f,e)})}}b.widget=function(e,h,f){var g=e.split(".")[0],j;e=e.split(".")[1];j=g+"-"+e;if(!f){f=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,e)};b[g]=b[g]||{};b[g][e]=function(l,k){if(arguments.length){this._createWidget(l,k)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][e].prototype=b.extend(true,i,{namespace:g,widgetName:e,widgetEventPrefix:b[g][e].prototype.widgetEventPrefix||e,widgetBaseClass:j},f);b.widget.bridge(e,b[g][e])};b.widget.bridge=function(e,f){b.fn[e]=function(j){var g=typeof j==="string",i=Array.prototype.slice.call(arguments,1),h=this;j=!g&&i.length?b.extend.apply(null,[true,j].concat(i)):j;if(g&&j.substring(0,1)==="_"){return h}if(g){this.each(function(){var k=b.data(this,e);if(!k){throw"cannot call methods on "+e+" prior to initialization; attempted to call method '"+j+"'"}if(!b.isFunction(k[j])){throw"no such method '"+j+"' for "+e+" widget instance"}var l=k[j].apply(k,i);if(l!==k&&l!==d){h=l;return false}})}else{this.each(function(){var k=b.data(this,e);if(k){k.option(j||{})._init()}else{b.data(this,e,new f(j,this))}})}return h}};b.Widget=function(f,e){if(arguments.length){this._createWidget(f,e)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(g,f){b.data(f,this.widgetName,this);this.element=b(f);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(f)[this.widgetName],g);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(g,h){var f=g,e=this;if(arguments.length===0){return b.extend({},e.options)}if(typeof g==="string"){if(h===d){return this.options[g]}f={};f[g]=h}b.each(f,function(i,j){e._setOption(i,j)});return e},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(f,g,h){var j=this.options[f];g=b.Event(g);g.type=(f===this.widgetEventPrefix?f:this.widgetEventPrefix+f).toLowerCase();h=h||{};if(g.originalEvent){for(var e=b.event.props.length,k;e;){k=b.event.props[--e];g[k]=g.originalEvent[k]}}this.element.trigger(g,h);return !(b.isFunction(j)&&j.call(this.element[0],g,h)===false||g.isDefaultPrevented())}}})(jQuery);
/*! 
 *		Author: Nathan Stilwell
 *		Project: Mars Vending . com
 *		Framework / System : the Lenny Framework
 *		File: jquery.ui.blueworld.contentLoader.js
 *
 *		@requires jQuery.js version 1.4.3 or higher
 *		@requires jQueryUI version 1.8.5 or higher
 *		
 *		Blue World, Inc  2010
 */
$.widget("bw.loader",{options:{contentContainer:"#stage-content",exitDirection:"left",enterDirection:"right",speed:500,loadingImg:"",debug:false},viewport:{h:$(window).height(),w:$(window).width()},_create:function(){this.element.addClass("bw-content-loader");this.options.currentContentSize={width:this.element.width(),height:this.element.height()};(this.debug)?this._debug("log","Content Loader Created"):false},_debug:function(b,a){(window.console&&window.console.debug)?(b)?console[b](a):console.log(a):false},_animateOptions:function(a){if(a==="exit"||a===undefined){}else{if(a==="enter"){}}return{}},_addLoading:function(){this.element.html('<h2 class="loading">loading...</h2>')},_removeLoading:function(){this.element.html("")},load:function(b){var a=this;a._trigger("contentCleanup");$(this.options.contentContainer,this.element).animate({left:"-="+this.viewport.w},this.options.speed,function(){$(this).remove();a._addLoading();var c=$("<div />",{id:"stage-content"});$.ajax({url:b,data:{_CONTEXT:"AJAX"},dataType:"html",success:function(d){a._removeLoading();c.html(d);c.css("left",a.viewport.w);a.element.html(c);$("#stage-content [data-prehide]").each(function(e,f){$elem=$(f);if($elem.data("prehide")){$elem.hide()}});$("#stage-content [data-preshow]").each(function(e,f){$elem=$(f);($elem.data("preshow"))?$elem.show():false});c.animate({left:0},a.options.speed,function(){$(this).removeAttr("style");a._trigger("contentLoaded")})},error:function(f,e,d){a._trigger("loadFailed",null,{xhr:f,status:e,err:d})}})})},report:function(a,b){(this.debug)?this._debug((b)?b:"log",this.options[a]):alert("Debugging Disabled")},_destroy:function(){this.element.removeClass("bw-content-loader").html("");$.Widget.prototype.destroy.call(this)}});(function(b,c){var a={characters:(function(){var g=["Red1.png","Red2.png","Red3.png","Red4.png","Yellow1.png","Yellow2.png","Yellow3.png","Yellow4.png","Orange1.png","Orange2.png","Orange3.png","Green1.png","Green2.png","Green3.png","Blue1.png","Blue2.png","Blue3.png","Blue4.png"],d="",f=function(){var h=Math.floor(Math.random()*g.length);(h===d)?h=Math.floor(Math.random()*g.length):false;d=h;return g[h]},e=function(h){return g[h]};return{getRandomCharacter:f,getCharacter:e}})()};b.mv=a})(window);
/*! 
 *		Author: Nathan Stilwell
 *		Project: Mars Vending . com
 *		Framework / System : the Lenny
 *		File: marsvending.com
 *		
 *		Blue World, Inc  2010
 *
 *		This is the Document.onReady
 */
(function(c,b,e){var a=b.document;function f(h){var g=new RegExp(location.protocol+"//"+location.host),i=new RegExp("http://");if(!i.test(h)){return true}return g.test(h)}function d(){c(".characters img").each(function(g,h){c(h).attr("src","images/characters/"+mv.characters.getRandomCharacter())});c(".characters").fadeIn(500)}c(function(){d();if(!c("html").hasClass("ie6")){c("#stage").loader({debug:false,contentLoaded:function(){d();if(typeof(contentInit)==="function"){contentInit()}},contentCleanup:function(){if(typeof(contentDisable)==="function"){contentDisable()}},loadFailed:function(){c("#stage").load("/404.php")}});c("body").delegate("a","click",function(g){if(f(this.href)&&!c(this).data("preventload")){g.preventDefault();if(c("a[data-groupid]").length>0){c("body").data("groupId",c("a[data-groupid]:first").data("groupid"))}c("#stage").loader("load",this.href)}})}else{contentInit()}})})(jQuery,window);
