var alertFallback=false;if(typeof console==="undefined"||typeof console.log==="undefined"){console={};if(alertFallback){console.log=function(a){alert(a)}}else{console.log=function(){}}}if(typeof qs==="undefined"){var qs={}}qs.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=b[e].split(".");g=window;for(c=0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]]}}return g};jQuery.fn.exists=function(){return jQuery(this).length>0};jQuery.fn.imgswap=function(){function a(b,d,c){if($(b).attr("src")>0){$(b).attr("src",function(){return this.src.replace(d,c)})}else{$(b).find("img").attr("src",function(){return this.src.replace(d,c)})}}$(this).hover(function(){a(this,"-swap","-over")},function(){a(this,"-over","-swap")});return this};qs.sajax=window.sajax;qs.namespace("qs.callback");qs.callback.que=function(a){this.debug=false;this.name=a;this.isReady=false;this.readyList=new Array();this.ready=function(b){this.log("this.name = "+this.name+" - this.isReady = "+this.isReady+" - fn = "+b);if(this.isReady){try{b.call(this)}catch(c){this.log("Error: "+c)}}else{if(this.readyList){this.readyList.push(b)}}return this}};qs.callback.que.prototype.loaded=function(f){f.data.isReady=true;if(f.data.readyList){var a=f.data.readyList.length;for(var b=0;b<a;b++){var c=f.data.readyList.pop();if(typeof c=="function"){try{this.log("Calling e.data.readyList ["+parseInt(b)+1+" of "+a+"]: "+c);c.call()}catch(d){this.log("Error: "+d)}}else{this.log("Loaded callback not a function: "+c)}}}};qs.callback.que.prototype.log=function(a){if(this.debug){if(window.console&&window.console.log){console.log(a)}}};qs.namespace("qs.polyfill");qs.polyfill={init:function(){qs.polyfill.placeholder();qs.polyfill.buttons()},placeholder:function(){Modernizr.load({test:Modernizr.input.placeholder,nope:"/Assets/Scripts/jquery.watermark.js",callback:function(b,a,c){if(!a){$("input[placeholder]").each(function(){$(this).watermark($(this).attr("placeholder"))})}}})},buttons:function(){if($.browser.msie){if(parseInt($.browser.version)<=8){$("button[type=submit]").bind("click",function(){$(this).parentsUntil("form").find("button[type=submit]").not(this).each(function(){$(this).attr("disabled","disabled")})})}}}};$(function(){qs.polyfill.init();$($("body")[0]).prepend('<div id="loading" style="display: none;"><img src="'+staticUrl+'/images/ajax-loader.gif" /></div>');$("#loading").bind("ajaxSend",function(){$(this).show()}).bind("ajaxComplete",function(){$(this).hide()});$('<div style="position: absolute; top: 0; left: 0; height 20px; width: 100%; color: red; font-color: white;"></div>').ajaxError(function(d,c,b,a){$(this).html("<div>Error requesting page "+b.url+"</div>"+a)})});
