Teamcode={};Teamcode.Viewport=(function(){var B=this;this.options={mode:"horizontal",easing:"easeOutExpo",viewport:"viewport"};this.showThrobber=function(){if(!B.throbber){B.throbber=$.create("div",{id:"ajaxloader","class":"ajaxloader"})}$(B.throbber).insertBefore(B.container+" #viewport").width($("#viewport",B.container).width())};this.hideThrobber=function(){$("#ajaxloader").remove()};this.request=function(D){$.ajax({type:"GET",dataType:"json",url:D+"&xhr=1",beforeRequest:showThrobber,success:function(E){update.call(B,E)}})};this.paginate=function(D){D.preventDefault();if($(this).hasClass("current")){return false}var E=parseInt($(this).attr("href").match(B.options.pagematch)[1]);B.request($(this).attr("href"));return false};this.moveScrollable=function(E){var D=$(B.options.viewport,this.container);if(B.options.mode==="horizontal"){var H=D.find(".panel").length*parseInt(D.find(".panel:first").width());D.width(H)}var G=D.offset({padding:true}),J={top:parseInt(D.css("padding-top")),left:parseInt(D.css("padding-left"))},F=$(E).offset({margin:true,border:true}),I={top:parseInt($(E).css("margin-top")),left:parseInt($(E).css("margin-left"))};var K=G.top-F.top+(J.top+I.top),L=G.left-F.left+(J.left+I.left);D.animate({top:K,left:L},3000,B.options.easing);delete D};function C(E){var D=$(this.options.viewport,E);this.height=D.outerHeight()-1;var F=$.create("div",{"class":"scroller"}).css({position:"relative",height:this.height});D.wrap(F).css({position:"absolute",border:"0px"});delete F;delete D;return true}function A(){if(arguments.length==0){return}var F=false,E=1,D=(arguments.length>0?$(arguments[0]):null);if(D.length==0){return}this.container=arguments[0];if(arguments.length>1){if($.typeOf(arguments[1])=="boolean"){F=arguments[1];E=2}}this.options=$.extend({},options,arguments[E]);if(F){this.scrollable=C(D)}delete D}A.apply(this,arguments);return this});Teamcode.Viewport.constructor=Teamcode.Viewport;Teamcode.ImageButton=(function(){var D=this;var C={regex:"(.*)\\d(\\.gif)",replace:"2"};function E(){$(this).attr("src",$(this).data("button_on"))}function B(){$(this).attr("src",$(this).data("button_off"))}function A(){this.selector=arguments[0];if(arguments.length>1&&$.typeOf(arguments[1])=="object"){this.options=$.extend({},C,arguments[1])}else{this.options=$.extend({},C)}op=this.options;var F=new RegExp(this.options.regex);$(this.selector).each(function(){var G=$(this);var H=G.attr("src");G.data("button_off",H);H=F.exec(H);G.data("button_on",H[1]+op.replace+H[2]);G.hover(E,B);delete G});delete F}A.apply(this,arguments);return this});Teamcode.ImageButton.constructor=Teamcode.ImageButton;(function(A){A.extend({typeOf:function(C){var B=typeof C;if(B==="object"){if(C){if(typeof C.length==="number"&&!(C.propertyIsEnumerable("length"))&&typeof C.splice==="function"){B="array"}}else{B="null"}}return B},isEmpty:function(C){var D,B;if(A.typeOf(C)==="object"){for(D in C){B=C[D];if(B!==undefined&&A.typeOf(B)!=="function"){return false}}}return true}})})(jQuery);(function(A){A.fn.highlight=function(B){var C={bgcolor:"rgb(255,255,240)",speedIn:"fast",speedOut:"slow",easing:"easeOutCirc"};var D=A.extend(C,B);return this.each(function(){var E=A(this).css("backgroundColor");A(this).animate({backgroundColor:D.bgcolor},D.speedIn,D.easing);A(this).animate({backgroundColor:E},D.speedOut,D.easing)})}})(jQuery);function do_swapImage(D,C,A){var B=$(D[0]=="#"?D:"#"+D);if(B!=null&&!B.hasClass(A)){B.attr("src",C)}delete B}function getBaseURL(){var B=window.location.href;var A=B.indexOf("?");return(A>0)?B.substring(0,A):B}$(function(){if($.browser.msie){if(parseFloat($.browser.version)<7){$(document.body).addClass("IE6")}else{$(document.body).addClass("IE7")}}else{$(document.body).addClass("W3C")}var B=["js/functions.js"];for(var A=B.length;A--;){$.requireJs(B[A])}if(typeof CUSTOM_SCRIPTS=="array"){for(var A=CUSTOM_SCRIPTS.length;A--;){$.requireJs(CUSTOM_SCRIPTS[A])}}});