(function(){Function.prototype.bind=function()
{var __method=this,args=$.makeArray(arguments),object=args.shift();return function()
{return __method.apply(object,args.concat($.makeArray(arguments)));}};})();var stopEvent=function(evt){if(window.event){evt=window.event;evt.returnValue=false;}
try{evt.cancelBubble=true;if(evt.preventDefault)evt.preventDefault();if(evt.stopPropagation)evt.stopPropagation();if(evt.stopped)evt.stopped=true;}catch(e){}
return evt;};Array.prototype.sum=function()
{var sum=0;for(var i=0,l=this.length;i<l;i++)
sum+=parseInt(this[i],10);return sum;};Array.prototype.max=function()
{var max=0;for(var i=0,l=this.length;i<l;i++)
{var current=parseInt(this[i],10);if(!isNaN(current)&&max<current)
{max=this[i];}}
return max;};Array.prototype.min=function()
{var min=(this.length)?this[0]:0;for(var i=1,l=this.length;i<l;i++)
{if(min>this[i])
{min=this[i];}}
return min;};Array.prototype.extract=function()
{var r=new Array(),prop=arguments[0]||null;if(prop)
{for(var i=0,l=this.length;i<l;i++)
{if(prop in this[i])
{r.push(this[i][prop]);}}}
return r;};if(!Array.prototype.indexOf)
{Array.prototype.indexOf=function()
{var r=-1,val=arguments[0]||null;if(val)
{if(this.isArray())
{for(var i=0,l=this.length;i<l;i++)
{if(this[i]==val)
{r=i;break;}}}}
return r;};}
Array.prototype.values=function()
{var r=new Array();for(var i=0,l=this.length;i<l;i++)
{if(r.indexOf(this[i])!=-1)continue;r.push(this[i]);}
return r;};String.prototype.truncate=function(length,replace)
{var r=this;if(this.length>length)
{r=this.substr(0,(length-replace.length))+ended;}
return r;};var Class=(function(){var _extend=function(childClass,parentClass)
{var F=function(){};F.prototype=parentClass.prototype;childClass.prototype=new F();childClass.prototype.constructor=parentClass;childClass.parentClass=parentClass.prototype;if(parentClass.prototype.constructor==Object.prototype.constructor){parentClass.prototype.constructor=parentClass;}
return childClass;};var _class=function(){return this._init.apply(this,arguments);};$.extend(_class.prototype,{_init:function()
{return this;}});return{create:function(){var _args=$.makeArray(arguments),props=_args.shift(),parent=_args.shift();try{var F=function(){return F.parentClass.constructor.apply(this,$.makeArray(arguments));};_extend(F,_class);}catch(error){}
if(parent)
{_extend(F,parent);}
if(props)
{$.extend(F.prototype,props);}
return F;},addMethods:function()
{var _args=$.makeArray(arguments),obj=_args.shift(),methods=_args.shift();for(var name in methods)
{if(!obj[name])
{var params={};params[name]=methods[name];$.extend(obj.prototype,params);}}},extend:function()
{var _args=$.makeArray(arguments),childClass=_args.shift(),parentClass=_args.shift();return _extend(childClass,parentClass);}}})();
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});
﻿
(function($){var g='bgPos';$.fx.step['backgroundPosition']=$.fx.step['background-position']=function(a){if(!a.set){var b=$(a.elem);var c=b.data(g);b.css('backgroundPosition',c);a.start=parseBackgroundPosition(c);a.end=parseBackgroundPosition($.fn.jquery>='1.6'?a.end:a.options.curAnim['backgroundPosition']||a.options.curAnim['background-position']);for(var i=0;i<a.end.length;i++){if(a.end[i][0]){a.end[i][1]=a.start[i][1]+(a.end[i][0]=='-='?-1:+1)*a.end[i][1]}}a.set=true}$(a.elem).css('background-position',((a.pos*(a.end[0][1]-a.start[0][1])+a.start[0][1])+a.end[0][2])+' '+((a.pos*(a.end[1][1]-a.start[1][1])+a.start[1][1])+a.end[1][2]))};function parseBackgroundPosition(c){var d={center:'50%',left:'0%',right:'100%',top:'0%',bottom:'100%'};var e=c.split(/ /);var f=function(a){var b=(d[e[a]]||e[a]||'50%').match(/^([+-]=)?([+-]?\d+(\.\d*)?)(.*)$/);e[a]=[b[1],parseFloat(b[2]),b[4]||'px']};if(e.length==1&&$.inArray(e[0],['top','bottom'])>-1){e[1]=e[0];e[0]='50%'}f(0);f(1);return e}$.fn.animate=function(e){return function(a,b,c,d){if(a['backgroundPosition']||a['background-position']){this.data(g,this.css('backgroundPosition')||'center')}return e.apply(this,[a,b,c,d])}}($.fn.animate)})(jQuery);
var audioplayer_swfobject=function(){var d="undefined",R="object",s="Shockwave Flash",w="ShockwaveFlash.ShockwaveFlash",Q="application/x-shockwave-flash",r="SWFObjectExprInst",X="onreadystatechange",o=window,J=document,T=navigator,t=false,u=[H],O=[],n=[],i=[],L,q,e,b,j=false,A=false,N,g,M=true,m=function(){var AA=typeof J.getElementById!=d&&typeof J.getElementsByTagName!=d&&typeof J.createElement!=d,AH=T.userAgent.toLowerCase(),y=T.platform.toLowerCase(),AE=y?/win/.test(y):/win/.test(AH),AC=y?/mac/.test(y):/mac/.test(AH),AF=/webkit/.test(AH)?parseFloat(AH.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,x=!+"\v1",AG=[0,0,0],AB=null;if(typeof T.plugins!=d&&typeof T.plugins[s]==R){AB=T.plugins[s].description;if(AB&&!(typeof T.mimeTypes!=d&&T.mimeTypes[Q]&&!T.mimeTypes[Q].enabledPlugin)){t=true;x=false;AB=AB.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AG[0]=parseInt(AB.replace(/^(.*)\..*$/,"$1"),10);AG[1]=parseInt(AB.replace(/^.*\.(.*)\s.*$/,"$1"),10);AG[2]=/[a-zA-Z]/.test(AB)?parseInt(AB.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof o.ActiveXObject!=d){try{var AD=new ActiveXObject(w);if(AD){AB=AD.GetVariable("$version");if(AB){x=true;AB=AB.split(" ")[1].split(",");AG=[parseInt(AB[0],10),parseInt(AB[1],10),parseInt(AB[2],10)]}}}catch(z){}}}return{w3:AA,pv:AG,wk:AF,ie:x,win:AE,mac:AC}}(),K=function(){if(!m.w3){return}if((typeof J.readyState!=d&&J.readyState=="complete")||(typeof J.readyState==d&&(J.getElementsByTagName("body")[0]||J.body))){F()}if(!j){if(typeof J.addEventListener!=d){J.addEventListener("DOMContentLoaded",F,false)}if(m.ie&&m.win){J.attachEvent(X,function(){if(J.readyState=="complete"){J.detachEvent(X,arguments.callee);F()}});if(o==top){(function(){if(j){return}try{J.documentElement.doScroll("left")}catch(x){setTimeout(arguments.callee,0);return}F()})()}}if(m.wk){(function(){if(j){return}if(!/loaded|complete/.test(J.readyState)){setTimeout(arguments.callee,0);return}F()})()}S(F)}}();function F(){if(j){return}try{var z=J.getElementsByTagName("body")[0].appendChild(c("span"));z.parentNode.removeChild(z)}catch(AA){return}j=true;var x=u.length;for(var y=0;y<x;y++){u[y]()}}function k(x){if(j){x()}else{u[u.length]=x}}function S(y){if(typeof o.addEventListener!=d){o.addEventListener("load",y,false)}else{if(typeof J.addEventListener!=d){J.addEventListener("load",y,false)}else{if(typeof o.attachEvent!=d){I(o,"onload",y)}else{if(typeof o.onload=="function"){var x=o.onload;o.onload=function(){x();y()}}else{o.onload=y}}}}}function H(){if(t){v()}else{h()}}function v(){var x=J.getElementsByTagName("body")[0];var AA=c(R);AA.setAttribute("type",Q);var z=x.appendChild(AA);if(z){var y=0;(function(){if(typeof z.GetVariable!=d){var AB=z.GetVariable("$version");if(AB){AB=AB.split(" ")[1].split(",");m.pv=[parseInt(AB[0],10),parseInt(AB[1],10),parseInt(AB[2],10)]}}else{if(y<10){y++;setTimeout(arguments.callee,10);return}}x.removeChild(AA);z=null;h()})()}else{h()}}function h(){var AG=O.length;if(AG>0){for(var AF=0;AF<AG;AF++){var y=O[AF].id;var AB=O[AF].callbackFn;var AA={success:false,id:y};if(m.pv[0]>0){var AE=C(y);if(AE){if(f(O[AF].swfVersion)&&!(m.wk&&m.wk<312)){W(y,true);if(AB){AA.success=true;AA.ref=Z(y);AB(AA)}}else{if(O[AF].expressInstall&&a()){var AI={};AI.data=O[AF].expressInstall;AI.width=AE.getAttribute("width")||"0";AI.height=AE.getAttribute("height")||"0";if(AE.getAttribute("class")){AI.styleclass=AE.getAttribute("class")}if(AE.getAttribute("align")){AI.align=AE.getAttribute("align")}var AH={};var x=AE.getElementsByTagName("param");var AC=x.length;for(var AD=0;AD<AC;AD++){if(x[AD].getAttribute("name").toLowerCase()!="movie"){AH[x[AD].getAttribute("name")]=x[AD].getAttribute("value")}}p(AI,AH,y,AB)}else{P(AE);if(AB){AB(AA)}}}}}else{W(y,true);if(AB){var z=Z(y);if(z&&typeof z.SetVariable!=d){AA.success=true;AA.ref=z}AB(AA)}}}}}function Z(AA){var x=null;var y=C(AA);if(y&&y.nodeName=="OBJECT"){if(typeof y.SetVariable!=d){x=y}else{var z=y.getElementsByTagName(R)[0];if(z){x=z}}}return x}function a(){return!A&&f("6.0.65")&&(m.win||m.mac)&&!(m.wk&&m.wk<312)}function p(AA,AB,x,z){A=true;e=z||null;b={success:false,id:x};var AE=C(x);if(AE){if(AE.nodeName=="OBJECT"){L=G(AE);q=null}else{L=AE;q=x}AA.id=r;if(typeof AA.width==d||(!/%$/.test(AA.width)&&parseInt(AA.width,10)<310)){AA.width="310"}if(typeof AA.height==d||(!/%$/.test(AA.height)&&parseInt(AA.height,10)<137)){AA.height="137"}J.title=J.title.slice(0,47)+" - Flash Player Installation";var AD=m.ie&&m.win?"ActiveX":"PlugIn",AC="MMredirectURL="+o.location.toString().replace(/&/g,"%26")+"&MMplayerType="+AD+"&MMdoctitle="+J.title;if(typeof AB.flashvars!=d){AB.flashvars+="&"+AC}else{AB.flashvars=AC}if(m.ie&&m.win&&AE.readyState!=4){var y=c("div");x+="SWFObjectNew";y.setAttribute("id",x);AE.parentNode.insertBefore(y,AE);AE.style.display="none";(function(){if(AE.readyState==4){AE.parentNode.removeChild(AE)}else{setTimeout(arguments.callee,10)}})()}U(AA,AB,x)}}function P(y){if(m.ie&&m.win&&y.readyState!=4){var x=c("div");y.parentNode.insertBefore(x,y);x.parentNode.replaceChild(G(y),x);y.style.display="none";(function(){if(y.readyState==4){y.parentNode.removeChild(y)}else{setTimeout(arguments.callee,10)}})()}else{y.parentNode.replaceChild(G(y),y)}}function G(AB){var AA=c("div");if(m.win&&m.ie){AA.innerHTML=AB.innerHTML}else{var y=AB.getElementsByTagName(R)[0];if(y){var AC=y.childNodes;if(AC){var x=AC.length;for(var z=0;z<x;z++){if(!(AC[z].nodeType==1&&AC[z].nodeName=="PARAM")&&!(AC[z].nodeType==8)){AA.appendChild(AC[z].cloneNode(true))}}}}}return AA}function U(AI,AG,y){var x,AA=C(y);if(m.wk&&m.wk<312){return x}if(AA){if(typeof AI.id==d){AI.id=y}if(m.ie&&m.win){var AH="";for(var AE in AI){if(AI[AE]!=Object.prototype[AE]){if(AE.toLowerCase()=="data"){AG.movie=AI[AE]}else{if(AE.toLowerCase()=="styleclass"){AH+=' class="'+AI[AE]+'"'}else{if(AE.toLowerCase()!="classid"){AH+=" "+AE+'="'+AI[AE]+'"'}}}}}var AF="";for(var AD in AG){if(AG[AD]!=Object.prototype[AD]){AF+='<param name="'+AD+'" value="'+AG[AD]+'" />'}}AA.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AH+">"+AF+"</object>";n[n.length]=AI.id;x=C(AI.id)}else{var z=c(R);z.setAttribute("type",Q);for(var AC in AI){if(AI[AC]!=Object.prototype[AC]){if(AC.toLowerCase()=="styleclass"){z.setAttribute("class",AI[AC])}else{if(AC.toLowerCase()!="classid"){z.setAttribute(AC,AI[AC])}}}}for(var AB in AG){if(AG[AB]!=Object.prototype[AB]&&AB.toLowerCase()!="movie"){E(z,AB,AG[AB])}}AA.parentNode.replaceChild(z,AA);x=z}}return x}function E(z,x,y){var AA=c("param");AA.setAttribute("name",x);AA.setAttribute("value",y);z.appendChild(AA)}function Y(y){var x=C(y);if(x&&x.nodeName=="OBJECT"){if(m.ie&&m.win){x.style.display="none";(function(){if(x.readyState==4){B(y)}else{setTimeout(arguments.callee,10)}})()}else{x.parentNode.removeChild(x)}}}function B(z){var y=C(z);if(y){for(var x in y){if(typeof y[x]=="function"){y[x]=null}}y.parentNode.removeChild(y)}}function C(z){var x=null;try{x=J.getElementById(z)}catch(y){}return x}function c(x){return J.createElement(x)}function I(z,x,y){z.attachEvent(x,y);i[i.length]=[z,x,y]}function f(z){var y=m.pv,x=z.split(".");x[0]=parseInt(x[0],10);x[1]=parseInt(x[1],10)||0;x[2]=parseInt(x[2],10)||0;return(y[0]>x[0]||(y[0]==x[0]&&y[1]>x[1])||(y[0]==x[0]&&y[1]==x[1]&&y[2]>=x[2]))?true:false}function V(AC,y,AD,AB){if(m.ie&&m.mac){return}var AA=J.getElementsByTagName("head")[0];if(!AA){return}var x=(AD&&typeof AD=="string")?AD:"screen";if(AB){N=null;g=null}if(!N||g!=x){var z=c("style");z.setAttribute("type","text/css");z.setAttribute("media",x);N=AA.appendChild(z);if(m.ie&&m.win&&typeof J.styleSheets!=d&&J.styleSheets.length>0){N=J.styleSheets[J.styleSheets.length-1]}g=x}if(m.ie&&m.win){if(N&&typeof N.addRule==R){N.addRule(AC,y)}}else{if(N&&typeof J.createTextNode!=d){N.appendChild(J.createTextNode(AC+" {"+y+"}"))}}}function W(z,x){if(!M){return}var y=x?"visible":"hidden";if(j&&C(z)){C(z).style.visibility=y}else{V("#"+z,"visibility:"+y)}}function l(y){var z=/[\\\"<>\.;]/;var x=z.exec(y)!=null;return x&&typeof encodeURIComponent!=d?encodeURIComponent(y):y}var D=function(){if(m.ie&&m.win){window.attachEvent("onunload",function(){var AC=i.length;for(var AB=0;AB<AC;AB++){i[AB][0].detachEvent(i[AB][1],i[AB][2])}var z=n.length;for(var AA=0;AA<z;AA++){Y(n[AA])}for(var y in m){m[y]=null}m=null;for(var x in audioplayer_swfobject){audioplayer_swfobject[x]=null}audioplayer_swfobject=null})}}();return{registerObject:function(AB,x,AA,z){if(m.w3&&AB&&x){var y={};y.id=AB;y.swfVersion=x;y.expressInstall=AA;y.callbackFn=z;O[O.length]=y;W(AB,false)}else{if(z){z({success:false,id:AB})}}},getObjectById:function(x){if(m.w3){return Z(x)}},embedSWF:function(AB,AH,AE,AG,y,AA,z,AD,AF,AC){var x={success:false,id:AH};if(m.w3&&!(m.wk&&m.wk<312)&&AB&&AH&&AE&&AG&&y){W(AH,false);k(function(){AE+="";AG+="";var AJ={};if(AF&&typeof AF===R){for(var AL in AF){AJ[AL]=AF[AL]}}AJ.data=AB;AJ.width=AE;AJ.height=AG;var AM={};if(AD&&typeof AD===R){for(var AK in AD){AM[AK]=AD[AK]}}if(z&&typeof z===R){for(var AI in z){if(typeof AM.flashvars!=d){AM.flashvars+="&"+AI+"="+z[AI]}else{AM.flashvars=AI+"="+z[AI]}}}if(f(y)){var AN=U(AJ,AM,AH);if(AJ.id==AH){W(AH,true)}x.success=true;x.ref=AN}else{if(AA&&a()){AJ.data=AA;p(AJ,AM,AH,AC);return}else{W(AH,true)}}if(AC){AC(x)}})}else{if(AC){AC(x)}}},switchOffAutoHideShow:function(){M=false},ua:m,getFlashPlayerVersion:function(){return{major:m.pv[0],minor:m.pv[1],release:m.pv[2]}},hasFlashPlayerVersion:f,createSWF:function(z,y,x){if(m.w3){return U(z,y,x)}else{return undefined}},showExpressInstall:function(z,AA,x,y){if(m.w3&&a()){p(z,AA,x,y)}},removeSWF:function(x){if(m.w3){Y(x)}},createCSS:function(AA,z,y,x){if(m.w3){V(AA,z,y,x)}},addDomLoadEvent:k,addLoadEvent:S,getQueryParamValue:function(AA){var z=J.location.search||J.location.hash;if(z){if(/\?/.test(z)){z=z.split("?")[1]}if(AA==null){return l(z)}var y=z.split("&");for(var x=0;x<y.length;x++){if(y[x].substring(0,y[x].indexOf("="))==AA){return l(y[x].substring((y[x].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A){var x=C(r);if(x&&L){x.parentNode.replaceChild(L,x);if(q){W(q,true);if(m.ie&&m.win){L.style.display="block"}}if(e){e(b)}}A=false}}}}();var AudioPlayer=function(){var H=[];var D;var F="";var A={};var E=-1;var G="9";function B(I){if(document.all&&!window[I]){for(var J=0;J<document.forms.length;J++){if(document.forms[J][I]){return document.forms[J][I];break}}}return document.all?window[I]:document[I]}function C(I,J,K){B(I).addListener(J,K)}return{setup:function(J,I){F=J;A=I;if(audioplayer_swfobject.hasFlashPlayerVersion(G)){audioplayer_swfobject.switchOffAutoHideShow();audioplayer_swfobject.createCSS("p.audioplayer_container span","visibility:hidden;height:24px;overflow:hidden;padding:0;border:none;")}},getPlayer:function(I){return B(I)},addListener:function(I,J,K){C(I,J,K)},embed:function(I,K){var N={};var L;var J={};var O={};var M={};for(L in A){N[L]=A[L]}for(L in K){N[L]=K[L]}if(N.transparentpagebg=="yes"){J.bgcolor="#FFFFFF";J.wmode="transparent"}else{if(N.pagebg){J.bgcolor="#"+N.pagebg}J.wmode="opaque"}J.menu="false";for(L in N){if(L=="pagebg"||L=="width"||L=="transparentpagebg"){continue}O[L]=N[L]}M.name=I;M.style="outline: none";O.playerID=I;audioplayer_swfobject.embedSWF(F,I,N.width.toString(),"24",G,false,O,J,M);H.push(I)},syncVolumes:function(I,K){E=K;for(var J=0;J<H.length;J++){if(H[J]!=I){B(H[J]).setVolume(E)}}},activate:function(I,J){if(D&&D!=I){B(D).close()}D=I},load:function(K,I,L,J){B(K).load(I,L,J)},close:function(I){B(I).close();if(I==D){D=null}},open:function(I,J){if(J==undefined){J=1}B(I).open(J==undefined?0:J-1)},getVolume:function(I){return E}}}();
(function($){$.fn.keyCTRL=function(){this.each(function(){var _disabled=false;$(this).bind('DISABLED',function(e){_disabled=true;}).bind('ENABLED',function(e){_disabled=false;}).bind('keydown',function(e){if(_disabled)return;var k=e.charCode?e.charCode:e.keyCode?e.keyCode:0;switch(k)
{case 37:$(this).trigger('LEFT_KEY');e.preventDefault();break;case 39:$(this).trigger('RIGHT_KEY');e.preventDefault();break;}});return this;});return this;};})(jQuery);(function($){$.fn.w3cTargetBlank=function(){this.each(function(){var $_self=$(this);$_self.attr('target','_blank');});};})(jQuery);(function($){var href=window.location.pathname,queryString=window.location.search;$.fn.activeStatus=function()
{var force=arguments[0]||false;if(arguments.length>1)
{href=arguments[1]||href;}
this.each(function(i,elt){var s=href,elt=$(elt);if(force)
{var params=queryString.replace(/\?page=(.*)?&+/,'').replace('?','');if(params.length)s+='?'+params;}
if(elt.attr('href')!=s)return;else
{elt.addClass('active');}
return this;});};})(jQuery);(function($){$.fn.listenCommandPosition=function()
{var defaultPosition=arguments[0]||0;this.each(function(i,elt){var elt=$(elt),pos=elt.offset(),top=pos.top;elt.bind('mouseenter',function(){pos=elt.offset();top=pos.top;$(document).bind('mousemove',function(evt){var _top=(evt.pageY-top),height=$(this).height()-25;if(_top<height)
{$('a',this).css({top:_top+'px'});}}.bind(elt));});elt.bind('mouseleave',function(){$(document).unbind('mousemove');$('a',this).css({top:defaultPosition+'px'});});});};})(jQuery);(function($){$.fn.tabs=function(){var CSS='active',DISPLAY_NONE={display:'none'};function _init(context){var t=$('ul:first li a',context),p=$('div[rel*="tab-"]',context),length=t.length;for(var i=0;i<length;i++){var c=$(t[i]),r=$('div[rel='+c.attr('href').split('#')[1]+']');if(r.length)
{if(r.hasClass(CSS))
{c.parent('li').addClass(CSS);}}
else{c.css(DISPLAY_NONE);break;}}
return;};$(this).each(function(i,elt){var tab=$(elt),t=$('ul:first li a',tab);t.bind('click',function(evt){stopEvent(evt);var $self=$(this);if($self.hasClass(CSS))return;else
{$('div[rel*="tab-"]',tab).removeClass(CSS);var rel=$self.attr('href').split('#');if(rel.length>1)
{rel=rel[1];$('div[rel='+rel+']').addClass(CSS);t.parent('li').removeClass(CSS);$self.parent('li').addClass(CSS);tab.trigger('change',[rel]);}}
return false;});_init(tab);return this;});};})(jQuery);(function($){$.fn.podcastPlayer=function(options){var _default={width:450,autostart:'no',loop:'no',transparentpagebg:'no',animation:'no',pagebg:'000000'};var params=$.extend({},_default,options||{});var WHITE_COLOR='FFFFFF';var GRAY_COLOR='000000';var GRAY_BLACK_COLOR='000000';var BLACK_COLOR='000000';var colors={bg:BLACK_COLOR,leftbg:BLACK_COLOR,lefticon:WHITE_COLOR,voltrack:'F2F2F2',volslider:'666666',rightbg:BLACK_COLOR,rightbghover:BLACK_COLOR,righticon:WHITE_COLOR,righticonhover:WHITE_COLOR,loader:'8dc63f',track:WHITE_COLOR,tracker:'ececec',border:WHITE_COLOR,skip:WHITE_COLOR,text:GRAY_BLACK_COLOR};var _swfUrl='/static/swf/player.swf';AudioPlayer.setup(_swfUrl,$.extend({},_default,colors));$(this).each(function(i,elt){var id='podcast-'+i,c=$(elt),container=$('div:first',c);if(container.length)
{container.attr('id',id);AudioPlayer.embed(id,{soundFile:container.data('files')});}
return this;});};})(jQuery);(function($){$.fn.metadata=function(options){return this.each(function(){$that=$(this);if(this.dataset){$that.data(this.dataset);}
else{$.each(this.attributes,function(index,attrib){if(attrib.name.indexOf("data-")==0){$that.data(attrib.name.substring(5),attrib.value);}});}});}
$.metadata=true;})(jQuery);(function($){var locationWrapper={put:function(hash,win){(win||window).location.hash=this.encoder(hash);},get:function(win){var hash=((win||window).location.hash).replace(/^#/,'');try{return $.browser.mozilla?hash:decodeURIComponent(hash);}
catch(error){return hash;}},encoder:encodeURIComponent};var iframeWrapper={id:"__jQuery_history",init:function(){var html='<iframe id="'+this.id+'" style="display:none" src="javascript:false;" />';$("body").prepend(html);return this;},_document:function(){return $("#"+this.id)[0].contentWindow.document;},put:function(hash){var doc=this._document();doc.open();doc.close();locationWrapper.put(hash,doc);},get:function(){return locationWrapper.get(this._document());}};function initObjects(options){options=$.extend({unescape:false},options||{});locationWrapper.encoder=encoder(options.unescape);function encoder(unescape_){if(unescape_===true){return function(hash){return hash;};}
if(typeof unescape_=="string"&&(unescape_=partialDecoder(unescape_.split("")))||typeof unescape_=="function"){return function(hash){return unescape_(encodeURIComponent(hash));};}
return encodeURIComponent;}
function partialDecoder(chars){var re=new RegExp($.map(chars,encodeURIComponent).join("|"),"ig");return function(enc){return enc.replace(re,decodeURIComponent);};}}
var implementations={};implementations.base={callback:undefined,type:undefined,check:function(){},load:function(hash){},init:function(callback,options){initObjects(options);self.callback=callback;self._options=options;self._init();},_init:function(){},_options:{}};implementations.timer={_appState:undefined,_init:function(){var current_hash=locationWrapper.get();self._appState=current_hash;self.callback(current_hash);setInterval(self.check,100);},check:function(){var current_hash=locationWrapper.get();if(current_hash!=self._appState){self._appState=current_hash;self.callback(current_hash);}},load:function(hash){if(hash!=self._appState){locationWrapper.put(hash);self._appState=hash;self.callback(hash);}}};implementations.iframeTimer={_appState:undefined,_init:function(){var current_hash=locationWrapper.get();self._appState=current_hash;iframeWrapper.init().put(current_hash);self.callback(current_hash);setInterval(self.check,100);},check:function(){var iframe_hash=iframeWrapper.get(),location_hash=locationWrapper.get();if(location_hash!=iframe_hash){if(location_hash==self._appState){self._appState=iframe_hash;locationWrapper.put(iframe_hash);self.callback(iframe_hash);}else{self._appState=location_hash;iframeWrapper.put(location_hash);self.callback(location_hash);}}},load:function(hash){if(hash!=self._appState){locationWrapper.put(hash);iframeWrapper.put(hash);self._appState=hash;self.callback(hash);}}};implementations.hashchangeEvent={_init:function(){self.callback(locationWrapper.get());$(window).bind('hashchange',self.check);},check:function(){self.callback(locationWrapper.get());},load:function(hash){locationWrapper.put(hash);}};var self=$.extend({},implementations.base);if($.browser.msie&&($.browser.version<8||document.documentMode<8)){self.type='iframeTimer';}else if("onhashchange"in window){self.type='hashchangeEvent';}else{self.type='timer';}
$.extend(self,implementations[self.type]);$.history=self;})(jQuery);
var AUX={YTReady:false,YTManager:null,YTOrigin:null,YTParams:{width:644,height:364},shareThisParams:{},shareThisPush:function(elt)
{var btn=$(elt),url=btn.attr('href'),title=btn.data('sttitle'),summary=btn.data('stsummary'),image=btn.data('stimage');btn.attr('href','javascript:;');var params=$.extend({},AUX.shareThisParams,{element:elt,url:url,title:title});if(image)
{params.image=image;}
if(summary.length)
{params.summary=summary;}
try{stWidget.addEntry(params);$('.stButton',elt).remove();}catch(e){}
return;},bindNextPrevPageScroller:function(root,pageScroller){var prev=$('.command.prev',root),plink=$('a',prev),next=$('.command.next',root),nlink=$('a',next),all=$('.command.prev, .command.next',root);var css={hide:{visibility:'hidden'},show:{visibility:'visible'}};if(prev.length&&plink.attr('href')=='#')
{prev.css(css.hide);}
$(pageScroller).bind('afterMove',function(e){var cssHide=css.hide;all.css(css.show);if(this._isFirstSection())
{var url=plink.attr('href');if(url=='#')
{prev.css(cssHide);}}
if(this._isLastSection())
{var url=nlink.attr('href');if(url=='#')
{next.css(cssHide);}}});return;}};function onYouTubePlayerAPIReady()
{AUX.YTReady=true;AUX.YTManager=new YTRegistry();return;};var BaseObject=Class.create({_init:function(){this.options={};return this;},setOption:function(prop,value)
{if($.isPlainObject(this.options))
{if(this.options.hasOwnProperty(prop))
{this.options[prop]=value;}}
return this;},getOption:function(prop)
{var r=undefined;if($.isPlainObject(this.options))
{if(this.options.hasOwnProperty(prop))
{r=this.options[prop];}}
return r;}});var Loader=Class.create({_init:function(container,options){var _options={orderZIndex:false};this.options=$.extend({},_options,options);this.container=$(container);this.medias=options.medias||$('img',container);return this.initialize();},initialize:function()
{return this;},load:function()
{var count=this.medias.length,total=0,$self=this;for(var i=0;i<count;i++)
{var img=new Image();img.onload=function()
{total+=1;if(count==total)
{$($self).trigger('loaded');}};img.src=this.medias[i].getAttribute('src');if(this.getOption('orderZIndex'))
{$(this.medias[i]).css('zIndex',count-i);}}
return this;}},BaseObject);var Btn=Class.create({_init:function(container,options){var _options={disable:false};this.options=$.extend({},_options,options);this.container=$(container);return this.initialize();},initialize:function()
{if(this.isDisabled())
this.disable();this.container.bind('click',function(evt){stopEvent(evt);if(!this.isDisabled())
{$(this).trigger('click');}
return false;}.bind(this));return this;},enable:function()
{this.setOption('disable',false);var force=arguments[0]||null;if(force)
{this.container.css({display:'block'});}
return this;},disable:function()
{this.setOption('disable',true);var force=arguments[0]||null;if(force)
{this.container.css({display:'none'});}
return this;},isDisabled:function()
{return this.getOption('disable');}},BaseObject);var Panel=Class.create({_init:function(container,btn,options){var _options={visible:false,closeBtn:null,toogle:true,openOnLoad:false};this.options=$.extend({},_options,options);this.container=$(container);this.btn=new Btn(btn);return this.initialize();},initialize:function()
{if(!this.container.is('div')&&!this.container.is('form'))
this.btn.disable(true);if(this.getOption('visible'))
this.show();$(this.btn).bind('click',function(evt){stopEvent(evt);var f='show';if(this.getOption('toogle'))
{f=(this.getOption('visible'))?'hide':'show';}
this[f]();return false;}.bind(this));var closeBtn=this.getOption('closeBtn');if(closeBtn)
{$(closeBtn,this.container).live('click',function(evt){stopEvent(evt);this.hide();return false;}.bind(this));}
return this;},hide:function()
{if(this.getOption('visible'))
{this.setOption('visible',false);$(this).trigger('beforeHide');this.container.css({display:'none'});$(this).trigger('hide');}
return this;},show:function()
{if(!this.getOption('visible'))
{this.setOption('visible',true);$(this).trigger('beforeShow');this.container.css({display:'block'});$(this).trigger('show');}
return this;}},BaseObject);var Menu=Class.create({hide:function()
{if(this.getOption('visible'))
{var params={easing:'easeInOutQuart',duration:500,complete:function(){$(this).trigger('hide');}.bind(this)};$(this).trigger('beforeHide');this.setOption('visible',false);this.container.stop(true,false).animate({height:0},params);}
return this;},show:function()
{if(!this.getOption('visible'))
{var params={easing:'easeInOutQuart',duration:500,complete:function(){$(this).trigger('show');}.bind(this)};$(this).trigger('beforeShow');this.setOption('visible',true);this.container.stop(true,false).animate({height:this.getHeight()},params);}
return this;},getHeight:function()
{var container=$('div:first',this.container);return parseInt(container.outerHeight(true),10);}},Panel);var Tabs=Class.create({_init:function(container,btn,options)
{var _options={active:0,css:'active'};this.options=$.extend({},_options,options);this.container=$(container);this.panels=new Array();if(this.container.is('div'))
{var $self=this;$(btn).each(function(i,elt){var c=$(elt),rel=$('.panel-'+c.data('panel'),$self.container);if(rel.length)
{$self.panels.push(new Panel(rel,c,{toogle:false}));}
else c.css({display:'none'});});}
return this.initialize();},initialize:function()
{var limit=this.panels.length;if(limit>0)
{var $self=this;for(var i=0;i<limit;i++)
{var panel=this.panels[i];if(panel.btn.container.hasClass(this.getOption('css')))
{panel.show();}}
for(var i=0;i<limit;i++)
{var panel=this.panels[i];$(panel).bind('beforeHide',function(event){this.btn.container.removeClass($self.getOption('css'));}.bind(panel));$(panel).bind('beforeShow',{active:i},function(event){this.btn.container.addClass($self.getOption('css'));$self.hideAll(event.data.active);}.bind(panel));}}
return this;},hideAll:function(active)
{var limit=this.panels.length;for(var i=0;i<limit;i++)
{if(i==active)continue;else
{this.panels[i].hide();}}
return this;}},BaseObject);var SlideShow=Class.create({_init:function(container,options)
{var _options={duration:500,interval:6000,autoplay:true}
this.options=$.extend({},_options,options);this.container=$(container);this.items=$('img',this.container);var limit=this.items.length;for(var i=0;i<limit;i++)
$(this.items[limit-(i+1)]).css({zIndex:i+limit});this.next=new Btn($('.next',this.container));this.prev=new Btn($('.previous',this.container));this.current=0;this.active=false;this.interval=null;return this.initialize();},initialize:function()
{if(this.items.length<2)
{this.next.disable(true);this.prev.disable(true);this.setOption('autoplay',false);}
else
{$(this.next).bind('click',function(evt){stopEvent(evt);this._next();return false;}.bind(this));$(this.prev).bind('click',function(evt){stopEvent(evt);this._prev();return false;}.bind(this));}
$(this).bind('ended',function(evt,i){this.current=i;this.active=false;if(!this.interval&&this.getOption('autoplay'))
{this.run();}
return;}.bind(this)).bind('beforeStart',function(evt,i){this.stop();return;}.bind(this));if(this.getOption('autoplay'))
this.run();return this;},run:function()
{if(!this.interval)
{this.interval=window.setTimeout(function(){this._next();}.bind(this),this.getOption('interval'));}
return this;},stop:function()
{window.clearTimeout(this.interval);this.interval=null;return this;},_prev:function()
{if(!this.active)
{this.active=true;var prev=(this.current==0)?this.items.length-1:this.current-1;$(this).trigger('beforeStart',[prev]);var d=this.getOption('duration');$(this.items[this.current]).animate({opacity:0},{duration:d});$(this.items[prev]).animate({opacity:1},{duration:d,complete:function(){$(this).trigger('ended',[prev]);}.bind(this)});}
return this;},_next:function()
{if(!this.active)
{this.active=true;var next=(this.current==this.items.length-1)?0:this.current+1;$(this).trigger('beforeStart',[next]);var d=this.getOption('duration');$(this.items[this.current]).animate({opacity:0},d);$(this.items[next]).animate({opacity:1},{duration:d,complete:function(){$(this).trigger('ended',[next]);}.bind(this)});}
return this;}},BaseObject);var Scroller=Class.create({_init:function(container){this.options={resizeDelay:400};this.container=$(container);this.scroller=$('.scroll',this.container);this.next=new Btn('.command.next a',this.container);this.prev=new Btn('.command.prev a',this.container);this.resizeTimeout=null;return this.initialize();},initialize:function(){$(window).bind('resize',function(evt){if(this.resizeTimeout)
{window.clearTimeout(this.resizeTimeout);this.resizeTimeout=null;}
this.resizeTimeout=window.setTimeout(function(){$(this).trigger('resized');}.bind(this),this.getOption('resizeDelay'));}.bind(this));$(this).bind('resized',function(){var left=this.getOffsetLeft();if(left==0)
{if(!this._isAlignOnLeft())
{this._move(left);}}
this._showHideBtns();}.bind(this));$(this.next).bind('click',function(){var left=this.getOffsetLeft();if(left>0)
{this._move(left);}}.bind(this));$(this.prev).bind('click',function(){this._move(0);}.bind(this));$(this).bind('afterMove',function(){var alignLeft=this._isAlignOnLeft(),left=this.getOffsetLeft();this.enableBtn(this.prev,this.next);var btn=(alignLeft)?this.prev:this.next;this.disableBtn(btn);if(left==0)
{this.disableBtn(this.next);}}.bind(this));this._keyboardCTRL();return this._showHideBtns();},getOffsetLeft:function()
{var r=326,screenWidth=parseInt(this.container.width()),width=parseInt(this.scroller.width());if(screenWidth<width)
{var left=width-screenWidth;if(r<left)
{r=left;}
else return left;}
else r=0;return r;},_keyboardCTRL:function()
{$(document).keyCTRL().bind('LEFT_KEY',function(){if(!this.prev.isDisabled())$(this.prev).trigger('click');}.bind(this)).bind('RIGHT_KEY',function(){if(!this.next.isDisabled())$(this.next).trigger('click');}.bind(this));return this;},_move:function(left)
{var options={duration:500,easing:'easeInOutQuart',complete:function(){$(this).trigger('afterMove');}.bind(this)};var scrollTop=this._getScrollTop();$(this).trigger('beforeMove');var callback=function(target){$(target.scroller).stop(true,false).animate({marginLeft:(-1*left)},options);};if(scrollTop>0)
{this._scrollTop(callback);}
else callback(this);return this;},_scrollTop:function()
{var callback=arguments[0]||null;$('html:not(:animated), body:not(:animated)').animate({scrollTop:0},{duration:350,complete:function(){if(callback)
{callback(this);}}.bind(this)});return this;},_isAlignOnLeft:function()
{var left=parseInt(this.scroller.css('marginLeft').replace('px',''));return(left==0)?true:false;},_getScrollTop:function()
{var scrollTopWindow=$(window).scrollTop(),offsetTop=this.container.offset()['top'];return(scrollTopWindow>offsetTop)?scrollTopWindow-(scrollTopWindow-offsetTop):0;},_showHideBtns:function()
{var left=this.getOffsetLeft();if(left!=0)
{if(!this._isAlignOnLeft())
{this._move(left);}
else
{this.disableBtn(this.prev).enableBtn(this.next);}}
else this.disableBtn(this.next,this.prev);return this;},disableBtn:function()
{for(var i=0;i<arguments.length;i++)
{var btn=arguments[i],container=btn.container.parents('.command:first');btn.disable();container.css({visibility:'hidden'});}
return this;},enableBtn:function()
{for(var i=0;i<arguments.length;i++)
{var btn=arguments[i],container=btn.container.parents('.command:first');btn.enable();container.css({visibility:'visible'});}
return this;}},BaseObject);var PageScroller=Class.create({_init:function(container,options){var _options={sectionSet:3,sectionWidth:326,ajaxBaseUrl:'/programme/',history:false,cssTargetElt:null};this.options=$.extend({},_options,options);this.container=$(container);this.next=new Btn('.command.next a',this.container);this.prev=new Btn('.command.prev a',this.container);this.sections=$('.section',this.container);this.target=this.getOption('target')||null;this.section=0;this.ajaxRequester=null;if(this.getOption('keyboard'))
{this._keyboardCTRL();}
return this.initialize();},initialize:function(){if(this.sections.length<=this.getOption('sectionSet'))
{$(new Array(this.next,this.prev)).each(function(i,elt){var href=elt.container.attr('href');if(href!='#'&&href)
{$(elt).bind('click',function(){window.location.href=this;}.bind(href));}
else elt.disable(true);}.bind(this));}
$(this.next).bind('click',function(){if(this._isLastSection())
{this._redirect(this.next);return;}
this._next();}.bind(this));$(this.prev).bind('click',function(){if(this._isFirstSection())
{this._redirect(this.prev);return;}
this._prev();}.bind(this));var cssTargetElt=this.getOption('cssTargetElt');if(cssTargetElt)
{$(cssTargetElt,this.container).bind('click',function(evt){stopEvent(evt);var target=$(evt.currentTarget);if(target.is('div')||target.is('a')||target.is('span'))
{var parent=target.parents('div.section:first');if(parent.length)
{var left=parent.data('left'),section=parseInt(left/this.getOption('sectionWidth')),uid=target.data('uid');if(section!=this.section)
{if(this.sections.length>2)
{this.section=section;this._move(left,uid);return;}}
if(this.target!=uid)
{if(this.target)this.close();}
this.open(uid);}}
return false;}.bind(this));}
$(this).bind('beforeMove',function(){if(this.target)
{this.close();}}.bind(this));if(this.getOption('history'))
{var hash=window.location.hash;if(hash.length>2)
{var f=this._initWidthHistory(hash.replace(/#\/?/,''));}}
if(!f)
{this._initWithSection();}
return this;},close:function()
{this.target=null;$(this._setWindowHash('')).trigger('beforeClose');if(this.ajaxRequester)
{this.ajaxRequester.abort();}
var sections=$('.sections_wrapper .section',this.container);if(sections.length)
{if(AUX.YTManager)
{AUX.YTManager.call('destroy');}
$('.sections_wrapper',this.container).replaceWith(sections).remove();if(arguments[0])
{var left=this._getLeftPosition(),limit=parseInt($('.section:last',this.container).data('left'),10);if(left>=limit)
{if(this.sections.length>this.getOption('sectionSet'))
{limit=(this.getOption('type')!='posts')?limit-this.getOption('sectionWidth'):limit;}
else limit=0;$('.sections',this.container).css({marginLeft:(-1*limit)+'px'});if(this.section==this.sections.length-2&&this.sections.length>this.getOption('sectionSet'))
{this.section-=1;}}}
if(this.getOption('type')=='posts')
{var params={display:'block'};$('.snail',sections).css(params);$('.section:last .snail',this.container).css(params);}
else sections.css({display:'block'});$(this).trigger('afterClose');}
return this;},open:function(uid)
{if(!this.target||this.target!=uid)
{var type=this.getOption('type');if(type=='posts')
{$('html:not(:animated), body:not(:animated)').animate({scrollTop:0},{duration:800});}
this.target=uid,context=this.container,article=$('.snail[data-uid='+uid+']',context);if(article.length)
{var colspan=1,width=parseInt(this.getOption('sectionWidth'),10),wrapperWidth=2*width;if(type=='posts')
{var props={text:3,video:2,image:2};for(var prop in props)
{if(article.hasClass(prop))
{colspan=props[prop];wrapperWidth=width*colspan;break;}}}
var parent=article.parent('div.section:first'),section=parseInt(parent.data('index'),10),limit=this.sections.length-colspan;var start=(section>limit)?limit:section,selectors=new Array();for(var i=0;i<colspan;i++)
{selectors.push('.section:eq('+(start+i)+')');}
var targets=$(selectors.join(', '),context),css='sections_wrapper';if(targets.length)
{targets.wrapAll($('<div class="'+css+'"><div></div></div>'));var html=$('.'+css,context).prepend($('<div class="article_content"><div class="loader_wrapper"><div class="loader"><img src="/static/images/ajax-loader-black.gif" /></div></div></div><span class="clear">&nbsp;</span>'));var elt=(type=='posts')?article:targets;elt.css({display:'none'});if(wrapperWidth<(3*width)&&type=='posts')
{$('.loader_wrapper',html).css({minHeight:'364px'});$('.loader',html).css({top:'150px'});}
html.stop(true,false).animate({width:wrapperWidth},{duration:900,complete:function(){$('.loader',html).css({display:'block'});this._loadArticle(article);}.bind(this)});}}}
return this;},_next:function()
{if(!this._isLastSection())
{this.section+=1;var left=parseInt($(this.sections.get(this.section)).data('left'));if(!isNaN(left))
{this._move(left);}}
return this;},_prev:function()
{if(!this._isFirstSection())
{this.section-=1;var left=parseInt($(this.sections.get(this.section)).data('left'));if(!isNaN(left))
{this._move(left);}}
return this;},_move:function(left)
{var uid=arguments[1]||null;var options={duration:650,easing:'easeInOutQuart',complete:function(){$(this).trigger('afterMove');if(uid)
{this.open(uid);}}.bind(this)};var scrollTop=this._getScrollTop();$(this).trigger('beforeMove');var callback=function(target){$('.sections',target.container).stop(true,false).animate({marginLeft:(-1*left)},options);};if(scrollTop>0)
{if(this.getOption('type')=='posts')scrollTop=0;$('html:not(:animated), body:not(:animated)').animate({scrollTop:scrollTop},{duration:350,complete:function(){callback(this);}.bind(this)});}
else callback(this);return this;},_initWidthHistory:function(uid)
{var r=false;if(uid.length)
{var article=$('.snail[data-uid='+uid+']',this.container);if(article.length)
{r=true;if(this.getOption('type')!='posts')
{$('.submenu .info a',article).trigger('click');}
else
{var target=$('.command:first, .play:first',article);if(target.length)
{$(target[0]).trigger('click');}}}}
return r;},_initWithSection:function()
{var article=$('.snail.active',this.container);if(article.length)
{var section=article.parent('.section:first');if(this.sections.length>2&&section.length)
{this._move(section.data('left'));this.section=parseInt(section.data('index'),10);}}
return this;},_getScrollTop:function()
{var scrollTopWindow=$(window).scrollTop(),offsetTop=this.container.offset()['top'];return(scrollTopWindow>offsetTop)?scrollTopWindow-(scrollTopWindow-offsetTop):0;},_getLeftPosition:function()
{var r=0,wrapper=$('.sections',this.container);if(wrapper.length)
{r=Math.abs(parseInt(wrapper.css('marginLeft').replace('px','')));}
return r;},_keyboardCTRL:function()
{$(document).keyCTRL().bind('LEFT_KEY',function(){if(!this.prev.isDisabled())$(this.prev).trigger('click');}.bind(this)).bind('RIGHT_KEY',function(){if(!this.next.isDisabled())$(this.next).trigger('click');}.bind(this));return this;},_loadArticle:function(article)
{if(article.length)
{var id=article.data('content-id'),uid=article.data('uid');if(this.ajaxRequester)this.ajaxRequester.abort();this.ajaxRequester=$.ajax({dataType:'html',url:this.getOption('ajaxBaseUrl')+id+'?ajax=true',complete:function(r)
{if(r.status==200)
{var wrapper=$('.sections_wrapper .article_content',this.container);if(wrapper.length)
{wrapper.html(r.responseText);this._setWindowHash(uid);$('.close:first').bind('click',function(evt){stopEvent(evt);this.close(true);return false;}.bind(this));}}}.bind(this)});}
return this;},_setWindowHash:function(value)
{var hash=window.location.hash.replace(/#\//,'');if(value!=hash)
{window.location.hash='/'+value;}
return this;},_isFirstSection:function()
{return(this.section==0)?true:false;},_isLastSection:function()
{var r=true,sectionSet=this.getOption('sectionSet');if(this.sections.length>sectionSet)
{var limit=this.sections.length-sectionSet;if(this.section<limit)
{r=false;}}
return r;},_redirect:function(btn)
{if(btn.container)
{var href=btn.container.attr('href');if(href!='#')
{window.location.href=href;}}
return;}},BaseObject);var YTPlayer=Class.create({_init:function(container,options)
{var _options={cssPlayer:null,width:270,height:200,origin:'http://www.auxecuries.com',params:'?wmode=opaque&enablejsapi=true&fs=1&&rel=0&autohide=1&disablekb=1',src:'http://www.youtube.com/embed/'};this.options=$.extend({},_options,options);this.container=$(container);this.YT=null;this.iframe=null;this.videoID=this.container.data('ytid');this.slug=this.videoID+'-'+this.container.data('slug');this.ie7Support=($.browser.msie&&parseInt($.browser.version.substr(0,1),10)<8)?true:false;return this.initialize();},initialize:function()
{if(!AUX.YTReady)
{window.setTimeout(function(){this.initialize();}.bind(this),250);}
else{if(!this.ie7Support)
{this.embed();this.YT=new YT.Player(document.getElementById(this.slug),{events:{'onReady':function(evt){$(this).trigger('ready',[this]);return;}.bind(this),'onStateChange':function(evt){switch(evt.data)
{case YT.PlayerState.PLAYING:$(this).trigger('played',[this]);break;case YT.PlayerState.ENDED:$(this).trigger('ended',[this]);break;}
return;}.bind(this)}});$(this).bind('played',function(evt){AUX.YTManager.setPlayingVideo(this.slug).call('pause',this.slug);}.bind(this));$(this).bind('ended',function(evt){this.stop();}.bind(this));$(this).bind('ready',function(evt){if(AUX.YTManager)
{AUX.YTManager.register(this);$('.thumbnail',this.container).bind('click',function(evt){this.play();}.bind(this));}
return;}.bind(this));}
else
{$('.thumbnail',this.container).bind('click',function(evt){this.play();}.bind(this));}}
return this;},play:function()
{var elt=$('.thumbnail',this.container);if(elt.is('div'))
{elt.css({display:'none'});if(this.ie7Support)
{this.embed();}
else
{if(this.YT)this.YT.playVideo();}
if(this.getOption('cssPlayer'))
{var css=this.getOption('cssPlayer');this.iframe.css(css.openState);}
elt.css({display:'none'});}
return this;},pause:function()
{if(!this.ie7Support&&this.YT)
{this.YT.pauseVideo();}
return this;},stop:function()
{if(!this.ie7Support&&this.YT)
{$('.thumbnail',this.container).css({display:'block'});if(this.getOption('cssPlayer'))
{var css=this.getOption('cssPlayer');this.iframe.css(css.closeState);}
this.YT.seekTo(0).stopVideo();}
return this;},destroy:function()
{if(this.ie7Support&&this.iframe)
{$('iframe',this.container).remove();this.iframe=null;return this;}
if(this.YT)
{this.YT.destroy();this.YT=null;this.iframe=null;}
return this;},embed:function()
{var src=this.getOption('src')+this.videoID+this.getOption('params');if(this.ie7Support)src+='&autoplay=1';src+='&origin='+this.getOption('origin');this.iframe=$('<iframe id="'+this.slug+'" width="'+this.getOption('width')+'" height="'+this.getOption('height')+'" src="'+src+'" frameborder="0"></iframe>');this.container.append(this.iframe);return this;}},BaseObject);var YTRegistry=Class.create({_init:function(){this.registry={};this.playing=null;return this['initialize'].apply(this,arguments);},initialize:function()
{for(var i=0;i<arguments.length;i++)
{this.register(arguments);}
$(this).bind('on_destroy',function(evt,obj)
{this.unregister(obj);}.bind(this));return this;},register:function(ytPlayer)
{var slug=ytPlayer.slug||null;if(slug)
{this.registry[slug]=ytPlayer;}
return this;},unregister:function(ytPlayer)
{var slug=ytPlayer.slug||null;if(slug)
{if(this.registry.hasOwnProperty(slug))
{delete this.registry[slug];}}
return this;},call:function(fn,slug)
{return this['_'+fn](slug);},setPlayingVideo:function(slug)
{if(slug)
{if(this.registry.hasOwnProperty(slug))
{this.playing=slug;}}
return this;},_call:function(fn,slug)
{if(slug)
{if(this.registry.hasOwnProperty(slug))
{try{this.registry[slug][fn]();}catch(e){}}}
else
{for(var prop in this.registry)
{try{var instance=this.registry[prop];instance[fn]();$(this).trigger('on'+fn,[instance]);}catch(e){}}}
return this;},_stop:function(slug)
{return this._call('stop',slug);},_pause:function(slug)
{for(var prop in this.registry)
{if(slug!=prop)
{try{var instance=this.registry[prop];instance.pause();$(this).trigger('on'+fn,[instance]);}catch(e){}}}
return this;},_destroy:function(slug)
{return this._call('destroy',slug);},_play:function(slug)
{if(slug)
{if(this.registry.hasOwnProperty(slug))
{try{var instance=this.registry[slug];instance.play();$(this).trigger('on'+fn,[instance]);}catch(e){}}}
return this;}},BaseObject);
