(typeof console=="undefined")&&(console=false);var fn={};fn._={selector:"",check:function(){return $(this.selector).length&&this.init();},init:function(){}};fn.sponsors={selector:"#sponsors",check:function(){return $(this.selector).length&&this.init();},init:function(){$("#sponsors").find(".corporate ol").infiniteCarousel().end().find("img").hover(function(){var A=$(this),C=A.attr("src"),D=new Image(),B=A.attr("original");if(B){A.attr("src",A.attr("new"));return ;}$(D).load(function(){A.attr("original",C).attr("new",this.src).attr("src",this.src);});D.src=C.replace(/_0/,"_1");},function(){$(this).attr("src",$(this).attr("original"));});}};jQuery.fn.infiniteCarousel=function(A){var B=$.extend({insert_page_break:false,page_break_html:function(){return'<li class="page_break"/>';},items_selector:"li",auto_animate:true,animate_duration:2500,max_page_width:420,time_on_page:1000},A);return this.each(function(){var O=$(this),M=O.parent(),F=[],J={width:0},L=O.find(B.items_selector).filter(":visible"),N=L.eq(L.length-1);var P=M.css("overflow","hidden").innerWidth(),E=0;F.single_page_width=(P>B.max_page_width)?B.max_page_width:P;L.each(function(){var S=$(this),R=S.outerWidth(),T=F[E]||{start:0,end:0,items:0,width:0};var Q=Math.ceil(T.width+R);if(Q<F.single_page_width){T.end=J.width+R;T.items+=1;T.width+=R;}else{E+=1;T={};T.start=J.width;T.width=R;T.end=J.width+R;T.items=1;B.insert_page_break&&$(B.page_break_html()).css({position:"absolute",left:T.start,top:0}).insertAfter(S);}F[E]=T;J.width+=R;});var I=0;for(var H=0;H<F.length;H++){var K=F[H],D=K.width;I+=D;var G=(J.width+P)-I;if(H==F.length-1&&G>0){L.each(function(R,Q){var T=$(this),S=T.outerWidth();G-=S;if(G>0){N=T.clone().addClass("clone").insertAfter(N);}else{return false;}});}}O.width(99999);function C(){if(C.active){return ;}var Q=C.current||0,R=F[Q].end;C.active=true;M.animate({"margin-left":-R},B.animate_duration,function(){B.auto_animate&&setTimeout(function(){C.current=(F[Q+1])?Q+1:0;C.current==0&&M.css("margin-left",0);C.active=false;C();},B.time_on_page);});}B.auto_animate&&setTimeout(function(){C();},B.time_on_page);O.hover(function(){M.stop();C.active=false;B.auto_animate=false;},function(){C.active=false;B.auto_animate=true;C();});});};fn.global_nav={selector:".intro .aux,ol.global",check:function(){return $(this.selector).length&&this.init();},init:function(){$(".intro .aux").superfish({delay:500});if($.browser.msie){$("ol.global").superfish({delay:500,onShow:function(){$(".header .inner").css("z-index",5);},onHide:function(A){$(".header .inner").css("z-index",1);}});}else{$("ol.global").superfish({delay:500});}return true;}};fn.standings={selector:".secondary .standings",check:function(){return $(this.selector).length&&this.init();},init:function(){$(this.selector).Tabs({index:".title",content:".article",show:function(A){A.fadeIn();},hide:function(A){A.hide();},preLoad:function(B){var A=$(B.index,this);A.each(function(E,D){if(!E){$(this).css("left","10px");}else{var C=parseInt(A.eq(E-1).css("left").replace(/[^0-9]/g,""),10);C+=A.eq(E-1).children().outerWidth(true)+30;$(this).css("left",C+"px");}});}});}};fn.primary_height={selector:"body",check:function(){return $(this.selector).length&&this.init();},init:function(){if($(".primary").innerHeight()<$(".secondary").innerHeight()){if($.browser.msie&&$.browser.version!=7){$(".primary").css("height",$(".secondary").innerHeight()+50);}else{$(".primary").css("min-height",$(".secondary").innerHeight()+50);}}if(!$.browser.mozilla&&!$.browser.safari){setTimeout(function(){$(".body, .primary").corner("right 20px");$(".secondary .heading").corner("right 5px");$(".multimedia .heading, .secondary .tabIndex, .sponsors h3").corner("5px");},0);}}};(function(E){var D=E.browser.mozilla&&/gecko/i.test(navigator.userAgent);var C=E.browser.safari&&E.browser.version>=3;var G=E.browser.msie&&(function(){var J=document.createElement("div");try{J.style.setExpression("width","0+0");}catch(I){return false;}return true;})();function F(I,J){return parseInt(E.css(I,J))||0;}function B(I){var I=parseInt(I).toString(16);return(I.length<2)?"0"+I:I;}function H(K){for(;K&&K.nodeName.toLowerCase()!="html";K=K.parentNode){var I=E.css(K,"backgroundColor");if(I=="rgba(0, 0, 0, 0)"){continue;}if(I.indexOf("rgb")>=0){var J=I.match(/\d+/g);return"#"+B(J[0])+B(J[1])+B(J[2]);}if(I&&I!="transparent"){return I;}}return"#ffffff";}function A(K,I,J){switch(K){case"round":return Math.round(J*(1-Math.cos(Math.asin(I/J))));case"cool":return Math.round(J*(1+Math.cos(Math.asin(I/J))));case"sharp":return Math.round(J*(1-Math.cos(Math.acos(I/J))));case"bite":return Math.round(J*(Math.cos(Math.asin((J-I-1)/J))));case"slide":return Math.round(J*(Math.atan2(I,J/I)));case"jut":return Math.round(J*(Math.atan2(J,(J-I-1))));case"curl":return Math.round(J*(Math.atan(I)));case"tear":return Math.round(J*(Math.cos(I)));case"wicked":return Math.round(J*(Math.tan(I)));case"long":return Math.round(J*(Math.sqrt(I)));case"sculpt":return Math.round(J*(Math.log((J-I-1),J)));case"dog":return(I&1)?(I+1):J;case"dog2":return(I&2)?(I+1):J;case"dog3":return(I&3)?(I+1):J;case"fray":return(I%2)*J;case"notch":return J;case"bevel":return I+1;}}E.fn.corner=function(I){if(this.length==0){if(!E.isReady&&this.selector){var J=this.selector,K=this.context;E(function(){E(J,K).corner(I);});}return this;}return this.each(function(P){var O=E(this);var V=(I||O.attr(E.fn.corner.defaults.metaAttr)||"").toLowerCase();var c=/keep/.test(V);var U=((V.match(/cc:(#[0-9a-f]+)/)||[])[1]);var L=((V.match(/sc:(#[0-9a-f]+)/)||[])[1]);var Y=parseInt((V.match(/(\d+)px/)||[])[1])||10;var W=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var N=((V.match(W)||["round"])[0]);var M={T:0,B:1};var S={TL:/top|tl|left/.test(V),TR:/top|tr|right/.test(V),BL:/bottom|bl|left/.test(V),BR:/bottom|br|right/.test(V)};if(!S.TL&&!S.TR&&!S.BL&&!S.BR){S={TL:1,TR:1,BL:1,BR:1};}if(E.fn.corner.defaults.useNative&&N=="round"&&(D||C)&&!U&&!L){if(S.TL){O.css(D?"-moz-border-radius-topleft":"-webkit-border-top-left-radius",Y+"px");}if(S.TR){O.css(D?"-moz-border-radius-topright":"-webkit-border-top-right-radius",Y+"px");}if(S.BL){O.css(D?"-moz-border-radius-bottomleft":"-webkit-border-bottom-left-radius",Y+"px");}if(S.BR){O.css(D?"-moz-border-radius-bottomright":"-webkit-border-bottom-right-radius",Y+"px");}return ;}var Z=document.createElement("div");Z.style.overflow="hidden";Z.style.height="1px";Z.style.backgroundColor=L||"transparent";Z.style.borderStyle="solid";var h={T:parseInt(E.css(this,"paddingTop"))||0,R:parseInt(E.css(this,"paddingRight"))||0,B:parseInt(E.css(this,"paddingBottom"))||0,L:parseInt(E.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined){this.style.zoom=1;}if(!c){this.style.border="none";}Z.style.borderColor=U||H(this.parentNode);var X=E.curCSS(this,"height");for(var a in M){var R=M[a];if((R&&(S.BL||S.BR))||(!R&&(S.TL||S.TR))){Z.style.borderStyle="none "+(S[a+"R"]?"solid":"none")+" none "+(S[a+"L"]?"solid":"none");var k=document.createElement("div");E(k).addClass("jquery-corner");var T=k.style;R?this.appendChild(k):this.insertBefore(k,this.firstChild);if(R&&X!="auto"){if(E.css(this,"position")=="static"){this.style.position="relative";}T.position="absolute";T.bottom=T.left=T.padding=T.margin="0";if(G){T.setExpression("width","this.parentNode.offsetWidth");}else{T.width="100%";}}else{if(!R&&E.browser.msie){if(E.css(this,"position")=="static"){this.style.position="relative";}T.position="absolute";T.top=T.left=T.right=T.padding=T.margin="0";if(G){var f=F(this,"borderLeftWidth")+F(this,"borderRightWidth");T.setExpression("width","this.parentNode.offsetWidth - "+f+'+ "px"');}else{T.width="100%";}}else{T.position="relative";T.margin=!R?"-"+h.T+"px -"+h.R+"px "+(h.T-Y)+"px -"+h.L+"px":(h.B-Y)+"px -"+h.R+"px -"+h.B+"px -"+h.L+"px";}}for(var b=0;b<Y;b++){var Q=Math.max(0,A(N,b,Y));var g=Z.cloneNode(false);g.style.borderWidth="0 "+(S[a+"R"]?Q:0)+"px 0 "+(S[a+"L"]?Q:0)+"px";R?k.appendChild(g):k.insertBefore(g,k.firstChild);}}}});};E.fn.uncorner=function(){if(D||C){this.css(D?"-moz-border-radius":"-webkit-border-radius",0);}E("div.jquery-corner",this).remove();return this;};E.fn.corner.defaults={useNative:true,metaAttr:"data-corner"};})(jQuery);jQuery.fn.Tabs=function(B){var A=$.extend({eventName:"click",show:function(C){C.show();},hide:function(C){C.hide();},startPosition:1,delay:500},B);return this.each(function(){var L=$(this),I=A.index,H=A.eventName,D=A.preLoad,J=A.content,G=A.hide,M=A.show,E=A.startPosition,F=$(I,L),C=$(J,L);if(D){D.call(this,A);}var K;C.hide().addClass("tabContent");F.addClass("tabIndex");L.unbind(H+".Tabs").bind(H+".Tabs",function(S,N){var O=jQuery.inArray(N||S.target,F);if(O==-1){O=jQuery.inArray($(S.target).parents(I+":first")[0],F);}if(O==-1||K==O){return ;}if(K!="undefined"){var Q=C.eq(K),P=F.eq(K);P.removeClass("active");G(Q);}var T=F.eq(O),R=C.eq(O);T.addClass("active");(!N&&M(R)||R.show());K=O;return false;});if(E){L.trigger(H+".Tabs",F.eq(E-1)[0]);}});};$(document).ready(function(){for(var A in fn){(function(B){setTimeout(function(){fn[B].check();},0);})(A);}});
