(function(n){var t=(n.browser.msie?"paste":"input")+".mask",i=window.orientation!=undefined;n.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn"};n.fn.extend({caret:function(n,t){if(this.length!=0){if(typeof n=="number")return t=typeof t=="number"?t:n,this.each(function(){if(this.setSelectionRange)this.setSelectionRange(n,t);else if(this.createTextRange){var i=this.createTextRange();i.collapse(!0);i.moveEnd("character",t);i.moveStart("character",n);i.select()}});if(this[0].setSelectionRange)n=this[0].selectionStart,t=this[0].selectionEnd;else if(document.selection&&document.selection.createRange){var i=document.selection.createRange();n=0-i.duplicate().moveStart("character",-1e5);t=n+i.text.length}return{begin:n,end:t}}},unmask:function(){return this.trigger("unmask")},mask:function(r,u){var c;if(!r&&this.length>0)return c=n(this[0]),c.data(n.mask.dataName)();u=n.extend({placeholder:"_",completed:null},u);var h=n.mask.definitions,f=[],o=r.length,s=null,e=r.length;return n.each(r.split(""),function(n,t){t=="?"?(e--,o=n):h[t]?(f.push(new RegExp(h[t])),s==null&&(s=f.length-1)):f.push(null)}),this.trigger("unmask").each(function(){function v(n){for(var h=c.val(),r=-1,a,t=0,i=0;t<e;t++)if(f[t]){for(l[t]=u.placeholder;i++<h.length;)if(a=h.charAt(i-1),f[t].test(a)){l[t]=a;r=t;break}if(i>h.length)break}else l[t]==h.charAt(i)&&t!=o&&(i++,r=t);return!n&&r+1<o?(c.val(""),p(0,e)):(n||r+1>=o)&&(y(),n||c.val(c.val().substring(0,r+1))),o?t:s}function y(){return c.val(l.join("")).val()}function p(n,t){for(var i=n;i<t&&i<e;i++)f[i]&&(l[i]=u.placeholder)}function k(n){var r=n.which,t=c.caret(),i,o,s;return n.ctrlKey||n.altKey||n.metaKey||r<32?!0:r?(t.end-t.begin!=0&&(p(t.begin,t.end),b(t.begin,t.end-1)),i=a(t.begin-1),i<e&&(o=String.fromCharCode(r),f[i].test(o)&&(g(i),l[i]=o,y(),s=a(i),c.caret(s),u.completed&&s>=e&&u.completed.call(c))),!1):void 0}function d(n){var r=n.which;if(r==8||r==46||i&&r==127){var f=c.caret(),u=f.begin,t=f.end;return t-u==0&&(u=r!=46?nt(u):t=a(u-1),t=r==46?a(t):t),p(u,t),b(u,t-1),!1}if(r==27)return c.val(w),c.caret(0,v()),!1}function g(n){for(var r,o,t=n,i=u.placeholder;t<e;t++)if(f[t])if(r=a(t),o=l[t],l[t]=i,r<e&&f[r].test(o))i=o;else break}function b(n,t){if(!(n<0)){for(var r=n,i=a(t);r<e;r++)if(f[r]){if(i<e&&f[r].test(l[i]))l[r]=l[i],l[i]=u.placeholder;else break;i=a(i)}y();c.caret(Math.max(s,n))}}function nt(n){while(--n>=0&&!f[n]);return n}function a(n){while(++n<=e&&!f[n]);return n}var c=n(this),l=n.map(r.split(""),function(n){if(n!="?")return h[n]?u.placeholder:n}),w=c.val();c.data(n.mask.dataName,function(){return n.map(l,function(n,t){return f[t]&&n!=u.placeholder?n:null}).join("")});c.attr("readonly")||c.one("unmask",function(){c.unbind(".mask").removeData(n.mask.dataName)}).bind("focus.mask",function(){var t,i;w=c.val();t=v();y();i=function(){t==r.length?c.caret(0,t):c.caret(t)};(n.browser.msie?i:function(){setTimeout(i,0)})()}).bind("blur.mask",function(){v();c.val()!=w&&c.change()}).bind("keydown.mask",d).bind("keypress.mask",k).bind(t,function(){setTimeout(function(){c.caret(v(!0))},0)});v()})}})})(jQuery),function(n,t,i){function u(i,r,u){var f=t.createElement(i);return r&&(f.id=h+r),u&&(f.style.cssText=u),n(f)}function bt(n){var i=c.length,t=(v+n)%i;return t<0?i+t:t}function a(n,t){return Math.round((/%/.test(n)?(t==="x"?kt():dt())/100:1)*parseInt(n,10))}function pi(n){return r.photo||/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(n)}function kt(){return i.innerWidth||p.width()}function dt(){return i.innerHeight||p.height()}function wi(){var t,i=n.data(y,b);i==null?(r=n.extend({},gt),console&&console.log&&console.log("Error: cboxElement missing settings object")):r=n.extend({},i);for(t in r)n.isFunction(r[t])&&t.slice(0,2)!=="on"&&(r[t]=r[t].call(y));r.rel=r.rel||y.rel||"nofollow";r.href=r.href||n(y).attr("href");r.title=r.title||y.title;typeof r.href=="string"&&(r.href=n.trim(r.href))}function ut(t,i){n.event.trigger(t);i&&i.call(y)}function di(){var t,n=h+"Slideshow_",i="click."+h,u,e;r.slideshow&&c[1]?(u=function(){ht.text(r.slideshowStop).unbind(i).bind(ti,function(){(r.loop||c[v+1])&&(t=setTimeout(f.next,r.slideshowSpeed))}).bind(ni,function(){clearTimeout(t)}).one(i+" "+vt,e);o.removeClass(n+"off").addClass(n+"on");t=setTimeout(f.next,r.slideshowSpeed)},e=function(){clearTimeout(t);ht.text(r.slideshowStart).unbind([ti,ni,vt,i].join(" ")).one(i,function(){f.next();u()});o.removeClass(n+"on").addClass(n+"off")},r.slideshowAuto?u():e()):o.removeClass(n+"off "+n+"on")}function bi(t){if(!wt){if(y=t,wi(),c=n(y),v=0,r.rel!=="nofollow"&&(c=n("."+ft).filter(function(){var t=n.data(this,b),i;return t&&(i=t.rel||this.rel),i===r.rel}),v=c.index(y),v===-1&&(c=c.add(y),v=c.length-1)),!g){if(g=at=!0,o.show(),r.returnFocus)n(y).blur().one(vi,function(){n(this).focus()});nt.css({opacity:+r.opacity,cursor:r.overlayClose?"pointer":"auto"}).show();r.w=a(r.initialWidth,"x");r.h=a(r.initialHeight,"y");f.position();ot&&p.bind("resize."+pt+" scroll."+pt,function(){nt.css({width:kt(),height:dt(),top:p.scrollTop(),left:p.scrollLeft()})}).trigger("resize."+pt);ut(ai,r.onOpen);ci.add(oi).hide();hi.html(r.close).show()}f.load(!0)}}function ki(){!o&&t.body&&(li=!1,p=n(i),o=u(e).attr({id:b,"class":et?h+(ot?"IE6":"IE"):""}).hide(),nt=u(e,"Overlay",ot?"position:absolute":"").hide(),ei=u(e,"LoadingOverlay").add(u(e,"LoadingGraphic")),rt=u(e,"Wrapper"),w=u(e,"Content").append(l=u(e,"LoadedContent","width:0; height:0; overflow:hidden"),oi=u(e,"Title"),si=u(e,"Current"),ct=u(e,"Next"),lt=u(e,"Previous"),ht=u(e,"Slideshow").bind(ai,di),hi=u(e,"Close")),rt.append(u(e).append(u(e,"TopLeft"),ii=u(e,"TopCenter"),u(e,"TopRight")),u(e,!1,"clear:left").append(ri=u(e,"MiddleLeft"),w,ui=u(e,"MiddleRight")),u(e,!1,"clear:left").append(u(e,"BottomLeft"),fi=u(e,"BottomCenter"),u(e,"BottomRight"))).find("div div").css({float:"left"}),st=u(e,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),ci=ct.add(lt).add(si).add(ht),n(t.body).append(nt,o.append(rt,st)))}function gi(){return o?(li||(li=!0,tt=ii.height()+fi.height()+w.outerHeight(!0)-w.height(),it=ri.width()+ui.width()+w.outerWidth(!0)-w.width(),k=l.outerHeight(!0),d=l.outerWidth(!0),o.css({"padding-bottom":tt,"padding-right":it}),ct.click(function(){f.next()}),lt.click(function(){f.prev()}),hi.click(function(){f.close()}),nt.click(function(){r.overlayClose&&f.close()}),n(t).bind("keydown."+h,function(n){var t=n.keyCode;g&&r.escKey&&t===27&&(n.preventDefault(),f.close());g&&r.arrowKey&&c[1]&&(t===37?(n.preventDefault(),lt.click()):t===39&&(n.preventDefault(),ct.click()))}),n("."+ft,t).live("click",function(n){n.which>1||n.shiftKey||n.altKey||n.metaKey||(n.preventDefault(),bi(this))})),!0):!1}var gt={transition:"elastic",speed:300,width:!1,initialWidth:"500",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"500",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},b="colorbox",h="cbox",ft=h+"Element",ai=h+"_open",ni=h+"_load",ti=h+"_complete",vt=h+"_cleanup",vi=h+"_closed",yt=h+"_purge",et=!n.support.opacity&&!n.support.style,ot=et&&!i.XMLHttpRequest,pt=h+"_IE6",nt,o,rt,w,ii,ri,ui,fi,c,p,l,st,ei,oi,si,ht,ct,lt,hi,ci,r,tt,it,k,d,y,v,s,g,at,wt,yi,f,e="div",li;n.colorbox||(n(ki),f=n.fn[b]=n[b]=function(t,i){var r=this;if(t=t||{},ki(),gi()){if(!r[0]){if(r.selector)return r;r=n("<a/>");t.open=!0}i&&(t.onComplete=i);r.each(function(){n.data(this,b,n.extend({},n.data(this,b)||gt,t))}).addClass(ft);(n.isFunction(t.open)&&t.open.call(r)||t.open)&&bi(r[0])}return r},f.position=function(n,t){function v(n){ii[0].style.width=fi[0].style.width=w[0].style.width=n.style.width;w[0].style.height=ri[0].style.height=ui[0].style.height=n.style.height}var u,e=0,s=0,i=o.offset(),c,l;p.unbind("resize."+h);o.css({top:-9e4,left:-9e4});c=p.scrollTop();l=p.scrollLeft();r.fixed&&!ot?(i.top-=c,i.left-=l,o.css({position:"fixed"})):(e=c,s=l,o.css({position:"absolute"}));s+=r.right!==!1?Math.max(kt()-r.w-d-it-a(r.right,"x"),0):r.left!==!1?a(r.left,"x"):Math.round(Math.max(kt()-r.w-d-it,0)/2);e+=r.bottom!==!1?Math.max(dt()-r.h-k-tt-a(r.bottom,"y"),0):r.top!==!1?a(r.top,"y"):Math.round(Math.max(dt()-r.h-k-tt,0)/2);o.css({top:i.top,left:i.left});n=o.width()===r.w+d&&o.height()===r.h+k?0:n||0;rt[0].style.width=rt[0].style.height="9999px";u={width:r.w+d,height:r.h+k,top:e,left:s};n===0&&o.css(u);o.dequeue().animate(u,{duration:n,complete:function(){v(this);at=!1;rt[0].style.width=r.w+d+it+"px";rt[0].style.height=r.h+k+tt+"px";r.reposition&&setTimeout(function(){p.bind("resize."+h,f.position)},1);t&&t()},step:function(){v(this)}})},f.resize=function(n){g&&(n=n||{},n.width&&(r.w=a(n.width,"x")-d-it),n.innerWidth&&(r.w=a(n.innerWidth,"x")),l.css({width:r.w}),n.height&&(r.h=a(n.height,"y")-k-tt),n.innerHeight&&(r.h=a(n.innerHeight,"y")),n.innerHeight||n.height||(l.css({height:"auto"}),r.h=l.height()),l.css({height:r.h}),f.position(r.transition==="none"?0:r.speed))},f.prep=function(t){function y(){return r.w=r.w||l.width(),r.w=r.mw&&r.mw<r.w?r.mw:r.w,r.w}function p(){return r.h=r.h||l.height(),r.h=r.mh&&r.mh<r.h?r.mh:r.h,r.h}if(g){var i,a=r.transition==="none"?0:r.speed;if(l.remove(),l=u(e,"LoadedContent").append(t),l.hide().appendTo(st.show()).css({width:y(),overflow:r.scrolling?"auto":"hidden"}).css({height:p()}).prependTo(w),st.hide(),n(s).css({float:"none"}),ot)n("select").not(o.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(vt,function(){this.style.visibility="inherit"});i=function(){function tt(){et&&o[0].style.removeAttribute("filter")}var w,f,p=c.length,t,k="frameBorder",d="allowTransparency",e,i,nt,y;if(g){if(e=function(){clearTimeout(yi);ei.detach().hide();ut(ti,r.onComplete)},et&&s&&l.fadeIn(100),oi.html(r.title).add(l).show(),p>1){if(typeof r.current=="string"&&si.html(r.current.replace("{current}",v+1).replace("{total}",p)).show(),ct[r.loop||v<p-1?"show":"hide"]().html(r.next),lt[r.loop||v?"show":"hide"]().html(r.previous),r.slideshow&&ht.show(),r.preloading)for(w=[bt(-1),bt(1)];f=c[w.pop()];)y=n.data(f,b),y&&y.href?(i=y.href,n.isFunction(i)&&(i=i.call(f))):i=f.href,pi(i)&&(nt=new Image,nt.src=i)}else ci.hide();if(r.iframe){if(t=u("iframe")[0],k in t&&(t[k]=0),d in t&&(t[d]="true"),t.name=h+ +new Date,r.fastIframe)e();else n(t).one("load",e);t.src=r.href;r.scrolling||(t.scrolling="no");n(t).addClass(h+"Iframe").appendTo(l).one(yt,function(){t.src="//about:blank"})}else e();r.transition==="fade"?o.fadeTo(a,1,tt):tt()}};r.transition==="fade"?o.fadeTo(a,0,function(){f.position(0,i)}):f.position(a,i)}},f.load=function(t){var i,p,o=f.prep;if(at=!0,s=!1,y=c[v],t||wi(),ut(yt),ut(ni,r.onLoad),r.h=r.height?a(r.height,"y")-k-tt:r.innerHeight&&a(r.innerHeight,"y"),r.w=r.width?a(r.width,"x")-d-it:r.innerWidth&&a(r.innerWidth,"x"),r.mw=r.w,r.mh=r.h,r.maxWidth&&(r.mw=a(r.maxWidth,"x")-d-it,r.mw=r.w&&r.w<r.mw?r.w:r.mw),r.maxHeight&&(r.mh=a(r.maxHeight,"y")-k-tt,r.mh=r.h&&r.h<r.mh?r.h:r.mh),i=r.href,yi=setTimeout(function(){ei.show().appendTo(w)},100),r.inline){u(e).hide().insertBefore(n(i)[0]).one(yt,function(){n(this).replaceWith(l.children())});o(n(i))}else r.iframe?o(" "):r.html?o(r.html):pi(i)?(n(s=new Image).addClass(h+"Photo").error(function(){r.title=!1;o(u(e,"Error").html(r.imgError))}).load(function(){var n;s.onload=null;r.scalePhotos&&(p=function(){s.height-=s.height*n;s.width-=s.width*n},r.mw&&s.width>r.mw&&(n=(s.width-r.mw)/s.width,p()),r.mh&&s.height>r.mh&&(n=(s.height-r.mh)/s.height,p()));r.h&&(s.style.marginTop=Math.max(r.h-s.height,0)/2+"px");c[1]&&(r.loop||c[v+1])&&(s.style.cursor="pointer",s.onclick=function(){f.next()});et&&(s.style.msInterpolationMode="bicubic");setTimeout(function(){o(s)},1)}),setTimeout(function(){s.src=i},1)):i&&st.load(i,r.data,function(t,i){o(i==="error"?u(e,"Error").html(r.xhrError):n(this).contents())})},f.next=function(){!at&&c[1]&&(r.loop||c[v+1])&&(v=bt(1),f.load())},f.prev=function(){!at&&c[1]&&(r.loop||v)&&(v=bt(-1),f.load())},f.close=function(){g&&!wt&&(wt=!0,g=!1,ut(vt,r.onCleanup),p.unbind("."+h+" ."+pt),nt.fadeTo(200,0),o.stop().fadeTo(300,0,function(){o.add(nt).css({opacity:1,cursor:"auto"}).hide();ut(yt);l.remove();setTimeout(function(){wt=!1;ut(vi,r.onClosed)},1)}))},f.remove=function(){n([]).add(o).add(nt).remove();o=null;n("."+ft).removeData(b).removeClass(ft).die()},f.element=function(){return n(y)},f.settings=gt)}(jQuery,document,this),function(n,t,i){var u="watermark",f="watermarkClass",h="watermarkFocus",s="watermarkSubmit",c="watermarkMaxLength",e="watermarkPassword",r="watermarkText",o=/\r/g,y="input:data("+u+"),textarea:data("+u+")",l="input:text,input:password,input[type=search],input:not([type]),textarea",a=["Page_ClientValidate"],v=!1,p="placeholder"in document.createElement("input");n.watermark=n.watermark||{version:"3.1.3",runOnce:!0,options:{className:"watermark",useNative:!0,hideBeforeUnload:!0},hide:function(t){n(t).filter(y).each(function(){n.watermark._hide(n(this))})},_hide:function(n,i){var h=n[0],y=(h.value||"").replace(o,""),l=n.data(r)||"",a=n.data(c)||0,v=n.data(f),u,s;l.length&&y==l&&(h.value="",n.data(e)&&(n.attr("type")||"")==="text"&&(u=n.data(e)||[],s=n.parent()||[],u.length&&s.length&&(s[0].removeChild(n[0]),s[0].appendChild(u[0]),n=u)),a&&(n.attr("maxLength",a),n.removeData(c)),i&&(n.attr("autocomplete","off"),t.setTimeout(function(){n.select()},1)));v&&n.removeClass(v)},show:function(t){n(t).filter(y).each(function(){n.watermark._show(n(this))})},_show:function(t){var a=t[0],p=(a.value||"").replace(o,""),i=t.data(r)||"",y=t.attr("type")||"",w=t.data(f),u,s,l;p.length!=0&&p!=i||t.data(h)?n.watermark._hide(t):(v=!0,t.data(e)&&y==="password"&&(u=t.data(e)||[],s=t.parent()||[],u.length&&s.length&&(s[0].removeChild(t[0]),s[0].appendChild(u[0]),t=u,t.attr("maxLength",i.length),a=t[0])),(y==="text"||y==="search")&&(l=t.attr("maxLength")||0,l>0&&i.length>l&&(t.data(c,l),t.attr("maxLength",i.length))),w&&t.addClass(w),a.value=i)},hideAll:function(){v&&(n.watermark.hide(l),v=!1)},showAll:function(){n.watermark.show(l)}};n.fn.watermark=n.fn.watermark||function(i,c){if(!this.length)return this;var v=!1,a=typeof i=="string";return a&&(i=i.replace(o,"")),typeof c=="object"?(v=typeof c.className=="string",c=n.extend({},n.watermark.options,c)):typeof c=="string"?(v=!0,c=n.extend({},n.watermark.options,{className:c})):c=n.watermark.options,typeof c.useNative!="function"&&(c.useNative=c.useNative?function(){return!0}:function(){return!1}),this.each(function(){var y=n(this),d,w,b,k;if(y.is(l)){if(y.data(u))(a||v)&&(n.watermark._hide(y),a&&y.data(r,i),v&&y.data(f,c.className));else{if(p&&c.useNative.call(this,y)&&(y.attr("tagName")||"")!=="TEXTAREA"){a&&y.attr("placeholder",i);return}y.data(r,a?i:"");y.data(f,c.className);y.data(u,1);(y.attr("type")||"")==="password"?(d=y.wrap("<span>").parent(),w=n(d.html().replace(/type=["']?password["']?/i,'type="text"')),w.data(r,y.data(r)),w.data(f,y.data(f)),w.data(u,1),w.attr("maxLength",i.length),w.focus(function(){n.watermark._hide(w,!0)}).bind("dragenter",function(){n.watermark._hide(w)}).bind("dragend",function(){t.setTimeout(function(){w.blur()},1)}),y.blur(function(){n.watermark._show(y)}).bind("dragleave",function(){n.watermark._show(y)}),w.data(e,y),y.data(e,w)):y.focus(function(){y.data(h,1);n.watermark._hide(y,!0)}).blur(function(){y.data(h,0);n.watermark._show(y)}).bind("dragenter",function(){n.watermark._hide(y)}).bind("dragleave",function(){n.watermark._show(y)}).bind("dragend",function(){t.setTimeout(function(){n.watermark._show(y)},1)}).bind("drop",function(n){var t=y[0],i=n.originalEvent.dataTransfer.getData("Text");(t.value||"").replace(o,"").replace(i,"")===y.data(r)&&(t.value=i);y.focus()});this.form&&(b=this.form,k=n(b),k.data(s)||(k.submit(n.watermark.hideAll),b.submit?(k.data(s,b.submit),b.submit=function(t,i){return function(){var r=i.data(s);n.watermark.hideAll();r.apply?r.apply(t,Array.prototype.slice.call(arguments)):r()}}(b,k)):(k.data(s,1),b.submit=function(t){return function(){n.watermark.hideAll();delete t.submit;t.submit()}}(b))))}n.watermark._show(y)}})};n.watermark.runOnce&&(n.watermark.runOnce=!1,n.extend(n.expr[":"],{data:function(t,i,r){return!!n.data(t,r[3])}}),function(t){n.fn.val=function(){if(!this.length)return arguments.length?this:i;if(arguments.length)return t.apply(this,arguments),n.watermark.show(this),this;if(this.data(u)){var f=(this[0].value||"").replace(o,"");return f===(this.data(r)||"")?"":f}return t.apply(this,arguments)}}(n.fn.val),a.length&&n(function(){for(var r,u,i=a.length-1;i>=0;i--)r=a[i],u=t[r],typeof u=="function"&&(t[r]=function(t){return function(){return n.watermark.hideAll(),t.apply(null,Array.prototype.slice.call(arguments))}}(u))}),n(t).bind("beforeunload",function(){n.watermark.options.hideBeforeUnload&&n.watermark.hideAll()}))}(jQuery,window),function(n){var t=function(n){if(!n)var n=window.event;n.cancelBubble=!0;n.stopPropagation&&n.stopPropagation()};n.fn.checkbox=function(i){var r,u;try{document.execCommand("BackgroundImageCache",!1,!0)}catch(f){}return r={cls:"jquery-checkbox",empty:"empty.png"},r=n.extend(r,i||{}),u=function(t){var r=t.checked,u=t.disabled,i=n(t);return t.stateInterval&&clearInterval(t.stateInterval),t.stateInterval=setInterval(function(){t.disabled!=u&&i.trigger((u=!!t.disabled)?"disable":"enable");t.checked!=r&&i.trigger((r=!!t.checked)?"check":"uncheck")},10),i},this.each(function(){var i=this,f=u(i),e;i.wrapper&&i.wrapper.remove();i.wrapper=n('<span class="'+r.cls+'"><span class="mark"><img src="'+r.empty+'" /><\/span><\/span>');i.wrapperInner=i.wrapper.children("span:eq(0)");i.wrapper.hover(function(n){i.wrapperInner.addClass(r.cls+"-hover");t(n)},function(n){i.wrapperInner.removeClass(r.cls+"-hover");t(n)});f.css({position:"absolute",zIndex:-1,visibility:"hidden"}).after(i.wrapper);e=!1;f.attr("id")&&(e=n("label[for="+f.attr("id")+"]"),e.length||(e=!1));e||(e=f.closest?f.closest("label"):f.parents("label:eq(0)"),e.length||(e=!1));e&&(e.hover(function(n){i.wrapper.trigger("mouseover",[n])},function(n){i.wrapper.trigger("mouseout",[n])}),e.click(function(n){return f.trigger("click",[n]),t(n),!1}));i.wrapper.click(function(n){return f.trigger("click",[n]),t(n),!1});f.click(function(n){t(n)});f.bind("disable",function(){i.wrapperInner.addClass(r.cls+"-disabled")}).bind("enable",function(){i.wrapperInner.removeClass(r.cls+"-disabled")});f.bind("check",function(){i.wrapper.addClass(r.cls+"-checked")}).bind("uncheck",function(){i.wrapper.removeClass(r.cls+"-checked")});n("img",i.wrapper).bind("dragstart",function(){return!1}).bind("mousedown",function(){return!1});window.getSelection&&i.wrapper.css("MozUserSelect","none");i.checked&&i.wrapper.addClass(r.cls+"-checked");i.disabled&&i.wrapperInner.addClass(r.cls+"-disabled")})}}(jQuery),function(n,t){function f(){this._state=[];this._defaults={classHolder:"sbHolder",classHolderDisabled:"sbHolderDisabled",classSelector:"sbSelector",classOptions:"sbOptions",classGroup:"sbGroup",classSub:"sbSub",classDisabled:"sbDisabled",classToggleOpen:"sbToggleOpen",classToggle:"sbToggle",classFocus:"sbFocus",speed:200,effect:"slide",onChange:null,onOpen:null,onClose:null}}var r="selectbox",i=!1,u=!0;n.extend(f.prototype,{_isOpenSelectbox:function(n){if(!n)return i;var t=this._getInst(n);return t.isOpen},_isDisabledSelectbox:function(n){if(!n)return i;var t=this._getInst(n);return t.isDisabled},_attachSelectbox:function(t,f){function p(){var t,i,r=this.attr("id").split("_")[1];for(t in o._state)t!==r&&o._state.hasOwnProperty(t)&&(i=n("select[sb='"+t+"']")[0],i&&o._closeSelectbox(i))}function w(){var i=arguments[1]&&arguments[1].sub?!0:!1,r=arguments[1]&&arguments[1].disabled?!0:!1;arguments[0].each(function(f){var s=n(this),y=n("<li>"),h;s.is(":selected")&&(c.text(s.text()),v=u);f===b-1&&y.addClass("last");s.is(":disabled")||r?(h=n("<span>",{text:s.text()}).addClass(e.settings.classDisabled),i&&h.addClass(e.settings.classSub),h.appendTo(y)):(h=n("<a>",{href:"#"+s.val(),rel:s.val()}).text(s.text()).bind("click.sb",function(i){i&&i.preventDefault&&i.preventDefault();var u=a,r=n(this),f=u.attr("id").split("_")[1];o._changeSelectbox(t,r.attr("rel"),r.text());o._closeSelectbox(t)}).bind("mouseover.sb",function(){var t=n(this);t.parent().siblings().find("a").removeClass(e.settings.classFocus);t.addClass(e.settings.classFocus)}).bind("mouseout.sb",function(){n(this).removeClass(e.settings.classFocus)}),i&&h.addClass(e.settings.classSub),s.is(":selected")&&h.addClass(e.settings.classFocus),h.appendTo(y));y.appendTo(l)})}if(this._getInst(t))return i;var s=n(t),o=this,e=o._newInst(s),h,c,a,l,v=i,k=s.find("optgroup"),y=s.find("option"),b=y.length;s.attr("sb",e.uid);n.extend(e.settings,o._defaults,f);o._state[e.uid]=i;s.hide();h=n("<div>",{id:"sbHolder_"+e.uid,"class":e.settings.classHolder,tabindex:s.attr("tabindex")});c=n("<a>",{id:"sbSelector_"+e.uid,href:"#","class":e.settings.classSelector,click:function(i){i.preventDefault();p.apply(n(this),[]);var r=n(this).attr("id").split("_")[1];o._state[r]?o._closeSelectbox(t):o._openSelectbox(t)}});a=n("<a>",{id:"sbToggle_"+e.uid,href:"#","class":e.settings.classToggle,click:function(i){i.preventDefault();p.apply(n(this),[]);var r=n(this).attr("id").split("_")[1];o._state[r]?o._closeSelectbox(t):o._openSelectbox(t)}});a.appendTo(h);l=n("<ul>",{id:"sbOptions_"+e.uid,"class":e.settings.classOptions,css:{display:"none"}});s.children().each(function(){var t=n(this),i,r={};t.is("option")?w(t):t.is("optgroup")&&(i=n("<li>"),n("<span>",{text:t.attr("label")}).addClass(e.settings.classGroup).appendTo(i),i.appendTo(l),t.is(":disabled")&&(r.disabled=!0),r.sub=!0,w(t.find("option"),r))});v||c.text(y.first().text());n.data(t,r,e);h.data("uid",e.uid).bind("keydown.sb",function(t){var l=t.charCode?t.charCode:t.keyCode?t.keyCode:0,u=n(this),h=u.data("uid"),f=u.siblings("select[sb='"+h+"']").data(r),s=u.siblings(["select[sb='",h,"']"].join("")).get(0),i=u.find("ul").find("a."+f.settings.classFocus),e,c;switch(l){case 37:case 38:i.length>0&&(n("a",u).removeClass(f.settings.classFocus),e=i.parent().prevAll("li:has(a)").eq(0).find("a"),e.length>0&&(e.addClass(f.settings.classFocus).focus(),n("#sbSelector_"+h).text(e.text())));break;case 39:case 40:n("a",u).removeClass(f.settings.classFocus);e=i.length>0?i.parent().nextAll("li:has(a)").eq(0).find("a"):u.find("ul").find("a").eq(0);e.length>0&&(e.addClass(f.settings.classFocus).focus(),n("#sbSelector_"+h).text(e.text()));break;case 13:i.length>0&&o._changeSelectbox(s,i.attr("rel"),i.text());o._closeSelectbox(s);break;case 9:s&&(f=o._getInst(s),f&&(i.length>0&&o._changeSelectbox(s,i.attr("rel"),i.text()),o._closeSelectbox(s)));c=parseInt(u.attr("tabindex"),10);t.shiftKey?c--:c++;n("*[tabindex='"+c+"']").focus();break;case 27:o._closeSelectbox(s)}return t.stopPropagation(),!1}).delegate("a","mouseover",function(){n(this).addClass(e.settings.classFocus)}).delegate("a","mouseout",function(){n(this).removeClass(e.settings.classFocus)});c.appendTo(h);l.appendTo(h);h.insertAfter(s);n("html").live("mousedown",function(t){t.stopPropagation();n("select").selectbox("close")});n([".",e.settings.classHolder,", .",e.settings.classSelector].join("")).mousedown(function(n){n.stopPropagation()})},_detachSelectbox:function(t){var u=this._getInst(t);if(!u)return i;n("#sbHolder_"+u.uid).remove();n.data(t,r,null);n(t).show()},_changeSelectbox:function(t,i,r){var e,f=this._getInst(t);f&&(e=this._get(f,"onChange"),n("#sbSelector_"+f.uid).text(r));i=i.replace(/\'/g,"\\'");n(t).find("option[value='"+i+"']").attr("selected",u);f&&e?e.apply(f.input?f.input[0]:null,[i,f]):f&&f.input&&f.input.trigger("change")},_enableSelectbox:function(t){var u=this._getInst(t);if(!u||!u.isDisabled)return i;n("#sbHolder_"+u.uid).removeClass(u.settings.classHolderDisabled);u.isDisabled=i;n.data(t,r,u)},_disableSelectbox:function(t){var f=this._getInst(t);if(!f||f.isDisabled)return i;n("#sbHolder_"+f.uid).addClass(f.settings.classHolderDisabled);f.isDisabled=u;n.data(t,r,f)},_optionSelectbox:function(t,u,f){var e=this._getInst(t);if(!e)return i;e[u]=f;n.data(t,r,e)},_openSelectbox:function(t){var i=this._getInst(t);if(i&&!i.isOpen&&!i.isDisabled){var f=n("#sbOptions_"+i.uid),s=parseInt(n(window).height(),10),h=n("#sbHolder_"+i.uid).offset(),c=n(window).scrollTop(),e=f.prev().height(),l=s-(h.top-c)-e/2,o=this._get(i,"onOpen");f.css({top:"30px",maxHeight:l-e+"px"});i.settings.effect==="fade"?f.fadeIn(i.settings.speed):f.slideDown(i.settings.speed);n("#sbToggle_"+i.uid).addClass(i.settings.classToggleOpen);this._state[i.uid]=u;i.isOpen=u;o&&o.apply(i.input?i.input[0]:null,[i]);n.data(t,r,i)}},_closeSelectbox:function(t){var u=this._getInst(t),f;u&&u.isOpen&&(f=this._get(u,"onClose"),u.settings.effect==="fade"?n("#sbOptions_"+u.uid).fadeOut(u.settings.speed):n("#sbOptions_"+u.uid).slideUp(u.settings.speed),n("#sbToggle_"+u.uid).removeClass(u.settings.classToggleOpen),this._state[u.uid]=i,u.isOpen=i,f&&f.apply(u.input?u.input[0]:null,[u]),n.data(t,r,u))},_newInst:function(n){var t=n[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:t,input:n,uid:Math.floor(Math.random()*99999999),isOpen:i,isDisabled:i,settings:{}}},_getInst:function(t){try{return n.data(t,r)}catch(i){throw"Missing instance data for this selectbox";}},_get:function(n,i){return n.settings[i]!==t?n.settings[i]:this._defaults[i]}});n.fn.selectbox=function(t){var i=Array.prototype.slice.call(arguments,1);return typeof t=="string"&&t=="isDisabled"?n.selectbox["_"+t+"Selectbox"].apply(n.selectbox,[this[0]].concat(i)):t=="option"&&arguments.length==2&&typeof arguments[1]=="string"?n.selectbox["_"+t+"Selectbox"].apply(n.selectbox,[this[0]].concat(i)):this.each(function(){typeof t=="string"?n.selectbox["_"+t+"Selectbox"].apply(n.selectbox,[this].concat(i)):n.selectbox._attachSelectbox(this,t)})};n.selectbox=new f;n.selectbox.version="0.2"}(jQuery),function(n){n.fn.slides=function(t){return t=n.extend({},n.fn.slides.option,t),this.each(function(){function h(f,h,a){if(!c&&b){c=!0;t.animationStart(o+1);switch(f){case"next":s=o;u=o+1;u=l===u?0:u;w=e*2;f=-e*2;o=u;break;case"prev":s=o;u=o-1;u=u===-1?l-1:u;w=0;f=0;o=u;break;case"pagination":u=parseInt(a,10);s=n("."+t.paginationClass+" li."+t.currentClass+" a",r).attr("href").match("[^#/]+$");u>s?(w=e*2,f=-e*2):(w=0,f=0);o=u}h==="fade"?t.crossfade?i.children(":eq("+u+")",r).css({zIndex:10}).fadeIn(t.fadeSpeed,t.fadeEasing,function(){t.autoHeight?i.animate({height:i.children(":eq("+u+")",r).outerHeight()},t.autoHeightSpeed,function(){i.children(":eq("+s+")",r).css({display:"none",zIndex:0});i.children(":eq("+u+")",r).css({zIndex:0});t.animationComplete(u+1);c=!1}):(i.children(":eq("+s+")",r).css({display:"none",zIndex:0}),i.children(":eq("+u+")",r).css({zIndex:0}),t.animationComplete(u+1),c=!1)}):i.children(":eq("+s+")",r).fadeOut(t.fadeSpeed,t.fadeEasing,function(){t.autoHeight?i.animate({height:i.children(":eq("+u+")",r).outerHeight()},t.autoHeightSpeed,function(){i.children(":eq("+u+")",r).fadeIn(t.fadeSpeed,t.fadeEasing)}):i.children(":eq("+u+")",r).fadeIn(t.fadeSpeed,t.fadeEasing,function(){n.browser.msie&&n(this).get(0).style.removeAttribute("filter")});t.animationComplete(u+1);c=!1}):(i.children(":eq("+u+")").css({left:w,display:"block"}),t.autoHeight?i.animate({left:f,height:i.children(":eq("+u+")").outerHeight()},t.slideSpeed,t.slideEasing,function(){i.css({left:-e});i.children(":eq("+u+")").css({left:e,zIndex:5});i.children(":eq("+s+")").css({left:e,display:"none",zIndex:0});t.animationComplete(u+1);c=!1}):i.animate({left:f},t.slideSpeed,t.slideEasing,function(){i.css({left:-e});i.children(":eq("+u+")").css({left:e,zIndex:5});i.children(":eq("+s+")").css({left:e,display:"none",zIndex:0});t.animationComplete(u+1);c=!1}));t.pagination&&(n("."+t.paginationClass+" li."+t.currentClass,r).removeClass(t.currentClass),n("."+t.paginationClass+" li:eq("+u+")",r).addClass(t.currentClass))}}function d(){clearInterval(r.data("interval"))}function y(){t.pause?(clearTimeout(r.data("pause")),clearInterval(r.data("interval")),tt=setTimeout(function(){clearTimeout(r.data("pause"));k=setInterval(function(){h("next",a)},t.play);r.data("interval",k)},t.pause),r.data("pause",tt)):d()}var it;n("."+t.container,n(this)).children().wrapAll('<div class="slides_control"/>');var r=n(this),i=n(".slides_control",r),l=i.children().size(),e=i.children().outerWidth(),rt=i.children().outerHeight(),f=t.start-1,a=t.effect.indexOf(",")<0?t.effect:t.effect.replace(" ","").split(",")[0],g=t.effect.indexOf(",")<0?a:t.effect.replace(" ","").split(",")[1],u=0,s=0,p=0,o=0,b,c,v,w,nt,tt,k;if(l<2)return n("."+t.container,n(this)).fadeIn(t.fadeSpeed,t.fadeEasing,function(){b=!0;t.slidesLoaded()}),n("."+t.next+", ."+t.prev).fadeOut(0),!1;l<2||(f<0&&(f=0),f>l&&(f=l-1),t.start&&(o=f),t.randomize&&i.randomize(),n("."+t.container,r).css({overflow:"hidden",position:"relative"}),i.children().css({position:"absolute",top:0,left:i.children().outerWidth(),zIndex:0,display:"none"}),i.css({position:"relative",width:e*3,height:rt,left:-e}),n("."+t.container,r).css({display:"block"}),t.autoHeight&&(i.children().css({height:"auto"}),i.animate({height:i.children(":eq("+f+")").outerHeight()},t.autoHeightSpeed)),t.preload&&i.find("img:eq("+f+")").length?(n("."+t.container,r).css({background:"url("+t.preloadImage+") no-repeat 50% 50%"}),it=i.find("img:eq("+f+")").attr("src")+"?"+(new Date).getTime(),nt=n("img",r).parent().attr("class")!="slides_control"?i.children(":eq(0)")[0].tagName.toLowerCase():i.find("img:eq("+f+")"),i.find("img:eq("+f+")").attr("src",it).load(function(){i.find(nt+":eq("+f+")").fadeIn(t.fadeSpeed,t.fadeEasing,function(){n(this).css({zIndex:5});n("."+t.container,r).css({background:""});b=!0;t.slidesLoaded()})})):i.children(":eq("+f+")").fadeIn(t.fadeSpeed,t.fadeEasing,function(){b=!0;t.slidesLoaded()}),t.bigTarget&&(i.children().css({cursor:"pointer"}),i.children().click(function(){return h("next",a),!1})),t.hoverPause&&t.play&&(i.bind("mouseover",function(){d()}),i.bind("mouseleave",function(){y()})),t.generateNextPrev&&(n("."+t.container,r).after('<a href="#" class="'+t.prev+'">Prev<\/a>'),n("."+t.prev,r).after('<a href="#" class="'+t.next+'">Next<\/a>')),n("."+t.next,r).click(function(n){n.preventDefault();t.play&&y();h("next",a)}),n("."+t.prev,r).click(function(n){n.preventDefault();t.play&&y();h("prev",a)}),t.generatePagination?(t.prependPagination?r.prepend("<ul class="+t.paginationClass+"><\/ul>"):r.append("<ul class="+t.paginationClass+"><\/ul>"),i.children().each(function(){n("."+t.paginationClass,r).append('<li><a href="#'+p+'">'+(p+1)+"<\/a><\/li>");p++})):n("."+t.paginationClass+" li a",r).each(function(){n(this).attr("href","#"+p);p++}),n("."+t.paginationClass+" li:eq("+f+")",r).addClass(t.currentClass),n("."+t.paginationClass+" li a",r).click(function(){return t.play&&y(),v=n(this).attr("href").match("[^#/]+$"),o!=v&&h("pagination",g,v),!1}),n("a.link",r).click(function(){return t.play&&y(),v=n(this).attr("href").match("[^#/]+$")-1,o!=v&&h("pagination",g,v),!1}),t.play&&(k=setInterval(function(){h("next",a)},t.play),r.data("interval",k)))})};n.fn.slides.option={preload:!1,preloadImage:"/includes/images/loading.gif",container:"slides_container",generateNextPrev:!1,next:"next",prev:"prev",pagination:!0,generatePagination:!0,prependPagination:!1,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:850,slideEasing:"",start:1,effect:"slide",crossfade:!1,randomize:!1,play:0,pause:0,hoverPause:!1,autoHeight:!1,autoHeightSpeed:350,bigTarget:!1,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}};n.fn.randomize=function(t){function r(){return Math.round(Math.random())-.5}return n(this).each(function(){var e=n(this),f=e.children(),o=f.length,u;if(o>1){for(f.hide(),u=[],i=0;i<o;i++)u[u.length]=i;u=u.sort(r);n.each(u,function(n,i){var r=f.eq(i),u=r.clone(!0);u.show().appendTo(e);t!==undefined&&t(r,u);r.remove()})}})}}(jQuery),function(){function u(t,r,u){function k(){for(nt++,v=jQuery.isFunction(r.height)?r.height(nt):h,s=document.createElement("DIV"),s.className=jQuery.isFunction(r.columnClass)?r.columnClass(nt):r.columnClass,c.append(s),e=s,ft=jQuery(s).width(),et.push(s),y=0;y<g.length;y++)f=g[y].cloneNode(!1),(y==0||ut)&&jQuery(f).addClass(r.continued),e.appendChild(f),e=f}function ot(n){var i=parseInt(jQuery(n).css("marginBottom")),r,u,f;for(i.toString()=="NaN"&&(i=0),u=jQuery(n).parents(),r=0;r<u.length;r++){if(u[r]==t)break;f=parseInt(jQuery(u[r]).css("marginBottom"));f.toString()!="NaN"&&(i=Math.max(i,f))}return i}function d(){while(o&&e&&!o.nextSibling){o=o.parentNode;e=e.parentNode;var n=g.pop();n=="A"&&(ht=null)}o&&(o=o.nextSibling)}var h,v,ft,s,e,et=[],nt=0,y,c=jQuery(t),l,p,tt,it,rt,f,st,b,a,ut;i[t.id]=r.columns;c.empty();jQuery.isFunction(r.height)||(l=r.height?r.height:parseInt(c.css("maxHeight")),u||isNaN(l)||l==0?(s=document.createElement("DIV"),s.className=jQuery.isFunction(r.columnClass)?r.columnClass(0):r.columnClass,jQuery(s).append(jQuery(n[t.id]).html()),c.append(s),p=parseInt(c.css("lineHeight")),p||(p=Math.ceil(parseInt(c.css("fontSize"))*1.2)),h=Math.ceil(jQuery(s).height()/r.columns),h%p>0&&(h+=p),t.removeChild(s),l>0&&h>l&&(h=l)):h=l,tt=r.minHeight?r.minHeight:parseInt(c.css("minHeight")),tt&&(h=Math.max(h,tt)));var o=n[t.id].children(":first")[0],g=[],ht=null,w=0;if(k(),v==0||ft==0)return!1;while(o)if(o.nodeType==1)it=jQuery(o),it.hasClass("dontSplit")||it.is(r.dontsplit)?(f=o.cloneNode(!0),e.appendChild(f),s.offsetHeight>v&&k(),d()):(f=o.cloneNode(!1),e.appendChild(f),s.offsetHeight-ot(e)>v&&(e.removeChild(f),rt=f,k(),e.appendChild(rt),f=rt),o.firstChild?(g.push(o.cloneNode(!1)),e=f,o=o.firstChild):d()),w=1;else if(o.nodeType==3){for(f=document.createTextNode(""),e.appendChild(f),st=ot(e),b=o.data.split(" "),a=0;a<b.length;a++)w==3&&f.appendData(" "),f.appendData(b[a]),e.removeChild(f),e.appendChild(f),s.offsetHeight-st>v&&(f.data=f.data.substr(0,f.data.length-b[a].length-1),jQuery(e).text()==""?(jQuery(e).remove(),ut=!1):ut=!0,k(),f=document.createTextNode(b[a]),e.appendChild(f)),w=3;d();w=0}else d(),w=o.nodeType;return et}var n={},i={},t=0,r=2147483648;jQuery.fn.columnize=function(i){return i=jQuery.extend({columnClass:"column",continued:"continued",columns:2,maxColumns:!1,balance:!0,height:!1,minHeight:!1,cache:!0,dontsplit:""},i),i.maxColumns||(i.maxColumns=r),i.column&&(i.columnClass=i.column),i.columns==0?this.unColumnize():this.each(function(){var f=jQuery(this),r=this.id,e;r||(r="jcols_"+t,this.id=r,t++);n[this.id]&&i.cache||(n[this.id]=f.clone(!0));e=u(this,i,i.balance);e||f.append(n[this.id].children().clone(!0))}),this};jQuery.fn.unColumnize=function(){return this.each(function(){var t=jQuery(this);n[this.id]&&t.empty().append(n[this.id].children().clone(!0))}),this}}();"undefined"==typeof jwplayer&&(jwplayer=function(n){if(jwplayer.api)return jwplayer.api.selectPlayer(n)},jwplayer.version="6.11.4923",jwplayer.vid=document.createElement("video"),jwplayer.audio=document.createElement("audio"),jwplayer.source=document.createElement("source"),function(){var r={},t=Array.prototype,u=Object.prototype,o=t.slice,h=t.concat,s=u.toString,p=u.hasOwnProperty,c=t.map,l=t.forEach,a=t.filter,f=t.some,v=t.indexOf,u=Array.isArray,y=Object.keys,n=function(t){return t instanceof n?t:(this instanceof n)?void 0:new n(t)},i=n.each=n.forEach=function(t,i,u){var f,e;if(null==t)return t;if(l&&t.forEach===l)t.forEach(i,u);else if(t.length===+t.length){for(f=0,e=t.length;f<e;f++)if(i.call(u,t[f],f,t)===r)return}else for(var o=n.keys(t),f=0,e=o.length;f<e;f++)if(i.call(u,t[o[f]],o[f],t)===r)return;return t},e;n.map=n.collect=function(n,t,r){var u=[];return null==n?u:c&&n.map===c?n.map(t,r):(i(n,function(n,i,f){u.push(t.call(r,n,i,f))}),u)};n.find=n.detect=function(n,t,i){var r;return e(n,function(n,u,f){if(t.call(i,n,u,f))return r=n,!0}),r};n.filter=n.select=function(n,t,r){var u=[];return null==n?u:a&&n.filter===a?n.filter(t,r):(i(n,function(n,i,f){t.call(r,n,i,f)&&u.push(n)}),u)};e=n.some=n.any=function(t,u,e){u||(u=n.identity);var o=!1;return null==t?o:f&&t.some===f?t.some(u,e):(i(t,function(n,t,i){if(o||(o=u.call(e,n,t,i)))return r}),!!o)};n.size=function(t){return null==t?0:t.length===+t.length?t.length:n.keys(t).length};n.after=function(n,t){return function(){if(1>--n)return t.apply(this,arguments)}};n.sortedIndex=function(t,i,r,u){var f,e,o;for(r=null==r?n.identity:n.isFunction(r)?r:n.property(r),i=r.call(u,i),f=0,e=t.length;f<e;)o=f+e>>>1,r.call(u,t[o])<i?f=o+1:e=o;return f};n.find=n.detect=function(n,t,i){var r;return e(n,function(n,u,f){if(t.call(i,n,u,f))return r=n,!0}),r};e=n.some=n.any=function(t,u,e){u||(u=n.identity);var o=!1;return null==t?o:f&&t.some===f?t.some(u,e):(i(t,function(n,t,i){if(o||(o=u.call(e,n,t,i)))return r}),!!o)};n.contains=n.include=function(t,i){return null==t?!1:(t.length!==+t.length&&(t=n.values(t)),0<=n.indexOf(t,i))};n.difference=function(i){var r=h.apply(t,o.call(arguments,1));return n.filter(i,function(t){return!n.contains(r,t)})};n.without=function(t){return n.difference(t,o.call(arguments,1))};n.indexOf=function(t,i,r){if(null==t)return-1;var u=0,f=t.length;if(r)if("number"==typeof r)u=0>r?Math.max(0,f+r):r;else return u=n.sortedIndex(t,i),t[u]===i?u:-1;if(v&&t.indexOf===v)return t.indexOf(i,r);for(;u<f;u++)if(t[u]===i)return u;return-1};n.memoize=function(t,i){var r={};return i||(i=n.identity),function(){var u=i.apply(this,arguments);return n.has(r,u)?r[u]:r[u]=t.apply(this,arguments)}};n.keys=function(t){if(!n.isObject(t))return[];if(y)return y(t);var r=[],i;for(i in t)n.has(t,i)&&r.push(i);return r};n.pick=function(n){var r={},u=h.apply(t,o.call(arguments,1));return i(u,function(t){t in n&&(r[t]=n[t])}),r};n.isArray=u||function(n){return"[object Array]"==s.call(n)};n.isObject=function(n){return n===Object(n)};i("Arguments Function String Number Date RegExp".split(" "),function(t){n["is"+t]=function(n){return s.call(n)=="[object "+t+"]"}});n.isArguments(arguments)||(n.isArguments=function(t){return!(!t||!n.has(t,"callee"))});"function"!=typeof/./&&(n.isFunction=function(n){return"function"==typeof n});n.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))};n.isNaN=function(t){return n.isNumber(t)&&t!=+t};n.isBoolean=function(n){return!0===n||!1===n||"[object Boolean]"==s.call(n)};n.isNull=function(n){return null===n};n.isUndefined=function(n){return void 0===n};n.has=function(n,t){return p.call(n,t)};n.identity=function(n){return n};n.constant=function(n){return function(){return n}};n.property=function(n){return function(t){return t[n]}};this._=n}.call(jwplayer),function(n){function u(n){return function(){return i(n)}}function o(n,i,r,u,f){return function(){var e,o;if(f)r(n);else{try{if((e=n.responseXML)&&(o=e.firstChild,e.lastChild&&"parsererror"===e.lastChild.nodeName)){u&&u("Invalid XML",i,n);return}}catch(s){}if(e&&o)return r(n);(e=t.parseXML(n.responseText))&&e.firstChild?(n=t.extend({},n,{responseXML:e}),r(n)):u&&u(n.responseText?"Invalid XML":i,i,n)}}}var t=n.utils={},r=n._,f,i,e;t.exists=function(n){switch(typeof n){case"string":return 0<n.length;case"object":return null!==n;case"undefined":return!1}return!0};t.styleDimension=function(n){return n+(0<n.toString().indexOf("%")?"":"px")};t.getAbsolutePath=function(n,i){var u,e,r,o,f;if(t.exists(i)||(i=document.location.href),t.exists(n)){if(t.exists(n)?(u=n.indexOf("://"),e=n.indexOf("?"),u=0<u&&(0>e||e>u)):u=void 0,u)return n;for(u=i.substring(0,i.indexOf("://")+3),e=i.substring(u.length,i.indexOf("/",u.length+1)),0===n.indexOf("/")?r=n.split("/"):(r=i.split("?")[0],r=r.substring(u.length+e.length+1,r.lastIndexOf("/")),r=r.split("/").concat(n.split("/"))),o=[],f=0;f<r.length;f++)r[f]&&t.exists(r[f])&&"."!==r[f]&&(".."===r[f]?o.pop():o.push(r[f]));return u+e+"/"+o.join("/")}};t.extend=function(){var n=Array.prototype.slice.call(arguments,0);if(1<n.length){for(var r=n[0],u=function(n,t){void 0!==t&&null!==t&&(r[n]=t)},i=1;i<n.length;i++)t.foreach(n[i],u);return r}return null};f=window.console=window.console||{log:function(){}};t.log=function(){var n=Array.prototype.slice.call(arguments,0);"object"==typeof f.log?f.log(n):f.log.apply(f,n)};i=r.memoize(function(n){return null!==navigator.userAgent.toLowerCase().match(n)});t.isFF=u(/firefox/i);t.isChrome=u(/chrome/i);t.isIPod=u(/iP(hone|od)/i);t.isIPad=u(/iPad/i);t.isSafari602=u(/Macintosh.*Mac OS X 10_8.*6\.0\.\d* Safari/i);t.isIETrident=function(n){return n?(n=parseFloat(n).toFixed(1),i(RegExp("trident/.+rv:\\s*"+n,"i"))):i(/trident/i)};t.isMSIE=function(n){return n?(n=parseFloat(n).toFixed(1),i(RegExp("msie\\s*"+n,"i"))):i(/msie/i)};t.isIE=function(n){return n?(n=parseFloat(n).toFixed(1),11<=n?t.isIETrident(n):t.isMSIE(n)):t.isMSIE()||t.isIETrident()};t.isSafari=function(){return i(/safari/i)&&!i(/chrome/i)&&!i(/chromium/i)&&!i(/android/i)};t.isIOS=function(n){return n?i(RegExp("iP(hone|ad|od).+\\sOS\\s"+n,"i")):i(/iP(hone|ad|od)/i)};t.isAndroidNative=function(n){return t.isAndroid(n,!0)};t.isAndroid=function(n,r){return r&&i(/chrome\/[123456789]/i)&&!i(/chrome\/18/)?!1:n?(t.isInt(n)&&!/\./.test(n)&&(n=""+n+"."),i(RegExp("Android\\s*"+n,"i"))):i(/Android/i)};t.isMobile=function(){return t.isIOS()||t.isAndroid()};t.isIframe=function(){return window.frameElement&&"IFRAME"===window.frameElement.nodeName};t.saveCookie=function(n,t){document.cookie="jwplayer."+n+"="+t+"; path=/"};t.getCookies=function(){for(var n,i={},r=document.cookie.split("; "),t=0;t<r.length;t++)n=r[t].split("="),0===n[0].indexOf("jwplayer.")&&(i[n[0].substring(9,n[0].length)]=n[1]);return i};t.isInt=function(n){return 0==parseFloat(n)%1};t.typeOf=function(n){if(null===n)return"null";var t=typeof n;return"object"===t&&r.isArray(n)?"array":t};t.translateEventResponse=function(i,r){var u=t.extend({},r),f;return i!==n.events.JWPLAYER_FULLSCREEN||u.fullscreen?"object"==typeof u.data?(f=u.data,delete u.data,u=t.extend(u,f)):"object"==typeof u.metadata&&t.deepReplaceKeyName(u.metadata,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]):(u.fullscreen="true"===u.message,delete u.message),t.foreach(["position","duration","offset"],function(n,t){u[t]&&(u[t]=Math.round(1e3*u[t])/1e3)}),u};t.flashVersion=function(){if(t.isAndroid())return 0;var i=navigator.plugins,n;try{if("undefined"!==i&&(n=i["Shockwave Flash"]))return parseInt(n.description.replace(/\D+(\d+)\..*/,"$1"),10)}catch(r){}if("undefined"!=typeof window.ActiveXObject)try{if(n=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return parseInt(n.GetVariable("$version").split(" ")[1].split(",")[0],10)}catch(u){}return 0};t.getScriptPath=function(n){for(var t,r=document.getElementsByTagName("script"),i=0;i<r.length;i++)if(t=r[i].src,t&&0<=t.indexOf(n))return t.substr(0,t.indexOf(n));return""};t.deepReplaceKeyName=function(i,r,u){switch(n.utils.typeOf(i)){case"array":for(var f=0;f<i.length;f++)i[f]=n.utils.deepReplaceKeyName(i[f],r,u);break;case"object":t.foreach(i,function(t,f){var s,e,o;if(r instanceof Array&&u instanceof Array){if(r.length!==u.length)return;s=r}else s=[r];for(e=t,o=0;o<s.length;o++)e=e.replace(RegExp(r[o],"g"),u[o]);i[e]=n.utils.deepReplaceKeyName(f,r,u);t!==e&&delete i[t]})}return i};e=t.pluginPathType={ABSOLUTE:0,RELATIVE:1,CDN:2};t.getPluginPathType=function(n){var i,r;if("string"==typeof n)return(n=n.split("?")[0],i=n.indexOf("://"),0<i)?e.ABSOLUTE:(r=n.indexOf("/"),n=t.extension(n),0>i&&0>r&&(!n||!isNaN(n))?e.CDN:e.RELATIVE)};t.getPluginName=function(n){return n.replace(/^(.*\/)?([^-]*)-?.*\.(swf|js)$/,"$2")};t.getPluginVersion=function(n){return n.replace(/[^-]*-?([^\.]*).*$/,"$1")};t.isYouTube=function(n,t){return"youtube"===t||/^(http|\/\/).*(youtube\.com|youtu\.be)\/.+/.test(n)};t.youTubeID=function(n){try{return/v[=\/]([^?&]*)|youtu\.be\/([^?]*)|^([\w-]*)$/i.exec(n).slice(1).join("").replace("?","")}catch(t){return""}};t.isRtmp=function(n,t){return 0===n.indexOf("rtmp")||"rtmp"===t};t.foreach=function(n,i){var r,u;for(r in n)"function"===t.typeOf(n.hasOwnProperty)?n.hasOwnProperty(r)&&(u=n[r],i(r,u)):(u=n[r],i(r,u))};t.isHTTPS=function(){return 0===window.location.href.indexOf("https")};t.repo=function(){var i="http://p.jwpcdn.com/"+n.version.split(/\W/).splice(0,2).join("/")+"/";try{t.isHTTPS()&&(i=i.replace("http://","https://ssl."))}catch(r){}return i};t.versionCheck=function(t){t=("0"+t).split(/\W/);var i=n.version.split(/\W/),r=parseFloat(t[0]),u=parseFloat(i[0]);return r>u||r===u&&parseFloat("0"+t[1])>parseFloat(i[1])?!1:!0};t.ajax=function(n,i,r,u){var f,h=!1,e,s,c,l;if(0<n.indexOf("#")&&(n=n.replace(/#.*$/,"")),n&&0<=n.indexOf("://")&&n.split("/")[2]!==window.location.href.split("/")[2]&&t.exists(window.XDomainRequest))f=new window.XDomainRequest,f.onload=o(f,n,i,r,u),f.ontimeout=f.onprogress=function(){},f.timeout=5e3;else if(t.exists(window.XMLHttpRequest))e=f=new window.XMLHttpRequest,s=n,f.onreadystatechange=function(){if(4===e.readyState)switch(e.status){case 200:o(e,s,i,r,u)();break;case 404:r("File not found",s,e)}};else return r&&r("",n,f),f;f.overrideMimeType&&f.overrideMimeType("text/xml");c=n;l=f;f.onerror=function(){r("Error loading file",c,l)};try{f.open("GET",n,!0)}catch(a){h=!0}return setTimeout(function(){if(h)r&&r(n,n,f);else try{f.send()}catch(t){r&&r(n,n,f)}},0),f};t.parseXML=function(n){var t;try{if(window.DOMParser){if(t=(new window.DOMParser).parseFromString(n,"text/xml"),t.childNodes&&t.childNodes.length&&"parsererror"===t.childNodes[0].firstChild.nodeName)return}else t=new window.ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(n)}catch(i){return}return t};t.between=function(n,t,i){return Math.max(Math.min(n,i),t)};t.seconds=function(n){if(r.isNumber(n))return n;n=n.replace(",",".");var t=n.split(":"),i=0;return"s"===n.slice(-1)?i=parseFloat(n):"m"===n.slice(-1)?i=60*parseFloat(n):"h"===n.slice(-1)?i=3600*parseFloat(n):1<t.length?(i=parseFloat(t[t.length-1]),i+=60*parseFloat(t[t.length-2]),3===t.length&&(i+=3600*parseFloat(t[t.length-3]))):i=parseFloat(n),i};t.serialize=function(n){return null===n?null:"true"===n.toString().toLowerCase()?!0:"false"===n.toString().toLowerCase()?!1:isNaN(Number(n))||5<n.length||0===n.length?n:Number(n)};t.addClass=function(n,i){var u=r.isString(n.className)?n.className.split(" "):[],f=r.isArray(i)?i:i.split(" ");r.each(f,function(n){r.contains(u,n)||u.push(n)});n.className=t.trim(u.join(" "))};t.removeClass=function(n,i){var u=r.isString(n.className)?n.className.split(" "):[],f=r.isArray(i)?i:i.split(" ");n.className=t.trim(r.difference(u,f).join(" "))};t.indexOf=r.indexOf;t.noop=function(){};t.canCast=function(){var t=n.cast;return!(!t||!r.isFunction(t.available)||!t.available())}}(jwplayer),function(n){function s(n){var t=document.createElement("style");return n&&t.appendChild(document.createTextNode(n)),t.type="text/css",document.getElementsByTagName("head")[0].appendChild(t),t}function h(n,t,r){return i.exists(t)?(r=r?" !important":"","string"==typeof t&&isNaN(t)?/png|gif|jpe?g/i.test(t)&&0>t.indexOf("url")?"url("+t+")":t+r:0===t||"z-index"===n||"opacity"===n?""+t+r:/color/i.test(n)?"#"+i.pad(t.toString(16).replace(/^0x/i,""),6)+r:Math.ceil(t)+"px"+r):""}function c(n,t){for(var u,e,i,r,f=0;f<n.length;f++)if(u=n[f],void 0!==u&&null!==u)for(e in t){for(i=e,i=i.split("-"),r=1;r<i.length;r++)i[r]=i[r].charAt(0).toUpperCase()+i[r].slice(1);i=i.join("");u.style[i]!==t[e]&&(u.style[i]=t[e])}}function o(n){var u=e[n].sheet,r,t,i,o,s;if(u){r=u.cssRules;t=l[n];i=n;o=f[i];i+=" { ";for(s in o)i+=s+": "+o[s]+"; ";if(i+="}",void 0!==t&&t<r.length&&r[t].selectorText===n){if(i===r[t].cssText)return;u.deleteRule(t)}else t=r.length,l[n]=t;try{u.insertRule(i,t)}catch(h){}}}var i=n.utils,e={},u,f={},t=null,l={},r;i.cssKeyframes=function(n,t){var i=e.keyframes,r;i||(i=s(),e.keyframes=i);i=i.sheet;r="@keyframes "+n+" { "+t+" }";try{i.insertRule(r,i.cssRules.length)}catch(u){}r=r.replace(/(keyframes|transform)/g,"-webkit-$1");try{i.insertRule(r,i.cssRules.length)}catch(f){}};r=i.css=function(n,i,r){var l,a,c,v;f[n]||(f[n]={});l=f[n];r=r||!1;a=!1;for(c in i)v=h(c,i[c],r),""!==v?v!==l[c]&&(l[c]=v,a=!0):void 0!==l[c]&&(delete l[c],a=!0);a&&(e[n]||(i=u&&u.sheet&&u.sheet.cssRules&&u.sheet.cssRules.length||0,(!u||5e4<i)&&(u=s()),e[n]=u),null!==t?t.styleSheets[n]=f[n]:o(n))};r.style=function(n,i,r){var u,f,e;if(!(void 0===n||null===n)){void 0===n.length&&(n=[n]);u={};for(f in i)u[f]=h(f,i[f]);if(null===t||r)c(n,u);else{i=(i=n.__cssRules)||{};for(e in u)i[e]=u[e];n.__cssRules=i;0>t.elements.indexOf(n)&&t.elements.push(n)}}};r.block=function(n){null===t&&(t={id:n,styleSheets:{},elements:[]})};r.unblock=function(n){if(t&&(!n||t.id===n)){for(var i in t.styleSheets)o(i);for(n=0;n<t.elements.length;n++)i=t.elements[n],c(i,i.__cssRules);t=null}};i.clearCss=function(n){var t,i;for(t in f)0<=t.indexOf(n)&&delete f[t];for(i in e)0<=i.indexOf(n)&&o(i)};i.transform=function(n,t){var i={};t=t||"";i.transform=t;i["-webkit-transform"]=t;i["-ms-transform"]=t;i["-moz-transform"]=t;i["-o-transform"]=t;"string"==typeof n?r(n,i):r.style(n,i)};i.dragStyle=function(n,t){r(n,{"-webkit-user-select":t,"-moz-user-select":t,"-ms-user-select":t,"-webkit-user-drag":t,"user-select":t,"user-drag":t})};i.transitionStyle=function(n,t){navigator.userAgent.match(/5\.\d(\.\d)? safari/i)||r(n,{"-webkit-transition":t,"-moz-transition":t,"-o-transition":t,transition:t})};i.rotate=function(n,t){i.transform(n,"rotate("+t+"deg)")};i.rgbHex=function(n){return n=String(n).replace("#",""),3===n.length&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]),"#"+n.substr(-6)};i.hexToRgba=function(n,t){var i="rgb",r=[parseInt(n.substr(1,2),16),parseInt(n.substr(3,2),16),parseInt(n.substr(5,2),16)];return void 0!==t&&100!==t&&(i+="a",r.push(t/100)),i+"("+r.join(",")+")"}}(jwplayer),function(n){var r=n.foreach,t={mp4:"video/mp4",ogg:"video/ogg",oga:"audio/ogg",vorbis:"audio/ogg",webm:"video/webm",aac:"audio/mp4",mp3:"audio/mpeg",hls:"application/vnd.apple.mpegurl"},u={mp4:t.mp4,f4v:t.mp4,m4v:t.mp4,mov:t.mp4,m4a:t.aac,f4a:t.aac,aac:t.aac,mp3:t.mp3,ogv:t.ogg,ogg:t.ogg,oga:t.vorbis,vorbis:t.vorbis,webm:t.webm,m3u8:t.hls,m3u:t.hls,hls:t.hls},i=n.extensionmap={};r(u,function(n,t){i[n]={html5:t}});r({flv:"video",f4v:"video",mov:"video",m4a:"video",m4v:"video",mp4:"video",aac:"video",f4a:"video",mp3:"sound",smil:"rtmp",m3u8:"hls",hls:"hls"},function(n,t){i[n]||(i[n]={});i[n].flash=t});i.types=t;i.mimeType=function(n){var i;return r(t,function(t,r){i||r!=n||(i=t)}),i};i.extType=function(n){return i.mimeType(u[n])}}(jwplayer.utils),function(n){var t=n.loaderstatus={NEW:0,LOADING:1,ERROR:2,COMPLETE:3},i=document;n.scriptloader=function(r){function o(n){u=t.ERROR;s.sendEvent(f.ERROR,n)}function e(n){u=t.COMPLETE;s.sendEvent(f.COMPLETE,n)}var f=jwplayer.events,s=n.extend(this,new f.eventdispatcher),u=t.NEW;this.load=function(){var h,s;if(u==t.NEW){if(h=n.scriptloader.loaders[r],h&&(u=h.getStatus(),2>u)){h.addEventListener(f.ERROR,o);h.addEventListener(f.COMPLETE,e);return}s=i.createElement("script");s.addEventListener?(s.onload=e,s.onerror=o):s.readyState&&(s.onreadystatechange=function(n){("loaded"==s.readyState||"complete"==s.readyState)&&e(n)});i.getElementsByTagName("head")[0].appendChild(s);s.src=r;u=t.LOADING;n.scriptloader.loaders[r]=this}};this.getStatus=function(){return u}};n.scriptloader.loaders={}}(jwplayer.utils),function(n){n.trim=function(n){return n.replace(/^\s+|\s+$/g,"")};n.pad=function(n,t,i){for(i||(i="0");n.length<t;)n=i+n;return n};n.xmlAttribute=function(n,t){for(var i=0;i<n.attributes.length;i++)if(n.attributes[i].name&&n.attributes[i].name.toLowerCase()===t.toLowerCase())return n.attributes[i].value.toString();return""};n.extension=function(n){if(!n||"rtmp"===n.substr(0,4))return"";var t;return(t=-1<n.indexOf("(format=m3u8-")?"m3u8":!1,t)?t:(n=n.substring(n.lastIndexOf("/")+1,n.length).split("?")[0].split("#")[0],-1<n.lastIndexOf(".")?n.substr(n.lastIndexOf(".")+1,n.length).toLowerCase():void 0)};n.stringToColor=function(n){return n=n.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2"),3===n.length&&(n=n.charAt(0)+n.charAt(0)+n.charAt(1)+n.charAt(1)+n.charAt(2)+n.charAt(2)),parseInt(n,16)}}(jwplayer.utils),function(n){var t="touchmove",i="touchstart";n.touch=function(r){function h(n){n.type===i?(e=!0,u=l(f.DRAG_START,n)):n.type===t?e&&(o||(s(f.DRAG_START,n,u),o=!0),s(f.DRAG,n)):(e&&(o?s(f.DRAG_END,n):(n.cancelBubble=!0,s(f.TAP,n))),e=o=!1,u=null)}function s(n,t,i){c[n]&&(t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault(),t=i?i:l(n,t))&&c[n](t)}function l(n,t){var i=null,r;return(t.touches&&t.touches.length?i=t.touches[0]:t.changedTouches&&t.changedTouches.length&&(i=t.changedTouches[0]),!i)?null:(r=a.getBoundingClientRect(),i={type:n,target:a,x:i.pageX-window.pageXOffset-r.left,y:i.pageY,deltaX:0,deltaY:0},n!==f.TAP&&u&&(i.deltaX=i.x-u.x,i.deltaY=i.y-u.y),i)}var a=r,e=!1,c={},u=null,o=!1,f=n.touchEvents;return document.addEventListener(t,h),document.addEventListener("touchend",function(n){e&&o&&s(f.DRAG_END,n);e=o=!1;u=null}),document.addEventListener("touchcancel",h),r.addEventListener(i,h),r.addEventListener("touchend",h),this.addEventListener=function(n,t){c[n]=t},this.removeEventListener=function(n){delete c[n]},this}}(jwplayer.utils),function(n){n.touchEvents={DRAG:"jwplayerDrag",DRAG_START:"jwplayerDragStart",DRAG_END:"jwplayerDragEnd",TAP:"jwplayerTap"}}(jwplayer.utils),function(n){n.key=function(t){var i,f,u,r;this.edition=function(){return u&&u.getTime()<(new Date).getTime()?"invalid":i};this.token=function(){return f};n.exists(t)||(t="");try{t=n.tea.decrypt(t,"36QXq4W@GSBV^teR");r=t.split("/");(i=r[0])?/^(free|pro|premium|enterprise|ads)$/i.test(i)?(f=r[1],r[2]&&0<parseInt(r[2])&&(u=new Date,u.setTime(String(r[2])))):i="invalid":i="free"}catch(e){i="invalid"}}}(jwplayer.utils),function(n){var t=n.tea={},r,i;t.encrypt=function(n,u){var f,o;if(0==n.length)return"";f=t.strToLongs(i.encode(n));1>=f.length&&(f[1]=0);for(var a=t.strToLongs(i.encode(u).slice(0,16)),s=f.length,e=f[s-1],h=f[0],l,v=Math.floor(6+52/s),c=0;0<v--;)for(c+=2654435769,l=c>>>2&3,o=0;o<s;o++)h=f[(o+1)%s],e=(e>>>5^h<<2)+(h>>>3^e<<4)^(c^h)+(a[o&3^l]^e),e=f[o]+=e;return f=t.longsToStr(f),r.encode(f)};t.decrypt=function(n,u){var e;if(0==n.length)return"";for(var f=t.strToLongs(r.decode(n)),a=t.strToLongs(i.encode(u).slice(0,16)),s=f.length,o=f[s-1],h=f[0],l,c=2654435769*Math.floor(6+52/s);0!=c;){for(l=c>>>2&3,e=s-1;0<=e;e--)o=f[0<e?e-1:s-1],o=(o>>>5^h<<2)+(h>>>3^o<<4)^(c^h)+(a[e&3^l]^o),h=f[e]-=o;c-=2654435769}return f=t.longsToStr(f),f=f.replace(/\0+$/,""),i.decode(f)};t.strToLongs=function(n){for(var i=Array(Math.ceil(n.length/4)),t=0;t<i.length;t++)i[t]=n.charCodeAt(4*t)+(n.charCodeAt(4*t+1)<<8)+(n.charCodeAt(4*t+2)<<16)+(n.charCodeAt(4*t+3)<<24);return i};t.longsToStr=function(n){for(var i=Array(n.length),t=0;t<n.length;t++)i[t]=String.fromCharCode(n[t]&255,n[t]>>>8&255,n[t]>>>16&255,n[t]>>>24&255);return i.join("")};r={code:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(n,t){var s,h,c,e,o=[],a="",u,f,l=r.code;if(f=("undefined"==typeof t?0:t)?i.encode(n):n,u=f.length%3,0<u)for(;3>u++;)a+="=",f+="\x00";for(u=0;u<f.length;u+=3)s=f.charCodeAt(u),h=f.charCodeAt(u+1),c=f.charCodeAt(u+2),e=s<<16|h<<8|c,s=e>>18&63,h=e>>12&63,c=e>>6&63,e&=63,o[u/3]=l.charAt(s)+l.charAt(h)+l.charAt(c)+l.charAt(e);return o=o.join(""),o.slice(0,o.length-a.length)+a},decode:function(n,t){var f,s,h,e,a,c,o,l,u;for(t="undefined"==typeof t?!1:t,c=[],l=r.code,o=t?i.decode(n):n,u=0;u<o.length;u+=4)f=l.indexOf(o.charAt(u)),s=l.indexOf(o.charAt(u+1)),e=l.indexOf(o.charAt(u+2)),a=l.indexOf(o.charAt(u+3)),h=f<<18|s<<12|e<<6|a,f=h>>>16&255,s=h>>>8&255,h&=255,c[u/4]=String.fromCharCode(f,s,h),64==a&&(c[u/4]=String.fromCharCode(f,s)),64==e&&(c[u/4]=String.fromCharCode(f));return e=c.join(""),t?i.decode(e):e}};i={encode:function(n){return n=n.replace(/[\u0080-\u07ff]/g,function(n){return n=n.charCodeAt(0),String.fromCharCode(192|n>>6,128|n&63)}),n.replace(/[\u0800-\uffff]/g,function(n){return n=n.charCodeAt(0),String.fromCharCode(224|n>>12,128|n>>6&63,128|n&63)})},decode:function(n){return n=n.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(n){return n=(n.charCodeAt(0)&15)<<12|(n.charCodeAt(1)&63)<<6|n.charCodeAt(2)&63,String.fromCharCode(n)}),n.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(n){return n=(n.charCodeAt(0)&31)<<6|n.charCodeAt(1)&63,String.fromCharCode(n)})}}}(jwplayer.utils),function(n){n.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_SETUP_ERROR:"jwplayerSetupError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",JWPLAYER_COMPONENT_SHOW:"jwplayerComponentShow",JWPLAYER_COMPONENT_HIDE:"jwplayerComponentHide",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_AUDIO_TRACKS:"jwplayerAudioTracks",JWPLAYER_AUDIO_TRACK_CHANGED:"jwplayerAudioTrackChanged",JWPLAYER_MEDIA_LEVELS:"jwplayerMediaLevels",JWPLAYER_MEDIA_LEVEL_CHANGED:"jwplayerMediaLevelChanged",JWPLAYER_CAPTIONS_CHANGED:"jwplayerCaptionsChanged",JWPLAYER_CAPTIONS_LIST:"jwplayerCaptionsList",JWPLAYER_CAPTIONS_LOADED:"jwplayerCaptionsLoaded",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"},JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_PLAYLIST_COMPLETE:"jwplayerPlaylistComplete",JWPLAYER_DISPLAY_CLICK:"jwplayerViewClick",JWPLAYER_PROVIDER_CLICK:"jwplayerProviderClick",JWPLAYER_VIEW_TAB_FOCUS:"jwplayerViewTabFocus",JWPLAYER_CONTROLS:"jwplayerViewControls",JWPLAYER_USER_ACTION:"jwplayerUserAction",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed",JWPLAYER_AD_TIME:"jwplayerAdTime",JWPLAYER_AD_ERROR:"jwplayerAdError",JWPLAYER_AD_CLICK:"jwplayerAdClicked",JWPLAYER_AD_COMPLETE:"jwplayerAdComplete",JWPLAYER_AD_IMPRESSION:"jwplayerAdImpression",JWPLAYER_AD_COMPANIONS:"jwplayerAdCompanions",JWPLAYER_AD_SKIPPED:"jwplayerAdSkipped",JWPLAYER_AD_PLAY:"jwplayerAdPlay",JWPLAYER_AD_PAUSE:"jwplayerAdPause",JWPLAYER_AD_META:"jwplayerAdMeta",JWPLAYER_CAST_AVAILABLE:"jwplayerCastAvailable",JWPLAYER_CAST_SESSION:"jwplayerCastSession",JWPLAYER_CAST_AD_CHANGED:"jwplayerCastAdChanged"}}(jwplayer),function(n){var t=n.utils;n.events.eventdispatcher=function(i,r){function e(n,i,r){var u,f;if(n)for(u=0;u<n.length;u++)if(f=n[u],f){null!==f.count&&0==--f.count&&delete n[u];try{f.listener(i)}catch(e){t.log('Error handling "'+r+'" event listener ['+u+"]: "+e.toString(),f.listener,i)}}}var u,f;this.resetEventListeners=function(){u={};f=[]};this.resetEventListeners();this.addEventListener=function(n,i,r){try{t.exists(u[n])||(u[n]=[]);"string"===t.typeOf(i)&&(i=new Function("return "+i)());u[n].push({listener:i,count:r||null})}catch(f){t.log("error",f)}return!1};this.removeEventListener=function(n,i){var r;if(u[n]){try{if(void 0===i){u[n]=[];return}for(r=0;r<u[n].length;r++)if(u[n][r].listener.toString()===i.toString()){u[n].splice(r,1);break}}catch(f){t.log("error",f)}return!1}};this.addGlobalListener=function(n,i){try{"string"===t.typeOf(n)&&(n=new Function("return "+n)());f.push({listener:n,count:i||null})}catch(r){t.log("error",r)}return!1};this.removeGlobalListener=function(n){if(n){try{for(var i=f.length;i--;)f[i].listener.toString()===n.toString()&&f.splice(i,1)}catch(r){t.log("error",r)}return!1}};this.sendEvent=function(o,s){t.exists(s)||(s={});t.extend(s,{id:i,version:n.version,type:o});r&&t.log(o,s);e(u[o],s,o);e(f,s,o)}}}(window.jwplayer),function(n){var t={},i={};n.plugins=function(){};n.plugins.loadPlugins=function(r,u){return i[r]=new n.plugins.pluginloader(new n.plugins.model(t),u),i[r]};n.plugins.registerPlugin=function(i,r,u,f){var e=n.utils.getPluginName(i);t[e]||(t[e]=new n.plugins.plugin(i));t[e].registerPlugin(i,r,u,f)}}(jwplayer),function(n){n.plugins.model=function(t){this.addPlugin=function(i){var r=n.utils.getPluginName(i);return t[r]||(t[r]=new n.plugins.plugin(i)),t[r]};this.getPlugins=function(){return t}}}(jwplayer),function(n){var t=jwplayer.utils,i=jwplayer.events;n.pluginmodes={FLASH:0,JAVASCRIPT:1,HYBRID:2};n.plugin=function(r){function h(){switch(t.getPluginPathType(r)){case t.pluginPathType.ABSOLUTE:return r;case t.pluginPathType.RELATIVE:return t.getAbsolutePath(r,window.location.href)}}function l(){s=setTimeout(function(){f=t.loaderstatus.COMPLETE;o.sendEvent(i.COMPLETE)},1e3)}function a(){f=t.loaderstatus.ERROR;o.sendEvent(i.ERROR,{url:r})}var f=t.loaderstatus.NEW,u,e,c,s,o=new i.eventdispatcher;t.extend(this,o);this.load=function(){if(f===t.loaderstatus.NEW)if(0<r.lastIndexOf(".swf"))u=r,f=t.loaderstatus.COMPLETE,o.sendEvent(i.COMPLETE);else if(t.getPluginPathType(r)===t.pluginPathType.CDN)f=t.loaderstatus.COMPLETE,o.sendEvent(i.COMPLETE);else{f=t.loaderstatus.LOADING;var n=new t.scriptloader(h());n.addEventListener(i.COMPLETE,l);n.addEventListener(i.ERROR,a);n.load()}};this.registerPlugin=function(n,r,h,l){s&&(clearTimeout(s),s=void 0);c=r;h&&l?(u=l,e=h):"string"==typeof h?u=h:"function"==typeof h?e=h:!h&&!l&&(u=n);f=t.loaderstatus.COMPLETE;o.sendEvent(i.COMPLETE)};this.getStatus=function(){return f};this.getPluginName=function(){return t.getPluginName(r)};this.getFlashPath=function(){if(u)switch(t.getPluginPathType(u)){case t.pluginPathType.ABSOLUTE:return u;case t.pluginPathType.RELATIVE:return 0<r.lastIndexOf(".swf")?t.getAbsolutePath(u,window.location.href):t.getAbsolutePath(u,h())}return null};this.getJS=function(){return e};this.getTarget=function(){return c};this.getPluginmode=function(){return"undefined"!=typeof u&&"undefined"!=typeof e?n.pluginmodes.HYBRID:"undefined"!=typeof u?n.pluginmodes.FLASH:"undefined"!=typeof e?n.pluginmodes.JAVASCRIPT:void 0};this.getNewInstance=function(n,t,i){return new e(n,t,i)};this.getURL=function(){return r}}}(jwplayer.plugins),function(n){var t=n.utils,i=n.events,r=n._,u=t.foreach;n.plugins.pluginloader=function(n,f){function l(){h||(h=!0,s=t.loaderstatus.COMPLETE,e.sendEvent(i.COMPLETE))}function a(){if(o&&0!==r.keys(o).length||l(),!h){var u=n.getPlugins();c=r.after(y,l);t.foreach(o,function(n){var f,r;n=t.getPluginName(n);r=u[n];n=r.getJS();f=r.getTarget();r=r.getStatus();r===t.loaderstatus.LOADING||r===t.loaderstatus.NEW||(n&&!t.versionCheck(f)&&e.sendEvent(i.ERROR,{message:"Incompatible player version"}),c())})}}function v(n){e.sendEvent(i.ERROR,{message:"File not found"});n.url&&t.log("File not found",n.url);c()}var s=t.loaderstatus.NEW,h=!1,o=f,y=r.size(o),c,e=new i.eventdispatcher;t.extend(this,e);this.setupPlugins=function(i,r,f){var e={length:0,plugins:{}},s=0,o={},h=n.getPlugins();return u(r.plugins,function(n,u){var l=t.getPluginName(n),a=h[l],v=a.getFlashPath(),p=a.getJS(),y=a.getURL(),c;v&&(e.plugins[v]=t.extend({},u),e.plugins[v].pluginmode=a.getPluginmode(),e.length++);try{if(p&&r.plugins&&r.plugins[y]){c=document.createElement("div");c.id=i.id+"_"+l;c.style.position="absolute";c.style.top=0;c.style.zIndex=s+10;o[l]=a.getNewInstance(i,t.extend({},r.plugins[y]),c);s++;i.onReady(f(o[l],c,!0));i.onResize(f(o[l],c))}}catch(w){t.log("ERROR: Failed to load "+l+".")}}),i.plugins=o,e};this.load=function(){if(!(t.exists(f)&&"object"!==t.typeOf(f))){s=t.loaderstatus.LOADING;u(f,function(r){t.exists(r)&&(r=n.addPlugin(r),r.addEventListener(i.COMPLETE,a),r.addEventListener(i.ERROR,v))});var r=n.getPlugins();u(r,function(n,t){t.load()})}a()};this.destroy=function(){e&&(e.resetEventListeners(),e=null)};this.pluginFailed=v;this.getStatus=function(){return s}}}(jwplayer),function(n){n.parsers={localName:function(n){return n?n.localName?n.localName:n.baseName?n.baseName:"":""},textContent:function(t){return t?t.textContent?n.utils.trim(t.textContent):t.text?n.utils.trim(t.text):"":""},getChildNode:function(n,t){return n.childNodes[t]},numChildren:function(n){return n.childNodes?n.childNodes.length:0}}}(jwplayer),function(n){var t=n.parsers;(t.jwparser=function(){}).parseEntry=function(i,r){for(var e,h,o=[],f=[],s=n.utils.xmlAttribute,u=0;u<i.childNodes.length;u++)e=i.childNodes[u],"jwplayer"==e.prefix&&(h=t.localName(e),"source"==h?(delete r.sources,o.push({file:s(e,"file"),"default":s(e,"default"),label:s(e,"label"),type:s(e,"type")})):"track"==h?(delete r.tracks,f.push({file:s(e,"file"),"default":s(e,"default"),kind:s(e,"kind"),label:s(e,"label")})):(r[h]=n.utils.serialize(t.textContent(e)),"file"==h&&r.sources&&delete r.sources)),r.file||(r.file=r.link);if(o.length)for(r.sources=[],u=0;u<o.length;u++)0<o[u].file.length&&(o[u]["default"]="true"==o[u]["default"]?!0:!1,o[u].label.length||delete o[u].label,r.sources.push(o[u]));if(f.length)for(r.tracks=[],u=0;u<f.length;u++)0<f[u].file.length&&(f[u]["default"]="true"==f[u]["default"]?!0:!1,f[u].kind=f[u].kind.length?f[u].kind:"captions",f[u].label.length||delete f[u].label,r.tracks.push(f[u]));return r}}(jwplayer),function(n){var u=jwplayer.utils,t=u.xmlAttribute,f=n.localName,i=n.textContent,e=n.numChildren,r=n.mediaparser=function(){};r.parseGroup=function(n,o){for(var s,l=[],c,v,a,h=0;h<e(n);h++)if(s=n.childNodes[h],"media"==s.prefix&&f(s))switch(f(s).toLowerCase()){case"content":t(s,"duration")&&(o.duration=u.seconds(t(s,"duration")));0<e(s)&&(o=r.parseGroup(s,o));t(s,"url")&&(o.sources||(o.sources=[]),o.sources.push({file:t(s,"url"),type:t(s,"type"),width:t(s,"width"),label:t(s,"label")}));break;case"title":o.title=i(s);break;case"description":o.description=i(s);break;case"guid":o.mediaid=i(s);break;case"thumbnail":o.image||(o.image=t(s,"url"));break;case"group":r.parseGroup(s,o);break;case"subtitle":c={};c.file=t(s,"url");c.kind="captions";0<t(s,"lang").length&&(v=c,s=t(s,"lang"),a={zh:"Chinese",nl:"Dutch",en:"English",fr:"French",de:"German",it:"Italian",ja:"Japanese",pt:"Portuguese",ru:"Russian",es:"Spanish"},s=a[s]?a[s]:s,v.label=s);l.push(c)}for(o.hasOwnProperty("tracks")||(o.tracks=[]),h=0;h<l.length;h++)o.tracks.push(l[h]);return o}}(jwplayer.parsers),function(n){function f(r){for(var f,s,u={},o=0;o<r.childNodes.length;o++)if(f=r.childNodes[o],s=i(f),s)switch(s.toLowerCase()){case"enclosure":u.file=e.xmlAttribute(f,"url");break;case"title":u.title=t(f);break;case"guid":u.mediaid=t(f);break;case"pubdate":u.date=t(f);break;case"description":u.description=t(f);break;case"link":u.link=t(f);break;case"category":u.tags=u.tags?u.tags+t(f):t(f)}return u=n.mediaparser.parseGroup(r,u),u=n.jwparser.parseEntry(r,u),new jwplayer.playlist.item(u)}var e=jwplayer.utils,t=n.textContent,r=n.getChildNode,u=n.numChildren,i=n.localName;n.rssparser={};n.rssparser.parse=function(n){for(var e,o,h,s=[],t=0;t<u(n);t++)if(e=r(n,t),"channel"==i(e).toLowerCase())for(o=0;o<u(e);o++)h=r(e,o),"item"==i(h).toLowerCase()&&s.push(f(h));return s}}(jwplayer.parsers),function(n){var t=n.utils,i=n._,r;n.playlist=function(t){var r=[];return t=i.isArray(t)?t:[t],i.each(t,function(t){r.push(new n.playlist.item(t))}),r};n.playlist.filterPlaylist=function(n,u){var f=[];return i.each(n,function(n){if(n=t.extend({},n),n.sources=r(n.sources,!1,u),n.sources.length){for(var i=0;i<n.sources.length;i++)n.sources[i].label=n.sources[i].label||i.toString();f.push(n)}}),f};r=n.playlist.filterSources=function(r,u,f){var e,o=[],s=u?n.embed.flashCanPlay:n.embed.html5CanPlay;if(r)return i.each(r,function(n){if(n&&n.file){var r=t.trim(""+n.file),i=n.type;i||(i=t.extension(r),i=t.extensionmap.extType(i));n=t.extend({},n,{file:r,type:i})}else n=void 0;n&&s(n.file,n.type,f)&&(e=e||n.type,n.type===e&&o.push(n))}),o}}(jwplayer),function(n){var t=n.item=function(i){var f=jwplayer.utils,r=f.extend({},t.defaults,i),u,e;for(r.tracks=i&&f.exists(i.tracks)?i.tracks:[],0===r.sources.length&&(r.sources=[new n.source(r)]),u=0;u<r.sources.length;u++)e=r.sources[u]["default"],r.sources[u]["default"]=e?"true"==e.toString():!1,r.sources[u]=new n.source(r.sources[u]);if(r.captions&&!f.exists(i.tracks)){for(i=0;i<r.captions.length;i++)r.tracks.push(r.captions[i]);delete r.captions}for(u=0;u<r.tracks.length;u++)r.tracks[u]=new n.track(r.tracks[u]);return r};t.defaults={description:void 0,image:void 0,mediaid:void 0,title:void 0,sources:[],tracks:[]}}(jwplayer.playlist),function(n){var r=n.utils,t=n.events,i=n.parsers;n.playlist.loader=function(){function e(r){var o,e,s;try{for(o=r.responseXML.childNodes,r="",e=0;e<o.length&&!(r=o[e],8!==r.nodeType);e++);"xml"===i.localName(r)&&(r=r.nextSibling);"rss"!==i.localName(r)?u("Not a valid RSS feed"):(s=new n.playlist(i.rssparser.parse(r)),f.sendEvent(t.JWPLAYER_PLAYLIST_LOADED,{playlist:s}))}catch(h){u()}}function o(n){u(n.match(/invalid/i)?"Not a valid RSS feed":"")}function u(n){f.sendEvent(t.JWPLAYER_ERROR,{message:n?n:"Error loading file"})}var f=new t.eventdispatcher;r.extend(this,f);this.load=function(n){r.ajax(n,e,o)}}}(jwplayer),function(n){var t=jwplayer.utils,i={file:void 0,label:void 0,type:void 0,"default":void 0};n.source=function(n){var r=t.extend({},i);return t.foreach(i,function(i){t.exists(n[i])&&(r[i]=n[i],delete n[i])}),r.type&&0<r.type.indexOf("/")&&(r.type=t.extensionmap.mimeType(r.type)),"m3u8"==r.type&&(r.type="hls"),"smil"==r.type&&(r.type="rtmp"),r}}(jwplayer.playlist),function(n){var t=jwplayer.utils,i={file:void 0,label:void 0,kind:"captions","default":!1};n.track=function(n){var r=t.extend({},i);return n||(n={}),t.foreach(i,function(i){t.exists(n[i])&&(r[i]=n[i],delete n[i])}),r}}(jwplayer.playlist),function(n){function u(n,i,r){var u=n.style;u.backgroundColor="#000";u.color="#FFF";u.width=t.styleDimension(r.width);u.height=t.styleDimension(r.height);u.display="table";u.opacity=1;r=document.createElement("p");u=r.style;u.verticalAlign="middle";u.textAlign="center";u.display="table-cell";u.font="15px/20px Arial, Helvetica, sans-serif";r.innerHTML=i.replace(":",":<br>");n.innerHTML="";n.appendChild(r)}var t=n.utils,i=n.events,f=n._,r=n.embed=function(e){function g(){var u,w,b,v;if(!p){if(u=o.playlist,f.isArray(u)){if(0===u.length){l();return}if(1===u.length&&(!u[0].sources||0===u[0].sources.length||!u[0].sources[0].file)){l();return}}if(!y)if(f.isString(u))c=new n.playlist.loader,c.addEventListener(i.JWPLAYER_PLAYLIST_LOADED,function(n){o.playlist=n.playlist;y=!1;g()}),c.addEventListener(i.JWPLAYER_ERROR,function(n){y=!1;l(n)}),y=!0,c.load(o.playlist);else if(h.getStatus()===t.loaderstatus.COMPLETE){for(u=0;u<o.modes.length;u++)if(v=o.modes[u],w=v.type,w&&r[w]&&(b=t.extend({},o),v=new r[w](s,v,b,h,e),v.supportsConfig()))return v.addEventListener(i.ERROR,rt),v.embed(),t.css("object.jwswf, .jwplayer:focus",{outline:"none"}),t.css(".jw-tab-focus:focus",{outline:"solid 2px #0B7EF4"}),e;o.fallback?(u="No suitable players found and fallback enabled",a(u,!0),t.log(u),new r.download(s,o,l)):(u="No suitable players found and fallback disabled",a(u,!1),t.log(u),s.parentNode.replaceChild(it,s))}}}function rt(n){v(nt+n.message)}function ut(n){e.dispatchEvent(i.JWPLAYER_ERROR,{message:"Could not load plugin: "+n.message})}function l(n){n&&n.message?v("Error loading playlist: "+n.message):v(nt+"No playable sources found")}function a(n,t){clearTimeout(tt);tt=setTimeout(function(){e.dispatchEvent(i.JWPLAYER_SETUP_ERROR,{message:n,fallback:t})},0)}function v(n){p||(o.fallback?(p=!0,u(s,n,o),a(n,!0)):a(n,!1))}var o=new r.config(e.config),w=o.width,b=o.height,nt="Error loading player: ",k=document.getElementById(e.id),h=n.plugins.loadPlugins(e.id,o.plugins),c,y=!1,p=!1,tt=-1,it=null,d,s;return o.fallbackDiv&&(it=o.fallbackDiv,delete o.fallbackDiv),o.id=e.id,o.aspectratio?e.config.aspectratio=o.aspectratio:delete e.config.aspectratio,d=e,t.foreach(o.events,function(n,t){var i=d[n];"function"==typeof i&&i.call(d,t)}),s=document.createElement("div"),s.id=k.id,s.style.width=0<w.toString().indexOf("%")?w:w+"px",s.style.height=0<b.toString().indexOf("%")?b:b+"px",k.parentNode.replaceChild(s,k),this.embed=function(){p||(h.addEventListener(i.COMPLETE,g),h.addEventListener(i.ERROR,ut),h.load())},this.destroy=function(){h&&(h.destroy(),h=null);c&&(c.resetEventListeners(),c=null)},this.errorScreen=v,this};n.embed.errorScreen=u}(jwplayer),function(n){function u(n){var u,f;if(n.playlist)for(u=0;u<n.playlist.length;u++)n.playlist[u]=new r(n.playlist[u]);else f={},t.foreach(r.defaults,function(t){i(n,f,t)}),f.sources||(n.levels?(f.sources=n.levels,delete n.levels):(u={},i(n,u,"file"),i(n,u,"type"),f.sources=u.file?[u]:[])),n.playlist=[new r(f)]}function i(n,i,r){t.exists(n[r])&&(i[r]=n[r],delete n[r])}var t=n.utils,r=n.playlist.item;(n.embed.config=function(i){var r={fallback:!0,height:270,primary:"html5",width:480,base:i.base?i.base:t.getScriptPath("jwplayer.js"),aspectratio:""},f,e;return i=t.extend({},r,n.defaults,i),r={type:"html5",src:i.base+"jwplayer.html5.js"},f={type:"flash",src:i.base+"jwplayer.flash.swf"},i.modes="flash"===i.primary?[f,r]:[r,f],i.listbar&&(i.playlistsize=i.listbar.size,i.playlistposition=i.listbar.position,i.playlistlayout=i.listbar.layout),i.flashplayer&&(f.src=i.flashplayer),i.html5player&&(r.src=i.html5player),u(i),f=i.aspectratio,"string"==typeof f&&t.exists(f)?(e=f.indexOf(":"),-1===e?r=0:(r=parseFloat(f.substr(0,e)),f=parseFloat(f.substr(e+1)),r=0>=r||0>=f?0:100*(f/r)+"%")):r=0,-1===i.width.toString().indexOf("%")?delete i.aspectratio:r?i.aspectratio=r:delete i.aspectratio,i}).addConfig=function(n,i){return u(i),t.extend(n,i)}}(jwplayer),function(n){var t=n.utils,i=n.utils.css;n.embed.download=function(n,r,u){function h(n,t,i){return n=document.createElement(n),t&&(n.className="jwdownload"+t),i&&i.appendChild(n),n}var e=t.extend({},r),o,p=e.width?e.width:480,w=e.height?e.height:320,c,l,f,a,v,s,y;if(r=r.logo?r.logo:{prefix:t.repo(),file:"logo.png",margin:10},f=e.playlist,e=["mp4","aac","mp3"],f&&f.length){for(a=f[0],v=a.sources,f=0;f<v.length;f++)s=v[f],s.file&&(y=s.type||t.extensionmap.extType(t.extension(s.file)),0<=t.indexOf(e,y)?(o=s.file,c=a.image):t.isYouTube(s.file,y)&&(l=s.file));o?(u=o,n&&(o=h("a","display",n),h("div","icon",o),h("div","logo",o),u&&o.setAttribute("href",t.getAbsolutePath(u))),u="#"+n.id+" .jwdownload",n.style.width="",n.style.height="",i(u+"display",{width:t.styleDimension(Math.max(320,p)),height:t.styleDimension(Math.max(180,w)),background:"black center no-repeat "+(c?"url("+c+")":""),backgroundSize:"contain",position:"relative",border:"none",display:"block"}),i(u+"display div",{position:"absolute",width:"100%",height:"100%"}),i(u+"logo",{top:r.margin+"px",right:r.margin+"px",background:"top right no-repeat url("+r.prefix+r.file+")"}),i(u+"icon",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgNJREFUeNrs28lqwkAYB/CZqNVDDj2r6FN41QeIy8Fe+gj6BL275Q08u9FbT8ZdwVfotSBYEPUkxFOoks4EKiJdaDuTjMn3wWBO0V/+sySR8SNSqVRKIR8qaXHkzlqS9jCfzzWcTCYp9hF5o+59sVjsiRzcegSckFzcjT+ruN80TeSlAjCAAXzdJSGPFXRpAAMYwACGZQkSdhG4WCzehMNhqV6vG6vVSrirKVEw66YoSqDb7cqlUilE8JjHd/y1MQefVzqdDmiaJpfLZWHgXMHn8F6vJ1cqlVAkEsGuAn83J4gAd2RZymQygX6/L1erVQt+9ZPWb+CDwcCC2zXGJaewl/DhcHhK3DVj+KfKZrMWvFarcYNLomAv4aPRSFZVlTlcSPA5fDweW/BoNIqFnKV53JvncjkLns/n/cLdS+92O7RYLLgsKfv9/t8XlDn4eDyiw+HA9Jyz2eyt0+kY2+3WFC5hluej0Ha7zQQq9PPwdDq1Et1sNsx/nFBgCqWJ8oAK1aUptNVqcYWewE4nahfU0YQnk4ntUEfGMIU2m01HoLaCKbTRaDgKtaVLk9tBYaBcE/6Artdr4RZ5TB6/dC+9iIe/WgAMYADDpAUJAxjAAAYwgGFZgoS/AtNNTF7Z2bL0BYPBV3Jw5xFwwWcYxgtBP5OkE8i9G7aWGOOCruvauwADALMLMEbKf4SdAAAAAElFTkSuQmCC)"})):l?(r=l,n=h("iframe","",n),n.src="http://www.youtube.com/embed/"+t.youTubeID(r),n.width=p,n.height=w,n.style.border="none"):u()}}}(jwplayer),function(n){var t=n.utils,u=n.events,i={},r;(n.embed.flash=function(f,e,o,s,h){function c(n,t,i){var r=document.createElement("param");r.setAttribute("name",t);r.setAttribute("value",i);n.appendChild(r)}function v(n,t,i){return function(){try{i&&document.getElementById(h.id+"_wrapper").appendChild(t);var r=document.getElementById(h.id).getPluginConfig("display");"function"==typeof n.resize&&n.resize(r.width,r.height);t.style.left=r.x;t.style.top=r.h}catch(u){}}}function y(n){if(!n)return{};var i={},r=[];return t.foreach(n,function(n,u){var f=t.getPluginName(n);r.push(n);t.foreach(u,function(n,t){i[f+"."+n]=t})}),i.plugins=r.join(","),i}var l=new n.events.eventdispatcher,a=t.flashVersion();t.extend(this,l);this.embed=function(){var r,n,w,p,b;if(o.id=h.id,10>a)return l.sendEvent(u.ERROR,{message:"Flash version must be 10.0 or greater"}),!1;for(w=h.config.listbar,p=t.extend({},o),f.id+"_wrapper"===f.parentNode.id?r=document.getElementById(f.id+"_wrapper"):(r=document.createElement("div"),n=document.createElement("div"),n.style.display="none",n.id=f.id+"_aspect",r.id=f.id+"_wrapper",r.style.position="relative",r.style.display="block",r.style.width=t.styleDimension(p.width),r.style.height=t.styleDimension(p.height),h.config.aspectratio&&(b=parseFloat(h.config.aspectratio),n.style.display="block",n.style.marginTop=h.config.aspectratio,r.style.height="auto",r.style.display="inline-block",w&&("bottom"===w.position?n.style.paddingBottom=w.size+"px":"right"===w.position&&(n.style.marginBottom=-1*w.size*(b/100)+"px"))),f.parentNode.replaceChild(r,f),r.appendChild(f),r.appendChild(n)),r=s.setupPlugins(h,p,v),0<r.length?t.extend(p,y(r.plugins)):delete p.plugins,"undefined"!=typeof p["dock.position"]&&"false"===p["dock.position"].toString().toLowerCase()&&(p.dock=p["dock.position"],delete p["dock.position"]),r=p.wmode||(p.height&&40>=p.height?"transparent":"opaque"),n="height width modes events primary base fallback volume".split(" "),w=0;w<n.length;w++)delete p[n[w]];n=t.getCookies();t.foreach(n,function(n,t){"undefined"==typeof p[n]&&(p[n]=t)});n=window.location.href.split("/");n.splice(n.length-1,1);n=n.join("/");p.base=n+"/";i[f.id]=p;t.isMSIE()?(n='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" " width="100%" height="100%"id="'+f.id+'" name="'+f.id+'" tabindex=0"">',n+='<param name="movie" value="'+e.src+'">',n+='<param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always">',n+='<param name="seamlesstabbing" value="true">',n+='<param name="wmode" value="'+r+'">',n+='<param name="bgcolor" value="#000000">',n+="<\/object>",f.outerHTML=n,r=document.getElementById(f.id)):(n=document.createElement("object"),n.setAttribute("type","application/x-shockwave-flash"),n.setAttribute("data",e.src),n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.setAttribute("bgcolor","#000000"),n.setAttribute("id",f.id),n.setAttribute("name",f.id),n.className="jwswf",c(n,"allowfullscreen","true"),c(n,"allowscriptaccess","always"),c(n,"seamlesstabbing","true"),c(n,"wmode",r),f.parentNode.replaceChild(n,f),r=n);h.config.aspectratio&&(r.style.position="absolute");h.container=r;h.setPlayer(r,"flash")};this.supportsConfig=function(){var n,i;if(a)if(o){if("string"===t.typeOf(o.playlist))return!0;try{if(n=o.playlist[0].sources,"undefined"==typeof n)return!0;for(i=0;i<n.length;i++)if(n[i].file&&r(n[i].file,n[i].type))return!0}catch(u){}}else return!0;return!1}}).getVars=function(n){return i[n]};r=n.embed.flashCanPlay=function(n,i){if(t.isYouTube(n,i)||t.isRtmp(n,i)||"hls"===i)return!0;var r=t.extensionmap[i?i:t.extension(n)];return r?!!r.flash:!1}}(jwplayer),function(n){var t=n.utils,i=t.extensionmap,r=n.events;n.embed.html5=function(i,u,f,e,o){function h(n,t,r){return function(){try{var u=document.querySelector("#"+i.id+" .jwmain");r&&u.appendChild(t);"function"==typeof n.resize&&(n.resize(u.clientWidth,u.clientHeight),setTimeout(function(){n.resize(u.clientWidth,u.clientHeight)},400));t.left=u.style.left;t.top=u.style.top}catch(f){}}}function c(n){s.sendEvent(n.type,{message:"HTML5 player not found"})}var s=this,l=new r.eventdispatcher;t.extend(s,l);s.embed=function(){if(n.html5){e.setupPlugins(o,f,h);i.innerHTML="";var l=n.utils.extend({},f);delete l.volume;l=new n.html5.player(l);o.container=document.getElementById(o.id);o.setPlayer(l,"html5")}else l=new t.scriptloader(u.src),l.addEventListener(r.ERROR,c),l.addEventListener(r.COMPLETE,s.embed),l.load()};s.supportsConfig=function(){if(n.vid.canPlayType)try{if("string"===t.typeOf(f.playlist))return!0;for(var r=f.playlist[0].sources,i=0;i<r.length;i++)if(n.embed.html5CanPlay(r[i].file,r[i].type,f.androidhls))return!0}catch(u){}return!1}};n.embed.html5CanPlay=function(r,u,f){var o,e;if(null!==navigator.userAgent.match(/BlackBerry/i)||t.isIE(9))return!1;if(t.isYouTube(r,u))return!0;if(o=t.extension(r),u=u||i.extType(o),"hls"===u)if(f){if(f=t.isAndroidNative,f(2)||f(3)||f("4.0"))return!1;if(t.isAndroid())return!0}else if(t.isAndroid())return!1;if(t.isRtmp(r,u)||(r=i[u]||i[o],!r||r.flash&&!r.html5))return!1;n:if(r=r.html5){try{e=!!n.vid.canPlayType(r);break n}catch(s){}e=!1}else e=!0;return e}}(jwplayer),function(n){var r=n.embed,u=n.embed.html5CanPlay,t=n.utils,f=n._,i=/\.(js|swf)$/;n.cast=n.cast||{};n.embed=t.extend(function(u){function v(){a="Adobe SiteCatalyst Error: Could not find Media Module"}var h=t.repo(),c=t.extend({},n.defaults),f=t.extend({},c,u.config),o=u.config,e=f.plugins,s=f.analytics,y=h+"jwpsrv.js",p=h+"sharing.js",w=h+"related.js",b=h+"gapro.js",c=n.key?n.key:c.key,l=new n.utils.key(c).edition(),a,e=e?e:{};"ads"==l&&f.advertising&&(i.test(f.advertising.client)?e[f.advertising.client]=f.advertising:e[h+f.advertising.client+".js"]=f.advertising);delete o.advertising;o.key=c;f.analytics&&i.test(f.analytics.client)&&(y=f.analytics.client);delete o.analytics;!s||"ads"===l||"enterprise"===l||delete s.enabled;"free"!=l&&s&&!1===s.enabled||(e[y]=s?s:{});delete e.sharing;delete e.related;switch(l){case"ads":case"enterprise":if(o.sitecatalyst)try{window.s&&window.s.hasOwnProperty("Media")?new n.embed.sitecatalyst(u):v()}catch(k){v()}case"premium":f.related&&(i.test(f.related.client)&&(w=f.related.client),e[w]=f.related);f.ga&&(i.test(f.ga.client)&&(b=f.ga.client),e[b]=f.ga);case"pro":f.sharing&&(i.test(f.sharing.client)&&(p=f.sharing.client),e[p]=f.sharing);f.skin&&(o.skin=f.skin.replace(/^(beelden|bekle|five|glow|modieus|roundster|stormtrooper|vapor)$/i,t.repo()+"skins/$1.xml"))}return o.plugins=e,u.config=o,u=new r(u),a&&u.errorScreen(a),u},n.embed);n.embed.html5CanPlay=function(t,i){var r,e={file:t,type:i};return r=n.html5&&n.html5.chooseProvider?n.html5.chooseProvider(e)!==n.html5.VideoProvider:f.any(n.unregisteredProviders,function(n){return n.supports(e)}),r?!0:u.apply(this,arguments)}}(jwplayer),function(n){var t=jwplayer.utils;n.sitecatalyst=function(n){function r(n){f.debug&&t.log(n)}function y(n){return n=n.split("/"),n=n[n.length-1],n=n.split("?"),n[0]}function c(){if(!h){h=!0;var n=u.getPosition();r("stop: "+i+" : "+n);s.Media.stop(i,n)}}function l(){v||(c(),v=!0,r("close: "+i),s.Media.close(i),o=!0,e=0)}var u=n,f=t.extend({},u.config.sitecatalyst),p={onPlay:function(){if(!o){var n=u.getPosition();h=!1;r("play: "+i+" : "+n);s.Media.play(i,n)}},onPause:c,onBuffer:c,onIdle:l,onPlaylistItem:function(n){var s,r;try{o=!0;l();e=0;f.mediaName?s=f.mediaName:(r=u.getPlaylistItem(n.index),s=r.title?r.title:r.file?y(r.file):r.sources&&r.sources.length?y(r.sources[0].file):"");i=s;a=f.playerName?f.playerName:u.id}catch(h){t.log(h)}},onTime:function(){var n,t;if(o){if(n=u.getDuration(),-1==n)return;v=h=o=!1;r("open: "+i+" : "+n+" : "+a);s.Media.open(i,n,a);r("play: "+i+" : 0");s.Media.play(i,0)}n=u.getPosition();3<=Math.abs(n-e)&&(t=e,r("seek: "+t+" to "+n),r("stop: "+i+" : "+t),s.Media.stop(i,t),r("play: "+i+" : "+n),s.Media.play(i,n));e=n},onComplete:l},i,a,e,h=!0,v=!0,o;t.foreach(p,function(n){u[n](p[n])})}}(jwplayer.embed),function(n){function i(n,i){n[i]&&(n[i]=t.getAbsolutePath(n[i]))}var t=n.utils,r=n._,u=window.location.href;n.cast.setupCastConfig=function(n,r){var e=t.extend({},n.config),o,s,c,f,h;for(e.cast=t.extend({pageUrl:u},r),o="base autostart controls fallback fullscreen width height mobilecontrols modes playlistlayout playlistposition playlistsize primary stretching sharing related ga skin logo listbar".split(" "),s=o.length;s--;)delete e[o[s]];o=e.plugins;delete e.plugins;for(c in o)if(o.hasOwnProperty(c)&&(f=o[c],f.client&&(/[\.\/]/.test(f.client)&&i(f,"client"),-1<f.client.indexOf("vast")))){if(s=e,f=t.extend({},f),f.client="vast",delete f.companiondiv,f.schedule){h=void 0;for(h in f.schedule)f.schedule.hasOwnProperty(h)&&i(f.schedule[h].ad||f.schedule[h],"tag")}i(f,"tag");s.advertising=f}return n.position&&(e.position=n.position),0<n.item&&(e.item=n.item),e.captionLabel=t.getCookies().captionLabel,e};n.cast.setupFlashCastConfig=function(n){var i=n.config,u;return i.playlist=n.getPlaylist(),(u=r.find(i.plugins,function(n,t){return 0<t.indexOf("vast.js")}))?(u.client="vast",u={advertising:u}):u={},i=r.pick(i,"id captionLabel cast key playlist repeat".split(" ")),i.cast.pageUrl=window.location.href,t.extend(i,{captionLabel:t.getCookies().captionLabel,volume:n.getVolume(),mute:n.getMute(),id:n.id,position:n.getPosition(),item:n.getPlaylistIndex()},u),i}}(window.jwplayer),function(n,t){function e(n,t){n[t]&&(n[t]=r.getAbsolutePath(n[t]))}var i=t.cast,r=t.utils,u=t.events,f=u.state,o={};i.NS="urn:x-cast:com.longtailvideo.jwplayer";i.debug=!1;i.availability=null;i.available=function(t){t=t||i.availability;var r=n.chrome,u="available";return r.cast&&r.cast.ReceiverAvailability&&(u=r.cast.ReceiverAvailability.AVAILABLE),t===u};i.controller=function(s,h){function pt(n,t){i.log("send command",n,t);var r={command:n};void 0!==t&&(r.args=t);c.sendMessage(i.NS,r,nt,function(n){i.log("error message",n);"Invalid namespace"===n.description&&d()})}function wt(n){n=!!i.available(n.availability);k.available!==n&&(k.available=n,ot(u.JWPLAYER_CAST_AVAILABLE))}function bt(n){i.log("existing session",n);c||y||(y=n.session,y.addMessageListener(i.NS,ft))}function ft(n,r){var f=JSON.parse(r),e,o;if(!f)throw"Message not proper JSON";f.reconcile&&(y.removeMessageListener(i.NS,ft),e=f.diff,o=y,e.id&&f.appid&&f.pageUrl||(e.id=t().id,f.appid=v.appid,f.pageUrl=rt,y=c=null),e.id===s.id&&f.appid===v.appid&&f.pageUrl===rt&&(c||(s.jwInstreamState()&&s.jwInstreamDestroy(!0),st(o),h.sendEvent(u.JWPLAYER_PLAYER_STATE,{oldstate:e.oldstate,newstate:e.newstate})),at(f)),y=null)}function et(n){k.active=!!n;n=k;var t;t=c&&c.receiver?c.receiver.friendlyName:"";n.deviceName=t;ot(u.JWPLAYER_CAST_SESSION,{})}function ot(n){var t=r.extend({},k);h.sendEvent(n,t)}function kt(t){var r=n.chrome;t.code!==r.cast.ErrorCode.CANCEL&&(i.log("Cast Session Error:",t,c),t.code===r.cast.ErrorCode.SESSION_ERROR&&d())}function d(){c?(ct(),c.stop(g,dt)):g()}function dt(n){i.error("Cast Session Stop error:",n,c);g()}function st(e){var v,o;i.log("Session started:",e);c=e;c.addMessageListener(i.NS,lt);c.addUpdateListener(ht);s.jwPause(!0);s.jwSetFullscreen(!1);b=h.getVideo();tt=h.volume;it=h.mute;a=new i.provider(pt);a.init();h.setVideoProvider(a);s.jwPlay=function(n){!1===n?a.pause():a.play()};s.jwPause=function(n){s.jwPlay(!!n)};s.jwLoad=function(n){"number"===r.typeOf(n)&&h.setItem(n);a.load(n)};s.jwPlaylistItem=function(n){"number"===r.typeOf(n)&&h.setItem(n);a.playlistItem(n)};s.jwPlaylistNext=function(){s.jwPlaylistItem(h.item+1)};s.jwPlaylistPrev=function(){s.jwPlaylistItem(h.item-1)};s.jwSetVolume=function(n){r.exists(n)&&(n=Math.min(Math.max(0,n),100)|0,vt(n)&&(n=Math.max(0,Math.min(n/100,1)),c.setReceiverVolumeLevel(n,w,function(n){i.error("set volume error",n);w()})))};s.jwSetMute=function(n){r.exists(n)||(n=!p.mute);yt(n)&&c.setReceiverMuted(!!n,w,function(n){i.error("set muted error",n);w()})};s.jwGetVolume=function(){return p.volume|0};s.jwGetMute=function(){return!!p.mute};s.jwIsBeforePlay=function(){return!1};v=s.jwSetCurrentCaptions;s.jwSetCurrentCaptions=function(n){v(n);a.sendCommand("caption",n)};s.jwSkipAd=function(n){l&&(l.skipAd(n),n=l.getAdModel(),n.complete=!0,h.sendEvent(u.JWPLAYER_CAST_AD_CHANGED,n))};s.jwClickAd=function(i){if(l&&300<l.timeSinceClick()&&(l.clickAd(i),h.state!==f.PAUSED)){var r={tag:i.tag};i.sequence&&(r.sequence=i.sequence);i.podcount&&(r.podcount=i.podcount);t(s.id).dispatchEvent(u.JWPLAYER_AD_CLICK,r);n.open(i.clickthrough)}};s.jwPlayAd=s.jwPauseAd=s.jwSetControls=s.jwForceState=s.jwReleaseState=s.jwSetFullscreen=s.jwDetachMedia=s.jwAttachMedia=nt;o=t(s.id).plugins;o.vast&&o.vast.jwPauseAd!==nt&&(ut={jwPlayAd:o.vast.jwPlayAd,jwPauseAd:o.vast.jwPauseAd},o.vast.jwPlayAd=o.vast.jwPauseAd=nt);w();et(!0);e!==y&&a.setup(gt(),h)}function ht(n){i.log("Cast Session status",n);n?w():(a.sendEvent(u.JWPLAYER_PLAYER_STATE,{oldstate:h.state,newstate:f.BUFFERING}),g())}function g(){if(i.log("_sessionStopped"),c&&(ct(),c=null),b){delete s.jwSkipAd;delete s.jwClickAd;s.initializeAPI();var n=t(s.id).plugins;n.vast&&r.extend(n.vast,ut);h.volume=tt;h.mute=it;h.setVideoProvider(b);h.duration=0;a&&(a.destroy(),a=null);l&&(l.destroy(),l=null);h.state!==f.IDLE?r.isIPad()||r.isIPod()?(s.jwStop(!0),b.sendEvent(u.JWPLAYER_PLAYER_STATE,{oldstate:f.BUFFERING,newstate:f.IDLE})):(h.state=f.IDLE,s.jwPlay(!0),s.jwSeek(h.position)):b.sendEvent(u.JWPLAYER_PLAYER_STATE,{oldstate:f.BUFFERING,newstate:f.IDLE});b=null}et(!1)}function ct(){c.removeUpdateListener(ht);c.removeMessageListener(i.NS,lt)}function lt(n,t){var i=JSON.parse(t);if(!i)throw"Message not proper JSON";at(i)}function at(n){if("state"===n.type)l&&(n.diff.newstate||n.diff.position)&&(l.destroy(),l=null,h.setVideoProvider(a),h.sendEvent(u.JWPLAYER_CAST_AD_CHANGED,{done:!0})),a.updateModel(n.diff,n.type),n=n.diff,void 0!==n.item&&h.item!==n.item&&(h.item=n.item,h.sendEvent(u.JWPLAYER_PLAYLIST_ITEM,{index:h.item}));else if("ad"===n.type){null===l&&(l=new i.adprovider(i.NS,c),l.init(),h.setVideoProvider(l));l.updateModel(n.diff,n.type);var t=l.getAdModel();n.diff.clickthrough&&(t.onClick=s.jwClickAd);n.diff.skipoffset&&(t.onSkipAd=s.jwSkipAd);h.sendEvent(u.JWPLAYER_CAST_AD_CHANGED,t);n.diff.complete&&l.resetAdModel()}else"connection"===n.type?!0===n.closed&&d():i.error("received unhandled message",n.type,n)}function gt(){var t=r.extend({},h.config),i,u,o,n,f;for(t.cast=r.extend({pageUrl:rt},v),i="base autostart controls fallback fullscreen width height mobilecontrols modes playlistlayout playlistposition playlistsize primary stretching sharing related ga skin logo listbar".split(" "),u=i.length;u--;)delete t[i[u]];i=t.plugins;delete t.plugins;for(o in i)if(i.hasOwnProperty(o)&&(n=i[o],n.client&&(/[\.\/]/.test(n.client)&&e(n,"client"),-1<n.client.indexOf("vast")))){if(u=t,n=r.extend({},n),n.client="vast",delete n.companiondiv,n.schedule){f=void 0;for(f in n.schedule)n.schedule.hasOwnProperty(f)&&e(n.schedule[f].ad||n.schedule[f],"tag")}e(n,"tag");u.advertising=n}return h.position&&(t.position=h.position),0<h.item&&(t.item=h.item),t.captionLabel=r.getCookies().captionLabel,t}function w(){var n,t;c&&c.receiver&&(n=c.receiver.volume,n&&(t=100*n.level|0,yt(!!n.muted),vt(t)))}function vt(n){var t=p.volume!==n;return t&&(p.volume=n,a.sendEvent(u.JWPLAYER_MEDIA_VOLUME,{volume:n})),t}function yt(n){var t=p.mute!==n;return t&&(p.mute=n,a.sendEvent(u.JWPLAYER_MEDIA_MUTE,{mute:n})),t}function nt(){}var tt,it,c=null,k={available:!1,active:!1,deviceName:""},p={volume:null,mute:null},rt=r.getAbsolutePath(n.location.href),v,a=null,l=null,b=null,y,ut;tt=h.volume;it=h.mute;y=null;ut=null;v=r.extend({},o,h.cast);e(v,"loadscreen");e(v,"endscreen");e(v,"logo");!v.appid||n.cast&&n.cast.receiver||(i.loader.addEventListener("availability",wt),i.loader.addEventListener("session",bt),i.loader.initialize(v.appid));this.startCasting=function(){c||s.jwInstreamState()||n.chrome.cast.requestSession(st,kt)};this.stopCasting=d};i.log=function(){if(i.debug){var n=Array.prototype.slice.call(arguments,0);console.log.apply(console,n)}};i.error=function(){var n=Array.prototype.slice.call(arguments,0);console.error.apply(console,n)}}(window,jwplayer),function(n){function d(n){t.log("existing session",n);i||u||(u=n.session,u.addMessageListener(t.NS,h))}function h(s,c){var l=JSON.parse(c),v=u;if(!l)throw"Message not proper JSON";l.reconcile&&(u.removeMessageListener(t.NS,h),l.receiverFriendlyName=u.receiver.friendlyName,l.pageUrl&&l.diff.id&&l.appid||(l.pageUrl=k,l.diff.id=n().id,l.appid=o,u=i=null),b[l.diff.id]&&o===l.appid&&l.pageUrl===k&&(r=l.diff.id,o=l.appid,f(r,"jwInstreamDestroy"),a(v),f(r,e.message,l),u=null))}function c(){i&&(i.removeUpdateListener(p),i.removeMessageListener(t.NS,v),i.stop(s.noop,y.bind(this)),i=null);f(r,e.cleanup)}function l(n,r){i.sendMessage(t.NS,{command:n,args:r},s.noop,function(n){t.error("message send error",n)})}function a(o){var s=n(r);i=o;i.addMessageListener(t.NS,v);i.addUpdateListener(p);s=n.cast.setupFlashCastConfig(s);u!==i&&l("setup",s);f(r,e.connected,{receiverFriendlyName:o.receiver.friendlyName})}function v(n,t){if(t){var i=JSON.parse(t);if(!i)throw"Message not proper JSON";f(r,e.message,i)}}function y(n){f(r,e.error,n||{})}function p(n){n||c()}function f(t,i,r){r?n(t).callInternal(i,r):n(t).callInternal(i)}function w(){}var t=n.cast,s=n.utils,g=n._,nt=window.chrome||{},r,b={},e={},o,u,k=s.getAbsolutePath(window.location.href),i;t.NS="urn:x-cast:com.longtailvideo.jwplayer";t.flash={checkAvailability:function(n,i,r){e=r;o=i;b[n]=!0;t.loader.addEventListener("availability",function(t){"available"===t.availability&&f(n,e.available,t)});t.loader.addEventListener("session",d);t.loader.initialize(i)},startCasting:function(n){r=n;nt.cast.requestSession(a.bind(this),y.bind(this))},stopCasting:c,mute:function(n){i.setReceiverMuted(n,w,function(n){t.error("set muted error",n)})},volume:function(n){n=Math.max(0,Math.min(n/100,1));i.setReceiverVolumeLevel(n,w,function(n){t.error("set volume error",n)})},messageReceiver:l,canCastItem:function(t){return g.any(t.levels,function(t){return n.embed.html5CanPlay(t.file,t.type)})}}}(window.jwplayer),function(n,t){function f(){t&&t.cast&&t.cast.isAvailable&&!i.apiConfig?(i.apiConfig=new t.cast.ApiConfig(new t.cast.SessionRequest(s),a,v,t.cast.AutoJoinPolicy.ORIGIN_SCOPED),t.cast.initialize(i.apiConfig,l,c)):15>y++&&setTimeout(f,1e3)}function h(){r&&(r.resetEventListeners(),r=null)}function c(){i.apiConfig=null}function l(){}function a(n){u.sendEvent("session",{session:n});n.sendMessage(i.NS,{whoami:1})}function v(n){i.availability=n;u.sendEvent("availability",{availability:n})}window.chrome=t;var i=n.cast,o=n.utils,e=n.events,r,y=0,s=null,u=o.extend({initialize:function(n){s=n;null!==i.availability?u.sendEvent("availability",{availability:i.availability}):t&&t.cast?f():r||(r=new o.scriptloader("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"),r.addEventListener(e.ERROR,h),r.addEventListener(e.COMPLETE,f),r.load())}},new e.eventdispatcher("cast.loader"));n.cast.loader=u}(window.jwplayer,window.chrome||{}),function(n,t){var f=[],r=n.utils,i=n.events,u=i.state,e="getBuffer getCaptionsList getControls getCurrentCaptions getCurrentQuality getCurrentAudioTrack getDuration getFullscreen getHeight getLockState getMute getPlaylistIndex getSafeRegion getPosition getQualityLevels getState getVolume getWidth isBeforeComplete isBeforePlay releaseState".split(" "),o="playlistNext stop forceState playlistPrev seek setCurrentCaptions setControls setCurrentQuality setVolume setCurrentAudioTrack".split(" "),s={onBufferChange:i.JWPLAYER_MEDIA_BUFFER,onBufferFull:i.JWPLAYER_MEDIA_BUFFER_FULL,onError:i.JWPLAYER_ERROR,onSetupError:i.JWPLAYER_SETUP_ERROR,onFullscreen:i.JWPLAYER_FULLSCREEN,onMeta:i.JWPLAYER_MEDIA_META,onMute:i.JWPLAYER_MEDIA_MUTE,onPlaylist:i.JWPLAYER_PLAYLIST_LOADED,onPlaylistItem:i.JWPLAYER_PLAYLIST_ITEM,onPlaylistComplete:i.JWPLAYER_PLAYLIST_COMPLETE,onReady:i.API_READY,onResize:i.JWPLAYER_RESIZE,onComplete:i.JWPLAYER_MEDIA_COMPLETE,onSeek:i.JWPLAYER_MEDIA_SEEK,onTime:i.JWPLAYER_MEDIA_TIME,onVolume:i.JWPLAYER_MEDIA_VOLUME,onBeforePlay:i.JWPLAYER_MEDIA_BEFOREPLAY,onBeforeComplete:i.JWPLAYER_MEDIA_BEFORECOMPLETE,onDisplayClick:i.JWPLAYER_DISPLAY_CLICK,onControls:i.JWPLAYER_CONTROLS,onQualityLevels:i.JWPLAYER_MEDIA_LEVELS,onQualityChange:i.JWPLAYER_MEDIA_LEVEL_CHANGED,onCaptionsList:i.JWPLAYER_CAPTIONS_LIST,onCaptionsChange:i.JWPLAYER_CAPTIONS_CHANGED,onAdError:i.JWPLAYER_AD_ERROR,onAdClick:i.JWPLAYER_AD_CLICK,onAdImpression:i.JWPLAYER_AD_IMPRESSION,onAdTime:i.JWPLAYER_AD_TIME,onAdComplete:i.JWPLAYER_AD_COMPLETE,onAdCompanions:i.JWPLAYER_AD_COMPANIONS,onAdSkipped:i.JWPLAYER_AD_SKIPPED,onAdPlay:i.JWPLAYER_AD_PLAY,onAdPause:i.JWPLAYER_AD_PAUSE,onAdMeta:i.JWPLAYER_AD_META,onCast:i.JWPLAYER_CAST_SESSION,onAudioTrackChange:i.JWPLAYER_AUDIO_TRACK_CHANGED,onAudioTracks:i.JWPLAYER_AUDIO_TRACKS},h={onBuffer:u.BUFFERING,onPause:u.PAUSED,onPlay:u.PLAYING,onIdle:u.IDLE};n.api=function(f){function tt(n,t){r.foreach(n,function(n,i){c[n]=function(n){return t(i,n)}})}function it(n,t){var i="jw"+t.charAt(0).toUpperCase()+t.slice(1);c[t]=function(){var t=l.apply(this,[i].concat(Array.prototype.slice.call(arguments,0)));return n?c:t}}function rt(t){d=[];w&&w.destroy&&w.destroy();n.api.destroyPlayer(t.id)}function ut(n,t){try{n.jwAddEventListener(t,'function(dat) { jwplayer("'+c.id+'").dispatchEvent("'+t+'", dat); }')}catch(u){if("flash"===c.renderingMode){var i=document.createElement("a");i.href=a.data;i.protocol!==location.protocol&&r.log("Warning: Your site ["+location.protocol+"] and JWPlayer ["+i.protocol+"] are hosted using different protocols")}r.log("Could not add internal listener")}}function p(n,t){return y[n]||(y[n]=[],a&&k&&ut(a,n)),y[n].push(t),c}function l(){if(k){if(a){var n=Array.prototype.slice.call(arguments,0),t=n.shift();if("function"==typeof a[t]){switch(n.length){case 6:return a[t](n[0],n[1],n[2],n[3],n[4],n[5]);case 5:return a[t](n[0],n[1],n[2],n[3],n[4]);case 4:return a[t](n[0],n[1],n[2],n[3]);case 3:return a[t](n[0],n[1],n[2]);case 2:return a[t](n[0],n[1]);case 1:return a[t](n[0])}return a[t]()}}return null}d.push(arguments)}var c=this,y={},b={},a,k=!1,d=[],v,w,g={},nt={};return c.container=f,c.id=f.id,c.setup=function(t){if(n.embed){var i=document.getElementById(c.id);return i&&(t.fallbackDiv=i),rt(c),i=n(c.id),i.config=t,w=new n.embed(i),w.embed(),i}return c},c.getContainer=function(){return c.container},c.addButton=function(n,t,i,u){try{nt[u]=i;l("jwDockAddButton",n,t,'jwplayer("'+c.id+'").callback("'+u+'")',u)}catch(f){r.log("Could not add dock button"+f.message)}},c.removeButton=function(n){l("jwDockRemoveButton",n)},c.callback=function(n){nt[n]&&nt[n]()},c.getMeta=function(){return c.getItemMeta()},c.getPlaylist=function(){var n=l("jwGetPlaylist");return"flash"===c.renderingMode&&r.deepReplaceKeyName(n,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),n},c.getPlaylistItem=function(n){return r.exists(n)||(n=c.getPlaylistIndex()),c.getPlaylist()[n]},c.getRenderingMode=function(){return c.renderingMode},c.setFullscreen=function(n){return r.exists(n)?l("jwSetFullscreen",n):l("jwSetFullscreen",!l("jwGetFullscreen")),c},c.setMute=function(n){return r.exists(n)?l("jwSetMute",n):l("jwSetMute",!l("jwGetMute")),c},c.lock=function(){return c},c.unlock=function(){return c},c.load=function(t){return l("jwInstreamDestroy"),n(c.id).plugins.googima&&l("jwDestroyGoogima"),l("jwLoad",t),c},c.playlistItem=function(n){return l("jwPlaylistItem",parseInt(n,10)),c},c.resize=function(n,t){if("flash"!==c.renderingMode)l("jwResize",n,t);else{var i=document.getElementById(c.id+"_wrapper"),u=document.getElementById(c.id+"_aspect");u&&(u.style.display="none");i&&(i.style.display="block",i.style.width=r.styleDimension(n),i.style.height=r.styleDimension(t))}return c},c.play=function(n){if(n!==t)return l("jwPlay",n),c;n=c.getState();var i=v&&v.getState();return i&&(i===u.IDLE||i===u.PLAYING||i===u.BUFFERING?l("jwInstreamPause"):l("jwInstreamPlay")),n===u.PLAYING||n===u.BUFFERING?l("jwPause"):l("jwPlay"),c},c.pause=function(n){return n===t?(n=c.getState(),n===u.PLAYING||n===u.BUFFERING?l("jwPause"):l("jwPlay")):l("jwPause",n),c},c.createInstream=function(){return new n.api.instream(this,a)},c.setInstream=function(n){return v=n},c.loadInstream=function(n,t){return v=c.setInstream(c.createInstream()).init(t),v.loadItem(n),v},c.destroyPlayer=function(){l("jwPlayerDestroy")},c.playAd=function(t){var i=n(c.id).plugins;i.vast?i.vast.jwPlayAd(t):l("jwPlayAd",t)},c.pauseAd=function(){var t=n(c.id).plugins;t.vast?t.vast.jwPauseAd():l("jwPauseAd")},tt(h,function(n,t){return b[n]||(b[n]=[],p(i.JWPLAYER_PLAYER_STATE,function(t){var u=t.newstate,i,r,f;if(t=t.oldstate,u===n&&(i=b[u],i))for(r=0;r<i.length;r++)f=i[r],"function"==typeof f&&f.call(this,{oldstate:t,newstate:u})})),b[n].push(t),c}),tt(s,p),r.foreach(e,function(n,t){it(!1,t)}),r.foreach(o,function(n,t){it(!0,t)}),c.remove=function(){if(!k)throw"Cannot call remove() before player is ready";rt(this)},c.registerPlugin=function(t,i,r,u){n.plugins.registerPlugin(t,i,r,u)},c.setPlayer=function(n,t){a=n;c.renderingMode=t},c.detachMedia=function(){if("html5"===c.renderingMode)return l("jwDetachMedia")},c.attachMedia=function(n){if("html5"===c.renderingMode)return l("jwAttachMedia",n)},c.getAudioTracks=function(){return l("jwGetAudioTracks")},c.removeEventListener=function(n,t){var i=y[n],r;if(i)for(r=i.length;r--;)i[r]===t&&i.splice(r,1)},c.dispatchEvent=function(n,t){var u=y[n],e;if(u)for(var u=u.slice(0),o=r.translateEventResponse(n,t),f=0;f<u.length;f++)if(e=u[f],"function"==typeof e)try{n===i.JWPLAYER_PLAYLIST_LOADED&&r.deepReplaceKeyName(o.playlist,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]);e.call(this,o)}catch(s){r.log("There was an error calling back an event handler",s)}},c.dispatchInstreamEvent=function(n){v&&v.dispatchEvent(n,arguments)},c.callInternal=l,c.playerReady=function(n){for(k=!0,a||c.setPlayer(document.getElementById(n.id)),c.container=document.getElementById(c.id),r.foreach(y,function(n){ut(a,n)}),p(i.JWPLAYER_PLAYLIST_ITEM,function(){g={}}),p(i.JWPLAYER_MEDIA_META,function(n){r.extend(g,n.metadata)}),p(i.JWPLAYER_VIEW_TAB_FOCUS,function(n){var t=c.getContainer();!0===n.hasFocus?r.addClass(t,"jw-tab-focus"):r.removeClass(t,"jw-tab-focus")}),c.dispatchEvent(i.API_READY);0<d.length;)l.apply(this,d.shift())},c.getItemMeta=function(){return g},c};n.playerReady=function(t){var i=n.api.playerById(t.id);i||(i=n.api.selectPlayer(t.id));i.playerReady(t)};n.api.selectPlayer=function(t){var i;return r.exists(t)||(t=0),t.nodeType?i=t:"string"==typeof t&&(i=document.getElementById(t)),i?(t=n.api.playerById(i.id))?t:n.api.addPlayer(new n.api(i)):"number"==typeof t?f[t]:null};n.api.playerById=function(n){for(var t=0;t<f.length;t++)if(f[t].id===n)return f[t];return null};n.api.addPlayer=function(n){for(var t=0;t<f.length;t++)if(f[t]===n)return n;return f.push(n),n};n.api.destroyPlayer=function(n){var u,i,e,o;return(r.foreach(f,function(t,r){r.id===n&&(u=t,i=r)}),u===t||i===t)?null:(r.clearCss("#"+i.id),(e=document.getElementById(i.id+("flash"===i.renderingMode?"_wrapper":"")))&&("html5"===i.renderingMode&&i.destroyPlayer(),o=document.createElement("div"),o.id=i.id,e.parentNode.replaceChild(o,e)),f.splice(u,1),null)}}(window.jwplayer),function(n){var t=n.events,r=n.utils,i=t.state;n.api.instream=function(n,u){function e(t,i){return o[t]||(o[t]=[],u.jwInstreamAddEventListener(t,'function(dat) { jwplayer("'+n.id+'").dispatchInstreamEvent("'+t+'", dat); }')),o[t].push(i),this}function h(n,i){return s[n]||(s[n]=[],e(t.JWPLAYER_PLAYER_STATE,function(t){var u=t.newstate,e=t.oldstate,i,r,f;if(u===n&&(i=s[u],i))for(r=0;r<i.length;r++)f=i[r],"function"==typeof f&&f.call(this,{oldstate:e,newstate:u,type:t.type})})),s[n].push(i),this}var c,l,o={},s={},f=this;f.type="instream";f.init=function(){return n.callInternal("jwInitInstream"),f};f.loadItem=function(t,i){c=t;l=i||{};"array"===r.typeOf(t)?n.callInternal("jwLoadArrayInstream",c,l):n.callInternal("jwLoadItemInstream",c,l)};f.removeEvents=function(){o=s={}};f.removeEventListener=function(n,t){var i=o[n],r;if(i)for(r=i.length;r--;)i[r]===t&&i.splice(r,1)};f.dispatchEvent=function(n,t){var i=o[n],f;if(i)for(var i=i.slice(0),e=r.translateEventResponse(n,t[1]),u=0;u<i.length;u++)f=i[u],"function"==typeof f&&f.call(this,e)};f.onError=function(n){return e(t.JWPLAYER_ERROR,n)};f.onMediaError=function(n){return e(t.JWPLAYER_MEDIA_ERROR,n)};f.onFullscreen=function(n){return e(t.JWPLAYER_FULLSCREEN,n)};f.onMeta=function(n){return e(t.JWPLAYER_MEDIA_META,n)};f.onMute=function(n){return e(t.JWPLAYER_MEDIA_MUTE,n)};f.onComplete=function(n){return e(t.JWPLAYER_MEDIA_COMPLETE,n)};f.onPlaylistComplete=function(n){return e(t.JWPLAYER_PLAYLIST_COMPLETE,n)};f.onPlaylistItem=function(n){return e(t.JWPLAYER_PLAYLIST_ITEM,n)};f.onTime=function(n){return e(t.JWPLAYER_MEDIA_TIME,n)};f.onBuffer=function(n){return h(i.BUFFERING,n)};f.onPause=function(n){return h(i.PAUSED,n)};f.onPlay=function(n){return h(i.PLAYING,n)};f.onIdle=function(n){return h(i.IDLE,n)};f.onClick=function(n){return e(t.JWPLAYER_INSTREAM_CLICK,n)};f.onInstreamDestroyed=function(n){return e(t.JWPLAYER_INSTREAM_DESTROYED,n)};f.onAdSkipped=function(n){return e(t.JWPLAYER_AD_SKIPPED,n)};f.play=function(n){u.jwInstreamPlay(n)};f.pause=function(n){u.jwInstreamPause(n)};f.hide=function(){n.callInternal("jwInstreamHide")};f.destroy=function(){f.removeEvents();n.callInternal("jwInstreamDestroy")};f.setText=function(n){u.jwInstreamSetText(n?n:"")};f.getState=function(){return u.jwInstreamState()};f.setClick=function(n){u.jwInstreamClick&&u.jwInstreamClick(n)}}}(jwplayer),function(n){var t=n.api,i=t.selectPlayer,r=n._;t.selectPlayer=function(t){return(t=i(t))?t:{registerPlugin:function(t,i,r){"jwpsrv"!==t&&n.plugins.registerPlugin(t,i,r)}}};n.unregisteredProviders=[];t.registerProvider=function(t){n&&n.html5&&r.isFunction(n.html5.registerProvider)?n.html5.registerProvider(t):n.unregisteredProviders.push(t)}}(jwplayer)),function(n){function t(){this.isField=!0;this.down=!1;this.inFocus=!1;this.disabled=!1;this.cutOff=!1;this.hasLabel=!1;this.keyboardMode=!1;this.nativeTouch=!0;this.wrapperClass="dropdown";this.onChange=null}t.prototype={constructor:t,instances:{},init:function(t,i){var r=this;n.extend(r,i);r.$select=n(t);r.id=t.id;r.options=[];r.$options=r.$select.find("option");r.isTouch="ontouchend"in document;r.$select.removeClass(r.wrapperClass+" dropdown");r.$select.is(":disabled")&&(r.disabled=!0);r.$options.length&&(r.$options.each(function(t){var i=n(this);i.is(":selected")&&(r.selected={index:t,title:i.text()},r.focusIndex=t);i.hasClass("label")&&t==0?(r.hasLabel=!0,r.label=i.text(),i.attr("value","")):r.options.push({domNode:i[0],title:i.text(),value:i.val(),selected:i.is(":selected")})}),r.selected||(r.selected={index:0,title:r.$options.eq(0).text()},r.focusIndex=0),r.render())},render:function(){var t=this,i=t.isTouch&&t.nativeTouch?" touch":"",r=t.disabled?" disabled":"";t.$container=t.$select.wrap('<div class="'+t.wrapperClass+i+r+'"><span class="old"/><\/div>').parent().parent();t.$active=n('<span class="selected">'+t.selected.title+"<\/span>").appendTo(t.$container);t.$carat=n('<span class="carat"/>').appendTo(t.$container);t.$scrollWrapper=n("<div><ul/><\/div>").appendTo(t.$container);t.$dropDown=t.$scrollWrapper.find("ul");t.$form=t.$container.closest("form");n.each(t.options,function(){var n=this,i=n.selected?' class="active"':"";t.$dropDown.append("<li"+i+">"+n.title+"<\/li>")});t.$items=t.$dropDown.find("li");t.cutOff&&t.$items.length>t.cutOff&&t.$container.addClass("scrollable");t.getMaxHeight();t.isTouch&&t.nativeTouch?t.bindTouchHandlers():t.bindHandlers()},getMaxHeight:function(){var n=this,t;for(n.maxHeight=0,i=0;i<n.$items.length;i++)if(t=n.$items.eq(i),n.maxHeight+=t.outerHeight(),n.cutOff==i+1)break},bindTouchHandlers:function(){var t=this;t.$container.on("click.easyDropDown",function(){t.$select.focus()});t.$select.on({change:function(){var i=n(this).find("option:selected"),r=i.text(),u=i.val();t.$active.text(r);typeof t.onChange=="function"&&t.onChange.call(t.$select[0],{title:r,value:u})},focus:function(){t.$container.addClass("focus")},blur:function(){t.$container.removeClass("focus")}})},bindHandlers:function(){var t=this;t.query="";t.$container.on({"click.easyDropDown":function(){t.down||t.disabled?t.close():t.open()},"mousemove.easyDropDown":function(){t.keyboardMode&&(t.keyboardMode=!1)}});n("body").on("click.easyDropDown."+t.id,function(i){var r=n(i.target),u=t.wrapperClass.split(" ").join(".");!r.closest("."+u).length&&t.down&&t.close()});t.$items.on({"click.easyDropDown":function(){var i=n(this).index();t.select(i);t.$select.focus()},"mouseover.easyDropDown":function(){if(!t.keyboardMode){var i=n(this);i.addClass("focus").siblings().removeClass("focus");t.focusIndex=i.index()}},"mouseout.easyDropDown":function(){t.keyboardMode||n(this).removeClass("focus")}});t.$select.on({"focus.easyDropDown":function(){t.$container.addClass("focus");t.inFocus=!0},"blur.easyDropDown":function(){t.$container.removeClass("focus");t.inFocus=!1},"keydown.easyDropDown":function(n){var i,r;if(t.inFocus&&(t.keyboardMode=!0,i=n.keyCode,(i==38||i==40||i==32)&&(n.preventDefault(),i==38?(t.focusIndex--,t.focusIndex=t.focusIndex<0?t.$items.length-1:t.focusIndex):i==40&&(t.focusIndex++,t.focusIndex=t.focusIndex>t.$items.length-1?0:t.focusIndex),t.down||t.open(),t.$items.removeClass("focus").eq(t.focusIndex).addClass("focus"),t.cutOff&&t.scrollToView(),t.query=""),t.down))if(i==9||i==27)t.close();else{if(i==13)return n.preventDefault(),t.select(t.focusIndex),t.close(),!1;if(i==8)return n.preventDefault(),t.query=t.query.slice(0,-1),t.search(),clearTimeout(t.resetQuery),!1;i!=38&&i!=40&&(r=String.fromCharCode(i),t.query+=r,t.search(),clearTimeout(t.resetQuery))}},"keyup.easyDropDown":function(){t.resetQuery=setTimeout(function(){t.query=""},1200)}});t.$dropDown.on("scroll.easyDropDown",function(){t.$dropDown[0].scrollTop>=t.$dropDown[0].scrollHeight-t.maxHeight?t.$container.addClass("bottom"):t.$container.removeClass("bottom")});if(t.$form.length)t.$form.on("reset.easyDropDown",function(){var n=t.hasLabel?t.label:t.options[0].title;t.$active.text(n)})},unbindHandlers:function(){var t=this;t.$container.add(t.$select).add(t.$items).add(t.$form).add(t.$dropDown).off(".easyDropDown");n("body").off("."+t.id)},open:function(){var n=this,t=window.scrollY||document.documentElement.scrollTop,i=window.scrollX||document.documentElement.scrollLeft,r=n.notInViewport(t);n.closeAll();n.getMaxHeight();n.$select.focus();window.scrollTo(i,t+r);n.$container.addClass("open");n.$scrollWrapper.css("height",n.maxHeight+"px");n.down=!0},close:function(){var n=this;n.$container.removeClass("open");n.$scrollWrapper.css("height","0px");n.focusIndex=n.selected.index;n.query="";n.down=!1},closeAll:function(){var r=this,n=Object.getPrototypeOf(r).instances,t,i;for(t in n)i=n[t],i.close()},select:function(n){var t=this,r,u;typeof n=="string"&&(n=t.$select.find("option[value="+n+"]").index()-1);r=t.options[n];u=t.hasLabel?n+1:n;t.$items.removeClass("active").eq(n).addClass("active");t.$active.text(r.title);t.$select.find("option").removeAttr("selected").eq(u).prop("selected",!0).parent().trigger("change");t.selected={index:n,title:r.title};t.focusIndex=i;typeof t.onChange=="function"&&t.onChange.call(t.$select[0],{title:r.title,value:r.value})},search:function(){var n=this,r=function(t){n.focusIndex=t;n.$items.removeClass("focus").eq(n.focusIndex).addClass("focus");n.scrollToView()},u=function(t){return n.options[t].title.toUpperCase()},t;for(i=0;i<n.options.length;i++)if(t=u(i),t.indexOf(n.query)==0){r(i);return}for(i=0;i<n.options.length;i++)if(t=u(i),t.indexOf(n.query)>-1){r(i);break}},scrollToView:function(){var n=this,t,i;n.focusIndex>=n.cutOff&&(t=n.$items.eq(n.focusIndex),i=t.outerHeight()*(n.focusIndex+1)-n.maxHeight,n.$dropDown.scrollTop(i))},notInViewport:function(n){var r=this,t={min:n,max:n+(window.innerHeight||document.documentElement.clientHeight)},i=r.$dropDown.offset().top+r.maxHeight;return i>=t.min&&i<=t.max?0:i-t.max+5},destroy:function(){var n=this;n.unbindHandlers();n.$select.unwrap().siblings().remove();n.$select.unwrap();delete Object.getPrototypeOf(n).instances[n.$select[0].id]},disable:function(){var n=this;n.disabled=!0;n.$container.addClass("disabled");n.$select.attr("disabled",!0);n.down||n.close()},enable:function(){var n=this;n.disabled=!1;n.$container.removeClass("disabled");n.$select.attr("disabled",!1)}};var r=function(n,i){n.id=n.id?n.id:"EasyDropDown"+u();var r=new t;r.instances[n.id]||(r.instances[n.id]=r,r.init(n,i))},u=function(){return("00000"+(Math.random()*16777216<<0).toString(16)).substr(-6).toUpperCase()};n.fn.easyDropDown=function(){var n=arguments,i=[],u;return u=this.each(function(){if(n&&typeof n[0]=="string"){var u=t.prototype.instances[this.id][n[0]](n[1],n[2]);u&&i.push(u)}else r(this,n[0])}),i.length?i.length>1?i:i[0]:u};n(function(){typeof Object.getPrototypeOf!="function"&&(Object.getPrototypeOf=typeof"test".__proto__=="object"?function(n){return n.__proto__}:function(n){return n.constructor.prototype});n("select.dropdown").each(function(){var t=n(this).attr("data-settings");settings=t?n.parseJSON(t):{};r(this,settings)})})}(jQuery)