if(!this.JSON){JSON={}
}(function(){function f(n){return n<10?"0"+n:n
}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"
};
String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()
}
}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;
function quote(string){escapable.lastIndex=0;
return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];
return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
})+'"':'"'+string+'"'
}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];
if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)
}if(typeof rep==="function"){value=rep.call(holder,key,value)
}switch(typeof value){case"string":return quote(value);
case"number":return isFinite(value)?String(value):"null";
case"boolean":case"null":return String(value);
case"object":if(!value){return"null"
}gap+=indent;
partial=[];
if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;
for(i=0;
i<length;
i+=1){partial[i]=str(i,value)||"null"
}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";
gap=mind;
return v
}if(rep&&typeof rep==="object"){length=rep.length;
for(i=0;
i<length;
i+=1){k=rep[i];
if(typeof k==="string"){v=str(k,value);
if(v){partial.push(quote(k)+(gap?": ":":")+v)
}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);
if(v){partial.push(quote(k)+(gap?": ":":")+v)
}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";
gap=mind;
return v
}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;
gap="";
indent="";
if(typeof space==="number"){for(i=0;
i<space;
i+=1){indent+=" "
}}else{if(typeof space==="string"){indent=space
}}rep=replacer;
if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")
}return str("",{"":value})
}
}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;
function walk(holder,key){var k,v,value=holder[key];
if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);
if(v!==undefined){value[k]=v
}else{delete value[k]
}}}}return reviver.call(holder,key,value)
}cx.lastIndex=0;
if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
})
}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");
return typeof reviver==="function"?walk({"":j},""):j
}throw new SyntaxError("JSON.parse")
}
}})();
(function(){function c(h){var f=new Array(Math.ceil(h.length/4)),g;
for(g=0;
g<f.length;
g++){f[g]=h.charCodeAt(g*4)+(h.charCodeAt(g*4+1)<<8)+(h.charCodeAt(g*4+2)<<16)+(h.charCodeAt(g*4+3)<<24)
}return f
}function d(g){var f=new Array(g.length),h;
for(h=0;
h<g.length;
h++){f[h]=String.fromCharCode(g[h]&255,g[h]>>>8&255,g[h]>>>16&255,g[h]>>>24&255)
}return f.join("")
}function e(f){return f.replace(/[\0\t\n\v\f\r\xa0'"!]/g,function(g){return"!"+g.charCodeAt(0)+"!"
})
}function b(f){return f.replace(/!\d\d?\d?!/g,function(g){return String.fromCharCode(g.slice(1,-1))
})
}this.TEAencrypt=function(h,A){if(h.length===0){return("")
}var i=escape(h).replace(/%20/g," "),B=c(i),m,j,s,u,x,w,r,f,o,g,l;
if(B.length<=1){B[1]=0
}m=c(A.slice(0,16));
j=B.length;
s=B[j-1];
u=B[0];
x=2654435769;
f=Math.floor(6+52/j);
o=0;
while(f-->0){o+=x;
r=o>>>2&3;
for(g=0;
g<j;
g++){u=B[(g+1)%j];
w=(s>>>5^u<<2)+(u>>>3^s<<4)^(o^u)+(m[g&3^r]^s);
s=B[g]+=w
}}l=d(B);
return e(l)
};
this.TEAdecrypt=function(j,x){if(j.length===0){return("")
}var A=c(b(j)),l=c(x.slice(0,16)),i=A.length,r=A[i-1],s=A[0],w=2654435769,u,o,f=Math.floor(6+52/i),m=f*w,h,g;
while(m!==0){o=m>>>2&3;
for(h=i-1;
h>=0;
h--){r=A[h>0?h-1:i-1];
u=(r>>>5^s<<2)+(s>>>3^r<<4)^(m^s)+(l[h&3^o]^r);
s=A[h]-=u
}m-=w
}g=d(A);
g=g.replace(/\0+$/,"");
return unescape(g)
}
})();
(function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(type,name){this.defaults.type=type;
this.defaults.name=name
},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);
if(!settings.single.length){settings.single="metadata"
}var data=$.data(elem,settings.single);
if(data){return data
}data="{}";
if(settings.type=="class"){var m=settings.cre.exec(elem.className);
if(m){data=m[1]
}}else{if(settings.type=="elem"){if(!elem.getElementsByTagName){return
}var e=elem.getElementsByTagName(settings.name);
if(e.length){data=$.trim(e[0].innerHTML)
}}else{if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);
if(attr){data=attr
}}}}if(data.indexOf("{")<0){data="{"+data+"}"
}data=eval("("+data+")");
$.data(elem,settings.single,data);
return data
}}});
$.fn.metadata=function(opts){return $.metadata.get(this[0],opts)
}
})(jQuery);
(function(b){b.fn.bgIframe=b.fn.bgiframe=function(d){if(b.browser.msie&&/6.0/.test(navigator.userAgent)){d=b.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},d||{});
var e=function(f){return f&&f.constructor==Number?f+"px":f
},c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+d.src+'"style="display:block;position:absolute;z-index:-1;'+(d.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(d.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":e(d.top))+";left:"+(d.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":e(d.left))+";width:"+(d.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":e(d.width))+";height:"+(d.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":e(d.height))+';"/>';
return this.each(function(){if(b("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(c),this.firstChild)
}})
}return this
}
})(jQuery);
jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(f,g,e,i,h){return jQuery.easing[jQuery.easing.def](f,g,e,i,h)
},easeInQuad:function(f,g,e,i,h){return i*(g/=h)*g+e
},easeOutQuad:function(f,g,e,i,h){return -i*(g/=h)*(g-2)+e
},easeInOutQuad:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g+e
}return -i/2*((--g)*(g-2)-1)+e
},easeInCubic:function(f,g,e,i,h){return i*(g/=h)*g*g+e
},easeOutCubic:function(f,g,e,i,h){return i*((g=g/h-1)*g*g+1)+e
},easeInOutCubic:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g+e
}return i/2*((g-=2)*g*g+2)+e
},easeInQuart:function(f,g,e,i,h){return i*(g/=h)*g*g*g+e
},easeOutQuart:function(f,g,e,i,h){return -i*((g=g/h-1)*g*g*g-1)+e
},easeInOutQuart:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g*g+e
}return -i/2*((g-=2)*g*g*g-2)+e
},easeInQuint:function(f,g,e,i,h){return i*(g/=h)*g*g*g*g+e
},easeOutQuint:function(f,g,e,i,h){return i*((g=g/h-1)*g*g*g*g+1)+e
},easeInOutQuint:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g*g*g+e
}return i/2*((g-=2)*g*g*g*g+2)+e
},easeInSine:function(f,g,e,i,h){return -i*Math.cos(g/h*(Math.PI/2))+i+e
},easeOutSine:function(f,g,e,i,h){return i*Math.sin(g/h*(Math.PI/2))+e
},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e
},easeInExpo:function(f,g,e,i,h){return(g==0)?e:i*Math.pow(2,10*(g/h-1))+e
},easeOutExpo:function(f,g,e,i,h){return(g==h)?e+i:i*(-Math.pow(2,-10*g/h)+1)+e
},easeInOutExpo:function(f,g,e,i,h){if(g==0){return e
}if(g==h){return e+i
}if((g/=h/2)<1){return i/2*Math.pow(2,10*(g-1))+e
}return i/2*(-Math.pow(2,-10*--g)+2)+e
},easeInCirc:function(f,g,e,i,h){return -i*(Math.sqrt(1-(g/=h)*g)-1)+e
},easeOutCirc:function(f,g,e,i,h){return i*Math.sqrt(1-(g=g/h-1)*g)+e
},easeInOutCirc:function(f,g,e,i,h){if((g/=h/2)<1){return -i/2*(Math.sqrt(1-g*g)-1)+e
}return i/2*(Math.sqrt(1-(g-=2)*g)+1)+e
},easeInElastic:function(f,h,e,l,k){var i=1.70158;
var j=0;
var g=l;
if(h==0){return e
}if((h/=k)==1){return e+l
}if(!j){j=k*0.3
}if(g<Math.abs(l)){g=l;
var i=j/4
}else{var i=j/(2*Math.PI)*Math.asin(l/g)
}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e
},easeOutElastic:function(f,h,e,l,k){var i=1.70158;
var j=0;
var g=l;
if(h==0){return e
}if((h/=k)==1){return e+l
}if(!j){j=k*0.3
}if(g<Math.abs(l)){g=l;
var i=j/4
}else{var i=j/(2*Math.PI)*Math.asin(l/g)
}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e
},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;
var j=0;
var g=l;
if(h==0){return e
}if((h/=k/2)==2){return e+l
}if(!j){j=k*(0.3*1.5)
}if(g<Math.abs(l)){g=l;
var i=j/4
}else{var i=j/(2*Math.PI)*Math.asin(l/g)
}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e
}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e
},easeInBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158
}return j*(g/=i)*g*((h+1)*g-h)+e
},easeOutBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158
}return j*((g=g/i-1)*g*((h+1)*g+h)+1)+e
},easeInOutBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158
}if((g/=i/2)<1){return j/2*(g*g*(((h*=(1.525))+1)*g-h))+e
}return j/2*((g-=2)*g*(((h*=(1.525))+1)*g+h)+2)+e
},easeInBounce:function(f,g,e,i,h){return i-jQuery.easing.easeOutBounce(f,h-g,0,i,h)+e
},easeOutBounce:function(f,g,e,i,h){if((g/=h)<(1/2.75)){return i*(7.5625*g*g)+e
}else{if(g<(2/2.75)){return i*(7.5625*(g-=(1.5/2.75))*g+0.75)+e
}else{if(g<(2.5/2.75)){return i*(7.5625*(g-=(2.25/2.75))*g+0.9375)+e
}else{return i*(7.5625*(g-=(2.625/2.75))*g+0.984375)+e
}}}},easeInOutBounce:function(f,g,e,i,h){if(g<h/2){return jQuery.easing.easeInBounce(f,g*2,0,i,h)*0.5+e
}return jQuery.easing.easeOutBounce(f,g*2-h,0,i,h)*0.5+i*0.5+e
}});
(function(b){b.fn.hoverIntent=function(l,k){var m={sensitivity:7,interval:100,timeout:0};
m=b.extend(m,k?{over:l,out:k}:l);
var o,n,i,e;
var h=function(f){o=f.pageX;
n=f.pageY
};
var d=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);
if((Math.abs(i-o)+Math.abs(e-n))<m.sensitivity){b(f).unbind("mousemove",h);
f.hoverIntent_s=1;
return m.over.apply(f,[g])
}else{i=o;
e=n;
f.hoverIntent_t=setTimeout(function(){d(g,f)
},m.interval)
}};
var j=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);
f.hoverIntent_s=0;
return m.out.apply(f,[g])
};
var c=function(r){var q=(r.type=="mouseover"?r.fromElement:r.toElement)||r.relatedTarget;
while(q&&q!=this){try{q=q.parentNode
}catch(r){q=this
}}if(q==this){return false
}var g=jQuery.extend({},r);
var f=this;
if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)
}if(r.type=="mouseover"){i=g.pageX;
e=g.pageY;
b(f).bind("mousemove",h);
if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){d(g,f)
},m.interval)
}}else{b(f).unbind("mousemove",h);
if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){j(g,f)
},m.timeout)
}}};
return this.mouseover(c).mouseout(c)
}
})(jQuery);
(function(c){c.fn.jcarousel=function(e){return this.each(function(){new b(this,e)
})
};
var d={vertical:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null};
c.jcarousel=function(j,g){this.options=c.extend({},d,g||{});
this.locked=false;
this.container=null;
this.clip=null;
this.list=null;
this.buttonNext=null;
this.buttonPrev=null;
this.wh=!this.options.vertical?"width":"height";
this.lt=!this.options.vertical?"left":"top";
var n="",l=j.className.split(" ");
for(var h=0;
h<l.length;
h++){if(l[h].indexOf("jcarousel-skin")!=-1){c(j).removeClass(l[h]);
var n=l[h];
break
}}if(j.nodeName=="UL"||j.nodeName=="OL"){this.list=c(j);
this.container=this.list.parent();
if(this.container.hasClass("jcarousel-clip")){if(!this.container.parent().hasClass("jcarousel-container")){this.container=this.container.wrap("<div></div>")
}this.container=this.container.parent()
}else{if(!this.container.hasClass("jcarousel-container")){this.container=this.list.wrap("<div></div>").parent()
}}}else{this.container=c(j);
this.list=c(j).find(">ul,>ol,div>ul,div>ol")
}if(n!=""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1){this.container.wrap('<div class=" '+n+'"></div>')
}this.clip=this.list.parent();
if(!this.clip.length||!this.clip.hasClass("jcarousel-clip")){this.clip=this.list.wrap("<div></div>").parent()
}this.buttonPrev=c(".jcarousel-prev",this.container);
if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null){this.buttonPrev=this.clip.before(this.options.buttonPrevHTML).prev()
}this.buttonPrev.addClass(this.className("jcarousel-prev"));
this.buttonNext=c(".jcarousel-next",this.container);
if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null){this.buttonNext=this.clip.before(this.options.buttonNextHTML).prev()
}this.buttonNext.addClass(this.className("jcarousel-next"));
this.clip.addClass(this.className("jcarousel-clip"));
this.list.addClass(this.className("jcarousel-list"));
this.container.addClass(this.className("jcarousel-container"));
var k=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;
var m=this.list.children("li");
var p=this;
if(m.size()>0){var f=0,h=this.options.offset;
m.each(function(){p.format(this,h++);
f+=p.dimension(this,k)
});
this.list.css(this.wh,f+"px");
if(!g||g.size===undefined){this.options.size=m.size()
}}this.container.css("display","block");
this.buttonNext.css("display","block");
this.buttonPrev.css("display","block");
this.funcNext=function(){p.next()
};
this.funcPrev=function(){p.prev()
};
this.funcResize=function(){p.reload()
};
if(this.options.initCallback!=null){this.options.initCallback(this,"init")
}if(c.browser.safari){this.buttons(false,false);
c(window).bind("load",function(){p.setup()
})
}else{this.setup()
}};
var b=c.jcarousel;
b.fn=b.prototype={jcarousel:"0.2.3"};
b.fn.extend=b.extend=c.extend;
b.fn.extend({setup:function(){this.first=null;
this.last=null;
this.prevFirst=null;
this.prevLast=null;
this.animating=false;
this.timer=null;
this.tail=null;
this.inTail=false;
if(this.locked){return
}this.list.css(this.lt,this.pos(this.options.offset)+"px");
var e=this.pos(this.options.start);
this.prevFirst=this.prevLast=null;
this.animate(e,false);
c(window).unbind("resize",this.funcResize).bind("resize",this.funcResize)
},reset:function(){this.list.empty();
this.list.css(this.lt,"0px");
this.list.css(this.wh,"10px");
if(this.options.initCallback!=null){this.options.initCallback(this,"reset")
}this.setup()
},reload:function(){if(this.tail!=null&&this.inTail){this.list.css(this.lt,b.intval(this.list.css(this.lt))+this.tail)
}this.tail=null;
this.inTail=false;
if(this.options.reloadCallback!=null){this.options.reloadCallback(this)
}if(this.options.visible!=null){var g=this;
var h=Math.ceil(this.clipping()/this.options.visible),f=0,e=0;
c("li",this.list).each(function(j){f+=g.dimension(this,h);
if(j+1<g.first){e=f
}});
this.list.css(this.wh,f+"px");
this.list.css(this.lt,-e+"px")
}this.scroll(this.first,false)
},lock:function(){this.locked=true;
this.buttons()
},unlock:function(){this.locked=false;
this.buttons()
},size:function(e){if(e!=undefined){this.options.size=e;
if(!this.locked){this.buttons()
}}return this.options.size
},has:function(g,h){if(h==undefined||!h){h=g
}if(this.options.size!==null&&h>this.options.size){h=this.options.size
}for(var f=g;
f<=h;
f++){var k=this.get(f);
if(!k.length||k.hasClass("jcarousel-item-placeholder")){return false
}}return true
},get:function(e){return c(".jcarousel-item-"+e,this.list)
},add:function(k,p){var l=this.get(k),g=0,o=0;
if(l.length==0){var n,l=this.create(k),h=b.intval(k);
while(n=this.get(--h)){if(h<=0||n.length){h<=0?this.list.prepend(l):n.after(l);
break
}}}else{g=this.dimension(l)
}l.removeClass(this.className("jcarousel-item-placeholder"));
typeof p=="string"?l.html(p):l.empty().append(p);
var m=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;
var f=this.dimension(l,m)-g;
if(k>0&&k<this.first){this.list.css(this.lt,b.intval(this.list.css(this.lt))-f+"px")
}this.list.css(this.wh,b.intval(this.list.css(this.wh))+f+"px");
return l
},remove:function(f){var g=this.get(f);
if(!g.length||(f>=this.first&&f<=this.last)){return
}var h=this.dimension(g);
if(f<this.first){this.list.css(this.lt,b.intval(this.list.css(this.lt))+h+"px")
}g.remove();
this.list.css(this.wh,b.intval(this.list.css(this.wh))-h+"px")
},next:function(){this.stopAuto();
if(this.tail!=null&&!this.inTail){this.scrollTail(false)
}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!=null&&this.last==this.options.size)?1:this.first+this.options.scroll)
}},prev:function(){this.stopAuto();
if(this.tail!=null&&this.inTail){this.scrollTail(true)
}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!=null&&this.first==1)?this.options.size:this.first-this.options.scroll)
}},scrollTail:function(e){if(this.locked||this.animating||!this.tail){return
}var f=b.intval(this.list.css(this.lt));
!e?f-=this.tail:f+=this.tail;
this.inTail=!e;
this.prevFirst=this.first;
this.prevLast=this.last;
this.animate(f)
},scroll:function(f,e){if(this.locked||this.animating){return
}this.animate(this.pos(f),e)
},pos:function(B){if(this.locked||this.animating){return
}if(this.options.wrap!="circular"){B=B<1?1:(this.options.size&&B>this.options.size?this.options.size:B)
}var y=this.first>B;
var h=b.intval(this.list.css(this.lt));
var C=this.options.wrap!="circular"&&this.first<=1?1:this.first;
var F=y?this.get(C):this.get(this.last);
var A=y?C:C-1;
var D=null,z=0,u=false,E=0;
while(y?--A>=B:++A<B){D=this.get(A);
u=!D.length;
if(D.length==0){D=this.create(A).addClass(this.className("jcarousel-item-placeholder"));
F[y?"before":"after"](D)
}F=D;
E=this.dimension(D);
if(u){z+=E
}if(this.first!=null&&(this.options.wrap=="circular"||(A>=1&&(this.options.size==null||A<=this.options.size)))){h=y?h+E:h-E
}}var q=this.clipping();
var s=[];
var g=0,A=B,r=0;
var F=this.get(B-1);
while(++g){D=this.get(A);
u=!D.length;
if(D.length==0){D=this.create(A).addClass(this.className("jcarousel-item-placeholder"));
F.length==0?this.list.prepend(D):F[y?"before":"after"](D)
}F=D;
var E=this.dimension(D);
if(E==0){return 0
}if(this.options.wrap!="circular"&&this.options.size!==null&&A>this.options.size){s.push(D)
}else{if(u){z+=E
}}r+=E;
if(r>=q){break
}A++
}for(var o=0;
o<s.length;
o++){s[o].remove()
}if(z>0){this.list.css(this.wh,this.dimension(this.list)+z+"px");
if(y){h-=z;
this.list.css(this.lt,b.intval(this.list.css(this.lt))-z+"px")
}}var n=B+g-1;
if(this.options.wrap!="circular"&&this.options.size&&n>this.options.size){n=this.options.size
}if(A>n){g=0,A=n,r=0;
while(++g){var D=this.get(A--);
if(!D.length){break
}r+=this.dimension(D);
if(r>=q){break
}}}var k=n-g+1;
if(this.options.wrap!="circular"&&k<1){k=1
}if(this.inTail&&y){h+=this.tail;
this.inTail=false
}this.tail=null;
if(this.options.wrap!="circular"&&n==this.options.size&&(n-g+1)>=1){var w=b.margin(this.get(n),!this.options.vertical?"marginRight":"marginBottom");
if((r-w)>q){this.tail=r-q-w
}}while(B-->k){h+=this.dimension(this.get(B))
}this.prevFirst=this.first;
this.prevLast=this.last;
this.first=k;
this.last=n;
return h
},animate:function(h,e){if(this.locked||this.animating){return
}this.animating=true;
var f=this;
var g=function(){f.animating=false;
if(h==0){f.list.css(f.lt,0)
}if(f.options.wrap=="both"||f.options.wrap=="last"||f.options.size==null||f.last<f.options.size){f.startAuto()
}f.buttons();
f.notify("onAfterAnimation")
};
this.notify("onBeforeAnimation");
if(!this.options.animation||e==false){this.list.css(this.lt,h+"px");
g()
}else{var i=!this.options.vertical?{left:h}:{top:h};
this.list.animate(i,this.options.animation,this.options.easing,g)
}},startAuto:function(f){if(f!=undefined){this.options.auto=f
}if(this.options.auto==0){return this.stopAuto()
}if(this.timer!=null){return
}var e=this;
this.timer=setTimeout(function(){e.next()
},this.options.auto*1000)
},stopAuto:function(){if(this.timer==null){return
}clearTimeout(this.timer);
this.timer=null
},buttons:function(g,f){if(g==undefined||g==null){var g=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="first")||this.options.size==null||this.last<this.options.size);
if(!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!=null&&this.last>=this.options.size){g=this.tail!=null&&!this.inTail
}}if(f==undefined||f==null){var f=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="last")||this.first>1);
if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!=null&&this.first==1){f=this.tail!=null&&this.inTail
}}var e=this;
this.buttonNext[g?"bind":"unbind"](this.options.buttonNextEvent,this.funcNext)[g?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",g?false:true);
this.buttonPrev[f?"bind":"unbind"](this.options.buttonPrevEvent,this.funcPrev)[f?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",f?false:true);
if(this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=g)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){e.options.buttonNextCallback(e,this,g)
});
this.buttonNext[0].jcarouselstate=g
}if(this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=f)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){e.options.buttonPrevCallback(e,this,f)
});
this.buttonPrev[0].jcarouselstate=f
}},notify:function(e){var f=this.prevFirst==null?"init":(this.prevFirst<this.first?"next":"prev");
this.callback("itemLoadCallback",e,f);
if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",e,f,this.first);
this.callback("itemFirstOutCallback",e,f,this.prevFirst)
}if(this.prevLast!==this.last){this.callback("itemLastInCallback",e,f,this.last);
this.callback("itemLastOutCallback",e,f,this.prevLast)
}this.callback("itemVisibleInCallback",e,f,this.first,this.last,this.prevFirst,this.prevLast);
this.callback("itemVisibleOutCallback",e,f,this.prevFirst,this.prevLast,this.first,this.last)
},callback:function(j,m,e,k,h,g,f){if(this.options[j]==undefined||(typeof this.options[j]!="object"&&m!="onAfterAnimation")){return
}var n=typeof this.options[j]=="object"?this.options[j][m]:this.options[j];
if(!c.isFunction(n)){return
}var o=this;
if(k===undefined){n(o,e,m)
}else{if(h===undefined){this.get(k).each(function(){n(o,this,k,e,m)
})
}else{for(var l=k;
l<=h;
l++){if(l!==null&&!(l>=g&&l<=f)){this.get(l).each(function(){n(o,this,l,e,m)
})
}}}}},create:function(e){return this.format("<li></li>",e)
},format:function(h,g){var f=c(h).addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+g));
f.attr("jcarouselindex",g);
return f
},className:function(e){return e+" "+e+(!this.options.vertical?"-horizontal":"-vertical")
},dimension:function(i,j){var h=i.jquery!=undefined?i[0]:i;
var g=!this.options.vertical?h.offsetWidth+b.margin(h,"marginLeft")+b.margin(h,"marginRight"):h.offsetHeight+b.margin(h,"marginTop")+b.margin(h,"marginBottom");
if(j==undefined||g==j){return g
}var f=!this.options.vertical?j-b.margin(h,"marginLeft")-b.margin(h,"marginRight"):j-b.margin(h,"marginTop")-b.margin(h,"marginBottom");
c(h).css(this.wh,f+"px");
return this.dimension(h)
},clipping:function(){return !this.options.vertical?this.clip[0].offsetWidth-b.intval(this.clip.css("borderLeftWidth"))-b.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-b.intval(this.clip.css("borderTopWidth"))-b.intval(this.clip.css("borderBottomWidth"))
},index:function(e,f){if(f==undefined){f=this.options.size
}return Math.round((((e-1)/f)-Math.floor((e-1)/f))*f)+1
}});
b.extend({defaults:function(e){return c.extend(d,e||{})
},margin:function(j,i){if(!j){return 0
}var h=j.jquery!=undefined?j[0]:j;
if(i=="marginRight"&&c.browser.safari){var g={display:"block","float":"none",width:"auto"},f,k;
c.swap(h,g,function(){f=h.offsetWidth
});
g.marginRight=0;
c.swap(h,g,function(){k=h.offsetWidth
});
return k-f
}return b.intval(c.css(h,i))
},intval:function(e){e=parseInt(e);
return isNaN(e)?0:e
}})
})(jQuery);
(function(b){b.fn.lazyload=function(c){var d={threshold:0,failurelimit:0,event:"scroll",effect:"show"};
if(c){b.extend(d,c)
}var e=this;
if("scroll"==d.event){b(window).bind("scroll",function(h){var f=0;
e.each(function(){if(!b.belowthefold(this,d)&&!b.rightoffold(this,d)){b(this).trigger("appear")
}else{if(f++>d.failurelimit){return false
}}});
var g=b.grep(e,function(i){return !i.loaded
});
e=b(g)
})
}return this.each(function(){var f=this;
b(f).attr("original",b(f).attr("src"));
if("scroll"!=d.event||b.belowthefold(f,d)||b.rightoffold(f,d)){if(d.placeholder){b(f).attr("src",d.placeholder)
}else{b(f).removeAttr("src")
}f.loaded=false
}else{f.loaded=true
}b(f).one("appear",function(){if(!this.loaded){b("<img>").attr("src",b(f).attr("original")).bind("load",function(){b(f).hide().attr("src",b(f).attr("original"))[d.effect](d.effectspeed);
f.loaded=true
})
}});
if("scroll"!=d.event){b(f).bind(d.event,function(g){if(!f.loaded){b(f).trigger("appear")
}})
}})
};
b.belowthefold=function(d,e){var c=b(window).height()+b(window).scrollTop();
return c<=b(d).offset().top-e.threshold
};
b.rightoffold=function(d,e){var c=b(window).width()+b(window).scrollLeft();
return c<=b(d).offset().left-e.threshold
};
b.extend(b.expr[":"],{"below-the-fold":"$.belowthefold(a, {threshold : 0})","above-the-fold":"!$.belowthefold(a, {threshold : 0})","right-of-fold":"$.rightoffold(a, {threshold : 0})","left-of-fold":"!$.rightoffold(a, {threshold : 0})"})
})(jQuery);
(function(b){b.extend({onAvailable:function(f,i){var c=b.onAvailable;
if(!(f instanceof Array)){f=[f]
}if(typeof i!=="function"){throw new TypeError()
}var h=arguments[2];
var d=arguments[3];
var g=!!arguments[4];
var e=c.listeners;
b.each(f,function(j,k){e.push({id:k,callback:i,obj:h,override:d,checkContent:g})
});
if(!c.interval){c.interval=window.setInterval(c.checkAvailable,c.POLL_INTERVAL)
}return this
},onContentReady:function(d,f,e,c){b.onAvailable(d,f,e,c,true)
}});
b.extend(b.onAvailable,{POLL_RETRIES:2000,POLL_INTERVAL:20,interval:null,listeners:[],executeCallback:function(d,e){var c=d;
if(e.override){if(e.override===true){c=e.obj
}else{c=e.override
}}e.callback.call(c,e.obj)
},checkAvailable:function(){var c=b.onAvailable;
var d=c.listeners;
b.each(d,function(e,g){if(g){var f=document.getElementById(g.id);
if(f&&(!g.checkContent||b.isReady||f.nextSibling)){d.splice(e,1);
c.executeCallback(f,g)
}if(d.length===0||--c.POLL_RETRIES===0){c.interval=window.clearInterval(c.interval)
}}})
}})
})(jQuery);
(function(c){c.tinysort={id:"TinySort",version:"1.0.0",defaults:{order:"asc",attr:"",place:"start",returns:false}};
c.fn.extend({tinysort:function(h,j){if(h&&typeof(h)!="string"){j=h;
h=null
}var e=c.extend({},c.tinysort.defaults,j);
var p={};
this.each(function(u){var w=(!h||h=="")?c(this):c(this).find(h);
var v=e.order=="rand"?""+Math.random():(e.attr==""?w.text():w.attr(e.attr));
var s=c(this).parent();
if(!p[s]){p[s]={s:[],n:[]}
}if(w.length>0){p[s].s.push({s:v,e:c(this),n:u})
}else{p[s].n.push({e:c(this),n:u})
}});
for(var g in p){oParent=p[g];
oParent.s.sort(function k(u,s){var i=u.s.toLowerCase();
var v=s.s.toLowerCase();
if(d(u.s)&&d(s.s)){i=parseFloat(u.s);
v=parseFloat(s.s)
}return(e.order=="asc"?1:-1)*(i<v?-1:(i>v?1:0))
})
}var m=[];
for(var g in p){oParent=p[g];
var n=[];
var f=c(this).length;
switch(e.place){case"first":c.each(oParent.s,function(s,u){f=Math.min(f,u.n)
});
break;
case"org":c.each(oParent.s,function(s,u){n.push(u.n)
});
break;
case"end":f=oParent.n.length;
break;
default:f=0
}var q=[0,0];
for(var l=0;
l<c(this).length;
l++){var o=l>=f&&l<f+oParent.s.length;
if(b(n,l)){o=true
}var r=(o?oParent.s:oParent.n)[q[o?0:1]].e;
r.parent().append(r);
if(o||!e.returns){m.push(r.get(0))
}q[o?0:1]++
}}return this.setArray(m)
}});
function d(e){return(parseFloat(e)+"")==e
}function b(f,g){var e=false;
c.each(f,function(j,h){if(!e){e=h==g
}});
return e
}c.fn.TinySort=c.fn.Tinysort=c.fn.tsort=c.fn.tinysort
})(jQuery);
jQuery.ui||(function(d){var j=d.fn.remove,e=d.browser.mozilla&&(parseFloat(d.browser.version)<1.9);
d.ui={version:"1.7.1",plugin:{add:function(l,m,o){var n=d.ui[l].prototype;
for(var k in o){n.plugins[k]=n.plugins[k]||[];
n.plugins[k].push([m,o[k]])
}},call:function(k,m,l){var o=k.plugins[m];
if(!o||!k.element[0].parentNode){return
}for(var n=0;
n<o.length;
n++){if(k.options[o[n][0]]){o[n][1].apply(k.element,l)
}}}},contains:function(l,k){return document.compareDocumentPosition?l.compareDocumentPosition(k)&16:l!==k&&l.contains(k)
},hasScroll:function(n,l){if(d(n).css("overflow")=="hidden"){return false
}var k=(l&&l=="left")?"scrollLeft":"scrollTop",m=false;
if(n[k]>0){return true
}n[k]=1;
m=(n[k]>0);
n[k]=0;
return m
},isOverAxis:function(l,k,m){return(l>k)&&(l<(k+m))
},isOver:function(p,l,o,n,k,m){return d.ui.isOverAxis(p,o,k)&&d.ui.isOverAxis(l,n,m)
},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};
if(e){var g=d.attr,f=d.fn.removeAttr,i="http://www.w3.org/2005/07/aaa",b=/^aria-/,c=/^wairole:/;
d.attr=function(l,k,m){var n=m!==undefined;
return(k=="role"?(n?g.call(this,l,k,"wairole:"+m):(g.apply(this,arguments)||"").replace(c,"")):(b.test(k)?(n?l.setAttributeNS(i,k.replace(b,"aaa:"),m):g.call(this,l,k.replace(b,"aaa:"))):g.apply(this,arguments)))
};
d.fn.removeAttr=function(k){return(b.test(k)?this.each(function(){this.removeAttributeNS(i,k.replace(b,""))
}):f.call(this,k))
}
}d.fn.extend({remove:function(){d("*",this).add(this).each(function(){d(this).triggerHandler("remove")
});
return j.apply(this,arguments)
},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")
},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false
})
},scrollParent:function(){var k;
if((d.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){k=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(d.curCSS(this,"position",1))&&(/(auto|scroll)/).test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))
}).eq(0)
}else{k=this.parents().filter(function(){return(/(auto|scroll)/).test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))
}).eq(0)
}return(/fixed/).test(this.css("position"))||!k.length?d(document):k
}});
d.extend(d.expr[":"],{data:function(m,l,k){return !!d.data(m,k[3])
},focusable:function(l){var m=l.nodeName.toLowerCase(),k=d.attr(l,"tabindex");
return(/input|select|textarea|button|object/.test(m)?!l.disabled:"a"==m||"area"==m?l.href||!isNaN(k):!isNaN(k))&&!d(l)["area"==m?"parents":"closest"](":hidden").length
},tabbable:function(l){var k=d.attr(l,"tabindex");
return(isNaN(k)||k>=0)&&d(l).is(":focusable")
}});
function h(n,o,p,m){function l(r){var q=d[n][o][r]||[];
return(typeof q=="string"?q.split(/,?\s+/):q)
}var k=l("getter");
if(m.length==1&&typeof m[0]=="string"){k=k.concat(l("getterSetter"))
}return(d.inArray(p,k)!=-1)
}d.widget=function(l,k){var m=l.split(".")[0];
l=l.split(".")[1];
d.fn[l]=function(q){var o=(typeof q=="string"),p=Array.prototype.slice.call(arguments,1);
if(o&&q.substring(0,1)=="_"){return this
}if(o&&h(m,l,q,p)){var n=d.data(this[0],l);
return(n?n[q].apply(n,p):undefined)
}return this.each(function(){var r=d.data(this,l);
(!r&&!o&&d.data(this,l,new d[m][l](this,q))._init());
(r&&o&&d.isFunction(r[q])&&r[q].apply(r,p))
})
};
d[m]=d[m]||{};
d[m][l]=function(p,o){var n=this;
this.namespace=m;
this.widgetName=l;
this.widgetEventPrefix=d[m][l].eventPrefix||l;
this.widgetBaseClass=m+"-"+l;
this.options=d.extend({},d.widget.defaults,d[m][l].defaults,d.metadata&&d.metadata.get(p)[l],o);
this.element=d(p).bind("setData."+l,function(r,q,s){if(r.target==p){return n._setData(q,s)
}}).bind("getData."+l,function(r,q){if(r.target==p){return n._getData(q)
}}).bind("remove",function(){return n.destroy()
})
};
d[m][l].prototype=d.extend({},d.widget.prototype,k);
d[m][l].getterSetter="option"
};
d.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")
},option:function(m,n){var l=m,k=this;
if(typeof m=="string"){if(n===undefined){return this._getData(m)
}l={};
l[m]=n
}d.each(l,function(o,p){k._setData(o,p)
})
},_getData:function(k){return this.options[k]
},_setData:function(k,l){this.options[k]=l;
if(k=="disabled"){this.element[l?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",l)
}},enable:function(){this._setData("disabled",false)
},disable:function(){this._setData("disabled",true)
},_trigger:function(m,n,o){var q=this.options[m],k=(m==this.widgetEventPrefix?m:this.widgetEventPrefix+m);
n=d.Event(n);
n.type=k;
if(n.originalEvent){for(var l=d.event.props.length,p;
l;
){p=d.event.props[--l];
n[p]=n.originalEvent[p]
}}this.element.trigger(n,o);
return !(d.isFunction(q)&&q.call(this.element[0],n,o)===false||n.isDefaultPrevented())
}};
d.widget.defaults={disabled:false};
d.ui.mouse={_mouseInit:function(){var k=this;
this.element.bind("mousedown."+this.widgetName,function(l){return k._mouseDown(l)
}).bind("click."+this.widgetName,function(l){if(k._preventClickEvent){k._preventClickEvent=false;
l.stopImmediatePropagation();
return false
}});
if(d.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");
this.element.attr("unselectable","on")
}this.started=false
},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);
(d.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))
},_mouseDown:function(m){m.originalEvent=m.originalEvent||{};
if(m.originalEvent.mouseHandled){return
}(this._mouseStarted&&this._mouseUp(m));
this._mouseDownEvent=m;
var l=this,n=(m.which==1),k=(typeof this.options.cancel=="string"?d(m.target).parents().add(m.target).filter(this.options.cancel).length:false);
if(!n||k||!this._mouseCapture(m)){return true
}this.mouseDelayMet=!this.options.delay;
if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){l.mouseDelayMet=true
},this.options.delay)
}if(this._mouseDistanceMet(m)&&this._mouseDelayMet(m)){this._mouseStarted=(this._mouseStart(m)!==false);
if(!this._mouseStarted){m.preventDefault();
return true
}}this._mouseMoveDelegate=function(o){return l._mouseMove(o)
};
this._mouseUpDelegate=function(o){return l._mouseUp(o)
};
d(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
(d.browser.safari||m.preventDefault());
m.originalEvent.mouseHandled=true;
return true
},_mouseMove:function(k){if(d.browser.msie&&!k.button){return this._mouseUp(k)
}if(this._mouseStarted){this._mouseDrag(k);
return k.preventDefault()
}if(this._mouseDistanceMet(k)&&this._mouseDelayMet(k)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,k)!==false);
(this._mouseStarted?this._mouseDrag(k):this._mouseUp(k))
}return !this._mouseStarted
},_mouseUp:function(k){d(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=false;
this._preventClickEvent=(k.target==this._mouseDownEvent.target);
this._mouseStop(k)
}return false
},_mouseDistanceMet:function(k){return(Math.max(Math.abs(this._mouseDownEvent.pageX-k.pageX),Math.abs(this._mouseDownEvent.pageY-k.pageY))>=this.options.distance)
},_mouseDelayMet:function(k){return this.mouseDelayMet
},_mouseStart:function(k){},_mouseDrag:function(k){},_mouseStop:function(k){},_mouseCapture:function(k){return true
}};
d.ui.mouse.defaults={cancel:null,distance:1,delay:0}
})(jQuery);
(function(b){b.widget("ui.accordion",{_init:function(){var e=this.options,c=this;
this.running=0;
if(e.collapsible==b.ui.accordion.defaults.collapsible&&e.alwaysOpen!=b.ui.accordion.defaults.alwaysOpen){e.collapsible=!e.alwaysOpen
}if(e.navigation){var d=this.element.find("a").filter(e.navigationFilter);
if(d.length){if(d.filter(e.header).length){this.active=d
}else{this.active=d.parent().parent().prev();
d.addClass("ui-accordion-content-active")
}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");
if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")
}this.headers=this.element.find(e.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b(this).addClass("ui-state-hover")
}).bind("mouseleave.accordion",function(){b(this).removeClass("ui-state-hover")
}).bind("focus.accordion",function(){b(this).addClass("ui-state-focus")
}).bind("blur.accordion",function(){b(this).removeClass("ui-state-focus")
});
this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
this.active=this._findActive(this.active||e.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
this.active.next().addClass("ui-accordion-content-active");
b("<span/>").addClass("ui-icon "+e.icons.header).prependTo(this.headers);
this.active.find(".ui-icon").toggleClass(e.icons.header).toggleClass(e.icons.headerSelected);
if(b.browser.msie){this.element.find("a").css("zoom","1")
}this.resize();
this.element.attr("role","tablist");
this.headers.attr("role","tab").bind("keydown",function(f){return c._keydown(f)
}).next().attr("role","tabpanel");
this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();
if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")
}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")
}if(!b.browser.safari){this.headers.find("a").attr("tabIndex","-1")
}if(e.event){this.headers.bind((e.event)+".accordion",function(f){return c._clickHandler.call(c,f,this)
})
}},destroy:function(){var d=this.options;
this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");
this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");
this.headers.find("a").removeAttr("tabindex");
this.headers.children(".ui-icon").remove();
var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");
if(d.autoHeight||d.fillHeight){c.css("height","")
}},_setData:function(c,d){if(c=="alwaysOpen"){c="collapsible";
d=!d
}b.widget.prototype._setData.apply(this,arguments)
},_keydown:function(f){var h=this.options,g=b.ui.keyCode;
if(h.disabled||f.altKey||f.ctrlKey){return
}var e=this.headers.length;
var c=this.headers.index(f.target);
var d=false;
switch(f.keyCode){case g.RIGHT:case g.DOWN:d=this.headers[(c+1)%e];
break;
case g.LEFT:case g.UP:d=this.headers[(c-1+e)%e];
break;
case g.SPACE:case g.ENTER:return this._clickHandler({target:f.target},f.target)
}if(d){b(f.target).attr("tabIndex","-1");
b(d).attr("tabIndex","0");
d.focus();
return false
}return true
},resize:function(){var f=this.options,e;
if(f.fillSpace){if(b.browser.msie){var c=this.element.parent().css("overflow");
this.element.parent().css("overflow","hidden")
}e=this.element.parent().height();
if(b.browser.msie){this.element.parent().css("overflow",c)
}this.headers.each(function(){e-=b(this).outerHeight()
});
var d=0;
this.headers.next().each(function(){d=Math.max(d,b(this).innerHeight()-b(this).height())
}).height(Math.max(0,e-d)).css("overflow","auto")
}else{if(f.autoHeight){e=0;
this.headers.next().each(function(){e=Math.max(e,b(this).outerHeight())
}).height(e)
}}},activate:function(c){var d=this._findActive(c)[0];
this._clickHandler({target:d},d)
},_findActive:function(c){return c?typeof c=="number"?this.headers.filter(":eq("+c+")"):this.headers.not(this.headers.not(c)):c===false?b([]):this.headers.filter(":eq(0)")
},_clickHandler:function(c,g){var e=this.options;
if(e.disabled){return false
}if(!c.target&&e.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header);
this.active.next().addClass("ui-accordion-content-active");
var i=this.active.next(),f={options:e,newHeader:b([]),oldHeader:e.active,newContent:b([]),oldContent:i},d=(this.active=b([]));
this._toggle(d,i,f);
return false
}var h=b(c.currentTarget||g);
var j=h[0]==this.active[0];
if(this.running||(!e.collapsible&&j)){return false
}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header);
this.active.next().addClass("ui-accordion-content-active");
if(!j){h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(e.icons.header).addClass(e.icons.headerSelected);
h.next().addClass("ui-accordion-content-active")
}var d=h.next(),i=this.active.next(),f={options:e,newHeader:j&&e.collapsible?b([]):h,oldHeader:this.active,newContent:j&&e.collapsible?b([]):d.find("> *"),oldContent:i.find("> *")},k=this.headers.index(this.active[0])>this.headers.index(h[0]);
this.active=j?b([]):h;
this._toggle(d,i,f,j,k);
return false
},_toggle:function(c,j,h,k,l){var e=this.options,n=this;
this.toShow=c;
this.toHide=j;
this.data=h;
var d=function(){if(!n){return
}return n._completed.apply(n,arguments)
};
this._trigger("changestart",null,this.data);
this.running=j.size()===0?c.size():j.size();
if(e.animated){var g={};
if(e.collapsible&&k){g={toShow:b([]),toHide:j,complete:d,down:l,autoHeight:e.autoHeight||e.fillSpace}
}else{g={toShow:c,toHide:j,complete:d,down:l,autoHeight:e.autoHeight||e.fillSpace}
}if(!e.proxied){e.proxied=e.animated
}if(!e.proxiedDuration){e.proxiedDuration=e.duration
}e.animated=b.isFunction(e.proxied)?e.proxied(g):e.proxied;
e.duration=b.isFunction(e.proxiedDuration)?e.proxiedDuration(g):e.proxiedDuration;
var m=b.ui.accordion.animations,f=e.duration,i=e.animated;
if(!m[i]){m[i]=function(o){this.slide(o,{easing:i,duration:f||700})
}
}m[i](g)
}else{if(e.collapsible&&k){c.toggle()
}else{j.hide();
c.show()
}d(true)
}j.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();
c.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()
},_completed:function(c){var d=this.options;
this.running=c?0:--this.running;
if(this.running){return
}if(d.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})
}this._trigger("change",null,this.data)
}});
b.extend(b.ui.accordion,{version:"1.7.1",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()
}},animations:{slide:function(k,i){k=b.extend({easing:"swing",duration:300},k,i);
if(!k.toHide.size()){k.toShow.animate({height:"show"},k);
return
}if(!k.toShow.size()){k.toHide.animate({height:"hide"},k);
return
}var d=k.toShow.css("overflow"),h,e={},g={},f=["height","paddingTop","paddingBottom"],c;
var j=k.toShow;
c=j[0].style.width;
j.width(parseInt(j.parent().width(),10)-parseInt(j.css("paddingLeft"),10)-parseInt(j.css("paddingRight"),10)-(parseInt(j.css("borderLeftWidth"),10)||0)-(parseInt(j.css("borderRightWidth"),10)||0));
b.each(f,function(l,n){g[n]="hide";
var m=(""+b.css(k.toShow[0],n)).match(/^([\d+-.]+)(.*)$/);
e[n]={value:m[1],unit:m[2]||"px"}
});
k.toShow.css({height:0,overflow:"hidden"}).show();
k.toHide.filter(":hidden").each(k.complete).end().filter(":visible").animate(g,{step:function(l,m){if(m.prop=="height"){h=(m.now-m.start)/(m.end-m.start)
}k.toShow[0].style[m.prop]=(h*e[m.prop].value)+e[m.prop].unit
},duration:k.duration,easing:k.easing,complete:function(){if(!k.autoHeight){k.toShow.css("height","")
}k.toShow.css("width",c);
k.toShow.css({overflow:d});
k.complete()
}})
},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1000:200})
},easeslide:function(c){this.slide(c,{easing:"easeinout",duration:700})
}}})
})(jQuery);
(function(b){b.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable
}this._tabify(true)
},_setData:function(c,d){if(c=="selected"){if(this.options.collapsible&&d==this.options.selected){return
}this.select(d)
}else{this.options[c]=d;
if(c=="deselectable"){this.options.collapsible=d
}this._tabify()
}},_tabId:function(c){return c.title&&c.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+b.data(c)
},_sanitizeSelector:function(c){return c.replace(/:/g,"\\:")
},_cookie:function(){var c=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+b.data(this.list[0]));
return b.cookie.apply(null,[c].concat(b.makeArray(arguments)))
},_ui:function(d,c){return{tab:d,panel:c,index:this.anchors.index(d)}
},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var c=b(this);
c.html(c.data("label.tabs")).removeData("label.tabs")
})
},_tabify:function(p){this.list=this.element.children("ul:first");
this.lis=b("li:has(a[href])",this.list);
this.anchors=this.lis.map(function(){return b("a",this)[0]
});
this.panels=b([]);
var q=this,e=this.options;
var d=/^#.+/;
this.anchors.each(function(s,o){var r=b(o).attr("href");
var u=r.split("#")[0],v;
if(u&&(u===location.toString().split("#")[0]||(v=b("base")[0])&&u===v.href)){r=o.hash;
o.href=r
}if(d.test(r)){q.panels=q.panels.add(q._sanitizeSelector(r))
}else{if(r!="#"){b.data(o,"href.tabs",r);
b.data(o,"load.tabs",r.replace(/#.*$/,""));
var x=q._tabId(o);
o.href="#"+x;
var w=b("#"+x);
if(!w.length){w=b(e.panelTemplate).attr("id",x).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(q.panels[s-1]||q.list);
w.data("destroy.tabs",true)
}q.panels=q.panels.add(w)
}else{e.disabled.push(s)
}}});
if(p){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
this.lis.addClass("ui-state-default ui-corner-top");
this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");
if(e.selected===undefined){if(location.hash){this.anchors.each(function(r,o){if(o.hash==location.hash){e.selected=r;
return false
}})
}if(typeof e.selected!="number"&&e.cookie){e.selected=parseInt(q._cookie(),10)
}if(typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))
}e.selected=e.selected||0
}else{if(e.selected===null){e.selected=-1
}}e.selected=((e.selected>=0&&this.anchors[e.selected])||e.selected<0)?e.selected:0;
e.disabled=b.unique(e.disabled.concat(b.map(this.lis.filter(".ui-state-disabled"),function(r,o){return q.lis.index(r)
}))).sort();
if(b.inArray(e.selected,e.disabled)!=-1){e.disabled.splice(b.inArray(e.selected,e.disabled),1)
}this.panels.addClass("ui-tabs-hide");
this.lis.removeClass("ui-tabs-selected ui-state-active");
if(e.selected>=0&&this.anchors.length){this.panels.eq(e.selected).removeClass("ui-tabs-hide");
this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active");
q.element.queue("tabs",function(){q._trigger("show",null,q._ui(q.anchors[e.selected],q.panels[e.selected]))
});
this.load(e.selected)
}b(window).bind("unload",function(){q.lis.add(q.anchors).unbind(".tabs");
q.lis=q.anchors=q.panels=null
})
}else{e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))
}this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");
if(e.cookie){this._cookie(e.selected,e.cookie)
}for(var h=0,n;
(n=this.lis[h]);
h++){b(n)[b.inArray(h,e.disabled)!=-1&&!b(n).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")
}if(e.cache===false){this.anchors.removeData("cache.tabs")
}this.lis.add(this.anchors).unbind(".tabs");
if(e.event!="mouseover"){var g=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)
}};
var k=function(o,i){i.removeClass("ui-state-"+o)
};
this.lis.bind("mouseover.tabs",function(){g("hover",b(this))
});
this.lis.bind("mouseout.tabs",function(){k("hover",b(this))
});
this.anchors.bind("focus.tabs",function(){g("focus",b(this).closest("li"))
});
this.anchors.bind("blur.tabs",function(){k("focus",b(this).closest("li"))
})
}var c,j;
if(e.fx){if(b.isArray(e.fx)){c=e.fx[0];
j=e.fx[1]
}else{c=j=e.fx
}}function f(i,o){i.css({display:""});
if(b.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")
}}var l=j?function(i,o){b(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");
o.hide().removeClass("ui-tabs-hide").animate(j,j.duration||"normal",function(){f(o,j);
q._trigger("show",null,q._ui(i,o[0]))
})
}:function(i,o){b(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");
o.removeClass("ui-tabs-hide");
q._trigger("show",null,q._ui(i,o[0]))
};
var m=c?function(o,i){i.animate(c,c.duration||"normal",function(){q.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");
i.addClass("ui-tabs-hide");
f(i,c);
q.element.dequeue("tabs")
})
}:function(o,i,r){q.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");
i.addClass("ui-tabs-hide");
q.element.dequeue("tabs")
};
this.anchors.bind(e.event+".tabs",function(){var o=this,s=b(this).closest("li"),i=q.panels.filter(":not(.ui-tabs-hide)"),r=b(q._sanitizeSelector(this.hash));
if((s.hasClass("ui-tabs-selected")&&!e.collapsible)||s.hasClass("ui-state-disabled")||s.hasClass("ui-state-processing")||q._trigger("select",null,q._ui(this,r[0]))===false){this.blur();
return false
}e.selected=q.anchors.index(this);
q.abort();
if(e.collapsible){if(s.hasClass("ui-tabs-selected")){e.selected=-1;
if(e.cookie){q._cookie(e.selected,e.cookie)
}q.element.queue("tabs",function(){m(o,i)
}).dequeue("tabs");
this.blur();
return false
}else{if(!i.length){if(e.cookie){q._cookie(e.selected,e.cookie)
}q.element.queue("tabs",function(){l(o,r)
});
q.load(q.anchors.index(this));
this.blur();
return false
}}}if(e.cookie){q._cookie(e.selected,e.cookie)
}if(r.length){if(i.length){q.element.queue("tabs",function(){m(o,i)
})
}q.element.queue("tabs",function(){l(o,r)
});
q.load(q.anchors.index(this))
}else{throw"jQuery UI Tabs: Mismatching fragment identifier."
}if(b.browser.msie){this.blur()
}});
this.anchors.bind("click.tabs",function(){return false
})
},destroy:function(){var c=this.options;
this.abort();
this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");
this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
this.anchors.each(function(){var d=b.data(this,"href.tabs");
if(d){this.href=d
}var e=b(this).unbind(".tabs");
b.each(["href","load","cache"],function(f,g){e.removeData(g+".tabs")
})
});
this.lis.unbind(".tabs").add(this.panels).each(function(){if(b.data(this,"destroy.tabs")){b(this).remove()
}else{b(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))
}});
if(c.cookie){this._cookie(null,c.cookie)
}},add:function(f,e,d){if(d===undefined){d=this.anchors.length
}var c=this,h=this.options,j=b(h.tabTemplate.replace(/#\{href\}/g,f).replace(/#\{label\}/g,e)),i=!f.indexOf("#")?f.replace("#",""):this._tabId(b("a",j)[0]);
j.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);
var g=b("#"+i);
if(!g.length){g=b(h.panelTemplate).attr("id",i).data("destroy.tabs",true)
}g.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");
if(d>=this.lis.length){j.appendTo(this.list);
g.appendTo(this.list[0].parentNode)
}else{j.insertBefore(this.lis[d]);
g.insertBefore(this.panels[d])
}h.disabled=b.map(h.disabled,function(l,k){return l>=d?++l:l
});
this._tabify();
if(this.anchors.length==1){j.addClass("ui-tabs-selected ui-state-active");
g.removeClass("ui-tabs-hide");
this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))
});
this.load(0)
}this._trigger("add",null,this._ui(this.anchors[d],this.panels[d]))
},remove:function(c){var e=this.options,f=this.lis.eq(c).remove(),d=this.panels.eq(c).remove();
if(f.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(c+(c+1<this.anchors.length?1:-1))
}e.disabled=b.map(b.grep(e.disabled,function(h,g){return h!=c
}),function(h,g){return h>=c?--h:h
});
this._tabify();
this._trigger("remove",null,this._ui(f.find("a")[0],d[0]))
},enable:function(c){var d=this.options;
if(b.inArray(c,d.disabled)==-1){return
}this.lis.eq(c).removeClass("ui-state-disabled");
d.disabled=b.grep(d.disabled,function(f,e){return f!=c
});
this._trigger("enable",null,this._ui(this.anchors[c],this.panels[c]))
},disable:function(d){var c=this,e=this.options;
if(d!=e.selected){this.lis.eq(d).addClass("ui-state-disabled");
e.disabled.push(d);
e.disabled.sort();
this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))
}},select:function(c){if(typeof c=="string"){c=this.anchors.index(this.anchors.filter("[href$="+c+"]"))
}else{if(c===null){c=-1
}}if(c==-1&&this.options.collapsible){c=this.options.selected
}this.anchors.eq(c).trigger(this.options.event+".tabs")
},load:function(f){var d=this,h=this.options,c=this.anchors.eq(f)[0],e=b.data(c,"load.tabs");
this.abort();
if(!e||this.element.queue("tabs").length!==0&&b.data(c,"cache.tabs")){this.element.dequeue("tabs");
return
}this.lis.eq(f).addClass("ui-state-processing");
if(h.spinner){var g=b("span",c);
g.data("label.tabs",g.html()).html(h.spinner)
}this.xhr=b.ajax(b.extend({},h.ajaxOptions,{url:e,success:function(j,i){b(d._sanitizeSelector(c.hash)).html(j);
d._cleanup();
if(h.cache){b.data(c,"cache.tabs",true)
}d._trigger("load",null,d._ui(d.anchors[f],d.panels[f]));
try{h.ajaxOptions.success(j,i)
}catch(k){}d.element.dequeue("tabs")
}}))
},abort:function(){this.element.queue([]);
this.panels.stop(false,true);
if(this.xhr){this.xhr.abort();
delete this.xhr
}this._cleanup()
},url:function(d,c){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",c)
},length:function(){return this.anchors.length
}});
b.extend(b.ui.tabs,{version:"1.7.1",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});
b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(e,g){var c=this,h=this.options;
var d=c._rotate||(c._rotate=function(i){clearTimeout(c.rotation);
c.rotation=setTimeout(function(){var j=h.selected;
c.select(++j<c.anchors.length?j:0)
},e);
if(i){i.stopPropagation()
}});
var f=c._unrotate||(c._unrotate=!g?function(i){if(i.clientX){c.rotate(null)
}}:function(i){t=h.selected;
d()
});
if(e){this.element.bind("tabsshow",d);
this.anchors.bind(h.event+".tabs",f);
d()
}else{clearTimeout(c.rotation);
this.element.unbind("tabsshow",d);
this.anchors.unbind(h.event+".tabs",f);
delete this._rotate;
delete this._unrotate
}}})
})(jQuery);
jQuery.noConflict();
try{_d.execCommand("BackgroundImageCache",false,true)
}catch(err){}window.ESPN_refresh_stop=function(){if(typeof ESPN_refresh!=="undefined"){clearTimeout(ESPN_refresh)
}};
window.ESPN_refresh_start=function(){ESPN_refresh=window.setTimeout(function(){window.location.href=window.location.href
},900000)
};
window.debug=(function(){var y=this,w=Array.prototype.slice,z=y.console,r={},v,u,q=9,x=["error","warn","info","debug","log"],n="assert clear count dir dirxml group groupEnd profile profileEnd time timeEnd trace".split(" "),p=n.length,A=[];
while(--p>=0){(function(b){r[b]=function(){q!==0&&z&&z[b]&&z[b].apply(z,arguments)
}
})(n[p])
}p=x.length;
while(--p>=0){(function(c,b){r[b]=function(){var d=w.call(arguments),e=[b].concat(d);
A.push(e);
s(e);
if(!z||!o(c)){return
}z.firebug?z[b].apply(y,d):z[b]?z[b](d):z.log(d)
}
})(p,x[p])
}function s(b){if(v&&(u||!z||!z.log)){v.apply(y,b)
}}r.setLevel=function(b){q=typeof b==="number"?b:9
};
function o(b){return q>0?q>b:x.length+q<=b
}r.setCallback=function(){var c=w.call(arguments),d=A.length,b=d;
v=c.shift()||null;
u=typeof c[0]==="boolean"?c.shift():false;
b-=typeof c[0]==="number"?c.shift():d;
while(b<d){s(A[b++])
}};
return r
})();
function newWin(e){var c="newWin",d="width=800,height=525,resizable=yes,scrollbars=yes,location=yes,status=yes,toolbar=yes,menubar=yes,directories=yes",f,b=window;
if(e.indexOf("http")<0){e="http://games.espn.go.com"+e
}if(!f||f.closed){f=b.open(e,c,d)
}else{f.focus();
f=b.open(e,c,d)
}}String.prototype.namespace=function(e){var c=this.split(e||"."),d=window,b;
for(b=0;
b<c.length;
b++){d=d[c[b]]=d[c[b]]||{}
}};
String.prototype.repeat=function(b){return new Array(b+1).join(this)
};
String.prototype.escapeSingleQuotes=function(){return this.replace("'","\\'")
};
String.prototype.escapeDoubleQuotes=function(){return this.replace('"','\\"')
};
"espn.core".namespace();
espn.core.secure=!!("https:"===document.location.protocol);
espn.core.asset_path=espn.core.secure?"https://a248.e.akamai.net/f/12/621/5m/proxy.espn.go.com/prod/":"http://a.espncdn.com/prod/";
espn.core.combiner_path=espn.core.secure?"https://a248.e.akamai.net/f/12/621/5m/proxy.espn.go.com/combiner/c/":"http://a.espncdn.com/combiner/c/";
espn.core.jquery_ui_path=espn.core.asset_path+"scripts/ui/1.7.1/minified/";
espn.core.benchmark=function(e,b,c){b+=1;
var f=+new Date(),d;
while(--b){e.call(this)
}d=+new Date();
if(window.console&&window.console.log){window.console.log(c,d-f)
}else{alert(c+" "+d-f)
}};
espn.core.loggedIn=false;
(function(e){var d,c,b={};
e.publish=function(g,f){if(!b[g]){b[g]=[]
}c=b[g].length;
while(--c>=0){b[g][c].apply(this,f||[])
}};
e.subscribe=function(f,g){if(!b[f]){b[f]=[]
}b[f].push(g);
return[f,g]
};
e.unsubscribe=function(f){d=f[0];
c=b[d].length;
while(--c>=0){if(b[d][c]==f[1]){b[d].splice(c,1)
}}}
})(jQuery);
(function(b){b.getScriptCache=function(c,d){b.ajax({url:c,cache:true,success:d,type:"GET",dataType:"script"})
}
})(jQuery);
(function($){var global=this,window=this,b,_d=document,videocom,UNDEF="undefined",asset_path=("https:"===_d.location.protocol)?"https://a248.e.akamai.net/f/12/621/5m/proxy.espn.go.com/prod/":"http://a.espncdn.com/prod/",activeNav=null,nextNav=null,navCloseTimer=null,script_loaded=[],videoPlayer={},studioAdPlayer={},SWID="",loggedIn=false,findAccordions,getMyESPNData,VIDEO_STATE,videoControls,setupVideoPlayer,initFlashSubHeader,trackButtonClicks,bodyClass,initCarousels,currentDate=new Date(),dayNamesLong=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesMedium=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesShort=["Su","Mo","Tu","We","Th","Fr","Sa"],monthNamesLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],getFullYear="getFullYear",getMonth="getMonth",getDate="getDate",getDay="getDay",prevDate=function(d){return new Date(d[getFullYear](),d[getMonth](),d[getDate]()-1)
},nextDate=function(d){return new Date(d[getFullYear](),d[getMonth](),d[getDate]()+1)
},prevMonth=function(d,i){return new Date(d[getFullYear](),d[getMonth]()-(i||1),1)
},nextMonth=function(d,i){return new Date(d[getFullYear](),d[getMonth]()+(i||1),1)
},prevYear=function(d){return new Date(d[getFullYear]()-1,d[getMonth](),d[getDate]())
},nextYear=function(d){return new Date(d[getFullYear]()+1,d[getMonth](),d[getDate]())
},firstDay=function(m,y){return new Date(y,m,1)[getDay]()
},lastDay=function(m,y){return new Date(y,m,0)[getDay]()
},lastDate=function(m,y){return new Date(y,m,0)[getDate]()
},daysInMonth=function(m,y){return new Date(y,m+1,0)[getDate]()
},formatDate=function(d){d=d+"";
if(d.length<2){d="0"+d
}return d
},formatMonth=function(m){m++;
m=m+"";
if(m.length<2){m="0"+m
}return m
},dateToURIString=function(d){return d[getFullYear]()+formatMonth(d[getMonth]())+formatDate(d[getDate]())
},dayNameRow=$('<tr class="cal-day-names" />'),buildCalendar,drawCalendar,getMyHeadlinesOptions,getMyHeadlines,initMyHeadlines,initMyFaves,tabControl,initNav,initTabs,initAccordion,init,i,userABValue,userABCookie,espn360,play360video,espn360player,current360MediaId=0,espn360BeingCreated=null,espn360initialized=false,espn360PlayerActive=false,vidPlayer,getSportId,isSport;
$.ajaxSetup({data:{xhr:1},cache:true});
"espn.sport".namespace();
espn.sport.id=function(){var ac=arguments.callee,sportId="sportId";
if(!ac[sportId]){ac[sportId]=$("body").metadata()[sportId]
}return ac[sportId]
};
espn.sport.is=function(id){var sportId=espn.sport.id(),idType=typeof sportId;
if(idType==="number"||idType==="string"){return +id===+sportId
}else{return jQuery.inArray(id,sportId)>-1
}};
initAccordion=function(el){findAccordions(el)
};
findAccordions=function(el){var a=(el)?$(el):$("div.mod-accordion").not(".ui-accordion"),ac="active",activate=function(e){$(e.target).parent().siblings("a.active").removeClass(ac).end().end().addClass(ac)
},stylize=function(event,ui){ui.newHeader.addClass(ac);
ui.newContent.addClass(ac);
ui.oldHeader.removeClass(ac);
ui.oldContent.removeClass(ac)
};
if(a.length){a.each(function(){$("div.mod-sub-accordion").accordion({header:"a.mod-sub-accordion-trigger",active:".active",autoHeight:false,fillSpace:false}).bind("accordionchange",function(event,ui){stylize(event,ui)
});
$("a.mod-sub-accordion-trigger").click(function(e){activate(e)
})
});
a.accordion({header:"a.mod-accordion-trigger",active:".active",autoHeight:false,fillSpace:false}).bind("accordionchange",function(event,ui){stylize(event,ui)
});
$("a.mod-accordion-trigger").click(function(e){activate(e)
})
}};
initNav=function(){var $nav=$("#nav-wrapper"),items;
if(!!$nav.data("initialized")){return
}if(!!$nav.length){$nav.espnNav({trigger:"mouseover",timeout:500});
if($.browser.msie&&$.browser.version<7){items=$("div.nav-empire-inner ul li");
items.each(function(i){var item=$(this);
if(item.hasClass("endcap")||item.hasClass("last")){return
}item.addClass("piped");
item.after('<li class="pipe"><a href="#">&nbsp;</a></li>')
})
}$(".expandable",$nav).each(function(){$(this).expandable()
});
$nav.data("initialized",true)
}};
$.onContentReady("nav-wrapper",function(){initNav()
});
$.onAvailable("section-title",function(){setTimeout(function(){if(window.flashObj||window.swfobject){initFlashSubHeader($("#section-title"))
}else{setTimeout(arguments.callee,20)
}},10)
});
$.onAvailable("sub-section-title",function(){setTimeout(function(){if(window.flashObj||window.swfobject){initFlashSubHeader($("#sub-section-title"))
}else{setTimeout(arguments.callee,20)
}},10)
});
$.onContentReady("top-stories",function(){initTabs($("#top-stories").find(".mod-tabs .mod-header"))
});
$.onContentReady("searchString",function(){var searchBox=$("#searchString");
if(searchBox.length>0){if(window.Jiffy){Jiffy.mark("initSearchBox")
}searchBox.bind("focus",function(){if(script_loaded.autocomplete){return false
}script_loaded.autocomplete=true;
$.getScript(asset_path+"scripts/plugins/jquery.autocomplete.min.js",function(){if(window.Jiffy){Jiffy.mark("initSearchBoxJS")
}searchBox.autocomplete("/lib/displayAutoCompleteMatches",{minChars:3,cacheLength:20,selectFirst:false,scroll:true,scrollHeight:200,formatItem:function(item,num,c,d){return eval("("+item+")").name
},formatResult:function(item,num,c,d){return eval("("+item+")").name
}}).bind("result",function(event,data,formatted){searchBox.parents("form").get(0).submit()
}).trigger("focus");
if(window.Jiffy){Jiffy.measure("initSearchBoxJSEnd","initSearchBoxJS")
}})
});
if(window.Jiffy){Jiffy.measure("initSearchBoxEnd","initSearchBox")
}}});
$.cookie=function(key,value,options){if(typeof value===UNDEF){regex=new RegExp("(^|;) ?"+key+"=([^;]+)(;|$)","g");
r=regex.exec(_d.cookie);
if(r!==null){return decodeURIComponent(r[2])
}return null
}var settings=$.extend({domain:null,path:"/",secure:window.location.protocol==="https:",expires:null},options),regex,r,date,expires,path=settings.path!==null?"; path="+settings.path:"",domain=settings.domain!==null?"; domain="+settings.domain:"",secure=settings.path===true?"; secure=":"";
if(settings.expires!==null&&(typeof settings.expires==="number"||settings.expires.toUTCString)){if(typeof settings.expires==="number"){date=new Date();
date.setTime(date.getTime()+(settings.expires*24*60*60*1000))
}else{date=settings.expires
}expires="; expires="+date.toUTCString()
}_d.cookie=[key,"=",encodeURIComponent(value),expires,path,domain,secure].join("");
return _d.cookie
};
global.getCookie=$.cookie;
global.setCookie=function(key,value,days){$.cookie(key,value,{expires:days})
};
global.deleteCookie=function(key){$.cookie(key,"",{expires:-1})
};
espn360=$.cookie("espn360");
SWID=$.cookie("SWID")||"";
espn.core.loggedIn=loggedIn=(SWID.charAt(0)==="{"&&SWID.charAt(SWID.length-1)==="}")||false;
userABCookie=$.cookie("userAB");
if(SWID!==""&&userABCookie===null){if(SWID.charAt(SWID.length-1)==="}"){userABValue=SWID.charAt(SWID.length-2)
}else{userABValue=SWID.charAt(SWID.length-1)
}$.cookie("userAB",userABValue,{domain:".espn.go.com",expires:7})
}global.MYESPN_ERROR_NOT_LOGGED_IN=401;
global.MYESPN_ERROR_NO_DATA=404;
global.MYESPN_ERROR_TIMEOUT=408;
$.myespn={init:function(callback){if(typeof global.MYESPN===UNDEF){if(typeof callback==="object"&&typeof callback.error==="function"){callback.error.call(this,global.MYESPN_ERROR_NOT_LOGGED_IN)
}}else{var cancel=0,i=setInterval(function(){if(global.MYESPN!==null){if(typeof callback==="object"&&typeof callback.success==="function"){callback.success.call(this,global.MYESPN)
}clearInterval(i)
}else{if(cancel>100){if(typeof callback==="object"&&typeof callback.error==="function"){callback.error.call(this,global.MYESPN_ERROR_TIMEOUT)
}clearInterval(i);
cancel=0
}cancel++
}},100)
}},reset:function(callback){window.name="";
global.MYESPN=undefined;
if(loggedIn===true){getMyESPNData(callback)
}}};
getMyESPNData=function(callback){$.ajax({url:"/composer/myespn",dataType:"json",cache:false,type:"GET",success:function(data,status){global.MYESPN=data;
global.MYESPN.expires=new Date().getTime()+(60*20*1000);
window.name=TEAencrypt(JSON.stringify(data),$.cookie("SWID"));
if(window.Jiffy){Jiffy.measure("getMyESPNDataSUCCESS","getMyESPNData")
}if(typeof callback==="object"){$.myespn.init(callback)
}},error:function(data,status){global.MYESPN=null;
if(window.Jiffy){Jiffy.measure("getMyESPNDataFAILURE","getMyESPNData")
}if(typeof callback==="object"){callback.error.call(this,global.MYESPN_ERROR_NO_DATA)
}}})
};
if(loggedIn===true){global.MYESPN=null;
if(window.name.length>0){try{if(window.Jiffy){Jiffy.mark("getMyESPNDataFromCache")
}global.MYESPN=JSON.parse(TEAdecrypt(window.name,$.cookie("SWID")));
if(typeof global.MYESPN!=="object"||global.MYESPN.expires<new Date().getTime()){getMyESPNData()
}else{if(window.Jiffy){Jiffy.measure("getMyESPNDataFromCacheCOMPLETE","getMyESPNDataFromCache")
}}}catch(e){getMyESPNData()
}}else{getMyESPNData()
}}global.gotosite=function(l){if(l!==null&&l!==""){location.href=l
}};
$.debug=debug.debug;
$.log=debug.log;
$.info=debug.info;
$.warn=debug.warn;
$.error=debug.error;
$.assert=debug.assert;
$.trace=debug.trace;
$.group=debug.group;
$.groupEnd=debug.groupEnd;
$.time=debug.time;
$.timeEnd=debug.timeEnd;
$.profile=debug.profile;
$.profileEnd=debug.profileEnd;
$.count=debug.count;
$.parseUri=function(str){var o=$.parseUri.options,m=o.parser[o.strictMode?"strict":"loose"].exec(str),uri={},i=14;
while(i--){uri[o.key[i]]=m[i]||""
}uri[o.q.name]={};
uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1){uri[o.q.name][$1]=$2
}});
return uri
};
$.parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
$.getConversation=function(){if(window.Jiffy){Jiffy.mark("getConversation")
}var container=$("#conversation-message-list"),data;
if(container.length===0){if(window.Jiffy){Jiffy.measure("getConversationAbort","getConversation")
}return false
}data=container.metadata();
contentId=data.id||null;
$.getJSON("http://mb.espn.go.com/dir-app/acx/activeContent.aspx?catList=Conversations&webtag=espnmb&fmt=json&type=talkback&contentID="+contentId+"&timeout=1&count=50&leaveHtml=true&scriptkey=_conversation&ÃƒÅ¸newestFirst=true&callbackParam=local&callback=?",function(json){var stuff_we_want,i,tot,plural,allcomments;
try{stuff_we_want=json.ContentElement.Forum[0].Folder[0].Discussion[0]
}catch(e){container.html('<li class="first alt alt-bg nocomments">There are currently no comments on this article.<br /></li>');
if(window.Jiffy){Jiffy.measure("getConversationError1","getConversation")
}return false
}i=0;
tot=parseInt(stuff_we_want["@messageCount"]);
plural="";
allcomments="";
$("#conversation-header .link-to-story").attr("href",stuff_we_want["@contentURL"]);
if(tot>1){plural="s"
}if(tot>10){allcomments="all "
}$("#comments-on_story").text("See "+allcomments+tot+" comment"+plural);
$.getJSON("http://mb.espn.go.com/dir-app/acx/activeContent.aspx?catList=Conversations&webtag=espnmb&type=featuredmsgs&fmt=json&contentID="+contentId+"&timeout=1&count=50&leaveHtml=true&scriptkey=_conversation&ÃƒÅ¸newestFirst=true&callbackParam=local&callback=?",function(json_again){var stuff_we_want_again;
try{stuff_we_want_again=json_again.ContentElement.Forum[0].Folder[0].Discussion[0]
}catch(e){if(window.Jiffy){Jiffy.measure("getConversationError2","getConversation")
}return false
}container.html($.map(stuff_we_want_again.Message,function(message){return' 					<li class="'+(i++%2==0?"alt alt-bg":"")+'"> 						<img onerror="this.src=\'http://assets.espn.go.com/i/profile/default/silo1_guy_35x48.jpg\'; this.onerror=null;" src="http://avatars.espn.go.com/avatars/'+message["@fromScreenName"].toLowerCase()+"/48/"+message["@fromScreenName"].toLowerCase()+'.jpg" alt="'+message["@fromScreenName"]+'"/> 						<div class="mod-conversation-header"> 							<div class="mod-conversation-postedby"> 								<a href="http://sportsnation.espn.go.com/fans/'+message["@fromScreenName"]+'">'+message["@fromScreenName"]+'</a> says: 							</div> 							<div class="mod-conversation-actions"></div> 							<div class="datetime">'+(monthNamesLong[message["@datePosted"].getMonth()])+" "+message["@datePosted"].getDate()+", "+message["@datePosted"].getFullYear()+", "+(message["@datePosted"].getHours()>12?(message["@datePosted"].getHours()-12):message["@datePosted"].getHours())+":"+message["@datePosted"].getMinutes()+" "+(message["@datePosted"].getHours()>12?"PM":"AM")+' ET</div> 						</div> 						<div class="mod-conversation-detail">'+message["@messageText"]+"</div> 					</li>"
}).join(""))
})
});
if(window.Jiffy){Jiffy.measure("getConversationDone","getConversation");
Jiffy.measure("getConversationDone")
}};
studioAdPlayer={initialized:false,playing:false,infoDisplayed:false,timeout:null,counter:0,playerType:"fpp09",hide:function(){$("#top-stories .mod-carousel, #top-stories .mod-header ul").addClass("video-takeover-hide");
$("#top-stories .mod-tabs div.ui-tabs-panel, #top-stories .mod-content, #top-stories .mod-header").addClass("video-takeover-coverup")
},show:function(){$("#top-stories .mod-carousel, #top-stories .mod-header ul").removeClass("video-takeover-hide");
$("#top-stories .mod-tabs div.ui-tabs-panel, #top-stories .mod-content, #top-stories .mod-header").removeClass("video-takeover-coverup");
$("#top-stories .ui-tabs-panel").not(".ui-tabs-hide").find(".mod-carousel ul").trigger("studioAdComplete");
$("#top-stories .videoplayer").removeClass("video-takeover-player").find("p").remove()
},info:function(){$("#top-stories .videoplayer").addClass("video-takeover-player").prepend("<p><span>"+window.adVideoTitle+'</span> <a href="javascript:closeStudioAd()">Close</a></p>')
},context:"/studioad/homepage/null/null/",play:function(context){if(context!==null&&context!=="null"&&context!==UNDEF){studioAdPlayer.context=context
}if(studioAdPlayer.playing===true){return
}if(studioAdPlayer.initialized===false){studioAdPlayer.initialized=true;
studioAdPlayer.hide();
$.playVideo(null,{playerType:studioAdPlayer.playerType},true)
}if(videoControls._init_complete!==true){if(++studioAdPlayer.counter>250){clearTimeout(studioAdPlayer.timeout)
}else{studioAdPlayer.timeout=setTimeout(function(){studioAdPlayer.play(context)
},20)
}return
}else{if(studioAdPlayer.infoDisplayed===false){studioAdPlayer.infoDisplayed=true;
studioAdPlayer.info();
videocom.mpfVideoHideEndcard();
videocom.mpfVideoInsertAd(studioAdPlayer.context)
}}},stop:function(){studioAdPlayer.playing=false;
studioAdPlayer.initialized=false;
studioAdPlayer.counter=0;
studioAdPlayer.infoDisplayed=false;
clearTimeout(studioAdPlayer.timeout);
studioAdPlayer.show()
}};
global.playStudioAd=studioAdPlayer.play;
global.closeStudioAd=studioAdPlayer.stop;
VIDEO_STATE={STOP:0,PLAY:1,PAUSE:3};
videoControls={adPlaying:false,videoPlaying:false,_init_complete:false,_isready:false,init:function(){videoControls._init_complete=true;
$.log("video: init")
},ready:function(){videoControls._isready=true;
$.log("video: ready")
},complete:function(){$.log("video: complete")
},playlistEnded:function(){setTimeout(function(){var adCheck=setInterval(function(){if(!videoControls.adPlaying){clearInterval(adCheck);
if(jQuery(".mod-inline.video-player").length>0){jQuery(".mod-video-playlist ul").trigger("videoComplete")
}else{jQuery("#top-stories").find(".ui-tabs-panel").not(".ui-tabs-hide").find(".mod-carousel ul").trigger("videoComplete")
}}},100)
},100)
},adStart:function(){$.log("video: ad start");
videoControls.adPlaying=true;
$.videoPlayer().find(".breaking-news").hide();
$.videoPlayer().find(".top-story-headline").hide();
if(studioAdPlayer.initialized===true){studioAdPlayer.playing=true
}},adEnd:function(){$.log("video: ad end");
videoControls.adPlaying=false;
if(studioAdPlayer.playing===true){studioAdPlayer.stop()
}},onMenuOn:function(){$.log("video: Menu show");
$.videoPlayer().find(".breaking-news").hide();
$.videoPlayer().find(".top-story-headline").hide()
},onMenuOff:function(){$.log("video: Menu hide");
$.videoPlayer().find(".breaking-news").show();
$.videoPlayer().find(".top-story-headline").show()
},onPlay:function(){$.log("video: play");
$.videoPlayer().find(".breaking-news").show();
$.videoPlayer().find(".top-story-headline").show();
setTimeout(function(){$.videoPlayer().find(".breaking-news").hide();
$.videoPlayer().find(".top-story-headline").hide()
},3000)
},onPause:function(){$.log("video: pause");
a=jQuery("#top-stories .ui-tabs-panel").not(".ui-tabs-hide").find("li.active div a").attr("href");
videoId=$.parseUri(a).queryKey.id||null;
if(videoId==null||videoId=="null"){videoId=$.parseUri(a).queryKey.mId||null
}if(!(videoControls.adPlaying)){$.videoPlayer().find(".breaking-news").show();
$.videoPlayer().find(".top-story-headline").show()
}},enableAutoStart:function(){$.log("video: enable auto start");
var _i=new Image();
_i.src="http://espn.go.com/personalization/setVideoAutoStart?vasPref=1&_="+new Date().getTime();
setTimeout(function(){$.myespn.reset()
},1000)
},disableAutoStart:function(){$.log("video: disable auto start");
var _i=new Image();
_i.src="http://espn.go.com/personalization/setVideoAutoStart?vasPref=2&_="+new Date().getTime();
setTimeout(function(){$.myespn.reset()
},1000)
}};
"espn.espn360.player".namespace();
espn.espn360.player.object=function(){if(!arguments.callee._playercached){arguments.callee._playercached=$("#espn360Player").get(0)
}return arguments.callee._playercached
};
espn.espn360.player.container=function(){if(!arguments.callee._containercached){arguments.callee._containercached=$("div.espn360Player")
}return arguments.callee._containercached
};
espn.espn360.player.init=function(){espn360initialized=true;
ESPN_refresh_stop();
$.publish("espn.espn360.init")
};
espn.espn360.player.fullscreen=function(){$.log("going full screen");
var answer=confirm("Controls are disabled in Full Screen mode. Press ESC to exit Full Screen");
(answer)?espn.espn360.player.object().goFullScreen():espn.espn360.player.object().cancelFullScreen()
};
espn.espn360.player.popoff=function(mediaId,position){$.log(mediaId,position);
window.open("http://espn.go.com/broadband/espn360/lite/index?mediaId="+mediaId+"&position="+position,"m360Window","resize=yes,status=0,top=0,left=0,width=840,height=730,directories=no")
};
"espn.espn360.player.overlay".namespace();
espn.espn360.player.overlay.safe=function(){$.log("360 overlay safe");
$.unsubscribe(espn.espn360.player.overlay.handle)
};
espn.espn360.player.overlay.unsafe=function(){$.log("360 overlay unsafe");
$.log("subscribing to espn.nav.open");
espn.espn360.player.overlay.handle=$.subscribe("espn.nav.open",function(){$.log("pausing 360 player from nav object");
espn.espn360.player.object().pauseEvent()
})
};
espn.espn360.player.getThumbnail=function(){return $("#mod-tab-content-top-stories").not(".ui-tabs-hide").find(".top-story-image img:visible").attr("src")||""
};
espn.espn360.player.onPlay=function(){};
espn.espn360.player.onPause=function(){};
var espn360Config={container:null,player:null,config:"http://espn.go.com/broadband/espn360/syndicated/config",src:"http://espn.go.com/broadband/espn360/syndicated/player.swf"};
play360video=function(mediaId,userInitiated){window.open("http://espn.go.com/broadband/espn360/lite/index?mediaId="+mediaId,"m360Window","resize=yes,status=0,top=0,left=0,width=840,height=730,directories=no")
};
$("a[rel=js-espn360]").live("click",function(e){$.log("clicked on 360 live event");
var mediaId=$.parseUri($(this).attr("href")).queryKey.id||null;
play360video(mediaId,true);
return false
});
setupVideoPlayer=function(playerType,videoSettings,videoContainer,userInitiated){if(window.Jiffy){Jiffy.mark("setupVideoPlayer")
}var autostart=videoSettings.autostart.toString(),params,attributes,createPlayer,thumbnailParam="",pageNameParam="",localSiteParam="";
$.videoPlayer().find(".top-story-headline").hide();
$.videoPlayer().find(".breaking-news").hide();
if(videoSettings.autostart==="true"||videoSettings.autostart===true){autostart=true
}if(videoPlayer[playerType].thumbnail!==null&&videoPlayer[playerType].thumbnail!==UNDEF){thumbnailParam="&thumbnail="+videoPlayer[playerType].thumbnail
}if(videoSettings.localSite!==null&&videoSettings.localSite!==UNDEF){localSiteParam="&localSite="+videoSettings.localSite
}if(videoSettings.pageName!==null&&videoSettings.pageName!==UNDEF){pageNameParam="&pageName="+videoSettings.pageName
}if(videoSettings.studioAd){$.extend(studioAdPlayer,videoSettings.studioAd);
$.extend(studioAdPlayer,{playerType:playerType})
}params={flashVars:"adminOver="+videoSettings.adminOver+"&player="+videoSettings.playerType+"&height="+videoSettings.height+"&width="+videoSettings.width+"&autostart="+autostart.toString()+thumbnailParam+pageNameParam+localSiteParam,bgcolor:"#000000",wmode:"transparent",allowscriptaccess:"always",quality:"autohigh",align:"t",swliveconnect:"true",menu:"false",play:userInitiated||autostart.toString(),allowfullscreen:"true",seamlesstabbing:"true"};
attributes={data:videoSettings.src+"?id="+videoPlayer[playerType].currentVideoID+"&autostart="+autostart.toString()+"&playerType="+videoSettings.playerType+thumbnailParam+pageNameParam+localSiteParam,height:videoSettings.height,width:videoSettings.width,id:"videoPlayer"};
createPlayer=function(){var tsHeadline=jQuery(".videoplayer").find(".top-story-headline"),tsBreakingNews=jQuery(".videoplayer").find(".breaking-news");
videoContainer.html($("<div/>").attr("id","videoPlayer"));
videoPlayer[playerType].obj=swfobject.createSWF(attributes,params,"videoPlayer");
var videoId=videoPlayer[playerType].currentVideoID,top=videoPlayer[playerType].top,credit=videoPlayer[playerType].credit,track=videoPlayer[playerType].track;
if(userInitiated==="true"||userInitiated===true){try{var videoReadyCheck=setInterval(function(){if(videoControls._isready===true){clearInterval(videoReadyCheck);
videocom.mpfVideoPlay();
videoPlayer.state=VIDEO_STATE.PLAY
}},100)
}catch(error){}}if(tsHeadline.length<=0){$.ajax({url:"/video/overlay?id="+top+"&credit="+credit+"&track="+track,dataType:"html",cache:true,success:function(data,status){$.videoPlayer().append(data).find(".top-story-headline").hide();
$.videoPlayer().find(".breaking-news").hide()
}})
}else{$.videoPlayer().append(tsBreakingNews.show());
$.videoPlayer().append(tsHeadline.show())
}};
createPlayer();
if(window.Jiffy){Jiffy.measure("setupVideoPlayerDone","setupVideoPlayer");
Jiffy.measure("setupVideoPlayer","ESPN_PageStart")
}return true
};
$.videoPlayer=function(){if(vidPlayer===null||vidPlayer===undefined){vidPlayer=$("div.videoplayer")
}return vidPlayer
};
$.playVideo=function(id,data,userInitiated){if(typeof ESPN_GLOBALS===UNDEF){setTimeout(function(){$.playVideo(id,data,userInitiated)
},10);
return false
}if(typeof arguments.callee.userInitiated===UNDEF){arguments.callee.userInitiated=userInitiated||false
}if(window.Jiffy){Jiffy.mark("playVideoStart")
}var playerType=data.playerType,thumbnail=data.thumbnail||null,videoSettings=ESPN_GLOBALS.videoPlayers[playerType]||null,videoContainer=$(".videoplayer-"+playerType),autostart=parseInt(videoSettings.autostart)||0,top=data.top,credit=data.credit||null,track=data.track||null;
if(typeof global.MYESPN!==UNDEF&&typeof global.MYESPN.mySettings!==UNDEF&&global.MYESPN!==null){autostart=global.MYESPN.mySettings.videoAutoStart||autostart
}autostart=$.cookie("VAS")||autostart;
switch(parseInt(autostart)){case 1:videoSettings.autostart=true;
break;
case 2:videoSettings.autostart=false;
break
}if(videoContainer.length===0||videoSettings===null){if(window.Jiffy){Jiffy.measure("playVideoNoContainer","playVideoStart")
}return false
}if(typeof videoPlayer[playerType]===UNDEF){videoPlayer[playerType]={currentVideoID:id,container:null,carousel:false,obj:null,playerType:playerType,thumbnail:thumbnail,top:top,credit:credit,track:track};
videoPlayer.state=VIDEO_STATE.STOP;
videoPlayer[playerType].carousel=videoContainer.parents("#top-stories").length>0
}if(!script_loaded.swfobject){script_loaded.swfobject=true;
$.getScript("http://a.espncdn.com/broadband/design09/js/swfobject.js",function(){if(swfobject.hasFlashPlayerVersion("9.0.45")){global.onCommandsLoaded=function(){videocom=window.com.espn.utils.PlayerCommands;
videocom.registerObserver("video_complete",videocom.VIDEO_COMPLETE,videoControls.complete);
videocom.registerObserver("video_playlist_finished",videocom.VIDEO_PLAYLIST_ENDED,videoControls.playlistEnded);
videocom.registerObserver("video_player_ready",videocom.VIDEO_PLAYER_READY,videoControls.ready);
videocom.registerObserver("video_ad_start",videocom.AD_START,videoControls.adStart);
videocom.registerObserver("video_ad_complete",videocom.AD_COMPLETE,videoControls.adEnd);
videocom.registerObserver("enable_autostart",videocom.ENABLE_AUTOSTART,videoControls.enableAutoStart);
videocom.registerObserver("disable_autostart",videocom.DISABLE_AUTOSTART,videoControls.disableAutoStart);
videocom.registerObserver("init_complete",videocom.INIT_COMPLETE,videoControls.init);
videocom.registerObserver("video_play",videocom.VIDEO_PLAY,videoControls.onPlay);
videocom.registerObserver("video_pause",videocom.VIDEO_PAUSE,videoControls.onPause);
videocom.registerObserver("video_menu_on",videocom.WIDGET_ON,videoControls.onMenuOn);
videocom.registerObserver("video_menu_off",videocom.WIDGET_OFF,videoControls.onMenuOff);
if(typeof moreObservers=="function"){moreObservers(videocom)
}};
if(videoContainer.data("init")!==true){videoContainer.data("init",setupVideoPlayer(playerType,videoSettings,videoContainer,userInitiated))
}if(window.Jiffy){Jiffy.measure("playVideoSWFObjectLoaded","playVideoStart")
}}$.playVideo(id,data,arguments.callee.userInitiated)
});
if(window.Jiffy){Jiffy.measure("playVideoBeRightBack","playVideoStart")
}}else{if(videoPlayer[playerType].carousel===true){$("#top-stories").find(".ui-tabs-panel").not(".ui-tabs-hide").find(".top-story-content").hide().end().end().end().find(".espn360Player-show").removeClass("espn360Player-show");
videoContainer.addClass("videoplayer-show");
try{espn360Config.player.pauseEvent()
}catch(e){}}try{if(videoPlayer[playerType].currentVideoID===id){videocom.mpfVideoPlay()
}else{$.videoPlayer().find(".breaking-news").remove();
$.videoPlayer().find(".top-story-headline").remove();
if(top!=null&&top!="null"){$.ajax({url:"/video/overlay?id="+top+"&credit="+credit+"&track="+track,dataType:"html",cache:true,success:function(data,status){$.videoPlayer().append(data).find(".top-story-headline").hide();
$.videoPlayer().find(".breaking-news").hide()
}})
}videocom.mpfVideoSwitchMedia(id);
videoPlayer.state=VIDEO_STATE.PLAY;
videoPlayer[playerType].currentVideoID=id
}}catch(error){}if(window.Jiffy){Jiffy.measure("playVideoDone","playVideoStart")
}}};
$.loadGenericVideo=function(){var first=$("#videotoplay"),firstId;
if(first.length===0){return
}firstId=$.parseUri(first.attr("href")).queryKey.id||null;
if(firstId==null||firstId=="null"){firstId=$.parseUri(first.attr("href")).queryKey.mId||null
}$(".videoplayer").addClass("videoplayer-show");
$.playVideo(firstId,first.metadata());
$("div.mod-video-playlist ul li").bind("click",function(){var li=$(this),info,videoId,a=li.children("a");
li.siblings().removeClass("active");
li.addClass("active");
info=a.siblings("span").html();
$("#videoInfo").html(info);
videoId=$.parseUri(a.attr("href")).queryKey.id||null;
if(videoId==null||videoId=="null"){videoId=$.parseUri(a.attr("href")).queryKey.mId||null
}$.playVideo(videoId,a.metadata());
return false
});
$(".mod-video-playlist ul").bind("videoComplete",function(){var target=$(this),a,info,videoId,topId=null,currentItem=target.find("li.active");
if(currentItem.next().length>0){a=currentItem.removeClass("active").next().addClass("active").find("a");
info=a.siblings("span").html();
$("#videoInfo").html(info);
videoId=$.parseUri(a.attr("href")).queryKey.id||null;
if(videoId==null||videoId=="null"){videoId=$.parseUri(a.attr("href")).queryKey.mId||null
}$.playVideo(videoId,a.metadata())
}else{try{setTimeout(function(){var adCheck=setInterval(function(){if(!videoControls.adPlaying){$.log("end of playlist");
clearInterval(adCheck);
videoPlayer.state=VIDEO_STATE.STOP;
topId=$.parseUri(currentItem.find("a").attr("href")).queryKey.topId;
if(topId===UNDEF||topId===null){videocom.mpfVideoShowEndcard()
}else{$.videoPlayer().find(".breaking-news").show();
$.videoPlayer().find(".top-story-headline").show()
}}},100)
},250)
}catch(error){}}})
};
$.fn.espnSelectRedirect=function(){return this.each(function(){$(this).bind("change",function(){var option=$(this).find("option").get(this.selectedIndex),href=option.value,data=$(option).metadata();
if(href!=="#"&&href!==""){if(typeof data.popup!==UNDEF){window.open(href,data.popup.name||"espnpop",data.popup.features||null)
}else{window.location.href=href
}}})
})
};
$.fn.expandable=function(options){var $this=$(this),$navWrapper=$("#nav-wrapper");
$this.hoverIntent({sensitivity:3,interval:100,timeout:500,over:function(){$(".expandable-hover",$navWrapper).find("div:first").hide().end().removeClass("expandable-hover");
try{activeNav[0].removeClass("hover");
activeNav[1].hide()
}catch(e){}var $div=$this.find("div:first"),dW=dOW=$div.outerWidth(),cW=0,pW=$div.parent().outerWidth(true),childCount=0,lP,cP,rP,POS,navOffset=$navWrapper.offset().left;
$div.css({left:"-9999em"}).show().children().each(function(){childCount++;
cW+=$(this).outerWidth(true)
});
dW=cW+1;
dOW=$div.outerWidth();
$this.addClass("expandable-hover");
lP=$div.parent().offset().left-navOffset;
cP=lP-(dOW/2)+(pW/2);
rP=lP-dOW+pW;
POS=childCount>1?cP:lP;
if(POS<navOffset){POS=lP
}else{if($navWrapper.width()<(POS+dOW)){POS=rP
}}$div.hide().css({width:dW+"px",height:$div.height()+"px",left:POS}).show()
},out:function(){$this.removeClass("expandable-hover");
$this.find("div:first").hide()
}});
return this
};
$.fn.espnNav=function(options){if(window.Jiffy){Jiffy.mark("MainNav")
}var settings=$.extend({position:"auto",trigger:"mouseover",timeout:500},options),$nav=$(this),id=$nav.attr("id")||"secondary",$menuItems=$nav.find("ul:first > li");
$menuItems.each(function(i){var $li=$(this),heightCheck,$d,tabWidth,w,tabContentWidth,centerPos,cW=0;
$li.attr("id",id+"-menu-items-"+i);
$d=$li.find("div:first");
tabWidth=$d.parent().outerWidth();
$d.children().each(function(){cW+=$(this).outerWidth()
});
tabContentWidth=tabWidth>cW?tabWidth:cW;
$d.width(tabContentWidth);
if(settings.trigger==="mouseover"){$li.hoverIntent({sensitivity:3,interval:100,timeout:settings.timeout,over:function(){$.publish("espn.nav.open");
$("li.expandable-hover").find("div:first").hide().end().removeClass("expandable-hover");
var $this=$(this),$ul,ul_w,ul_widths=0,ul_count=0;
try{activeNav[0].removeClass("hover");
activeNav[1].hide()
}catch(e){}activeNav=[$li,$d];
$li.addClass("hover");
if($this.data("init")!==true){$this.data("init",true);
$d.css({left:"-9999em",display:"block"});
$this.find("div > ul").each(function(){$ul=$(this);
ul_w=$ul.outerWidth();
$ul.css({overflow:"hidden",width:ul_w});
$ul.find("li").each(function(){var li=$(this),li_w=li.outerWidth();
if(li_w>ul_w){ul_w=li_w
}$(this).width("100%")
});
ul_widths+=ul_w;
$ul.width($ul.width())
});
if(settings.position==="auto"){$d.css({left:"auto",width:ul_widths,height:$this.find("div ul:first").height()})
}$d.hide()
}$d.show()
},out:function(){$.publish("espn.nav.closed");
$li.removeClass("hover");
$d.hide();
if(typeof anStopCount==="function"){anStopCount()
}}})
}});
if(window.Jiffy){Jiffy.measure("MainNav::COMPLETE","MainNav")
}return this
};
$.espnNavHide=function(){if(typeof activeNav==="string"&&activeNav!==null){$("#"+activeNav).find("div:first").hide().end().removeClass("hover").data("navTrack",false);
activeNav=null;
if(typeof anStopCount==="function"){anStopCount()
}}};
initFlashSubHeader=function(section){if(window.Jiffy){Jiffy.mark("initFlashSubheaderStart")
}var title,indexUrl,data,gh,flashvars,params,attributes;
if(section.length){title=section.find("span").html();
indexUrl=section.attr("href");
data=section.metadata();
if(window.flashObj){gh=new flashObj();
gh.flashFile=data.src||"swf/globalHeader_redesign.swf";
gh.flashVars="&title="+title+"&titlex="+(data.titlex||"")+"&titley="+(data.titley||"")+"&titleHeight="+(data.titleHeight||"")+"&renderLogo="+(data.renderLogo||"")+"&indexUrl="+(indexUrl||"")+"&logo1url="+(data.logo1url||"")+"&clicktag="+(data.clicktag||"")+"&logo1Align="+(data.logo1Align||"")+"&logo2url="+(data.logo2url||"")+"&clicktag2="+(data.clicktag2||"")+"&logo2Align="+(data.logo2Align||"")+"&header="+(data.header||"")+"&headerPadding="+(data.headerPadding||"")+"&section="+(data.section||"")+"&sectionUrl="+(data.sectionUrl||"")+"&sectionPadding="+(data.sectionPadding||"")+(data.adTag||"");
gh.width=data.width||"924";
gh.height=data.height||"45";
gh.scale=data.scale||"noScale";
gh.salign=data.salign||"lt";
gh.wmode=data.wmode||"opaque";
gh.DenyIEdl=data.DenyIEdl||"TRUE";
gh.allowScriptAccess=data.allowScriptAccess||"Always";
gh.allowNetworking=data.allowNetworking||"All";
gh.FlashVer=data.FlashVer||7;
gh.cabVersion=data.cabVersion||"7,0,19,0";
gh.altTxt=section.html();
gh.ID=data.id||"section-title";
section.replaceWith(gh.render())
}else{if(window.swfobject){flashvars=$.extend({title:title,indexUrl:indexUrl,titlex:(data.titlex||""),titley:(data.titley||""),titleHeight:(data.titleHeight||""),renderLogo:(data.renderLogo||""),logo1url:(data.logo1url||""),clicktag:(data.clicktag||""),logo1Align:(data.logo1Align||""),logo2url:(data.logo2url||""),clicktag2:(data.clicktag2||""),logo2Align:(data.logo2Align||""),header:(data.header||""),headerPadding:(data.headerPadding||""),section:(data.section||""),sectionUrl:(data.sectionUrl||""),sectionPadding:(data.sectionPadding||"")},$.parseUri("?ad="+data.adTag).queryKey);
params={scale:data.scale||"noScale",salign:data.salign||"lt",DenyIEdl:data.DenyIEdl||true,allowscriptaccess:data.allowScriptAccess||"Always",allownetworking:data.allowNetworking||"All",wmode:data.wmode,devicefont:false,menu:false};
attributes={};
swfobject.embedSWF(data.src||asset_path+"/swf/globalHeader_redesign.swf",data.id||"section-title",data.width||"924",data.height||"45",data.FlashVer||"7.0.0",false,flashvars,params,attributes)
}}}if(window.Jiffy){Jiffy.measure("initFlashSubheaderDone","initFlashSubheaderStart")
}};
"espn.core.track".namespace();
trackButtonClicks=function(e,type){if(typeof anTrackLink!=="function"){return
}var lpos,target,mod,lid,bId,lposrx,lidrx;
if(type==="carousel"){lpos="carousel";
target=$(e.target);
mod=":main:topstory";
lid,bId="rightarrow";
bodyClass=b.attr("class").replace(/\{[^{]*\}|[\W_]/g,"");
if(window.location.href==="http://espn.go.com/"||window.location.href==="http://espn.go.com/index"){lpos="fp"+lpos
}else{lpos=bodyClass+lpos
}if(target.parents("#glance").length>0){mod=":ataglance"
}else{if($("div.videoplayer-show","#top-stories").length>0){mod=":main:topvideos"
}}if(target.hasClass("jcarousel-prev")){bId="leftarrow"
}lpos+=mod;
lid="click:"+bId;
anTrackLink(target,"espn",lpos,lid)
}else{lposrx=/\=([A-Za-z-\+]+)&/;
lidrx=/\=([A-Za-z-\+]+)$/;
lpos=lposrx.exec(e.name)||[];
lid=lidrx.exec(e.name)||[];
if(lpos.length>1&&lid.length>1){anTrackLink(e,"espn",lpos[1],lid[1]+"+tab")
}}};
initCarousels=function(parent){if(window.Jiffy){Jiffy.mark("initCarouselsStart")
}$("div.mod-carousel",parent).not(".initialized").find("ul:first").each(function(){var c=$(this),data;
if(c.data("init")===true){return true
}c.data("init",true).find("li").hover(function(){$(this).addClass("hover")
},function(){$(this).removeClass("hover")
});
data=c.metadata();
if(window.Jiffy){Jiffy.mark("configCarousel")
}c.jcarousel({auto:data.auto||0,visible:data.visible||null,scroll:data.scroll||data.visible,start:data.first||1,size:data.size||c.find("li").length,animation:data.animation||1000,easing:"easeInOutCubic",buttonNextHTML:(data.buttons===false)?null:"<div></div>",buttonPrevHTML:(data.buttons===false)?null:"<div></div>",wrap:data.wrap||false,initCallback:function(carousel,state){var i,numToAdd=0;
if(window.Jiffy){Jiffy.mark("carouselInitCallbackStart")
}carousel.options.num_pages=Math.ceil(carousel.options.size/carousel.options.scroll);
numToAdd=(carousel.options.visible*carousel.options.num_pages)%carousel.options.size;
for(i=0;
i<numToAdd;
i++){carousel.add(++carousel.options.size,"")
}if(data.prev){$(data.prev).bind("click",function(e){trackButtonClicks(e,"carousel");
carousel.prev();
return false
})
}if(data.next){$(data.next).bind("click",function(e){trackButtonClicks(e,"carousel");
carousel.next();
return false
})
}var autoAdvanceTimer,cancelAutoAdvanceTimer=false,startAutoAdvance=function(){if(cancelAutoAdvanceTimer===true||typeof data.advance===UNDEF||data.advance<1){return true
}var currentItem=c.find("li.active"),a;
autoAdvanceTimer=setInterval(function(){if(carousel.container.parents(".ui-tabs-hide").length===0){if(currentItem.hasClass("last")){carousel.next()
}if(currentItem.next().length){a=currentItem.removeClass("active").next().addClass("active").find("a");
currentItem=currentItem.next()
}else{currentItem.removeClass("active");
currentItem=c.find("li:first").addClass("active");
a=currentItem.find("a")
}if(a.attr("rel")==="js-video"){var videoId=$.parseUri(a.attr("href")).queryKey.id||null;
if(videoId==null||videoId=="null"){videoId=$.parseUri(a.attr("href")).queryKey.mId||null
}$.playVideo(videoId,a.metadata(),false)
}else{c.trigger("click",[false]);
cancelAutoAdvanceTimer=false;
startAutoAdvance()
}}},data.advance*1000)
},stopAutoAdvance=function(){clearInterval(autoAdvanceTimer)
},cancelAutoAdvance=function(){cancelAutoAdvanceTimer=true;
stopAutoAdvance()
};
if(typeof data.advance!==UNDEF){carousel.startAuto(0);
startAutoAdvance()
}if($(".jcarousel-controls").length>0){$(".jcarousel-controls a").bind("click",function(){var self=$(this);
self.siblings().removeClass("active");
self.addClass("active");
carousel.scroll($.jcarousel.intval(self.attr("alt")));
return false
});
$(".jcarousel-controls > .prev").bind("click",function(){var a=$(".jcarousel-controls a.active");
if(parseInt(a.attr("alt"))===1){carousel.scroll($.jcarousel.intval(carousel.size()));
a.removeClass("active");
$(".jcarousel-controls a:last").addClass("active")
}else{carousel.prev();
a.removeClass("active").prev().addClass("active")
}return false
});
$(".jcarousel-controls > .next").bind("click",function(){var a=$(".jcarousel-controls a.active");
if(parseInt(a.attr("alt"))===carousel.size()){carousel.scroll($.jcarousel.intval(1));
a.removeClass("active");
$(".jcarousel-controls a:first").addClass("active")
}else{carousel.next();
a.removeClass("active").next().addClass("active")
}return false
})
}carousel.container.parents(".mod-carousel").addClass("initialized");
carousel.clip.hover(function(){stopAutoAdvance();
carousel.stopAuto()
},function(){startAutoAdvance();
carousel.startAuto()
});
carousel.list.click(function(){carousel.startAuto(0);
cancelAutoAdvance()
});
carousel.buttonNext.click(function(){carousel.startAuto(0);
cancelAutoAdvance()
});
carousel.buttonPrev.click(function(){carousel.startAuto(0);
cancelAutoAdvance()
});
c.bind("videoComplete",function(){var target=$(this),currentItem=target.find("li.active"),a,videoId,topId=null;
if(currentItem.next().length>0&&currentItem.next().find("a[rel=js-video]").length>0){if(currentItem.hasClass("last")){carousel.next()
}a=currentItem.removeClass("active").next().addClass("active").find("a");
if(a.attr("rel")==="js-video"){videoId=$.parseUri(a.attr("href")).queryKey.id||null;
if(videoId==null||videoId=="null"){videoId=$.parseUri(a.attr("href")).queryKey.mId||null
}$.playVideo(videoId,a.metadata())
}}else{try{setTimeout(function(){var adCheck=setInterval(function(){if(!videoControls.adPlaying){clearInterval(adCheck);
videoPlayer.state=VIDEO_STATE.STOP;
topId=$.parseUri(jQuery("#top-stories .ui-tabs-panel").not(".ui-tabs-hide").find("li.active div a").attr("href")).queryKey.topId||null;
if(topId!==undefined&&topId!=null){$.videoPlayer().find(".breaking-news").show();
$.videoPlayer().find(".top-story-headline").show()
}else{videocom.mpfVideoShowEndcard()
}}},100)
},250)
}catch(error){}}});
c.bind("studioAdComplete",function(){c.trigger("click")
});
if(window.Jiffy){Jiffy.measure("carouselInitCallbackEnd","carouselInitCallbackStart")
}setTimeout(function(){carousel.setup()
},100);
$.publish("espn.carousel.init",[carousel])
},itemLoadCallback:function(carousel,state){if(window.Jiffy){Jiffy.mark("carouselItemloadCallbackStart")
}var i,pageLink,p,scrollTo,page,prev,next,pagination=carousel.container.find(".jcarousel-item").removeClass("first").removeClass("last").end().find(".jcarousel-item-"+carousel.first).addClass("first").end().find(".jcarousel-item-"+carousel.last).addClass("last").end().parent().find(".pagination").find("a").unbind("click").end().empty();
carousel.options.cur_page=Math.ceil(carousel.last/carousel.options.scroll);
if(pagination.length>0&&carousel.options.num_pages>1){i=carousel.options.num_pages;
while(i--){page=i+1;
if(page==carousel.options.cur_page){pageLink=$('<a class="current" href="#'+page+'">&nbsp;</a>')
}else{pageLink=$('<a href="#'+page+'">&nbsp;</a>')
}pageLink.bind("click",function(){p=$(this).attr("href").substr($(this).attr("href").indexOf("#")+1)-1;
scrollTo=jQuery.jcarousel.intval(p*carousel.options.scroll+1);
carousel.scroll(scrollTo);
return false
});
pagination.prepend(pageLink)
}}else{$(carousel.buttonNext).css("visibility","hidden");
$(carousel.buttonPrev).css("visibility","hidden")
}if(carousel.options.wrap!=="both"){if(data.prev){prev=$(data.prev);
prev.removeClass("jcarousel-prev-disabled");
if(carousel.options.cur_page===1&&carousel.options.wrap!=="first"){prev.addClass("jcarousel-prev-disabled")
}}if(data.next){next=$(data.next);
next.removeClass("jcarousel-next-disabled");
if(carousel.options.cur_page===carousel.options.num_pages&&carousel.options.wrap!=="last"){next.addClass("jcarousel-next-disabled")
}}}if(window.Jiffy){Jiffy.measure("carouselItemloadCallbackEnd","carouselItemloadCallbackStart")
}$.publish("espn.carousel.load",[carousel])
},buttonNextCallback:function(carousel,el,flag){$.publish("espn.carousel.next",[carousel])
},buttonPrevCallback:function(carousel,el,flag){$.publish("espn.carousel.prev",[carousel])
}}).click(function(e,track){var target=$(e.target),a,hideVideo,headline,mod,index,lpos,lid,videoId,linkdata;
if(target.parents("a").length>0||target.find("li.active a").length>0){if(target.parents("a").length>0){a=target.parents("a")
}else{a=target.find("li.active a")
}hideVideo=false;
if(a.attr("href")!=="#"){if(a.attr("rel")==="js-video"){videoId=$.parseUri(a.attr("href")).queryKey.id||null;
if(videoId==null||videoId=="null"){videoId=$.parseUri(a.attr("href")).queryKey.mId||null
}linkdata=a.metadata();
linkdata.userAction=true;
$.playVideo(videoId,linkdata,true);
$.publish("espn.carousel.show.video",[c.list||c])
}else{if(a.attr("rel")==="js-espn360"){$.log("play ESPN 360 video");
videoId=$.parseUri(a.attr("href")).queryKey.id||null;
play360video(videoId,true);
$.publish("espn.carousel.show.espn360",[c.list||c])
}else{if(target.parents("#top-stories").length>0){hideVideo=true;
$.ajax({url:a.attr("href"),dataType:"html",cache:true,success:function(data,status){if(hideVideo===true){$.info("pausing video");
var videoPlayerPanel=$("div.videoplayer","#top-stories");
var espn360PlayerPanel=$("div.espn360Player","#top-stories");
try{espn.espn360.player.object().pauseEvent()
}catch(e){}try{videocom.mpfVideoPause();
videoPlayer.state=VIDEO_STATE.PAUSE
}catch(error){}videoPlayerPanel.removeClass("videoplayer-show");
espn360PlayerPanel.removeClass("espn360Player-show")
}target.parents("div.mod-carousel").siblings(".top-story-content").replaceWith(data);
$.publish("espn.carousel.show.story.load",[c.list||c])
}});
$.publish("espn.carousel.show.story",[c.list||c])
}}}}if(typeof anTrackLink==="function"&&track!==false){headline=$(a).find("h3").html()||"";
mod="topstory";
index=$(target.parents("ul")).find("li").index(target.parents("li"))+1;
if(headline.indexOf("<span>")>-1){headline=headline.substr(0,headline.indexOf("<span>"))+headline.substr(headline.indexOf("</span>")+7)
}headline=headline.replace(/\s+/g,"");
if($(".videoplayer-show").length>0){mod="topvideos"
}lpos="carousel:main:"+mod;
bodyClass=b.attr("class").replace(/\{[^{]*\}|[\W_]/g,"");
if(window.location.href==="http://espn.go.com/"||window.location.href==="http://espn.go.com/index"){lpos="fp"+lpos
}else{lpos=bodyClass+lpos
}lid="click:thumbnail"+index+":"+headline;
anTrackLink(window.location,"espn",lpos,lid)
}if(target.parents("#top-stories").length>0){target.parents("ul").find("li.active").removeClass("active");
target.parents("li").addClass("active");
return false
}}});
c.parents(".jcarousel-clip").siblings(".jcarousel-next").click(function(e){trackButtonClicks(e,"carousel")
}).end().siblings(".jcarousel-prev").click(function(e){trackButtonClicks(e,"carousel")
})
}).find("li.active:first a").each(function(){var a=$(this),videoId;
if(a.attr("rel")==="js-video"){videoId=$.parseUri(a.attr("href")).queryKey.id||null;
if(videoId==null||videoId=="null"){videoId=$.parseUri(a.attr("href")).queryKey.mId||null
}setTimeout(function(){$.playVideo(videoId,a.metadata());
$.publish("espn.carousel.show.video",[a.parents("ul")])
},100)
}else{if(a.attr("rel")==="js-espn360"){videoId=$.parseUri(a.attr("href")).queryKey.id||null;
play360video(videoId);
$.publish("espn.carousel.show.espn360",[a.parents("ul")])
}}});
if(window.Jiffy){Jiffy.measure("initCarouselsDone","initCarouselsStart")
}};
var dayNameRowHTML="";
for(i=0;
i<7;
i++){dayNameRowHTML+="<th>"+dayNamesShort[i]+"</th>"
}dayNameRow.append(dayNameRowHTML);
buildCalendar=function(dateObj,order){if(window.Jiffy){Jiffy.mark("buildCalendarStart")
}var sClass=(function(order){if(order===-1){return"prev"
}else{if(order===1){return"next"
}else{return"current"
}}})(order),calContainer=$('<div class="cal-container '+sClass+'"/>'),calGradient=$('<div class="gradient-container"/>'),calTable=$('<table class="cal-'+sClass+'"/>'),calTableHead=$("<thead/>"),calTableBody=$("<tbody/>"),prevLink="",nextLink="",f=firstDay(dateObj.getMonth(),dateObj.getFullYear()),firstDayDisplayed=false,lastDayDisplayed=false,w,dow,calTableWeekRow;
if(sClass==="prev"){prevLink='<a href="" class="prev">&nbsp;</a>'
}else{if(sClass==="next"){nextLink='<a href="" class="next">&nbsp;</a>'
}}calTableHead.append('<tr class="cal-month-name"><th colspan="7">'+prevLink+monthNamesLong[dateObj.getMonth()]+nextLink+"</th></tr>");
calTableHead.append(dayNameRow.clone());
calTable.append(calTableHead);
for(w=0;
w<6;
w++){calTableWeekRow=$('<tr class="week"/>');
for(dow=0;
dow<7;
dow++){if(dow===f){firstDayDisplayed=true
}if(firstDayDisplayed&&!lastDayDisplayed){calTableWeekRow.append('<td class="day"><a href="?date='+dateToURIString(dateObj)+'">'+dateObj.getDate()+"</a></td>")
}else{calTableWeekRow.append('<td class="day other"><a name="null">&nbsp;</a></td>')
}if(firstDayDisplayed){if(dateObj.getDate()===daysInMonth(dateObj.getMonth(),dateObj.getFullYear())){lastDayDisplayed=true
}dateObj=nextDate(dateObj)
}}calTableBody.append(calTableWeekRow)
}calTable.append(calTableBody);
calGradient.append(calTable);
calContainer.append(calGradient);
return calContainer;
if(window.Jiffy){Jiffy.measure("buildCalendarEnd","buildCalendarStart")
}};
drawCalendar=function(currentDate,trigger){if(window.Jiffy){Jiffy.mark("drawCalendarStart")
}var cm=new Date(currentDate.getFullYear(),currentDate.getMonth(),1),pm=prevMonth(currentDate),nm=nextMonth(currentDate),calContainer=$('<div class="cal-nav-container"/>'),monthsContainer=$('<div class="cal-months-container"/>');
$("div.cal-nav-container").remove();
calContainer.append('<div class="cal-nav-year"><span><a class="prev" href="">&nbsp;</a>'+currentDate.getFullYear()+'<a class="next" href="">&nbsp;</a></span></div>');
monthsContainer.append(buildCalendar(pm,-1));
monthsContainer.append(buildCalendar(cm,0));
monthsContainer.append(buildCalendar(nm,1));
calContainer.append(monthsContainer).bgiframe();
b.append(calContainer);
calContainer.width(monthsContainer.width());
calContainer.css({top:trigger.offset().top+trigger.height(),left:trigger.offset().left+(trigger.width()/2)-(calContainer.width()/2)});
calContainer.find("div.cal-nav-year a.prev").bind("click",function(){drawCalendar(prevYear(currentDate),trigger);
return false
});
calContainer.find("div.cal-nav-year a.next").bind("click",function(){drawCalendar(nextYear(currentDate),trigger);
return false
});
calContainer.find("div.cal-months-container a.prev").bind("click",function(){drawCalendar(prevMonth(currentDate,3),trigger);
return false
});
calContainer.find("div.cal-months-container a.next").bind("click",function(){drawCalendar(nextMonth(currentDate,3),trigger);
return false
});
if(window.Jiffy){Jiffy.measure("drawCalendarEnd","drawCalendarStart")
}};
$.fn.espnCalendarCarousel=function(){if(window.Jiffy){Jiffy.mark("espnCalendarCarouselStart")
}var el=$(this),container=el.get(0),ul=el.find("ul:first"),width=ul.width(),scrollArea=el.find("div.view"),scrollWidth=scrollArea.width()-1,lock=false,applyStyles=function(){scrollArea.find("li.current").not(".key").find("a").css({"border-width":"1px"}).end().prev().not(".key").find("a").css({"border-width":"1px 0px"});
scrollArea.find("li.current").not(".key").prev().find("a").css({"border-width":"2px 1px; 2px 1px;"});
scrollArea.find("li.key").prev().find("a").css({"border-right-color":"#ae2535"});
scrollArea.find("li.current.key").find("a").css({height:"58px","border-left-width":"2px"}).end().prev().find("a").css({"border-right-width":"0px"})
},scrollView=function(currentScroll,dir){var pos;
lock=true;
if(dir==="prev"){pos=currentScroll-scrollWidth
}else{if(dir==="next"){pos=currentScroll+scrollWidth
}}scrollArea.animate({scrollLeft:pos},500,function(){var day1=$("li.day1"),day7=$("li.day7"),d1=day1.metadata().date,firstDate=new Date(Date.parse(d1)),firstDateString=monthNamesLong[firstDate.getUTCMonth()]+" "+firstDate.getDate()+", "+firstDate.getUTCFullYear(),d7=day7.metadata().date,lastDate=new Date(Date.parse(d7)),lastDateString=monthNamesLong[lastDate.getUTCMonth()]+" "+lastDate.getDate()+", "+lastDate.getUTCFullYear();
$("#scoreboard-weeknav-day1").html(firstDateString);
$("#scoreboard-weeknav-day7").html(lastDateString);
lock=false
})
};
applyStyles();
el.find("a").hover(function(){$(this).addClass("hover")
},function(){$(this).removeClass("hover")
});
el.find("a.prev").click(function(){if(lock){return false
}var day1=el.find("li.day1").removeClass("day1"),day7=el.find("li.day7").removeClass("day7"),d=day1.metadata().date,firstDate=new Date(Date.parse(d)),prevDates=day1.prevAll(),currentScroll=scrollArea.get(0).scrollLeft,thisDate,i,dayClass;
if(prevDates.length===0){thisDate=prevDate(firstDate);
$.get("format/sbweek",$.extend($.parseUri(window.location).queryKey,{start:dateToURIString(thisDate),view:dateToURIString(new Date())}),function(d,s){ul.prepend(d);
ul.width(ul.width()+scrollWidth);
currentScroll=currentScroll+scrollWidth;
scrollArea.scrollLeft(currentScroll);
applyStyles();
scrollView(currentScroll,"prev")
},"html")
}else{day1.prev().addClass("day7");
$(day1.prevAll().get(6)).addClass("day1");
scrollView(currentScroll,"prev")
}return false
});
el.find("a.next").click(function(){if(lock){return false
}var day1=el.find("li.day1").removeClass("day1"),day7=el.find("li.day7").removeClass("day7"),d=day7.metadata().date,lastDate=new Date(Date.parse(d)),nextDates=day7.nextAll(),currentScroll=scrollArea.get(0).scrollLeft,thisDate;
if(nextDates.length===0){thisDate=nextDate(lastDate);
$.get("format/sbweek",$.extend($.parseUri(window.location).queryKey,{start:dateToURIString(thisDate),view:dateToURIString(new Date())}),function(d,s){ul.append(d);
ul.width(ul.width()+scrollWidth);
applyStyles();
scrollView(currentScroll,"next")
},"html")
}else{day7.next().addClass("day1");
$(day7.nextAll().get(6)).addClass("day7");
scrollView(currentScroll,"next")
}return false
});
if(window.Jiffy){Jiffy.measure("espnCalendarCarouselEnd","espnCalendarCarouselStart")
}return this
};
getMyHeadlinesOptions=function(){var sportMatrix,sportAbbrevMatrix,indexSportId,optionsList="";
sportMatrix=new Object();
sportMatrix[23]="NCAA Football";
sportMatrix[41]="NCAA Basketball";
sportMatrix[54]="Women's Basketball";
sportAbbrevMatrix=new Object();
sportAbbrevMatrix[23]="NCAAF";
sportAbbrevMatrix[41]="NCAAB";
sportAbbrevMatrix[54]="NCAAW";
if(window.Jiffy){Jiffy.mark("getMyHeadlinesOptionsStart")
}indexSportId=b.metadata().sportId;
optionsList="";
$.myespn.init({success:function(data){try{if(typeof(indexSportId)!==UNDEF&&indexSportId!==null){if(typeof(data.myTeams)!==UNDEF&&data.myTeams!==null){optionsCount=0;
$.each(data.myTeams,function(i,item){if((item.sport===indexSportId||$(indexSportId).index(item.sport)!==-1)&&typeof(item.text)!==UNDEF&&item.text!==null){if(optionsCount===0){optionsList+='<optgroup label="myTeams">'
}var sportName="";
if(typeof(sportAbbrevMatrix[item.sport])!==UNDEF&&sportAbbrevMatrix[item.sport]!==null){sportName=" ("+sportAbbrevMatrix[item.sport]+")"
}optionsList+="<option class=\"{'sportId':"+item.sport+", 'teamAbbrev':'"+item.abbrev+"', 'teamId':"+item.id+", 'text': '"+item.text.escapeSingleQuotes()+'\'}" value="">'+item.text+sportName+"</option>";
optionsCount+=1
}});
if(optionsCount>0){optionsList+="</optgroup>"
}}if(typeof(data.myPlayers)!==UNDEF&&data.myPlayers!==null){optionsCount=0;
$.each(data.myPlayers,function(i,item){if((item.sport===indexSportId||$(indexSportId).index(item.sport)!==-1)&&typeof(item.text)!==UNDEF&&item.text!==null){if(optionsCount===0){optionsList+='<optgroup label="myPlayers">'
}optionsList+="<option class=\"{'sportId':"+item.sport+", 'playerId':"+item.id+", 'text': '"+item.text.escapeSingleQuotes()+'\'}" value="">'+item.text+"</option>";
optionsCount+=1
}});
if(optionsCount>0){optionsList+="</optgroup>"
}}}else{if(typeof(data.mySports)!==UNDEF&&data.mySports!==null){optionsCount=0;
$.each(data.mySports,function(i,item){if(typeof(item.text)!==UNDEF&&item.text!==null){if(optionsCount===0){optionsList+='<optgroup label="mySports">'
}var sportName=item.text;
if(typeof(sportMatrix[item.id])!==UNDEF&&sportMatrix[item.id]!==null){sportName=sportMatrix[item.id]
}optionsList+="<option class=\"{'sportId':"+item.id+", 'text': '"+item.text.escapeSingleQuotes()+'\'}" value="">'+sportName+"</option>";
optionsCount+=1
}});
if(optionsCount>0){optionsList+="</optgroup>"
}}if(typeof(data.myTeams)!==UNDEF&&data.myTeams!==null){optionsCount=0;
$.each(data.myTeams,function(i,item){if(typeof(item.text)!==UNDEF&&item.text!==null){if(optionsCount===0){optionsList+='<optgroup label="myTeams">'
}var sportName="";
if(typeof(sportAbbrevMatrix[item.sport])!==UNDEF&&sportAbbrevMatrix[item.sport]!==null){sportName=" ("+sportAbbrevMatrix[item.sport]+")"
}optionsList+="<option class=\"{'sportId':"+item.sport+", 'teamAbbrev':'"+item.abbrev+"', 'teamId':"+item.id+", 'text': '"+item.text.escapeSingleQuotes()+'\'}" value="">'+item.text+sportName+"</option>";
optionsCount+=1
}});
if(optionsCount>0){optionsList+="</optgroup>"
}}if(typeof(data.myPlayers)!==UNDEF&&data.myPlayers!==null){optionsCount=0;
$.each(data.myPlayers,function(i,item){if(typeof(item.text)!==UNDEF&&item.text!==null){if(optionsCount===0){optionsList+='<optgroup label="myPlayers">'
}optionsList+="<option class=\"{'sportId':"+item.sport+", 'playerId':"+item.id+", 'text': '"+item.text.escapeSingleQuotes()+'\'}" value="">'+item.text+"</option>";
optionsCount+=1
}});
if(optionsCount>0){optionsList+="</optgroup>"
}}}if(optionsList!==""){$(".mod-myheadlines").html("<select>"+optionsList+'</select>\n<ul id="myheadlines" class="headlines"></ul>\n<p class="footer"><span id="myheadlines-link"></span><a href="http://espn.go.com/personalization/">Edit myHeadlines &#187;</a></p>');
$(".mod-myheadlines").each(function(){$(".ui-tabs-panel .mod-myheadlines select").change(function(ui){$(".ui-tabs-panel .mod-myheadlines select option:selected").each(function(ui){var headlinesData=$(this).metadata();
if(typeof(headlinesData)!==UNDEF&&headlinesData!==null){getMyHeadlines(headlinesData)
}})
}).change()
})
}else{$(".mod-myheadlines").html('<p><a href="http://espn.go.com/personalization/">Set up</a> your preferences and get news delivered about your favorite sports, teams and players.</p>')
}}catch(error){$(".mod-myheadlines").html("<p>We could not retrieve your personalized options at this time. Please try again later.</p>")
}},error:function(){$(".mod-myheadlines").html("<p>We could not retrieve your personalized options at this time. Please try again later.</p>")
}});
if(window.Jiffy){Jiffy.measure("getMyHeadlinesOptionsEnd","getMyHeadlinesOptionsStart")
}};
getMyHeadlines=function(headlineData){if(window.Jiffy){Jiffy.mark("getMyHeadlinesStart")
}var amp="",uri="",headlineList="";
if(typeof(headlineData.sportId)!==UNDEF){uri+=amp+"sportId="+headlineData.sportId;
amp="&"
}if(typeof(headlineData.teamId)!==UNDEF){uri+=amp+"teamId="+headlineData.teamId;
amp="&"
}if(typeof(headlineData.playerId)!==UNDEF){uri+=amp+"playerId="+headlineData.playerId;
amp="&"
}$.ajax({type:"GET",url:"/composer/cached/tea/myheadlines?"+uri,dataType:"json",cache:true,timeout:3500,success:function(data){try{$.each(data.myHeadlines,function(i,item){if(item.url!=null&&item.url!="No matching template"){var itemText=item.text,last;
if(itemText.length>44){last=itemText.lastIndexOf(" ",40);
if(last===0){last=40
}itemText=itemText.substring(0,last)+" ..."
}headlineList+='<li><a href="'+item.url+'" title="'+item.text+'">'+itemText+"</a></li>";
if(i==7){return false
}}});
if(headlineList!=""){$("#myheadlines").replaceWith('<ul id="myheadlines" class="headlines">'+headlineList+"</ul>")
}else{$("#myheadlines").replaceWith('<p id="myheadlines">There are no headlines currently for this topic. Please try another topic.</p>');
$("#myheadlines-link").html("&nbsp;")
}if((typeof(data.myHeadlinesLink)!==UNDEF&&data.myHeadlinesLink!=="")&&(typeof(data.myHeadlinesLinkText)!==UNDEF&&data.myHeadlinesLinkText!=="")){$("#myheadlines-link").html('<a href="'+data.myHeadlinesLink+'">'+data.myHeadlinesLinkText+" &#187;</a>")
}else{$("#myheadlines-link").html("&nbsp;")
}}catch(error){$("#myheadlines").replaceWith('<p id="myheadlines">We could not retrieve your headlines at this time. Please try again later.</p>');
$("#myheadlines-link").html("&nbsp;")
}},error:function(){$("#myheadlines").replaceWith('<p id="myheadlines">We could not retrieve your headlines at this time. Please try again later.</p>');
$("#myheadlines-link").html("&nbsp;")
}});
if(window.Jiffy){Jiffy.measure("getMyHeadlinesEnd","getMyHeadlinesStart")
}};
initMyFaves=function(){var pageSportId=$("body").metadata().sportId;
if(pageSportId!==UNDEF&&pageSportId!==null&&pageSportId!==0){$.myespn.init({success:function(data){try{var myTeamsTable=$("#my-teams-table");
if(myTeamsTable.length>0){if(typeof(data.myTeams)!==UNDEF&&data.myTeams!==null){$.each(data.myTeams,function(i,item){var thisItemSport=item.sport;
var thisItemId=item.id;
if((thisItemSport===pageSportId||$(pageSportId).index(thisItemSport)!==-1)&&typeof(thisItemId)!==UNDEF&&thisItemId!==null){$("tr.team-"+thisItemSport+"-"+thisItemId,myTeamsTable).addClass("my-fave")
}})
}}var myPlayersTable=$("#my-players-table");
if(myPlayersTable.length>0){if(typeof(data.myPlayers)!==UNDEF&&data.myPlayers!==null){$.each(data.myPlayers,function(i,item){var thisItemSport=item.sport;
var thisItemId=item.id;
if((thisItemSport===pageSportId||$(pageSportId).index(thisItemSport)!==-1)&&typeof(thisItemId)!==UNDEF&&thisItemId!==null){$("tr.player-"+thisItemSport+"-"+thisItemId,myPlayersTable).addClass("my-fave")
}})
}}}catch(error){}}})
}};
initMyHeadlines=function(ui){if(window.Jiffy){Jiffy.mark("initMyHeadlinesStart")
}if(loggedIn){if($(ui.panel).find(".mod-myheadlines").length>0){if($(this).data("mod-headlines-initialized")){return true
}$(this).data("mod-headlines-initialized",true);
getMyHeadlinesOptions()
}}else{$(".mod-myheadlines").html("<p>Sign in above to set up your preferences and get news delivered about your favorite sports, teams and players.</p>")
}if(window.Jiffy){Jiffy.measure("initMyHeadlinesEnd","initMyHeadlinesStart")
}};
tabControl={videoPlayer:null,espn360Player:null,topStories:false};
initTabs=function(sel){var tabContainer=$(sel).filter(function(){var keepIt=true;
if($(this).parents("#scoreboard").length>0||$(this).data("initialized")===true){keepIt=false
}return keepIt
});
if(window.Jiffy){Jiffy.mark("initTabsStart")
}tabContainer.data("initialized",true);
tabContainer.tabs({cache:true,spinner:"",select:function(event,ui){var panel=$(ui.panel);
if(panel.parents("#top-stories").length!==0){tabControl.topStories=true;
tabControl.videoPlayer=$("div.videoplayer-show");
tabControl.espn360Player=$("div.espn360Player-show")
}trackButtonClicks(ui.tab,"tab");
$.publish("espn.tabs.select",[panel,ui])
},load:function(event,ui){var panel=$(ui.panel);
$.publish("espn.tabs.load",[panel,ui])
},show:function(event,ui){var panel=$(ui.panel),videoitem,espn360item,mediaId,linkdata;
setTimeout(function(){initCarousels(panel)
},100);
if(tabControl.topStories===true){tabControl.topStories=false;
tabControl.videoPlayer.removeClass("videoplayer-show");
tabControl.espn360Player.removeClass("espn360Player-show");
try{if(typeof window.com!==UNDEF){videocom.mpfVideoPause();
videoPlayer.state=VIDEO_STATE.PAUSE
}}catch(error){}videoitem=panel.find("ul li.active a[rel=js-video]");
if(videoitem.length>0){mediaId=$.parseUri(videoitem.attr("href")).queryKey.id;
if(mediaId==null||mediaId=="null"){mediaId=$.parseUri(videoitem.attr("href")).queryKey.mId||null
}linkdata=videoitem.metadata();
linkdata.userAction=true;
$.playVideo(mediaId,linkdata,true)
}}if(panel.find(".mod-myheadlines").length>0){initMyHeadlines(ui)
}$.publish("espn.tabs.show",[panel,ui])
}});
if(window.Jiffy){Jiffy.measure("initTabsEnd","initTabsStart")
}};
"espn.core.init".namespace();
espn.core.init.tabs=initTabs;
espn.core.init.nav=initNav;
espn.core.init.carousel=initCarousels;
espn.core.init.faves=initMyFaves;
espn.core.init.accordion=initAccordion;
espn.core.init.headlines=initMyHeadlines;
espn.core.init.genericVideo=$.loadGenericVideo;
espn.core.init.flashHeader=initFlashSubHeader;
espn.core.init.search=function(){var searchBox=$("#searchString");
if(searchBox.length>0){if(window.Jiffy){Jiffy.mark("initSearchBox")
}searchBox.bind("focus",function(){if(script_loaded.autocomplete){return false
}script_loaded.autocomplete=true;
$.getScript(asset_path+"scripts/plugins/jquery.autocomplete.min.js",function(){if(window.Jiffy){Jiffy.mark("initSearchBoxJS")
}searchBox.autocomplete("/lib/displayAutoCompleteMatches",{minChars:3,cacheLength:20,selectFirst:false,scroll:true,scrollHeight:200,formatItem:function(item,num,c,d){return eval("("+item+")").name
},formatResult:function(item,num,c,d){return eval("("+item+")").name
}}).bind("result",function(event,data,formatted){searchBox.parents("form").get(0).submit()
}).trigger("focus");
if(window.Jiffy){Jiffy.measure("initSearchBoxJSEnd","initSearchBoxJS")
}})
});
if(window.Jiffy){Jiffy.measure("initSearchBoxEnd","initSearchBox")
}}};
$.espn={initTabs:initTabs,initNav:initNav,initCarousels:initCarousels,initMyFaves:initMyFaves,initAccordion:initAccordion,initMyHeadlines:initMyHeadlines};
init=function(){if(window.Jiffy){Jiffy.mark("onDOMReady")
}if(arguments.callee.done){return
}arguments.callee.done=true;
b=$("body");
initNav();
initTabs($(".mod-header","div.mod-tabs"));
findAccordions();
initCarousels();
$("div.mod-calendar-dropdown a").click(function(){if($("div.cal-nav-container:visible").get(0)){$("div.cal-nav-container").remove();
return false
}var trigger=$(this).parent(),data=$(this).metadata(),currentDate=(typeof data.date!==UNDEF)?new Date(Date.parse(data.date)):new Date();
drawCalendar(currentDate,trigger);
return false
});
$("form.js-goto").find("select").espnSelectRedirect();
$("div.mod-scoreboard-carousel").espnCalendarCarousel();
$.getConversation();
$.loadGenericVideo();
initMyFaves();
$("li#myespn").bind("mouseover",function(){$("select").each(function(){if(this.size<1||typeof this.size===UNDEF){this.blur();
this.size=0
}})
});
if(window.Jiffy){Jiffy.measure("onDOMReady::Complete","onDOMReady")
}};
$(function(){init()
});
$(window).unload(function(){_d.onkeypress=null
})
})(jQuery);
(function(b){b(function(){var e=b.cookie("espn360"),f=espn.core,d=function(){b("body").addClass("espn360");
b("#top-stories").find(".mod-tabs .mod-header").data("disabled.tabs",[])
};
if(e===null){b.getJSON("//broadband.espn.go.com/espn360/util/espn360user?callback=?",function(c){if(c.affiliate!=="invalid"){b.cookie("espn360",true);
e=true;
d()
}else{b.cookie("espn360",false);
e=false
}})
}if(!!e){d()
}})
})(jQuery);