(function(a){var b={nextPage:function(f){var c=this;var e=c.data("jdGallery");var d=Number(e.idx)+Number(e.pageSize);if(d<=e.feed.maxResults){c.queue(function(){a.fn.jdGallery.showPage(c,d);a.fn.jdGallery.updatePrevNav(c);a.fn.jdGallery.updateNextNav(c);a.fn.jdGallery.updatePageNav(c);if(a.isFunction(f)){f(c);}c.dequeue();});a.fn.jdGallery.preload(c);}},previousPage:function(f){var c=this;var e=c.data("jdGallery");var d=e.idx-e.pageSize;if(d>0){c.queue(function(){a.fn.jdGallery.showPage(c,d);a.fn.jdGallery.updatePrevNav(c);a.fn.jdGallery.updateNextNav(c);a.fn.jdGallery.updatePageNav(c);if(a.isFunction(f)){f(c);}c.dequeue();});}},page:function(d,f){var c=this;var e=c.data("jdGallery");if(d<=e.feed.maxResults&&d!==e.idx){if(d>e.feed.entries.length){e.idx=d;e.feed=null;a.fn.jdGallery.load(c,f);}else{c.queue(function(){a.fn.jdGallery.showPage(c,d);a.fn.jdGallery.updatePrevNav(c);a.fn.jdGallery.updateNextNav(c);a.fn.jdGallery.updatePageNav(c);if(a.isFunction(f)){f(c);}c.dequeue();});a.fn.jdGallery.preload(c);}}},displayItem:function(d){var c=this;if(typeof d==="number"){d=c.data("jdGallery").feed.entries[d];}if(typeof d==="object"){a.fn.jdGallery.displayItem(c,d,false);}},setUrl:function(c,d){this.data("jdGallery").galleryApiUrl=c;this.data("jdGallery").idx=1;a.fn.jdGallery.update(this,d);},destroy:function(){return this.each(function(){var d=a(this).data("jdGallery");var c=d.plyrEl;if(c){c.jdVideo("destroy");}});}};a.fn.jdGallery=function(d){function c(e){e=a.extend({},a.fn.jdGallery.defaults,e);return this.each(function(){var m=a(this),D=m.data("jdGallery"),g,v;if(!D){var y=a('<div class="jdg-item"/>').appendTo(m);var j=Math.floor((a.fn.jdGallery.getCW(m)/e.columns)-a.fn.jdGallery.getExW(y));if(a.browser.msie&&a.browser.version.substr(0,1)==="6"){j=parseInt(j-j/90);}if(e.galleryItemOpts.thumbnail){var w=a('<img class="jdg-thumb" style="display:inline"/>').appendTo(y);g=(w.width()>0)?a.fn.jdGallery.depx(w,"width"):Math.floor(j-a.fn.jdGallery.getExW(w));v=Math.floor(g/16*9);w.remove();}y.remove();var C=a.fn.jdGallery.getReqPar("jdgstart-index"),o=e.navOpts;var u=o&&e.navOpts.next,q=o&&e.navOpts.previous,z=o&&e.navOpts.pageNumbers;m.data("jdGallery",a.extend(e,{target:m,galleryApiUrl:a.fn.jdGallery.rewriteUrl(m,e.galleryApiUrl),apiUrlBase:a.fn.jdGallery.rewriteUrl(m,e.apiUrlBase),idx:(C)?C:e.idx,prvEl:q&&e.navOpts.previous.el&&a(e.navOpts.previous.el).length>0?a(e.navOpts.previous.el):null,nxtEl:u&&e.navOpts.next.el&&a(e.navOpts.next.el).length>0?a(e.navOpts.next.el):null,pgsEl:z&&e.navOpts.pageNumbers.el&&a(e.navOpts.pageNumbers.el).length>0?a(e.navOpts.pageNumbers.el):null,plyrEl:e.playerOpts&&e.playerOpts.el&&a(e.playerOpts.el).length>0?a(e.playerOpts.el):null,tabsEl:e.tabOpts&&e.tabOpts.el&&a(e.tabOpts.el).length>0?a(e.tabOpts.el):null,itemWidth:j,imageWidth:g,imageHeight:v}));D=m.data("jdGallery");if(D.tabsEl&&D.tabOpts.items){var n;for(var A=0;A<D.tabOpts.items.length;A++){if(A==0||(D.tabOpts.items[A]&&D.tabOpts.items[A].selected)){n=D.tabOpts.items[A].key;}}if(D.tabOpts.reqParam){var l=a.fn.jdGallery.getReqPar(D.tabOpts.reqParam);if(l){n=l;}}var s=a("<ul/>").addClass("jdg-tabs");for(var x in D.tabOpts.items){var f=D.tabOpts.items[x];var r=a("<li/>");r.attr("id",f.key);r.unbind("click");r.bind("click",{tab:f,"$li":this},function(t){var k=t.data.tab;var E=a(this);D.currentTab=k;m.jdGallery("setUrl",k.apiUrl,D.onDisplayTab);E.siblings(".selected").removeClass("selected");E.addClass("selected");t.stopPropagation();return false;}).appendTo(s);if(f.key==n){D.galleryApiUrl=f.apiUrl;r.addClass("selected");D.currentTab=f;}var B={};B[D.tabOpts.reqParam]=f.key;var h=a("<a/>");h.attr("href",(D.seo)?a.fn.jdGallery.repReqPar(B):"");h.text(f.label);h.appendTo(r);}s.appendTo(D.tabsEl);}a.fn.jdGallery.update(m,function(){var E=m.data("jdGallery");if(E.plyrEl){var t=(E.playerOpts.loadFirst)?"first":null;if(E.playerOpts.entry!=null&&typeof E.playerOpts.entry==="object"){t=E.playerOpts.entry;}else{if(E.playerOpts.entry&&E.playerOpts.entry!=null){t=E.playerOpts.entry;}}if(E.playerOpts.reqParam){var k=a.fn.jdGallery.getReqPar(E.playerOpts.reqParam);if(k){t=E.apiUrlBase+"/"+k;}}if(t&&t=="first"){t=E.feed.entries[0];}if(t!=null&&(typeof t==="string"||typeof t==="object")){a.fn.jdGallery.displayItem(m,t,true);}else{if(a.isFunction(E.onInit)){E.onInit(m);}}}else{if(a.isFunction(E.onInit)){E.onInit(m);}}});}});}if(b[d]){return b[d].apply(this,Array.prototype.slice.call(arguments,1));}else{if(typeof d==="object"||!d){return c.apply(this,arguments);}else{a.error("Method "+d+" does not exist on jQuery.jdGallery");}}};a.fn.jdGallery.update=function(c,f){var d=c.data("jdGallery");var e=function(g){var j=g.data("jdGallery");var h=Math.ceil(j.feed.maxResults/j.pageSize);if(j.navOpts&&!j.navOpts.autoHide||h>1||j.idx==1){a.fn.jdGallery.updatePrevNav(g);a.fn.jdGallery.updateNextNav(g);a.fn.jdGallery.buildPageNav(g);}if(a.isFunction(f)){f(g);}};a.fn.jdGallery.showBusy(c);if(c.children(".jdg-page").length){c.children(".jdg-page").animate({opacity:0},"fast",function(){a.fn.jdGallery.load(c,e);});}else{a.fn.jdGallery.load(c,e);}};a.fn.jdGallery.showBusy=function(c){c.children().hide();c.css({height:"150px"}).spin({lines:11,length:10,width:4,radius:10,rotate:0,color:"#666",speed:1,trail:60,shadow:false,hwaccel:true,className:"spinner",zIndex:2000000000,top:c.height()/2-30,left:c.width()/2-30});};a.fn.jdGallery.hideBusy=function(c){c.children(".spinner").remove();c.children().show();};a.fn.jdGallery.updatePrevNav=function(c){var e=c.data("jdGallery");if(e.prvEl){e.prvEl.children(".jdg-nav-previous").remove();if(e.idx>1){a("<a/>").addClass("jdg-nav jdg-nav-previous").text(e.navOpts.previous.label).attr({title:(e.navOpts.previous.title)?e.navOpts.previous.title:"Previous"}).appendTo(e.prvEl);var d=e.prvEl.children(".jdg-nav-previous");d.unbind("click").bind("click",function(){c.jdGallery("previousPage");return false;});}else{var d=a("<span/>").text(e.navOpts.previous.label).addClass("jdg-nav jdg-nav-previous jdg-nav-disabled").appendTo(e.prvEl);}}};a.fn.jdGallery.updateNextNav=function(c){var e=c.data("jdGallery");if(e.nxtEl){e.nxtEl.children(".jdg-nav-next").remove();if(Number(e.idx)+Number(e.pageSize)<=e.feed.maxResults){a("<a/>").addClass("jdg-nav jdg-nav-next").text(e.navOpts.next.label).attr({title:(e.navOpts.next.title)?e.navOpts.next.title:"Next"}).appendTo(e.nxtEl);var d=e.nxtEl.children(".jdg-nav-next");d.bind("click",function(){c.jdGallery("nextPage");return false;}).attr("href",(e.seo)?a.fn.jdGallery.getNavUrl(c,Number(e.idx)+e.pageSize):"");}else{var d=a("<span/>").text(e.navOpts.next.label).addClass("jdg-nav jdg-nav-next jdg-nav-disabled").appendTo(e.nxtEl);}}};a.fn.jdGallery.updatePageNav=function(c){var d=c.data("jdGallery");if(d.pgsEl){d.pgsEl.each(function(){var e=a(this).children(".jdg-page-number");e.removeClass("jdg-nav-disabled");a(e.get(Math.ceil(d.idx/d.pageSize)-1)).addClass("jdg-nav-disabled");});}};a.fn.jdGallery.buildPageNav=function(c){var g=c.data("jdGallery");if(g.pgsEl){g.pgsEl.children(".jdg-page-number").remove();var e=Math.ceil(g.feed.maxResults/g.pageSize);if(e>1){for(var d=1;d<=e;d++){var f=((d-1)*g.pageSize)+1;a("<a/>").addClass("jdg-nav jdg-page-number").addClass((f==g.idx)?"jdg-nav-disabled":"").text(d).attr("href",(g.seo)?a.fn.jdGallery.getNavUrl(c,f):"").bind("click",{pg:f},function(h){try{c.jdGallery("page",h.data.pg);}catch(h){}finally{return false;}}).appendTo(g.pgsEl);}}}c.bind("swipe",function(k,j,h){var l=g.scrollVert?h:j;switch(l){case 1:c.jdGallery(g.scrollVert?"nextPage":"previousPage");break;case -1:c.jdGallery(g.scrollVert?"previousPage":"nextPage");break;}});};a.fn.jdGallery.getNavUrl=function(d,c){var e=d.data("jdGallery");var f={"jdgstart-index":c};if(e.tabsEl){f[e.tabOpts.reqParam]=e.currentTab.key;}return a.fn.jdGallery.repReqPar(f);};a.fn.jdGallery.load=function(c,h){var f=c.data("jdGallery");c.css({position:"relative",overflow:"hidden",height:c.height()}).empty().append('<div class="jdg-loading"/>');var g;var e;if(!f.feed&&f.idx>1){g=1;e=f.idx+f.pageSize;}else{g=f.idx;e=f.pageSize;}e=(e<5)?5:e;var d=a.extend(f.jdParams,{"start-index":g,"max-results":e});a.jdFeed({url:f.galleryApiUrl,jdParams:d,success:function(k){var j=c.data("jdGallery");j.feed=k;j.feed.maxResults=(j.currentTab&&j.currentTab.maxResults)?j.currentTab.maxResults:(j.maxResults)?j.maxResults:j.feed.totalResults;c.empty();if(k.entries.length>0){a.fn.jdGallery.showPage(c,j.idx);c.animate({opacity:1},"fast");a.fn.jdGallery.hideBusy(c);a.fn.jdGallery.preload(c);c.trigger("jdgallery.init",c);}else{c.empty();a('<p class="jdg-empty"/>').html(j.emptyMessage).appendTo(c);c.css({height:"auto"});if(a.isFunction(j.onEmpty)){j.onEmpty(c);}}if(a.isFunction(h)){h(c);}},error:function(){c.empty();a('<p class="jdg-error"/>').html(f.errorMessage).appendTo(c);c.css({height:"auto"});}});};a.fn.jdGallery.showPage=function(E,s){var F=E.data("jdGallery");var j=s-1;var g=(j+F.pageSize>F.feed.entries.length)?F.feed.entries.length:j+F.pageSize;if(a.isFunction(F.onBeforeShowPage)){F.onBeforeShowPage(E,j,g);}var d=E.children(".jdg-page");var y=d.length;var q=(d.length)?d.height():0;var l=a("<div/>").attr("class","jdg-page").attr("id","page_"+s).css({position:"absolute"});for(var x=j;x<g;x++){if((x)%F.columns==0){$row=a("<div/>").addClass("jdg-row").css({width:E.width()+"px",clear:"both"}).appendTo(l);}var A=(F.currentTab&&F.currentTab.galleryItemOpts)?a.extend({},F.galleryItemOpts,F.currentTab.galleryItemOpts):F.galleryItemOpts;var e=F.feed.entries[x];var u=a("<div/>").attr("class","jdg-item").css({"float":"left",width:F.itemWidth+"px"}).attr("id",e.guid).appendTo($row);if((x+1)%F.columns==0||(x==F.feed.totalResults-1)){a("<div/>").css({clear:"both"}).appendTo($row);}if(F.displayedEntry&&e.guid==F.displayedEntry.guid){u.addClass("jdg-now-playing");}var C={};if(F.tabsEl){C[F.tabOpts.reqParam]=F.currentTab.key;}if(F.plyrEl){C[F.playerOpts.reqParam]=e.key;}var r=(F.seo)?a.fn.jdGallery.repReqPar(C):"";for(var B in A){var f=A[B];if(B=="index"){var D=(x+1)+"";while(f.zeropad&&D.length<(F.feed.maxResults+"").length){D="0"+D;}a("<p/>").attr("class","jdg-item-index").text(D).appendTo(u);}else{if(B=="thumbnail"){var c=a("<div/>").addClass("jdg-thumb-holder").appendTo(u);var o=a("<div/>").addClass("jdg-thumb").css({width:F.imageWidth,height:F.imageHeight});if(e.defaultImage){o.css({"background-image":"url("+a.fn.jdGallery.rewriteUrl(E,e.defaultImage.url)+"?width="+F.imageWidth+")","background-repeat":"no-repeat"});}else{if(e.images&&e.images.length){o.css({"background-image":"url("+a.fn.jdGallery.rewriteUrl(E,e.images[0].url)+"?width="+F.imageWidth+")","background-repeat":"no-repeat"});}else{o.addClass("jdg-no-thumb");}}var n=a("<div/>").addClass("jdg-thumb-overlay").css({width:F.imageWidth,height:F.imageHeight}).appendTo(o);var t=a("<a/>").attr({href:(f.url)?a.fn.jdGallery.replaceItemProperties(f.url,e):F.seo?r:"",title:e.title}).css({display:"block",width:F.imageWidth,height:F.imageHeight}).appendTo(n);o.appendTo(c);}else{if(B=="category"){var m=null;if(!f.label){for(var w=0;w<e.categories.length;w++){if(f.scheme==e.categories[w].scheme){m=e.categories[w];break;}}}a("<p/>").attr("class","jdg-item-category").text((m!=null)?m.label:f.defaultCategory).appendTo(u);}else{if(e[B]){var h=(a.isFunction(f.converter))?f.converter(e[B]):e[B];itemHtml=(f.prepend)?f.prepend+h:h;itemHtml=(f.append)?itemHtml+f.append:itemHtml;var z=a("<p/>").attr("class","jdg-item-"+B).appendTo(u);if(f.url){a("<a/>").attr({href:a.fn.jdGallery.replaceItemProperties(f.url,e),title:e.title}).html(itemHtml).appendTo(z);}else{z.html(itemHtml);}}}}}}if(F.plyrEl){u.unbind("click").bind("click",{"$gallery":E,entry:e},function(k){if(a.isFunction(F.onClickItem)){F.onClickItem(k);}a.fn.jdGallery.displayItem(k.data.$gallery,k.data.entry,false);return false;});}else{if(a.isFunction(F.onClickItem)){u.unbind("click").bind("click",{"$gallery":E,entry:e},function(k){F.onClickItem(k);return false;});}}}if(y){if(s>1&&s>F.idx){l.appendTo(E);l.css((F.scrollVert)?{top:d.height()+"px"}:{left:d.width()+"px"});E.children(".jdg-page").animate((F.scrollVert)?{top:"-="+d.height()+"px"}:{left:"-="+d.width()+"px"},"medium","swing",function(){d.remove();E.animate({height:l.height()+"px"},"medium","swing");if(F.scrollVert){l.css({top:"0px"});}});}else{if(F.idx>0){l.prependTo(E);l.css((F.scrollVert)?{top:-l.height()}:{left:-l.width()});E.children(".jdg-page").animate((F.scrollVert)?{top:"+="+d.height()+"px"}:{left:"+="+d.width()+"px"},"medium","swing",function(){d.remove();E.animate({height:l.height()+"px"},"medium","swing");});}}}else{l.appendTo(E);var v=l.find(".jdg-row").height()*Math.ceil((g-j)/F.columns);E.css({height:q+v});}F.idx=s;if(a.isFunction(F.onShowPage)){F.onShowPage(E);}};a.fn.jdGallery.replaceItemProperties=function(f,d){while(f.match(/\{([^}]+)\}/,f)){var c=f.match(/\{([^}]+)\}/);var e=f.split(c[0]);f=e[0]+d[c[1]]+e[1];}return f;};a.fn.jdGallery.displayItem=function(c,e,g){var f=c.data("jdGallery");if(g||!f.player){f.firstLoad=true;var d=a.extend({},f.playerOpts,{el:null});if(g&&a.isFunction(f.onInit)){d.events=a.extend({},d.events);if(d.events.onReady){d.events.oldOnReady=d.events.onReady;d.events.onReady=function(h){oldOnReady.onReady(h);if(c.data("jdGallery").firstLoad){f.onInit(c);}};}else{d.events.onReady=function(h){if(c.data("jdGallery").firstLoad){f.onInit(c);}};}}var d=a.extend(d,{el:null,entry:e,onDisplay:function(j){var h=c.data("jdGallery");if(h.displayedEntry){c.find("#"+h.displayedEntry.guid).removeClass("jdg-now-playing");}c.find("#"+j.data("jdVideo").entry.guid).addClass("jdg-now-playing");h.displayedEntry=j.data("jdVideo").entry;c.trigger("jdgallery.display-item",c);if(a.isFunction(h.onDisplayItem)){h.onDisplayItem(c);}}});if(!f.player){d.autostart=((f.playerOpts.playFirst)?true:false);}if(d.playerOptions&&!f.player){d.playerOptions.autostart=((f.playerOpts.playFirst)?true:false);}f.player=a(f.playerOpts.el).jdVideo(d);}else{f.firstLoad=false;var d=a.extend(f.playerOpts,{el:null,entry:e});f.player.jdVideo("display",d);}};a.fn.jdGallery.preload=function(c){var d=c.data("jdGallery");if(d.feed.nextUrl){a.jdFeed({url:a.fn.jdGallery.rewriteUrl(c,d.feed.nextUrl),jdParams:{},success:function(e){if(e.entries.length){a(e.entries).each(function(){if(this.images&&this.images[0]){var f=a("<img/>").attr("src",a.fn.jdGallery.rewriteUrl(c,this.images[0].url)+"?width="+c.data("jdGallery").imageWidth);}});e.entries=c.data("jdGallery").feed.entries.concat(e.entries);e.maxResults=(d.currentTab&&d.currentTab.maxResults)?d.currentTab.maxResults:(d.maxResults)?d.maxResults:e.totalResults;c.data("jdGallery").feed=e;}}});}};a.fn.jdGallery.rewriteUrl=function(c,d){var e=c.data("jdGallery");if(window.location.protocol.indexOf("https")==0){d=d.replace(/http:\/\/.+?\//,"https://media.jacaranda.co.uk/");}return d;};a.fn.jdGallery.repReqPar=function(g){var j=window.location.search.substring(1);for(var h in g){var e=g[h];var f=h+"=";var e=h+"="+e;if(j.length){e="&"+e;}if(j.indexOf(h+"=")!=-1){var d=j.indexOf(h+"=");var k=j.substring(0,d);if(k.indexOf("&")==k.length-1){k=k.substring(0,k.length-1);}var l=(j.indexOf("&",d)!=-1)?j.indexOf("&",d):j.length;var c=j.substring(l,j.length);j=k+e+c;}else{j=j+e;}if(j.indexOf("&")==0){j=j.substring(1,j.length);}}return"?"+j;};a.fn.jdGallery.getReqPar=function(f){var f=f+"=";var e=null;var c=window.location.search.substring(1);if(c.indexOf(f)!=-1){var g=c.indexOf(f)+f.length;var d=(c.indexOf("&",g)!=-1)?c.indexOf("&",g):c.length;e=unescape(c.substring(g,d));}return e;};a.fn.jdGallery.getCW=function(c){return c.width();};a.fn.jdGallery.getExW=function(d){var c=d.outerWidth(true)-d.width();return c;};a.fn.jdGallery.getExH=function(c){return c.outerHeight(true)-c.height();};a.fn.jdGallery.depx=function(e,c){var d=(a(e).css(c)&&a(e).css(c).indexOf("px")>0)?a(e).css(c).replace("px",""):0;d=(d<0)?0:d;return parseInt(d);};a.fn.jdGallery.defaults={emptyMessage:"No videos available",errorMessage:"Videos are currently unavailable",idx:1,seo:true,galleryApiUrl:null,apiUrlBase:null,galleryItemOpts:{thumbnail:{},title:{}},secureHost:"media.jacaranda.co.uk",playerOpts:null,tabOpts:null,navOpts:null,jdParams:null,columns:4,pageSize:4,scrollVert:false,maxResults:null,onInit:null,onClickItem:null,onDisplayItem:null,onDisplayTab:null};})(jQuery);(function(a){a.jdFeed=function(c){c=a.extend({},a.jdFeed.defaults,c);function b(){var d=(a.browser.msie&&a.browser.version.substr(0,1)=="8")?false:true;if(a.fn.jquery.substr(0,3)<1.3&&a.browser.mozilla&&a.browser.version.substr(0,1)=="2"){a.ajax({url:c.url,dataType:"jsonp",jsonpCallback:"jsonpjdfeed",type:"GET",cache:true,data:c.jdParams,success:function(e){if(a.isFunction(c.success)&&e){c.success(e);}}});}else{a.jsonp({url:c.url,callbackParameter:"callback",callback:"jsonpjdfeed",pageCache:false,cache:d,data:c.jdParams,success:function(e){if(a.isFunction(c.success)&&e){c.success(e);}},error:function(f,e){if(a.isFunction(c.error)){c.error();}}});}}b();};a.jdFeed.defaults={url:null,jdParams:null};})(jQuery);(function(e,b){function d(){}function v(E){c=[E];}function n(E){f.insertBefore(E,f.firstChild);}function m(G,E,F){return G&&G.apply(E.context||E,F);}function l(E){return/\?/.test(E)?"&":"?";}var o="async",u="charset",s="",C="error",t="_jqjsp",y="on",q=y+"click",r=y+C,a=y+"load",j=y+"readystatechange",B="removeChild",g="<script/>",x="success",A="timeout",z=e.browser,f=e("head")[0]||document.documentElement,w={},k=0,c,h={callback:t,url:location.href};function D(E){E=e.extend({},h,E);var S=E.complete,G=E.dataFilter,O=E.callbackParameter,T=E.callback,I=E.cache,L=E.pageCache,K=E.charset,F=E.url,N=E.data,R=E.timeout,Q,M=0,J=d;E.abort=function(){!M++&&J();};if(m(E.beforeSend,E,[E])===false||M){return E;}F=F||s;N=N?((typeof N)=="string"?N:e.param(N,E.traditional)):s;F+=N?(l(F)+N):s;O&&(F+=l(F)+encodeURIComponent(O)+"=?");!I&&!L&&(F+=l(F)+"_"+(new Date()).getTime()+"=");F=F.replace(/=\?(&|$)/,"="+T+"$1");function P(U){!M++&&b(function(){J();L&&(w[F]={s:[U]});G&&(U=G.apply(E,[U]));m(E.success,E,[U,x]);m(S,E,[E,x]);},0);}function H(U){!M++&&b(function(){J();L&&U!=A&&(w[F]=U);m(E.error,E,[E,U]);m(S,E,[E,U]);},0);}L&&(Q=w[F])?(Q.s?P(Q.s[0]):H(Q)):b(function(V,U,W){if(!M){W=R>0&&b(function(){H(A);},R);J=function(){W&&clearTimeout(W);V[j]=V[q]=V[a]=V[r]=null;f[B](V);U&&f[B](U);};window[T]=v;V=e(g)[0];V.id=t+k++;if(K){V[u]=K;}function X(Y){(V[q]||d)();Y=c;c=undefined;Y?P(Y[0]):H(C);}if(z.msie){V.event=q;V.htmlFor=V.id;V[j]=function(){/loaded|complete/.test(V.readyState)&&X();};}else{V[r]=V[a]=X;z.opera?((U=e(g)[0]).text="jQuery('#"+V.id+"')[0]."+r+"()"):V[o]=o;}V.src=F;n(V);U&&n(U);}},0);return E;}D.setup=function(E){e.extend(h,E);};e.jsonp=D;})(jQuery,setTimeout);if(typeof window.jdplayer=="undefined"){window.jdplayer=function(a){if(jwplayer.api){return jwplayer.api.selectPlayer(a);}};}(function(b){var a={display:function(d){var c=b.extend({},d);var e=this.data("jdVideo");this.data("jdVideo",b.extend(e,d,{playerOptions:b.extend(c,d.playerOptions)}));e=this.data("jdVideo");if(d.url&&b.isPlainObject(d.entry)){e.entry=d.url;b.fn.jdVideo.load(this);}else{if(typeof e.entry==="string"){b.fn.jdVideo.load(this);}else{b.fn.jdVideo.updateProperties(this);b.fn.jdVideo.display(this);}}},play:function(){var c=this.data("jdVideo").jwplayer;if(c.getState()!="PLAYING"){c.play();}},pause:function(){var c=this.data("jdVideo").jwplayer;var d=c.getState();if(d!="PAUSED"&&d!="IDLE"){c.pause();}},toggle:function(){var c=this.data("jdVideo").jwplayer;if(c.getState()=="PLAYING"){c.pause();}else{c.play();}return c.getState();},playlistNext:function(){this.data("jdVideo").jwplayer.playlistNext();},playlistPrev:function(){this.data("jdVideo").jwplayer.playlistPrev();},playlistItem:function(c){this.data("jdVideo").jwplayer.playlistItem(c);},playlist:function(){return this.data("jdVideo").jwplayer.getPlaylist();},seek:function(c){return this.data("jdVideo").jwplayer.seek(c);},state:function(){return this.data("jdVideo").jwplayer.getState();},duration:function(){return this.data("jdVideo").jwplayer.getDuration();},position:function(){return this.data("jdVideo").jwplayer.getPosition();},entry:function(){return this.data("jdVideo").entry;},stop:function(){var c=this.data("jdVideo").jwplayer;if(c.getState()!="IDLE"){c.stop();}},fullscreen:function(d){var c=this.data("jdVideo").jwplayer;if(typeof d!="undefined"){c.setFullscreen(d);}return c.getFullscreen();},mute:function(d){var c=this.data("jdVideo").jwplayer;if(typeof d!="undefined"){c.mute(d);}return c.getMute();},volume:function(d){var c=this.data("jdVideo").jwplayer;if(typeof d!="undefined"){c.setVolume(d);}return c.getVolume();},resize:function(c,d){this.each(function(){b.fn.jdVideo.resize(b(this),c,d);});},destroy:function(){return this.each(function(){b.fn.jdVideo.destroy(b(this));});}};b.fn.jdvideo=b.fn.jdPlayer=b.fn.jdplayer=b.fn.jdVideo=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1));}else{if(typeof d==="object"||!d){return c.apply(this,arguments);}else{b.error("Method "+d+" does not exist on jdvideo");}}function c(e){var e=b.extend({},e);return this.each(function(){var j=b(this);var k=jdutils.getDataAttributes(this,"jplayer");var g=b.extend({},b.fn.jdVideo.defaults,k,e);j.data("jdVideo",b.extend({},b.fn.jdVideo.defaults,k,e,{target:j,playerOptions:b.extend(g,e.playerOptions),width:((e.width!=null||e.height!=null)?e.width:j.width()),iPhone:(navigator.platform.indexOf("iPhone")!=-1),iPad:(navigator.platform.indexOf("iPad")!=-1),iPod:(navigator.platform.indexOf("iPod")!=-1)}));var h=j.data("jdVideo");if(typeof h.entry=="string"){b.fn.jdVideo.load(j);}else{b.fn.jdVideo.updateProperties(j);b.fn.jdVideo.display(j);}var f=b(window);if(!f.data("jplayers")){f.data("jplayers",new Array());}f.data("jplayers").push(j);});}};b.fn.jdVideo.destroy=function(d){var c=d.data("jdVideo");if(c.playerId){b(document).unbind("jdplayerPlay."+c.playerId);b(window).unbind("resize."+ +c.playerId);d.trigger({type:"destroy",target:d});if(c.jwplayer){if(b.browser.msie){var e=b("#"+c.playerId).find("object");if(e){e.appendTo("body").hide();c.jwplayer.remove();}}else{c.jwplayer.remove();}}b("#"+c.playerId).remove();}};b.fn.jdVideo.resize=function(f,c,d){var e=f.data("jdVideo");if(c&&!d){d=b.fn.jdVideo.getHeight(f,e.video,c);}else{if(d&&!c){c=b.fn.jdVideo.getWidth(f,e.video,d);}}e.width=c,e.height=d;b.fn.jdVideo.updateProperties(f);e.jwplayer.resize(c,d);f.find("video").css({width:c+"px",height:d+"px"});};b.fn.jdVideo.updateProperties=function(j){var f=j.data("jdVideo");if(f.entry.playerconfig){f.playerConfig=b.extend({jdentry:f.entry},f.entry.playerconfig.parameters,f.playerOptions);}else{f.playerConfig=b.extend({jdentry:f.entry},f.playerOptions);}var h=f.skin;if(!h){if(f.playerOptions.skin){h=f.playerOptions.skin;}else{if(f.entry.playerconfig&&f.entry.playerconfig.skin){h=f.entry.playerconfig.skin;}}}if(h){if(h.indexOf("http://")!=0&&h.indexOf("https://")!=0){var e=(f.entry.playerconfig.baseurl.indexOf("http://")!=0&&f.entry.playerconfig.baseurl.indexOf("https://")!=0&&f.entry.playerconfig.baseurl.indexOf("/")!=0)?"http://"+f.entry.playerconfig.baseurl:f.entry.playerconfig.baseurl;f.playerConfig.skin=e+"/players/skins/"+h+"/"+h+".zip";}else{f.playerConfig.skin=h;}}else{f.playerConfig.skin="";}if(document.documentMode==9||document.documentMode==10){f.preferFlash=true;}var g=(f.width)?"width":"height";var c=function(l,k){return k[g]-l[g];};var d=f[g];if(f.entry.videos.length){f.entry.videos.sort(c);}f.image=f.playerConfig.image;if(!f.image||f.image=="auto"){f.image=b.fn.jdVideo.getImageForEntry(j,f.entry);}};b.fn.jdVideo.getImageForEntry=function(f,d){var e=f.data("jdVideo");var c=null;if(b.isPlainObject(d.defaultImage)){c=d.defaultImage;}else{if(d.images&&d.images.length){c=d.images[0];}}return c;};b.fn.jdVideo.load=function(e){var d=e.data("jdVideo");var c=(jdutils.isGuid(d.entry))?"http://cdn.jacaranda.co.uk/json/-/e/"+d.entry:d.entry;b.jdapi({url:c,success:function(f){if(f){if(f.entries&&f.entries.length){d.feed=f;d.entry=d.feed.entries[0];}else{if(f.guid){d.entry=f;}}}if(typeof d.entry==="object"){b.fn.jdVideo.updateProperties(e);b.fn.jdVideo.display(e);}else{b.fn.jdVideo.noEntry(e);}},error:function(g,f){if(b.isFunction(d.onError)){d.onError();}b.fn.jdVideo.noEntry(e);}});};b.fn.jdVideo.noEntry=function(g){var f=g.data("jdVideo");if(f.playerId){delete f.playerId;}var d=(f.width)?f.width:g.width();var c=(f.height)?f.height:g.height();c=(c>0)?c:(d/16)*9;g.empty();var e=b("<div/>").addClass("jdvideo-empty").css({background:"#000000",outline:"none",width:d+"px",height:c+"px",color:"#FFFFFF","text-align":"center","line-height":c+"px",margin:0}).appendTo(g).text(f.emptyMessage);},b.fn.jdVideo.display=function(j){var g=j.data("jdVideo");if(g.entry.videos){b.fn.jdVideo.destroy(j);j.children(".jdvideo-empty").remove();var d="jdVideo"+g.entry.guid+"-"+(new Date()).getTime();g.playerId=d;var f=b("<div/>").css({outline:"none"}).attr("id",g.playerId).appendTo(j);if(jdutils.parseBoolean(g.playerOptions.pauseOnOtherPlay)){b(document).bind("jdplayerPlay."+d,{"$this":j},b.fn.jdVideo.eventHandlers.pauseOnOtherPlay);}b(window).bind("resize."+d,b.debounce(100,function(k){if(g.width!=j.width()){b.fn.jdVideo.resize(j,j.width());}}));var e=b.fn.jdVideo.getHtml5Config(j),h=b.fn.jdVideo.getFlashConfig(j),c=new Array();if(g.preferFlash){if(h){c.push(h);}if(e){c.push(e);}}else{if(e){c.push(e);}if(h){c.push(h);}}g.jwsettings=b.extend({},g.playerConfig,{embedMethod:"jdVideo",modes:c,plugins:b.fn.jdVideo.getPluginConfig(j),events:b.fn.jdVideo.getEventsConfig(j)});if(g.playerConfig.image=="auto"&&g.image){g.jwsettings.image=g.image.url;}else{if(g.image=="auto"||!g.image){g.jwsettings.image=null;}}g.jwplayer=jwplayer(d).setup(g.jwsettings);}else{if(g.image){j.empty().append(b.fn.jdVideo.image(j));}}if(b.isFunction(g.onDisplay)){g.onDisplay(j);}};b.fn.jdVideo.getEventsConfig=function(e){var d=e.data("jdVideo");var c=b.extend({},d.events,d.playerConfig.events);var f={};b.fn.jdVideo.addEventConfig(e,f,c,"onReady","jdplayerReady");b.fn.jdVideo.addEventConfig(e,f,c,"onBeforePlay","jdplayerBeforePlay");b.fn.jdVideo.addEventConfig(e,f,c,"onPlay","jdplayerPlay");b.fn.jdVideo.addEventConfig(e,f,c,"onPause","jdplayerPause");b.fn.jdVideo.addEventConfig(e,f,c,"onIdle","jdplayerIdle");b.fn.jdVideo.addEventConfig(e,f,c,"onComplete","jdplayerComplete");b.fn.jdVideo.addEventConfig(e,f,c,"onPlaylistItem","jdplayerPlaylistItem");b.fn.jdVideo.addEventConfig(e,f,c,"onPlaylist","jdplayerPlaylist");b.fn.jdVideo.addEventConfig(e,f,c,"onSeek","jdplayerSeek");b.fn.jdVideo.addEventConfig(e,f,c,"onResize","jdplayerResize");b.fn.jdVideo.addEventConfig(e,f,c,"onFullscreen","jdplayerFullscreen");b.fn.jdVideo.addEventConfig(e,f,c,"onVolume","jdplayerVolume");b.fn.jdVideo.addEventConfig(e,f,c,"onMute","jdplayerMute");b.fn.jdVideo.addEventConfig(e,f,c,"onTime","jdplayerTime");b.fn.jdVideo.addEventConfig(e,f,c,"onBufferChange","jdplayerBufferChange");b.fn.jdVideo.addEventConfig(e,f,c,"onBufferFull","jdplayerBufferFull");b.fn.jdVideo.addEventConfig(e,f,c,"onBuffer","jdplayerBuffer");b.fn.jdVideo.addEventConfig(e,f,c,"onError","jdplayerError");return f;};b.fn.jdVideo.addEventConfig=function(f,g,d,e,c){g[e]=function(h){var j=b.extend({},h,{type:c,target:f});f.trigger(j);if(b.isFunction(d[e])){d[e](j);}};};b.fn.jdVideo.eventHandlers={pauseOnOtherPlay:function(c){if(c.target!=c.data.$this.get(0)&&c.target!=c.data.$this){c.data.$this.jdplayer("pause");}}};b.fn.jdVideo.getHtml5Config=function(k){var e=k.data("jdVideo");var d={type:"html5",config:{provider:"http","http.startparam":"fs",stretching:(e.iPad||(document.documentMode&&document.documentMode==9))?"uniform":"exactfit"}};var l;if(e.feed){var c=new Array();for(var f=0;f<e.feed.entries.length;f++){var m=e.feed.entries[f];var j=b.fn.jdVideo.getDisplaySize(k,b.fn.jdVideo.getLargestHtml5VideoForEntry(k,m));if(!l||(j.width*j.height)>l.width*l.height){l=j;}var g={title:m.title,description:m.description,levels:b.fn.jdVideo.getHtml5LevelsForEntry(k,m),jdentry:m};if(e.playerConfig.image=="auto"){var h=b.fn.jdVideo.getImageForEntry(k,m);if(h){g.image=jdutils.rewriteUrl(h.url+"?width="+(l.width)+"&height="+(l.height),e.secureHost);}}c.push(g);}d.config.playlist=c;}else{l=b.fn.jdVideo.getDisplaySize(k,b.fn.jdVideo.getLargestHtml5VideoForEntry(k,e.entry));d.config.levels=b.fn.jdVideo.getHtml5LevelsForEntry(k,e.entry);if(e.playerConfig.image=="auto"&&e.image){var n=jdutils.repReqPar(e.image.url,{width:l.width,height:l.height});d.config.image=jdutils.rewriteUrl(n,e.secureHost);}}b.extend(d.config,l);return d;};b.fn.jdVideo.getLargestHtml5VideoForEntry=function(j,e){var f=j.data("jdVideo");var h=(f.width)?"width":"height";var g;for(var d=0;d<e.videos.length;d++){var c=e.videos[d];if(f.iPad||f.iPod||f.iPhone){if(c.type=="video/quicktime"||c.type=="application/vnd.apple.mpegurl"){g=c;}}else{if(c.type!="application/x-shockwave-flash"){if(!g||c[h]>g[h]){g=c;}}}}return g;};b.fn.jdVideo.getHtml5LevelsForEntry=function(j,k){var e=j.data("jdVideo");var g=(e.width)?"width":"height";var d=e[g];hasHtml5Videos=false;var m={};var c={};for(var f=0;f<k.videos.length;f++){var l=k.videos[f];if(e.iPad||e.iPod||e.iPhone){if(l.type=="video/quicktime"||l.type=="application/vnd.apple.mpegurl"){if(!c[l.type]){c[l.type]=new Array();}c[l.type].push(l);hasHtml5Videos=true;}}else{if(l.type!="application/x-shockwave-flash"&&l.type!="video/quicktime"&&l.type!="application/vnd.apple.mpegurl"){if(!c[l.type]||l[g]>=d){hasHtml5Videos=true;if(!c[l.type]){c[l.type]=new Array();}if(l[g]>=d){m[l.type]=true;}c[l.type].push(l);}}}}var o=null;if(hasHtml5Videos){o=new Array();for(format in c){var n=c[format];var h=n[n.length-1];o.push({file:h.url,width:h.width,height:h.height});}}return o;};b.fn.jdVideo.getPluginConfig=function(k){var j=k.data("jdVideo");var h={};var c=(j.entry.playerconfig)?(j.entry.playerconfig.baseurl.indexOf("http://")==0)?j.entry.playerconfig.baseurl+"/players/plugins/":"http://"+j.entry.playerconfig.baseurl+"/players/plugins/":"/";if(j.entry.playerconfig&&j.entry.playerconfig.plugins){for(var e=0;e<j.entry.playerconfig.plugins.length;e++){var g=j.entry.playerconfig.plugins[e];var f=(g.js)?g.js:c+g.key+"/"+g.key+".js";f=jdutils.rewriteUrl(f,j.secureHost);h[f]=b.extend({skin:g.skin},g.parameters);}}if(j.playerConfig.plugins){for(var g in j.playerConfig.plugins){var d=null;if(g.indexOf("http://")==0||g.indexOf("https://")==0){d=g;}else{if(g.substring(g.length-3,g.length)==".js"){g=g.substring(0,g.length-3);}var d=c+g+"/"+g+".js";}if(d){d=jdutils.rewriteUrl(d,j.secureHost);if(h[d]){h[d]=b.extend(h[d],j.playerConfig.plugins[g]);}else{h[d]=j.playerConfig.plugins[g];}}}}return h;};b.fn.jdVideo.getFlashConfig=function(l){var g=l.data("jdVideo");var h=(g.width)?"width":"height";var e=g[h];var c=b.fn.jdVideo.getFlashPlayerForEntry(l,g.entry);if(c){var m=b.fn.jdVideo.getDisplaySize(l,c);var n={type:"flash",src:c.url,config:b.extend(m,{provider:"http","http.startparam":"fs",stretching:"exactfit"})};if(g.feed){var d=new Array();for(var f=0;f<g.feed.entries.length;f++){var o=g.feed.entries[f];var q=b.fn.jdVideo.getFlashPlayerForEntry(l,o);if(q){var j={levels:b.fn.jdVideo.getFlashLevelsForEntry(l,o),title:o.title,description:o.description};if(g.playerConfig.image=="auto"){var k=b.fn.jdVideo.getImageForEntry(l,o);if(k){j.image=jdutils.rewriteUrl(k.url+"?width="+(m.width)+"&height="+(m.height),g.secureHost);}}d.push(j);}}n.config.playlist=d;}else{var q=b.fn.jdVideo.getFlashPlayerForEntry(l,g.entry);if(q){n.src=q.url;n.config.levels=b.fn.jdVideo.getFlashLevelsForEntry(l,g.entry);if(g.playerConfig.image=="auto"&&g.image){n.config.image=jdutils.rewriteUrl(g.image.url,g.secureHost);}}}if(!g.video){g.video=q;}return n;}else{return null;}};b.fn.jdVideo.getFlashPlayerForEntry=function(k,g){var h=k.data("jdVideo");var j=(h.width)?"width":"height";var f=h[j];var e;for(var d=0;d<g.videos.length;d++){var c=g.videos[d];if(c.type=="application/x-shockwave-flash"){if(!e||c[j]>=f){e=c;}}}return e;};b.fn.jdVideo.getFlashLevelsForEntry=function(h,e){var g=h.data("jdVideo");var f=new Array();for(var d=0;d<e.videos.length;d++){var c=e.videos[d];if(c.type=="video/mp4"){f.push({bitrate:Math.floor(c.datarate/1024),file:c.url,width:c.width});}}return f;};b.fn.jdVideo.getFlashLevelsForEntryOld=function(h){var d=h.data("jdVideo");var f=(d.width)?"width":"height";var c=d[f];var m=new Array();var k;for(var e=0;e<d.entry.videos.length;e++){var l=d.entry.videos[e];if(l.type=="application/x-shockwave-flash"){if(!k||l[f]>=c){k=l;}}else{if(l.type=="video/mp4"){m.push({bitrate:Math.floor(l.datarate/1024),file:l.url,width:l.width});}}}if(k){var g=b.fn.jdVideo.getDisplaySize(h,k);var j={type:"flash",flashplayer:jdutils.rewriteUrl(k.url,d.secureHost),config:b.extend(g,{provider:"http","http.startparam":"fs",stretching:"exactfit",levels:m})};if(!d.video){d.video=k;}if(d.playerConfig.image=="auto"&&d.image){j.config.image=jdutils.rewriteUrl(d.image.url,d.secureHost);}return j;}else{return null;}};b.fn.jdVideo.getDisplaySize=function(f,d){var e=f.data("jdVideo");var c={};c.width=(e.width)?e.width:(e.width==null&&e.height!=null)?b.fn.jdVideo.getWidth(f,d,e.height):e.video.width;c.height=(e.height)?e.height:(e.height==null&&e.width!=null)?b.fn.jdVideo.getHeight(f,d,e.width):e.video.height;return c;};b.fn.jdVideo.getHeight=function(j,c,k){var f=j.data("jdVideo");var d=f.entry.playerconfig;var l=(d)?k-d.chromewidth:k;var m=(c.videowidth)?c.videowidth:c.width;var e=(c.videoheight)?c.videoheight:c.height;var h=Math.round(l*(e/m));if(f.iPad||f.iPod||f.iPhone){return h;}else{var g=h+((d)?d.chromeheight:0);return(f.playerConfig.controlbar=="bottom"&&(d&&d.chromeheight==0))?g+d.controlbarheight:g;}};b.fn.jdVideo.getWidth=function(h,c,g){var f=h.data("jdVideo");var d=f.entry.playerconfig;var j=(d)?g-d.chromeheight:g;var l=(c.videowidth)?c.videowidth:c.width;var e=(c.videoheight)?c.videoheight:c.height;var k=Math.round(j*(l/e));return k+((d)?d.chromewidth:0);};b.fn.jdVideo.imagetag=function(e){var d=e.data("jdVideo");var c=b("<img/>").attr("width",d.displayWidth).attr("src",d.image+"?width="+d.displayWidth);return c;};b.fn.jdVideo.defaults={allowfullScreen:true,width:null,height:null,onDisplay:null,onError:null,preferFlash:false,pauseOnOtherPlay:true,secureHost:"media.jacaranda.co.uk",emptyMessage:"This video is currently unavailable.",errorMessage:"This video is currently unavailable."};})($);(function(){jdutils={};jdutils.getDataAttributes=function(a,b){var c={};$(a.attributes).each(function(){var e=this.nodeName;if(e.indexOf("data-"+b)==0){var f=e.substring(13,14).toLowerCase()+e.substring(14);if(f){var h=f.split("-"),d="";for(var g=0;g<h.length;g++){d+=(g==0)?h[g]:h[g].substring(0,1).toUpperCase()+h[g].substring(1);}c[d]=this.nodeValue;}}});return c;};jdutils.isBoolean=function(a){return(a===true||a==false||(typeof a==="string"&&a.toLowerCase()==="true"||a.toLowerCase()==="false"));};jdutils.parseBoolean=function(a){return/^true$/i.test(a);};jdutils.isGuid=function(a){return a.match(/^[\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12}$/);};jdutils.rewriteUrl=function(b,a){if(window.location.protocol.indexOf("https")==0){b=b.replace(/http:\/\/.+?\//,"https://"+a+"/");}return b;};jdutils.getReqPar=function(d){var d=d+"=";var c=null;var a=window.location.search.substring(1);if(a.indexOf(d)!=-1){var e=a.indexOf(d)+d.length;var b=(a.indexOf("&",e)!=-1)?a.indexOf("&",e):a.length;c=unescape(a.substring(e,b));}return c;};jdutils.repReqPar=function(b,g){var f=(b.indexOf("?")!=-1)?b.split("?")[0]:b,a=(b.indexOf("?")!=-1)?b.split("?")[1]:"";for(var d in g){var e=d+"="+g[d];var c=new RegExp(d+"=[\\w-]+");a=(a.indexOf(d+"=")!=-1)?a.replace(c,e):a+(a.length?"&":"")+e;}return f+"?"+a;};})();(function(a){jQuery.uaMatch=function(c){c=c.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(c)||/(webkit)[ \/]([\w.]+)/.exec(c)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(c)||/(msie) ([\w.]+)/.exec(c)||c.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(c)||[];return{browser:b[1]||"",version:b[2]||"0"};};if(!jQuery.browser){matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version;}if(browser.chrome){browser.webkit=true;}else{if(browser.webkit){browser.safari=true;}}jQuery.browser=browser;}})(jQuery);(function(a){a.jdapi=function(c){c=a.extend({},a.jdapi.defaults,c);function b(){var e=(a.browser.msie&&a.browser.version.substr(0,1)=="8")?true:true;var h=a.fn.jquery.split(".");var g=h[0],d=h[1];if(a.browser.msie&&a.browser.version.substr(0,2)=="10"||(d==1&&g<3)&&a.browser.mozilla&&a.browser.version.substr(0,1)=="2"){var f="jsonpjdfeed";if(a.browser.msie&&a.browser.version.substr(0,2)=="10"){f+=c.url.replace(/[^a-zA-Z0-9]/g,"");for(p in c.jdParams){f+=p.replace(/[^a-zA-Z0-9]/g,"")+(new String(c.jdParams[p])).replace(/[^a-zA-Z0-9]/g,"");}}a.ajax({url:c.url,dataType:"jsonp",jsonpCallback:f,type:"GET",cache:e,data:c.jdParams,success:function(j){if(a.isFunction(c.success)&&j){c.success(j);}}});}else{a.jsonp({url:c.url,callbackParameter:"callback",callback:"jsonpjdfeed",pageCache:false,cache:e,data:c.jdParams,success:function(j){if(a.isFunction(c.success)&&j){c.success(j);}},error:function(k,j){console.log(j);if(a.isFunction(c.error)){c.error();}}});}}b();};a.jdapi.defaults={url:null,jdParams:null};})(jQuery);
/*
 * jQuery throttle / debounce - v1.1 - 3/7/2010
 * http://benalman.com/projects/jquery-throttle-debounce-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,k,j){var h,d=0;if(typeof f!=="boolean"){j=k;k=f;f=c;}function g(){var q=this,n=+new Date()-d,o=arguments;function m(){d=+new Date();k.apply(q,o);}function l(){h=c;}if(j&&!h){m();}h&&clearTimeout(h);if(j===c&&n>e){m();}else{if(f!==true){h=setTimeout(j?l:m,j===c?e-n:e);}}}if($.guid){g.guid=k.guid=k.guid||$.guid++;}return g;};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false);};})(this);if(typeof jwplayer=="undefined"){var jwplayer=function(a){if(jwplayer.api){return jwplayer.api.selectPlayer(a);}};var $jw=jwplayer;jwplayer.version="5.10.2393";jwplayer.vid=document.createElement("video");jwplayer.audio=document.createElement("audio");jwplayer.source=document.createElement("source");(function(b){b.utils=function(){};b.utils.typeOf=function(d){var c=typeof d;if(c==="object"){if(d){if(d instanceof Array){c="array";}}else{c="null";}}return c;};b.utils.extend=function(){var c=b.utils.extend["arguments"];if(c.length>1){for(var e=1;e<c.length;e++){for(var d in c[e]){c[0][d]=c[e][d];}}return c[0];}return null;};b.utils.clone=function(f){var c;var d=b.utils.clone["arguments"];if(d.length==1){switch(b.utils.typeOf(d[0])){case"object":c={};for(var e in d[0]){c[e]=b.utils.clone(d[0][e]);}break;case"array":c=[];for(var e in d[0]){c[e]=b.utils.clone(d[0][e]);}break;default:return d[0];break;}}return c;};b.utils.extension=function(c){if(!c){return"";}c=c.substring(c.lastIndexOf("/")+1,c.length);c=c.split("?")[0];if(c.lastIndexOf(".")>-1){return c.substr(c.lastIndexOf(".")+1,c.length).toLowerCase();}return;};b.utils.html=function(c,d){c.innerHTML=d;};b.utils.wrap=function(c,d){if(c.parentNode){c.parentNode.replaceChild(d,c);}d.appendChild(c);};b.utils.ajax=function(g,f,c){var e;if(window.XMLHttpRequest){e=new XMLHttpRequest();}else{e=new ActiveXObject("Microsoft.XMLHTTP");}e.onreadystatechange=function(){if(e.readyState===4){if(e.status===200){if(f){if(!b.utils.exists(e.responseXML)){try{if(window.DOMParser){var h=(new DOMParser()).parseFromString(e.responseText,"text/xml");if(h){e=b.utils.extend({},e,{responseXML:h});}}else{h=new ActiveXObject("Microsoft.XMLDOM");h.async="false";h.loadXML(e.responseText);e=b.utils.extend({},e,{responseXML:h});}}catch(j){if(c){c(g);}}}f(e);}}else{if(c){c(g);}}}};try{e.open("GET",g,true);e.send(null);}catch(d){if(c){c(g);}}return e;};b.utils.load=function(d,e,c){d.onreadystatechange=function(){if(d.readyState===4){if(d.status===200){if(e){e();}}else{if(c){c();}}}};};b.utils.find=function(d,c){return d.getElementsByTagName(c);};b.utils.append=function(c,d){c.appendChild(d);};b.utils.isIE=function(){return((!+"\v1")||(typeof window.ActiveXObject!="undefined"));};b.utils.userAgentMatch=function(d){var c=navigator.userAgent.toLowerCase();return(c.match(d)!==null);};b.utils.isIOS=function(){return b.utils.userAgentMatch(/iP(hone|ad|od)/i);};b.utils.isIPad=function(){return b.utils.userAgentMatch(/iPad/i);};b.utils.isIPod=function(){return b.utils.userAgentMatch(/iP(hone|od)/i);};b.utils.isAndroid=function(){return b.utils.userAgentMatch(/android/i);};b.utils.isLegacyAndroid=function(){return b.utils.userAgentMatch(/android 2.[012]/i);};b.utils.isBlackberry=function(){return b.utils.userAgentMatch(/blackberry/i);};b.utils.isMobile=function(){return b.utils.userAgentMatch(/(iP(hone|ad|od))|android/i);};b.utils.getFirstPlaylistItemFromConfig=function(c){var d={};var e;if(c.playlist&&c.playlist.length){e=c.playlist[0];}else{e=c;}d.file=e.file;d.levels=e.levels;d.streamer=e.streamer;d.playlistfile=e.playlistfile;d.provider=e.provider;if(!d.provider){if(d.file&&(d.file.toLowerCase().indexOf("youtube.com")>-1||d.file.toLowerCase().indexOf("youtu.be")>-1)){d.provider="youtube";}if(d.streamer&&d.streamer.toLowerCase().indexOf("rtmp://")==0){d.provider="rtmp";}if(e.type){d.provider=e.type.toLowerCase();}}if(d.provider=="audio"){d.provider="sound";}return d;};b.utils.getOuterHTML=function(c){if(c.outerHTML){return c.outerHTML;}else{try{return new XMLSerializer().serializeToString(c);}catch(d){return"";}}};b.utils.setOuterHTML=function(f,e){if(f.outerHTML){f.outerHTML=e;}else{var g=document.createElement("div");g.innerHTML=e;var c=document.createRange();c.selectNodeContents(g);var d=c.extractContents();f.parentNode.insertBefore(d,f);f.parentNode.removeChild(f);}};b.utils.hasFlash=function(){if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]!="undefined"){return true;}if(typeof window.ActiveXObject!="undefined"){try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return true;}catch(c){}}return false;};b.utils.getPluginName=function(c){if(c.lastIndexOf("/")>=0){c=c.substring(c.lastIndexOf("/")+1,c.length);}if(c.lastIndexOf("-")>=0){c=c.substring(0,c.lastIndexOf("-"));}if(c.lastIndexOf(".swf")>=0){c=c.substring(0,c.lastIndexOf(".swf"));}if(c.lastIndexOf(".js")>=0){c=c.substring(0,c.lastIndexOf(".js"));}return c;};b.utils.getPluginVersion=function(c){if(c.lastIndexOf("-")>=0){if(c.lastIndexOf(".js")>=0){return c.substring(c.lastIndexOf("-")+1,c.lastIndexOf(".js"));}else{if(c.lastIndexOf(".swf")>=0){return c.substring(c.lastIndexOf("-")+1,c.lastIndexOf(".swf"));}else{return c.substring(c.lastIndexOf("-")+1);}}}return"";};b.utils.getAbsolutePath=function(j,h){if(!b.utils.exists(h)){h=document.location.href;}if(!b.utils.exists(j)){return undefined;}if(a(j)){return j;}var k=h.substring(0,h.indexOf("://")+3);var g=h.substring(k.length,h.indexOf("/",k.length+1));var d;if(j.indexOf("/")===0){d=j.split("/");}else{var e=h.split("?")[0];e=e.substring(k.length+g.length+1,e.lastIndexOf("/"));d=e.split("/").concat(j.split("/"));}var c=[];for(var f=0;f<d.length;f++){if(!d[f]||!b.utils.exists(d[f])||d[f]=="."){continue;}else{if(d[f]==".."){c.pop();}else{c.push(d[f]);}}}return k+g+"/"+c.join("/");};function a(d){if(!b.utils.exists(d)){return;}var e=d.indexOf("://");var c=d.indexOf("?");return(e>0&&(c<0||(c>e)));}b.utils.pluginPathType={ABSOLUTE:"ABSOLUTE",RELATIVE:"RELATIVE",CDN:"CDN"};b.utils.getPluginPathType=function(d){if(typeof d!="string"){return;}d=d.split("?")[0];var e=d.indexOf("://");if(e>0){return b.utils.pluginPathType.ABSOLUTE;}var c=d.indexOf("/");var f=b.utils.extension(d);if(e<0&&c<0&&(!f||!isNaN(f))){return b.utils.pluginPathType.CDN;}return b.utils.pluginPathType.RELATIVE;};b.utils.mapEmpty=function(c){for(var d in c){return false;}return true;};b.utils.mapLength=function(d){var c=0;for(var e in d){c++;}return c;};b.utils.log=function(d,c){if(typeof console!="undefined"&&typeof console.log!="undefined"){if(c){console.log(d,c);}else{console.log(d);}}};b.utils.css=function(d,g,c){if(b.utils.exists(d)){for(var e in g){try{if(typeof g[e]==="undefined"){continue;}else{if(typeof g[e]=="number"&&!(e=="zIndex"||e=="opacity")){if(isNaN(g[e])){continue;}if(e.match(/color/i)){g[e]="#"+b.utils.strings.pad(g[e].toString(16),6);}else{g[e]=Math.ceil(g[e])+"px";}}}d.style[e]=g[e];}catch(f){}}}};b.utils.isYouTube=function(c){return(c.indexOf("youtube.com")>-1||c.indexOf("youtu.be")>-1);};b.utils.transform=function(e,d,c,g,h){if(!b.utils.exists(d)){d=1;}if(!b.utils.exists(c)){c=1;}if(!b.utils.exists(g)){g=0;}if(!b.utils.exists(h)){h=0;}if(d==1&&c==1&&g==0&&h==0){e.style.webkitTransform="";e.style.MozTransform="";e.style.OTransform="";}else{var f="scale("+d+","+c+") translate("+g+"px,"+h+"px)";e.style.webkitTransform=f;e.style.MozTransform=f;e.style.OTransform=f;}};b.utils.stretch=function(k,r,q,g,n,h){if(typeof q=="undefined"||typeof g=="undefined"||typeof n=="undefined"||typeof h=="undefined"){return;}var d=q/n;var f=g/h;var m=0;var l=0;var e=false;var c={};if(r.parentElement){r.parentElement.style.overflow="hidden";}b.utils.transform(r);switch(k.toUpperCase()){case b.utils.stretching.NONE:c.width=n;c.height=h;c.top=(g-c.height)/2;c.left=(q-c.width)/2;break;case b.utils.stretching.UNIFORM:if(d>f){c.width=n*f;c.height=h*f;if(c.width/q>0.95){e=true;d=Math.ceil(100*q/c.width)/100;f=1;c.width=q;}}else{c.width=n*d;c.height=h*d;if(c.height/g>0.95){e=true;d=1;f=Math.ceil(100*g/c.height)/100;c.height=g;}}c.top=(g-c.height)/2;c.left=(q-c.width)/2;break;case b.utils.stretching.FILL:if(d>f){c.width=n*d;c.height=h*d;}else{c.width=n*f;c.height=h*f;}c.top=(g-c.height)/2;c.left=(q-c.width)/2;break;case b.utils.stretching.EXACTFIT:c.width=n;c.height=h;var o=Math.round((n/2)*(1-1/d));var j=Math.round((h/2)*(1-1/f));e=true;c.top=c.left=0;break;default:break;}if(e){b.utils.transform(r,d,f,o,j);}b.utils.css(r,c);};b.utils.stretching={NONE:"NONE",FILL:"FILL",UNIFORM:"UNIFORM",EXACTFIT:"EXACTFIT"};b.utils.deepReplaceKeyName=function(k,e,c){switch(b.utils.typeOf(k)){case"array":for(var g=0;g<k.length;g++){k[g]=b.utils.deepReplaceKeyName(k[g],e,c);}break;case"object":for(var f in k){var j,h;if(e instanceof Array&&c instanceof Array){if(e.length!=c.length){continue;}else{j=e;h=c;}}else{j=[e];h=[c];}var d=f;for(var g=0;g<j.length;g++){d=d.replace(new RegExp(e[g],"g"),c[g]);}k[d]=b.utils.deepReplaceKeyName(k[f],e,c);if(f!=d){delete k[f];}}break;}return k;};b.utils.isInArray=function(e,d){if(!(e)||!(e instanceof Array)){return false;}for(var c=0;c<e.length;c++){if(d===e[c]){return true;}}return false;};b.utils.exists=function(c){switch(typeof(c)){case"string":return(c.length>0);break;case"object":return(c!==null);case"undefined":return false;}return true;};b.utils.empty=function(c){if(typeof c.hasChildNodes=="function"){while(c.hasChildNodes()){c.removeChild(c.firstChild);}}};b.utils.parseDimension=function(c){if(typeof c=="string"){if(c===""){return 0;}else{if(c.lastIndexOf("%")>-1){return c;}else{return parseInt(c.replace("px",""),10);}}}return c;};b.utils.getDimensions=function(c){if(c&&c.style){return{x:b.utils.parseDimension(c.style.left),y:b.utils.parseDimension(c.style.top),width:b.utils.parseDimension(c.style.width),height:b.utils.parseDimension(c.style.height)};}else{return{};}};b.utils.getElementWidth=function(c){if(!c){return null;}else{if(c==document.body){return b.utils.parentNode(c).clientWidth;}else{if(c.clientWidth>0){return c.clientWidth;}else{if(c.style){return b.utils.parseDimension(c.style.width);}else{return null;}}}}};b.utils.getElementHeight=function(c){if(!c){return null;}else{if(c==document.body){return b.utils.parentNode(c).clientHeight;}else{if(c.clientHeight>0){return c.clientHeight;}else{if(c.style){return b.utils.parseDimension(c.style.height);}else{return null;}}}}};b.utils.timeFormat=function(c){str="00:00";if(c>0){str=Math.floor(c/60)<10?"0"+Math.floor(c/60)+":":Math.floor(c/60)+":";str+=Math.floor(c%60)<10?"0"+Math.floor(c%60):Math.floor(c%60);}return str;};b.utils.useNativeFullscreen=function(){return(navigator&&navigator.vendor&&navigator.vendor.indexOf("Apple")==0);};b.utils.parentNode=function(c){if(!c){return document.body;}else{if(c.parentNode){return c.parentNode;}else{if(c.parentElement){return c.parentElement;}else{return c;}}}};b.utils.getBoundingClientRect=function(c){if(typeof c.getBoundingClientRect=="function"){return c.getBoundingClientRect();}else{return{left:c.offsetLeft+document.body.scrollLeft,top:c.offsetTop+document.body.scrollTop,width:c.offsetWidth,height:c.offsetHeight};}};b.utils.translateEventResponse=function(e,c){var g=b.utils.extend({},c);if(e==b.api.events.JWPLAYER_FULLSCREEN&&!g.fullscreen){g.fullscreen=g.message=="true"?true:false;delete g.message;}else{if(typeof g.data=="object"){g=b.utils.extend(g,g.data);delete g.data;}else{if(typeof g.metadata=="object"){b.utils.deepReplaceKeyName(g.metadata,["__dot__","__spc__","__dsh__"],["."," ","-"]);}}}var d=["position","duration","offset"];for(var f in d){if(g[d[f]]){g[d[f]]=Math.round(g[d[f]]*1000)/1000;}}return g;};b.utils.saveCookie=function(c,d){document.cookie="jwplayer."+c+"="+d+"; path=/";};b.utils.getCookies=function(){var f={};var e=document.cookie.split("; ");for(var d=0;d<e.length;d++){var c=e[d].split("=");if(c[0].indexOf("jwplayer.")==0){f[c[0].substring(9,c[0].length)]=c[1];}}return f;};b.utils.readCookie=function(c){return b.utils.getCookies()[c];};})(jwplayer);(function(a){a.events=function(){};a.events.COMPLETE="COMPLETE";a.events.ERROR="ERROR";})(jwplayer);(function(jwplayer){jwplayer.events.eventdispatcher=function(debug){var _debug=debug;var _listeners;var _globallisteners;this.resetEventListeners=function(){_listeners={};_globallisteners=[];};this.resetEventListeners();this.addEventListener=function(type,listener,count){try{if(!jwplayer.utils.exists(_listeners[type])){_listeners[type]=[];}if(typeof(listener)=="string"){eval("listener = "+listener);}_listeners[type].push({listener:listener,count:count});}catch(err){jwplayer.utils.log("error",err);}return false;};this.removeEventListener=function(type,listener){if(!_listeners[type]){return;}try{for(var listenerIndex=0;listenerIndex<_listeners[type].length;listenerIndex++){if(_listeners[type][listenerIndex].listener.toString()==listener.toString()){_listeners[type].splice(listenerIndex,1);break;}}}catch(err){jwplayer.utils.log("error",err);}return false;};this.addGlobalListener=function(listener,count){try{if(typeof(listener)=="string"){eval("listener = "+listener);}_globallisteners.push({listener:listener,count:count});}catch(err){jwplayer.utils.log("error",err);}return false;};this.removeGlobalListener=function(listener){if(!listener){return;}try{for(var globalListenerIndex=0;globalListenerIndex<_globallisteners.length;globalListenerIndex++){if(_globallisteners[globalListenerIndex].listener.toString()==listener.toString()){_globallisteners.splice(globalListenerIndex,1);break;}}}catch(err){jwplayer.utils.log("error",err);}return false;};this.sendEvent=function(type,data){if(!jwplayer.utils.exists(data)){data={};}if(_debug){jwplayer.utils.log(type,data);}if(typeof _listeners[type]!="undefined"){for(var listenerIndex=0;listenerIndex<_listeners[type].length;listenerIndex++){try{_listeners[type][listenerIndex].listener(data);}catch(err){jwplayer.utils.log("There was an error while handling a listener: "+err.toString(),_listeners[type][listenerIndex].listener);}if(_listeners[type][listenerIndex]){if(_listeners[type][listenerIndex].count===1){delete _listeners[type][listenerIndex];}else{if(_listeners[type][listenerIndex].count>0){_listeners[type][listenerIndex].count=_listeners[type][listenerIndex].count-1;}}}}}for(var globalListenerIndex=0;globalListenerIndex<_globallisteners.length;globalListenerIndex++){try{_globallisteners[globalListenerIndex].listener(data);}catch(err){jwplayer.utils.log("There was an error while handling a listener: "+err.toString(),_globallisteners[globalListenerIndex].listener);}if(_globallisteners[globalListenerIndex]){if(_globallisteners[globalListenerIndex].count===1){delete _globallisteners[globalListenerIndex];}else{if(_globallisteners[globalListenerIndex].count>0){_globallisteners[globalListenerIndex].count=_globallisteners[globalListenerIndex].count-1;}}}}};};})(jwplayer);(function(a){var b={};a.utils.animations=function(){};a.utils.animations.transform=function(c,d){c.style.webkitTransform=d;c.style.MozTransform=d;c.style.OTransform=d;c.style.msTransform=d;};a.utils.animations.transformOrigin=function(c,d){c.style.webkitTransformOrigin=d;c.style.MozTransformOrigin=d;c.style.OTransformOrigin=d;c.style.msTransformOrigin=d;};a.utils.animations.rotate=function(c,d){a.utils.animations.transform(c,["rotate(",d,"deg)"].join(""));};a.utils.cancelAnimation=function(c){delete b[c.id];};a.utils.fadeTo=function(m,f,e,j,h,d){if(b[m.id]!=d&&a.utils.exists(d)){return;}if(m.style.opacity==f){return;}var c=new Date().getTime();if(d>c){setTimeout(function(){a.utils.fadeTo(m,f,e,j,0,d);},d-c);}if(m.style.display=="none"){m.style.display="block";}if(!a.utils.exists(j)){j=m.style.opacity===""?1:m.style.opacity;}if(m.style.opacity==f&&m.style.opacity!==""&&a.utils.exists(d)){if(f===0){m.style.display="none";}return;}if(!a.utils.exists(d)){d=c;b[m.id]=d;}if(!a.utils.exists(h)){h=0;}var k=(e>0)?((c-d)/(e*1000)):0;k=k>1?1:k;var l=f-j;var g=j+(k*l);if(g>1){g=1;}else{if(g<0){g=0;}}m.style.opacity=g;if(h>0){b[m.id]=d+h*1000;a.utils.fadeTo(m,f,e,j,0,b[m.id]);return;}setTimeout(function(){a.utils.fadeTo(m,f,e,j,0,d);},10);};})(jwplayer);(function(a){a.utils.arrays=function(){};a.utils.arrays.indexOf=function(c,d){for(var b=0;b<c.length;b++){if(c[b]==d){return b;}}return -1;};a.utils.arrays.remove=function(c,d){var b=a.utils.arrays.indexOf(c,d);if(b>-1){c.splice(b,1);}};})(jwplayer);(function(a){a.utils.extensionmap={"3gp":{html5:"video/3gpp",flash:"video"},"3gpp":{html5:"video/3gpp"},"3g2":{html5:"video/3gpp2",flash:"video"},"3gpp2":{html5:"video/3gpp2"},flv:{flash:"video"},f4a:{html5:"audio/mp4"},f4b:{html5:"audio/mp4",flash:"video"},f4v:{html5:"video/mp4",flash:"video"},mov:{html5:"video/quicktime",flash:"video"},m4a:{html5:"audio/mp4",flash:"video"},m4b:{html5:"audio/mp4"},m4p:{html5:"audio/mp4"},m4v:{html5:"video/mp4",flash:"video"},mp4:{html5:"video/mp4",flash:"video"},rbs:{flash:"sound"},aac:{html5:"audio/aac",flash:"video"},mp3:{html5:"audio/mp3",flash:"sound"},ogg:{html5:"audio/ogg"},oga:{html5:"audio/ogg"},ogv:{html5:"video/ogg"},webm:{html5:"video/webm"},m3u8:{html5:"audio/x-mpegurl"},gif:{flash:"image"},jpeg:{flash:"image"},jpg:{flash:"image"},swf:{flash:"image"},png:{flash:"image"},wav:{html5:"audio/x-wav"}};})(jwplayer);(function(e){e.utils.mediaparser=function(){};var g={element:{width:"width",height:"height",id:"id","class":"className",name:"name"},media:{src:"file",preload:"preload",autoplay:"autostart",loop:"repeat",controls:"controls"},source:{src:"file",type:"type",media:"media","data-jw-width":"width","data-jw-bitrate":"bitrate"},video:{poster:"image"}};var f={};e.utils.mediaparser.parseMedia=function(j){return d(j);};function c(k,j){if(!e.utils.exists(j)){j=g[k];}else{e.utils.extend(j,g[k]);}return j;}function d(n,j){if(f[n.tagName.toLowerCase()]&&!e.utils.exists(j)){return f[n.tagName.toLowerCase()](n);}else{j=c("element",j);var o={};for(var k in j){if(k!="length"){var m=n.getAttribute(k);if(e.utils.exists(m)){o[j[k]]=m;}}}var l=n.style["#background-color"];if(l&&!(l=="transparent"||l=="rgba(0, 0, 0, 0)")){o.screencolor=l;}return o;}}function h(n,k){k=c("media",k);var l=[];var j=e.utils.selectors("source",n);for(var m in j){if(!isNaN(m)){l.push(a(j[m]));}}var o=d(n,k);if(e.utils.exists(o.file)){l[0]={file:o.file};}o.levels=l;return o;}function a(l,k){k=c("source",k);var j=d(l,k);j.width=j.width?j.width:0;j.bitrate=j.bitrate?j.bitrate:0;return j;}function b(l,k){k=c("video",k);var j=h(l,k);return j;}f.media=h;f.audio=h;f.source=a;f.video=b;})(jwplayer);(function(a){a.utils.loaderstatus={NEW:"NEW",LOADING:"LOADING",ERROR:"ERROR",COMPLETE:"COMPLETE"};a.utils.scriptloader=function(c){var d=a.utils.loaderstatus.NEW;var b=new a.events.eventdispatcher();a.utils.extend(this,b);this.load=function(){if(d==a.utils.loaderstatus.NEW){d=a.utils.loaderstatus.LOADING;var e=document.createElement("script");e.onload=function(f){d=a.utils.loaderstatus.COMPLETE;b.sendEvent(a.events.COMPLETE);};e.onerror=function(f){d=a.utils.loaderstatus.ERROR;b.sendEvent(a.events.ERROR);};e.onreadystatechange=function(){if(e.readyState=="loaded"||e.readyState=="complete"){d=a.utils.loaderstatus.COMPLETE;b.sendEvent(a.events.COMPLETE);}};document.getElementsByTagName("head")[0].appendChild(e);e.src=c;}};this.getStatus=function(){return d;};};})(jwplayer);(function(a){a.utils.selectors=function(b,e){if(!a.utils.exists(e)){e=document;}b=a.utils.strings.trim(b);var c=b.charAt(0);if(c=="#"){return e.getElementById(b.substr(1));}else{if(c=="."){if(e.getElementsByClassName){return e.getElementsByClassName(b.substr(1));}else{return a.utils.selectors.getElementsByTagAndClass("*",b.substr(1));}}else{if(b.indexOf(".")>0){var d=b.split(".");return a.utils.selectors.getElementsByTagAndClass(d[0],d[1]);}else{return e.getElementsByTagName(b);}}}return null;};a.utils.selectors.getElementsByTagAndClass=function(e,h,g){var j=[];if(!a.utils.exists(g)){g=document;}var f=g.getElementsByTagName(e);for(var d=0;d<f.length;d++){if(a.utils.exists(f[d].className)){var c=f[d].className.split(" ");for(var b=0;b<c.length;b++){if(c[b]==h){j.push(f[d]);}}}}return j;};})(jwplayer);(function(a){a.utils.strings=function(){};a.utils.strings.trim=function(b){return b.replace(/^\s*/,"").replace(/\s*$/,"");};a.utils.strings.pad=function(c,d,b){if(!b){b="0";}while(c.length<d){c=b+c;}return c;};a.utils.strings.serialize=function(b){if(b==null){return null;}else{if(b=="true"){return true;}else{if(b=="false"){return false;}else{if(isNaN(Number(b))||b.length>5||b.length==0){return b;}else{return Number(b);}}}}};a.utils.strings.seconds=function(d){d=d.replace(",",".");var b=d.split(":");var c=0;if(d.substr(-1)=="s"){c=Number(d.substr(0,d.length-1));}else{if(d.substr(-1)=="m"){c=Number(d.substr(0,d.length-1))*60;}else{if(d.substr(-1)=="h"){c=Number(d.substr(0,d.length-1))*3600;}else{if(b.length>1){c=Number(b[b.length-1]);c+=Number(b[b.length-2])*60;if(b.length==3){c+=Number(b[b.length-3])*3600;}}else{c=Number(d);}}}}return c;};a.utils.strings.xmlAttribute=function(b,c){for(var d=0;d<b.attributes.length;d++){if(b.attributes[d].name&&b.attributes[d].name.toLowerCase()==c.toLowerCase()){return b.attributes[d].value.toString();}}return"";};a.utils.strings.jsonToString=function(f){var h=h||{};if(h&&h.stringify){return h.stringify(f);}var c=typeof(f);if(c!="object"||f===null){if(c=="string"){f='"'+f.replace(/"/g,'\\"')+'"';}else{return String(f);}}else{var g=[],b=(f&&f.constructor==Array);for(var d in f){var e=f[d];switch(typeof(e)){case"string":e='"'+e.replace(/"/g,'\\"')+'"';break;case"object":if(a.utils.exists(e)){e=a.utils.strings.jsonToString(e);}break;}if(b){if(typeof(e)!="function"){g.push(String(e));}}else{if(typeof(e)!="function"){g.push('"'+d+'":'+String(e));}}}if(b){return"["+String(g)+"]";}else{return"{"+String(g)+"}";}}};})(jwplayer);(function(c){var d=new RegExp(/^(#|0x)[0-9a-fA-F]{3,6}/);c.utils.typechecker=function(g,f){f=!c.utils.exists(f)?b(g):f;return e(g,f);};function b(f){var g=["true","false","t","f"];if(g.toString().indexOf(f.toLowerCase().replace(" ",""))>=0){return"boolean";}else{if(d.test(f)){return"color";}else{if(!isNaN(parseInt(f,10))&&parseInt(f,10).toString().length==f.length){return"integer";}else{if(!isNaN(parseFloat(f))&&parseFloat(f).toString().length==f.length){return"float";}}}}return"string";}function e(g,f){if(!c.utils.exists(f)){return g;}switch(f){case"color":if(g.length>0){return a(g);}return null;case"integer":return parseInt(g,10);case"float":return parseFloat(g);case"boolean":if(g.toLowerCase()=="true"){return true;}else{if(g=="1"){return true;}}return false;}return g;}function a(f){switch(f.toLowerCase()){case"blue":return parseInt("0000FF",16);case"green":return parseInt("00FF00",16);case"red":return parseInt("FF0000",16);case"cyan":return parseInt("00FFFF",16);case"magenta":return parseInt("FF00FF",16);case"yellow":return parseInt("FFFF00",16);case"black":return parseInt("000000",16);case"white":return parseInt("FFFFFF",16);default:f=f.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2");if(f.length==3){f=f.charAt(0)+f.charAt(0)+f.charAt(1)+f.charAt(1)+f.charAt(2)+f.charAt(2);}return parseInt(f,16);}return parseInt("000000",16);}})(jwplayer);(function(a){a.utils.parsers=function(){};a.utils.parsers.localName=function(b){if(!b){return"";}else{if(b.localName){return b.localName;}else{if(b.baseName){return b.baseName;}else{return"";}}}};a.utils.parsers.textContent=function(b){if(!b){return"";}else{if(b.textContent){return b.textContent;}else{if(b.text){return b.text;}else{return"";}}}};})(jwplayer);(function(a){a.utils.parsers.jwparser=function(){};a.utils.parsers.jwparser.PREFIX="jwplayer";a.utils.parsers.jwparser.parseEntry=function(c,d){for(var b=0;b<c.childNodes.length;b++){if(c.childNodes[b].prefix==a.utils.parsers.jwparser.PREFIX){d[a.utils.parsers.localName(c.childNodes[b])]=a.utils.strings.serialize(a.utils.parsers.textContent(c.childNodes[b]));if(a.utils.parsers.localName(c.childNodes[b])=="file"&&d.levels){delete d.levels;}}if(!d.file&&String(d.link).toLowerCase().indexOf("youtube")>-1){d.file=d.link;}}return d;};a.utils.parsers.jwparser.getProvider=function(c){if(c.type){return c.type;}else{if(c.file.indexOf("youtube.com/w")>-1||c.file.indexOf("youtube.com/v")>-1||c.file.indexOf("youtu.be/")>-1){return"youtube";}else{if(c.streamer&&c.streamer.indexOf("rtmp")==0){return"rtmp";}else{if(c.streamer&&c.streamer.indexOf("http")==0){return"http";}else{var b=a.utils.strings.extension(c.file);if(extensions.hasOwnProperty(b)){return extensions[b];}}}}}return"";};})(jwplayer);(function(a){a.utils.parsers.mediaparser=function(){};a.utils.parsers.mediaparser.PREFIX="media";a.utils.parsers.mediaparser.parseGroup=function(d,f){var e=false;for(var c=0;c<d.childNodes.length;c++){if(d.childNodes[c].prefix==a.utils.parsers.mediaparser.PREFIX){if(!a.utils.parsers.localName(d.childNodes[c])){continue;}switch(a.utils.parsers.localName(d.childNodes[c]).toLowerCase()){case"content":if(!e){f.file=a.utils.strings.xmlAttribute(d.childNodes[c],"url");}if(a.utils.strings.xmlAttribute(d.childNodes[c],"duration")){f.duration=a.utils.strings.seconds(a.utils.strings.xmlAttribute(d.childNodes[c],"duration"));}if(a.utils.strings.xmlAttribute(d.childNodes[c],"start")){f.start=a.utils.strings.seconds(a.utils.strings.xmlAttribute(d.childNodes[c],"start"));}if(d.childNodes[c].childNodes&&d.childNodes[c].childNodes.length>0){f=a.utils.parsers.mediaparser.parseGroup(d.childNodes[c],f);}if(a.utils.strings.xmlAttribute(d.childNodes[c],"width")||a.utils.strings.xmlAttribute(d.childNodes[c],"bitrate")||a.utils.strings.xmlAttribute(d.childNodes[c],"url")){if(!f.levels){f.levels=[];}f.levels.push({width:a.utils.strings.xmlAttribute(d.childNodes[c],"width"),bitrate:a.utils.strings.xmlAttribute(d.childNodes[c],"bitrate"),file:a.utils.strings.xmlAttribute(d.childNodes[c],"url")});}break;case"title":f.title=a.utils.parsers.textContent(d.childNodes[c]);break;case"description":f.description=a.utils.parsers.textContent(d.childNodes[c]);break;case"keywords":f.tags=a.utils.parsers.textContent(d.childNodes[c]);break;case"thumbnail":f.image=a.utils.strings.xmlAttribute(d.childNodes[c],"url");break;case"credit":f.author=a.utils.parsers.textContent(d.childNodes[c]);break;case"player":var b=d.childNodes[c].url;if(b.indexOf("youtube.com")>=0||b.indexOf("youtu.be")>=0){e=true;f.file=a.utils.strings.xmlAttribute(d.childNodes[c],"url");}break;case"group":a.utils.parsers.mediaparser.parseGroup(d.childNodes[c],f);break;}}}return f;};})(jwplayer);(function(b){b.utils.parsers.rssparser=function(){};b.utils.parsers.rssparser.parse=function(f){var c=[];for(var e=0;e<f.childNodes.length;e++){if(b.utils.parsers.localName(f.childNodes[e]).toLowerCase()=="channel"){for(var d=0;d<f.childNodes[e].childNodes.length;d++){if(b.utils.parsers.localName(f.childNodes[e].childNodes[d]).toLowerCase()=="item"){c.push(a(f.childNodes[e].childNodes[d]));}}}}return c;};function a(d){var e={};for(var c=0;c<d.childNodes.length;c++){if(!b.utils.parsers.localName(d.childNodes[c])){continue;}switch(b.utils.parsers.localName(d.childNodes[c]).toLowerCase()){case"enclosure":e.file=b.utils.strings.xmlAttribute(d.childNodes[c],"url");break;case"title":e.title=b.utils.parsers.textContent(d.childNodes[c]);break;case"pubdate":e.date=b.utils.parsers.textContent(d.childNodes[c]);break;case"description":e.description=b.utils.parsers.textContent(d.childNodes[c]);break;case"link":e.link=b.utils.parsers.textContent(d.childNodes[c]);break;case"category":if(e.tags){e.tags+=b.utils.parsers.textContent(d.childNodes[c]);}else{e.tags=b.utils.parsers.textContent(d.childNodes[c]);}break;}}e=b.utils.parsers.mediaparser.parseGroup(d,e);e=b.utils.parsers.jwparser.parseEntry(d,e);return new b.html5.playlistitem(e);}})(jwplayer);(function(a){var c={};var b={};a.plugins=function(){};a.plugins.loadPlugins=function(e,d){b[e]=new a.plugins.pluginloader(new a.plugins.model(c),d);return b[e];};a.plugins.registerPlugin=function(h,f,e){var d=a.utils.getPluginName(h);if(c[d]){c[d].registerPlugin(h,f,e);}else{a.utils.log("A plugin ("+h+") was registered with the player that was not loaded. Please check your configuration.");for(var g in b){b[g].pluginFailed();}}};})(jwplayer);(function(a){a.plugins.model=function(b){this.addPlugin=function(c){var d=a.utils.getPluginName(c);if(!b[d]){b[d]=new a.plugins.plugin(c);}return b[d];};};})(jwplayer);(function(a){a.plugins.pluginmodes={FLASH:"FLASH",JAVASCRIPT:"JAVASCRIPT",HYBRID:"HYBRID"};a.plugins.plugin=function(b){var d="http://plugins.longtailvideo.com";var j=a.utils.loaderstatus.NEW;var k;var h;var l;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function e(){switch(a.utils.getPluginPathType(b)){case a.utils.pluginPathType.ABSOLUTE:return b;case a.utils.pluginPathType.RELATIVE:return a.utils.getAbsolutePath(b,window.location.href);case a.utils.pluginPathType.CDN:var o=a.utils.getPluginName(b);var n=a.utils.getPluginVersion(b);var m=(window.location.href.indexOf("https://")==0)?d.replace("http://","https://secure"):d;return m+"/"+a.version.split(".")[0]+"/"+o+"/"+o+(n!==""?("-"+n):"")+".js";}}function g(m){l=setTimeout(function(){j=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE);},1000);}function f(m){j=a.utils.loaderstatus.ERROR;c.sendEvent(a.events.ERROR);}this.load=function(){if(j==a.utils.loaderstatus.NEW){if(b.lastIndexOf(".swf")>0){k=b;j=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE);return;}j=a.utils.loaderstatus.LOADING;var m=new a.utils.scriptloader(e());m.addEventListener(a.events.COMPLETE,g);m.addEventListener(a.events.ERROR,f);m.load();}};this.registerPlugin=function(o,n,m){if(l){clearTimeout(l);l=undefined;}if(n&&m){k=m;h=n;}else{if(typeof n=="string"){k=n;}else{if(typeof n=="function"){h=n;}else{if(!n&&!m){k=o;}}}}j=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE);};this.getStatus=function(){return j;};this.getPluginName=function(){return a.utils.getPluginName(b);};this.getFlashPath=function(){if(k){switch(a.utils.getPluginPathType(k)){case a.utils.pluginPathType.ABSOLUTE:return k;case a.utils.pluginPathType.RELATIVE:if(b.lastIndexOf(".swf")>0){return a.utils.getAbsolutePath(k,window.location.href);}return a.utils.getAbsolutePath(k,e());case a.utils.pluginPathType.CDN:if(k.indexOf("-")>-1){return k+"h";}return k+"-h";}}return null;};this.getJS=function(){return h;};this.getPluginmode=function(){if(typeof k!="undefined"&&typeof h!="undefined"){return a.plugins.pluginmodes.HYBRID;}else{if(typeof k!="undefined"){return a.plugins.pluginmodes.FLASH;}else{if(typeof h!="undefined"){return a.plugins.pluginmodes.JAVASCRIPT;}}}};this.getNewInstance=function(n,m,o){return new h(n,m,o);};this.getURL=function(){return b;};};})(jwplayer);(function(a){a.plugins.pluginloader=function(h,e){var g={};var k=a.utils.loaderstatus.NEW;var d=false;var b=false;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function f(){if(!b){b=true;k=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE);}}function j(){if(!b){var m=0;for(plugin in g){var l=g[plugin].getStatus();if(l==a.utils.loaderstatus.LOADING||l==a.utils.loaderstatus.NEW){m++;}}if(m==0){f();}}}this.setupPlugins=function(n,l,t){var m={length:0,plugins:{}};var q={length:0,plugins:{}};for(var o in g){var r=g[o].getPluginName();if(g[o].getFlashPath()){m.plugins[g[o].getFlashPath()]=l.plugins[o];m.plugins[g[o].getFlashPath()].pluginmode=g[o].getPluginmode();m.length++;}if(g[o].getJS()){var s=document.createElement("div");s.id=n.id+"_"+r;s.style.position="absolute";s.style.zIndex=q.length+10;q.plugins[r]=g[o].getNewInstance(n,l.plugins[o],s);q.length++;if(typeof q.plugins[r].resize!="undefined"){n.onReady(t(q.plugins[r],s,true));n.onResize(t(q.plugins[r],s));}}}n.plugins=q.plugins;return m;};this.load=function(){k=a.utils.loaderstatus.LOADING;d=true;for(var l in e){if(a.utils.exists(l)){g[l]=h.addPlugin(l);g[l].addEventListener(a.events.COMPLETE,j);g[l].addEventListener(a.events.ERROR,j);}}for(l in g){g[l].load();}d=false;j();};this.pluginFailed=function(){f();};this.getStatus=function(){return k;};};})(jwplayer);(function(b){var a=[];b.api=function(d){this.container=d;this.id=d.id;var m={};var u={};var q={};var c=[];var g=undefined;var k=false;var h=[];var s=undefined;var o=b.utils.getOuterHTML(d);var t={};var j={};this.getBuffer=function(){return this.callInternal("jwGetBuffer");};this.getContainer=function(){return this.container;};function e(w,v){return function(B,x,y,z){if(w.renderingMode=="flash"||w.renderingMode=="html5"){var A;if(x){j[B]=x;A="jwplayer('"+w.id+"').callback('"+B+"')";}else{if(!x&&j[B]){delete j[B];}}g.jwDockSetButton(B,A,y,z);}return v;};}this.getPlugin=function(v){var x=this;var w={};if(v=="dock"){return b.utils.extend(w,{setButton:e(x,w),show:function(){x.callInternal("jwDockShow");return w;},hide:function(){x.callInternal("jwDockHide");return w;},onShow:function(y){x.componentListener("dock",b.api.events.JWPLAYER_COMPONENT_SHOW,y);return w;},onHide:function(y){x.componentListener("dock",b.api.events.JWPLAYER_COMPONENT_HIDE,y);return w;}});}else{if(v=="controlbar"){return b.utils.extend(w,{show:function(){x.callInternal("jwControlbarShow");return w;},hide:function(){x.callInternal("jwControlbarHide");return w;},onShow:function(y){x.componentListener("controlbar",b.api.events.JWPLAYER_COMPONENT_SHOW,y);return w;},onHide:function(y){x.componentListener("controlbar",b.api.events.JWPLAYER_COMPONENT_HIDE,y);return w;}});}else{if(v=="display"){return b.utils.extend(w,{show:function(){x.callInternal("jwDisplayShow");return w;},hide:function(){x.callInternal("jwDisplayHide");return w;},onShow:function(y){x.componentListener("display",b.api.events.JWPLAYER_COMPONENT_SHOW,y);return w;},onHide:function(y){x.componentListener("display",b.api.events.JWPLAYER_COMPONENT_HIDE,y);return w;}});}else{return this.plugins[v];}}}};this.callback=function(v){if(j[v]){return j[v]();}};this.getDuration=function(){return this.callInternal("jwGetDuration");};this.getFullscreen=function(){return this.callInternal("jwGetFullscreen");};this.getHeight=function(){return this.callInternal("jwGetHeight");};this.getLockState=function(){return this.callInternal("jwGetLockState");};this.getMeta=function(){return this.getItemMeta();};this.getMute=function(){return this.callInternal("jwGetMute");};this.getPlaylist=function(){var w=this.callInternal("jwGetPlaylist");if(this.renderingMode=="flash"){b.utils.deepReplaceKeyName(w,["__dot__","__spc__","__dsh__"],["."," ","-"]);}for(var v=0;v<w.length;v++){if(!b.utils.exists(w[v].index)){w[v].index=v;}}return w;};this.getPlaylistItem=function(v){if(!b.utils.exists(v)){v=this.getCurrentItem();}return this.getPlaylist()[v];};this.getPosition=function(){return this.callInternal("jwGetPosition");};this.getRenderingMode=function(){return this.renderingMode;};this.getState=function(){return this.callInternal("jwGetState");};this.getVolume=function(){return this.callInternal("jwGetVolume");};this.getWidth=function(){return this.callInternal("jwGetWidth");};this.setFullscreen=function(v){if(!b.utils.exists(v)){this.callInternal("jwSetFullscreen",!this.callInternal("jwGetFullscreen"));}else{this.callInternal("jwSetFullscreen",v);}return this;};this.setMute=function(v){if(!b.utils.exists(v)){this.callInternal("jwSetMute",!this.callInternal("jwGetMute"));}else{this.callInternal("jwSetMute",v);}return this;};this.lock=function(){return this;};this.unlock=function(){return this;};this.load=function(v){this.callInternal("jwLoad",v);return this;};this.playlistItem=function(v){this.callInternal("jwPlaylistItem",v);return this;};this.playlistPrev=function(){this.callInternal("jwPlaylistPrev");return this;};this.playlistNext=function(){this.callInternal("jwPlaylistNext");return this;};this.resize=function(w,v){if(this.renderingMode=="html5"){g.jwResize(w,v);}else{this.container.width=w;this.container.height=v;var x=document.getElementById(this.id+"_wrapper");if(x){x.style.width=w+"px";x.style.height=v+"px";}}return this;};this.play=function(v){if(typeof v=="undefined"){v=this.getState();if(v==b.api.events.state.PLAYING||v==b.api.events.state.BUFFERING){this.callInternal("jwPause");}else{this.callInternal("jwPlay");}}else{this.callInternal("jwPlay",v);}return this;};this.pause=function(v){if(typeof v=="undefined"){v=this.getState();if(v==b.api.events.state.PLAYING||v==b.api.events.state.BUFFERING){this.callInternal("jwPause");}else{this.callInternal("jwPlay");}}else{this.callInternal("jwPause",v);}return this;};this.stop=function(){this.callInternal("jwStop");return this;};this.seek=function(v){this.callInternal("jwSeek",v);return this;};this.setVolume=function(v){this.callInternal("jwSetVolume",v);return this;};this.loadInstream=function(w,v){s=new b.api.instream(this,g,w,v);return s;};this.onBufferChange=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_BUFFER,v);};this.onBufferFull=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_BUFFER_FULL,v);};this.onError=function(v){return this.eventListener(b.api.events.JWPLAYER_ERROR,v);};this.onFullscreen=function(v){return this.eventListener(b.api.events.JWPLAYER_FULLSCREEN,v);};this.onMeta=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_META,v);};this.onMute=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_MUTE,v);};this.onPlaylist=function(v){return this.eventListener(b.api.events.JWPLAYER_PLAYLIST_LOADED,v);};this.onPlaylistItem=function(v){return this.eventListener(b.api.events.JWPLAYER_PLAYLIST_ITEM,v);};this.onReady=function(v){return this.eventListener(b.api.events.API_READY,v);};this.onResize=function(v){return this.eventListener(b.api.events.JWPLAYER_RESIZE,v);};this.onComplete=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_COMPLETE,v);};this.onSeek=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_SEEK,v);};this.onTime=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_TIME,v);};this.onVolume=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_VOLUME,v);};this.onBeforePlay=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_BEFOREPLAY,v);};this.onBeforeComplete=function(v){return this.eventListener(b.api.events.JWPLAYER_MEDIA_BEFORECOMPLETE,v);};this.onBuffer=function(v){return this.stateListener(b.api.events.state.BUFFERING,v);};this.onPause=function(v){return this.stateListener(b.api.events.state.PAUSED,v);};this.onPlay=function(v){return this.stateListener(b.api.events.state.PLAYING,v);};this.onIdle=function(v){return this.stateListener(b.api.events.state.IDLE,v);};this.remove=function(){if(!k){throw"Cannot call remove() before player is ready";return;}r(this);};function r(v){h=[];if(b.utils.getOuterHTML(v.container)!=o){b.api.destroyPlayer(v.id,o);}}this.setup=function(w){if(b.embed){var v=this.id;r(this);var x=b(v);x.config=w;return new b.embed(x);}return this;};this.registerPlugin=function(x,w,v){b.plugins.registerPlugin(x,w,v);};this.setPlayer=function(v,w){g=v;this.renderingMode=w;};this.stateListener=function(v,w){if(!u[v]){u[v]=[];this.eventListener(b.api.events.JWPLAYER_PLAYER_STATE,f(v));}u[v].push(w);return this;};this.detachMedia=function(){if(this.renderingMode=="html5"){return this.callInternal("jwDetachMedia");}};this.attachMedia=function(){if(this.renderingMode=="html5"){return this.callInternal("jwAttachMedia");}};function f(v){return function(x){var w=x.newstate,z=x.oldstate;if(w==v){var y=u[w];if(y){for(var A=0;A<y.length;A++){if(typeof y[A]=="function"){y[A].call(this,{oldstate:z,newstate:w});}}}}};}this.componentListener=function(v,w,x){if(!q[v]){q[v]={};}if(!q[v][w]){q[v][w]=[];this.eventListener(w,l(v,w));}q[v][w].push(x);return this;};function l(v,w){return function(y){if(v==y.component){var x=q[v][w];if(x){for(var z=0;z<x.length;z++){if(typeof x[z]=="function"){x[z].call(this,y);}}}}};}this.addInternalListener=function(v,w){try{v.jwAddEventListener(w,'function(dat) { jwplayer("'+this.id+'").dispatchEvent("'+w+'", dat); }');}catch(x){b.utils.log("Could not add internal listener");}};this.eventListener=function(v,w){if(!m[v]){m[v]=[];if(g&&k){this.addInternalListener(g,v);}}m[v].push(w);return this;};this.dispatchEvent=function(x){if(m[x]){var w=_utils.translateEventResponse(x,arguments[1]);for(var v=0;v<m[x].length;v++){if(typeof m[x][v]=="function"){m[x][v].call(this,w);}}}};this.dispatchInstreamEvent=function(v){if(s){s.dispatchEvent(v,arguments);}};this.callInternal=function(){if(k){var x=arguments[0],v=[];for(var w=1;w<arguments.length;w++){v.push(arguments[w]);}if(typeof g!="undefined"&&typeof g[x]=="function"){if(v.length==2){return(g[x])(v[0],v[1]);}else{if(v.length==1){return(g[x])(v[0]);}else{return(g[x])();}}}return null;}else{h.push(arguments);}};this.playerReady=function(w){k=true;if(!g){this.setPlayer(document.getElementById(w.id));}this.container=document.getElementById(this.id);for(var v in m){this.addInternalListener(g,v);}this.eventListener(b.api.events.JWPLAYER_PLAYLIST_ITEM,function(x){t={};});this.eventListener(b.api.events.JWPLAYER_MEDIA_META,function(x){b.utils.extend(t,x.metadata);});this.dispatchEvent(b.api.events.API_READY);while(h.length>0){this.callInternal.apply(this,h.shift());}};this.getItemMeta=function(){return t;};this.getCurrentItem=function(){return this.callInternal("jwGetPlaylistIndex");};function n(x,z,y){var v=[];if(!z){z=0;}if(!y){y=x.length-1;}for(var w=z;w<=y;w++){v.push(x[w]);}return v;}return this;};b.api.selectPlayer=function(d){var c;if(!b.utils.exists(d)){d=0;}if(d.nodeType){c=d;}else{if(typeof d=="string"){c=document.getElementById(d);}}if(c){var e=b.api.playerById(c.id);if(e){return e;}else{return b.api.addPlayer(new b.api(c));}}else{if(typeof d=="number"){return b.getPlayers()[d];}}return null;};b.api.events={API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",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_PLAYER_STATE:"jwplayerPlayerState",JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed"};b.api.events.state={BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"};b.api.playerById=function(d){for(var c=0;c<a.length;c++){if(a[c].id==d){return a[c];}}return null;};b.api.addPlayer=function(c){for(var d=0;d<a.length;d++){if(a[d]==c){return c;}}a.push(c);return c;};b.api.destroyPlayer=function(h,d){var g=-1;for(var l=0;l<a.length;l++){if(a[l].id==h){g=l;continue;}}if(g>=0){try{a[g].callInternal("jwDestroy");}catch(k){}var c=document.getElementById(a[g].id);if(document.getElementById(a[g].id+"_wrapper")){c=document.getElementById(a[g].id+"_wrapper");}if(c){if(d){b.utils.setOuterHTML(c,d);}else{var j=document.createElement("div");var f=c.id;if(c.id.indexOf("_wrapper")==c.id.length-8){newID=c.id.substring(0,c.id.length-8);}j.setAttribute("id",f);c.parentNode.replaceChild(j,c);}}a.splice(g,1);}return null;};b.getPlayers=function(){return a.slice(0);};})(jwplayer);var _userPlayerReady=(typeof playerReady=="function")?playerReady:undefined;playerReady=function(b){var a=jwplayer.api.playerById(b.id);if(a){a.playerReady(b);}else{jwplayer.api.selectPlayer(b.id).playerReady(b);}if(_userPlayerReady){_userPlayerReady.call(this,b);}};(function(a){a.api.instream=function(c,j,n,r){var h=c;var b=j;var g=n;var k=r;var e={};var q={};function f(){h.callInternal("jwLoadInstream",n,r);}function m(s,t){b.jwInstreamAddEventListener(t,'function(dat) { jwplayer("'+h.id+'").dispatchInstreamEvent("'+t+'", dat); }');}function d(s,t){if(!e[s]){e[s]=[];m(b,s);}e[s].push(t);return this;}function o(s,t){if(!q[s]){q[s]=[];d(a.api.events.JWPLAYER_PLAYER_STATE,l(s));}q[s].push(t);return this;}function l(s){return function(u){var t=u.newstate,w=u.oldstate;if(t==s){var v=q[t];if(v){for(var x=0;x<v.length;x++){if(typeof v[x]=="function"){v[x].call(this,{oldstate:w,newstate:t,type:u.type});}}}}};}this.dispatchEvent=function(v,u){if(e[v]){var t=_utils.translateEventResponse(v,u[1]);for(var s=0;s<e[v].length;s++){if(typeof e[v][s]=="function"){e[v][s].call(this,t);}}}};this.onError=function(s){return d(a.api.events.JWPLAYER_ERROR,s);};this.onFullscreen=function(s){return d(a.api.events.JWPLAYER_FULLSCREEN,s);};this.onMeta=function(s){return d(a.api.events.JWPLAYER_MEDIA_META,s);};this.onMute=function(s){return d(a.api.events.JWPLAYER_MEDIA_MUTE,s);};this.onComplete=function(s){return d(a.api.events.JWPLAYER_MEDIA_COMPLETE,s);};this.onSeek=function(s){return d(a.api.events.JWPLAYER_MEDIA_SEEK,s);};this.onTime=function(s){return d(a.api.events.JWPLAYER_MEDIA_TIME,s);};this.onVolume=function(s){return d(a.api.events.JWPLAYER_MEDIA_VOLUME,s);};this.onBuffer=function(s){return o(a.api.events.state.BUFFERING,s);};this.onPause=function(s){return o(a.api.events.state.PAUSED,s);};this.onPlay=function(s){return o(a.api.events.state.PLAYING,s);};this.onIdle=function(s){return o(a.api.events.state.IDLE,s);};this.onInstreamClick=function(s){return d(a.api.events.JWPLAYER_INSTREAM_CLICK,s);};this.onInstreamDestroyed=function(s){return d(a.api.events.JWPLAYER_INSTREAM_DESTROYED,s);};this.play=function(s){b.jwInstreamPlay(s);};this.pause=function(s){b.jwInstreamPause(s);};this.seek=function(s){b.jwInstreamSeek(s);};this.destroy=function(){b.jwInstreamDestroy();};this.getState=function(){return b.jwInstreamGetState();};this.getDuration=function(){return b.jwInstreamGetDuration();};this.getPosition=function(){return b.jwInstreamGetPosition();};f();};})(jwplayer);(function(a){var c=a.utils;a.embed=function(h){var k={width:400,height:300,components:{controlbar:{position:"over"}}};var g=c.mediaparser.parseMedia(h.container);var f=new a.embed.config(c.extend(k,g,h.config),this);var j=a.plugins.loadPlugins(h.id,f.plugins);function d(n,m){for(var l in m){if(typeof n[l]=="function"){(n[l]).call(n,m[l]);}}}function e(){if(j.getStatus()==c.loaderstatus.COMPLETE){for(var n=0;n<f.modes.length;n++){if(f.modes[n].type&&a.embed[f.modes[n].type]){var q=f.modes[n].config;var u=f;if(q){u=c.extend(c.clone(f),q);var t=["file","levels","playlist"];for(var m=0;m<t.length;m++){var r=t[m];if(c.exists(q[r])){for(var l=0;l<t.length;l++){if(l!=m){var o=t[l];if(c.exists(u[o])&&!c.exists(q[o])){delete u[o];}}}}}}var s=new a.embed[f.modes[n].type](document.getElementById(h.id),f.modes[n],u,j,h);if(s.supportsConfig()){s.embed();d(h,f.events);return h;}}}c.log("No suitable players found");new a.embed.logo(c.extend({hide:true},f.components.logo),"none",h.id);}}j.addEventListener(a.events.COMPLETE,e);j.addEventListener(a.events.ERROR,e);j.load();return h;};function b(){if(!document.body){return setTimeout(b,15);}var d=c.selectors.getElementsByTagAndClass("video","jwplayer");for(var e=0;e<d.length;e++){var f=d[e];if(f.id==""){f.id="jwplayer_"+Math.round(Math.random()*100000);}a(f.id).setup({});}}b();})(jwplayer);(function(e){var k=e.utils;function h(m){var l=[{type:"flash",src:m?m:"/jwplayer/player.swf"},{type:"html5"},{type:"download"}];if(k.isAndroid()){l[0]=l.splice(1,1,l[0])[0];}return l;}var a={players:"modes",autoplay:"autostart"};function b(o){var n=o.toLowerCase();var m=["left","right","top","bottom"];for(var l=0;l<m.length;l++){if(n==m[l]){return true;}}return false;}function c(m){var l=false;l=(m instanceof Array)||(typeof m=="object"&&!m.position&&!m.size);return l;}function j(l){if(typeof l=="string"){if(parseInt(l).toString()==l||l.toLowerCase().indexOf("px")>-1){return parseInt(l);}}return l;}var g=["playlist","dock","controlbar","logo","display"];function f(l){var o={};switch(k.typeOf(l.plugins)){case"object":for(var n in l.plugins){o[k.getPluginName(n)]=n;}break;case"string":var q=l.plugins.split(",");for(var m=0;m<q.length;m++){o[k.getPluginName(q[m])]=q[m];}break;}return o;}function d(q,o,n,l){if(k.typeOf(q[o])!="object"){q[o]={};}var m=q[o][n];if(k.typeOf(m)!="object"){q[o][n]=m={};}if(l){if(o=="plugins"){var r=k.getPluginName(n);m[l]=q[r+"."+l];delete q[r+"."+l];}else{m[l]=q[n+"."+l];delete q[n+"."+l];}}}e.embed.deserialize=function(m){var n=f(m);for(var l in n){d(m,"plugins",n[l]);}for(var r in m){if(r.indexOf(".")>-1){var q=r.split(".");var o=q[0];var r=q[1];if(k.isInArray(g,o)){d(m,"components",o,r);}else{if(n[o]){d(m,"plugins",n[o],r);}}}}return m;};e.embed.config=function(l,w){var v=k.extend({},l);var t;if(c(v.playlist)){t=v.playlist;delete v.playlist;}v=e.embed.deserialize(v);v.height=j(v.height);v.width=j(v.width);if(typeof v.plugins=="string"){var m=v.plugins.split(",");if(typeof v.plugins!="object"){v.plugins={};}for(var r=0;r<m.length;r++){var s=k.getPluginName(m[r]);if(typeof v[s]=="object"){v.plugins[m[r]]=v[s];delete v[s];}else{v.plugins[m[r]]={};}}}for(var u=0;u<g.length;u++){var q=g[u];if(k.exists(v[q])){if(typeof v[q]!="object"){if(!v.components[q]){v.components[q]={};}if(q=="logo"){v.components[q].file=v[q];}else{v.components[q].position=v[q];}delete v[q];}else{if(!v.components[q]){v.components[q]={};}k.extend(v.components[q],v[q]);delete v[q];}}if(typeof v[q+"size"]!="undefined"){if(!v.components[q]){v.components[q]={};}v.components[q].size=v[q+"size"];delete v[q+"size"];}}if(typeof v.icons!="undefined"){if(!v.components.display){v.components.display={};}v.components.display.icons=v.icons;delete v.icons;}for(var o in a){if(v[o]){if(!v[a[o]]){v[a[o]]=v[o];}delete v[o];}}var n;if(v.flashplayer&&!v.modes){n=h(v.flashplayer);delete v.flashplayer;}else{if(v.modes){if(typeof v.modes=="string"){n=h(v.modes);}else{if(v.modes instanceof Array){n=v.modes;}else{if(typeof v.modes=="object"&&v.modes.type){n=[v.modes];}}}delete v.modes;}else{n=h();}}v.modes=n;if(t){v.playlist=t;}return v;};})(jwplayer);(function(a){a.embed.download=function(c,g,b,d,f){this.embed=function(){var k=a.utils.extend({},b);var r={};var j=b.width?b.width:480;if(typeof j!="number"){j=parseInt(j,10);}var m=b.height?b.height:320;if(typeof m!="number"){m=parseInt(m,10);}var v,o,n;var t={};if(b.playlist&&b.playlist.length){t.file=b.playlist[0].file;o=b.playlist[0].image;t.levels=b.playlist[0].levels;}else{t.file=b.file;o=b.image;t.levels=b.levels;}if(t.file){v=t.file;}else{if(t.levels&&t.levels.length){v=t.levels[0].file;}}n=v?"pointer":"auto";var l={display:{style:{cursor:n,width:j,height:m,backgroundColor:"#000",position:"relative",textDecoration:"none",border:"none",display:"block"}},display_icon:{style:{cursor:n,position:"absolute",display:v?"block":"none",top:0,left:0,border:0,margin:0,padding:0,zIndex:3,width:50,height:50,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALdJREFUeNrs18ENgjAYhmFouDOCcQJGcARHgE10BDcgTOIosAGwQOuPwaQeuFRi2p/3Sb6EC5L3QCxZBgAAAOCorLW1zMn65TrlkH4NcV7QNcUQt7Gn7KIhxA+qNIR81spOGkL8oFJDyLJRdosqKDDkK+iX5+d7huzwM40xptMQMkjIOeRGo+VkEVvIPfTGIpKASfYIfT9iCHkHrBEzf4gcUQ56aEzuGK/mw0rHpy4AAACAf3kJMACBxjAQNRckhwAAAABJRU5ErkJggg==)"}},display_iconBackground:{style:{cursor:n,position:"absolute",display:v?"block":"none",top:((m-50)/2),left:((j-50)/2),border:0,width:50,height:50,margin:0,padding:0,zIndex:2,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEpJREFUeNrszwENADAIA7DhX8ENoBMZ5KR10EryckCJiIiIiIiIiIiIiIiIiIiIiIh8GmkRERERERERERERERERERERERGRHSPAAPlXH1phYpYaAAAAAElFTkSuQmCC)"}},display_image:{style:{width:j,height:m,display:o?"block":"none",position:"absolute",cursor:n,left:0,top:0,margin:0,padding:0,textDecoration:"none",zIndex:1,border:"none"}}};var h=function(w,y,z){var x=document.createElement(w);if(z){x.id=z;}else{x.id=c.id+"_jwplayer_"+y;}a.utils.css(x,l[y].style);return x;};r.display=h("a","display",c.id);if(v){r.display.setAttribute("href",a.utils.getAbsolutePath(v));}r.display_image=h("img","display_image");r.display_image.setAttribute("alt","Click to download...");if(o){r.display_image.setAttribute("src",a.utils.getAbsolutePath(o));}if(true){r.display_icon=h("div","display_icon");r.display_iconBackground=h("div","display_iconBackground");r.display.appendChild(r.display_image);r.display_iconBackground.appendChild(r.display_icon);r.display.appendChild(r.display_iconBackground);}_css=a.utils.css;_hide=function(w){_css(w,{display:"none"});};function s(w){_imageWidth=r.display_image.naturalWidth;_imageHeight=r.display_image.naturalHeight;u();}function u(){a.utils.stretch(a.utils.stretching.UNIFORM,r.display_image,j,m,_imageWidth,_imageHeight);}r.display_image.onerror=function(w){_hide(r.display_image);};r.display_image.onload=s;c.parentNode.replaceChild(r.display,c);var q=(b.plugins&&b.plugins.logo)?b.plugins.logo:{};r.display.appendChild(new a.embed.logo(b.components.logo,"download",c.id));f.container=document.getElementById(f.id);f.setPlayer(r.display,"download");};this.supportsConfig=function(){if(b){var j=a.utils.getFirstPlaylistItemFromConfig(b);if(typeof j.file=="undefined"&&typeof j.levels=="undefined"){return true;}else{if(j.file){return e(j.file,j.provider,j.playlistfile);}else{if(j.levels&&j.levels.length){for(var h=0;h<j.levels.length;h++){if(j.levels[h].file&&e(j.levels[h].file,j.provider,j.playlistfile)){return true;}}}}}}else{return true;}};function e(j,l,h){if(h){return false;}var k=["image","sound","youtube","http"];if(l&&(k.toString().indexOf(l)>-1)){return true;}if(!l||(l&&l=="video")){var m=a.utils.extension(j);if(m&&a.utils.extensionmap[m]){return true;}}return false;}};})(jwplayer);(function(a){a.embed.flash=function(f,g,l,e,j){function m(o,n,q){var r=document.createElement("param");r.setAttribute("name",n);r.setAttribute("value",q);o.appendChild(r);}function k(o,q,n){return function(r){if(n){document.getElementById(j.id+"_wrapper").appendChild(q);}var t=document.getElementById(j.id).getPluginConfig("display");o.resize(t.width,t.height);var s={left:t.x,top:t.y};a.utils.css(q,s);};}function d(q){if(!q){return{};}var s={};for(var o in q){var n=q[o];for(var r in n){s[o+"."+r]=n[r];}}return s;}function h(r,q){if(r[q]){var t=r[q];for(var o in t){var n=t[o];if(typeof n=="string"){if(!r[o]){r[o]=n;}}else{for(var s in n){if(!r[o+"."+s]){r[o+"."+s]=n[s];}}}}delete r[q];}}function b(r){if(!r){return{};}var u={},t=[];for(var n in r){var q=a.utils.getPluginName(n);var o=r[n];t.push(n);for(var s in o){u[q+"."+s]=o[s];}}u.plugins=t.join(",");return u;}function c(q){var n=q.netstreambasepath?"":"netstreambasepath="+encodeURIComponent(window.location.href.split("#")[0])+"&";for(var o in q){if(typeof(q[o])=="object"){n+=o+"="+encodeURIComponent("[[JSON]]"+a.utils.strings.jsonToString(q[o]))+"&";}else{n+=o+"="+encodeURIComponent(q[o])+"&";}}return n.substring(0,n.length-1);}this.embed=function(){l.id=j.id;var B;var s=a.utils.extend({},l);var o=s.width;var z=s.height;if(f.id+"_wrapper"==f.parentNode.id){B=document.getElementById(f.id+"_wrapper");}else{B=document.createElement("div");B.id=f.id+"_wrapper";a.utils.wrap(f,B);a.utils.css(B,{position:"relative",width:o,height:z});}var q=e.setupPlugins(j,s,k);if(q.length>0){a.utils.extend(s,b(q.plugins));}else{delete s.plugins;}var t=["height","width","modes","events"];for(var w=0;w<t.length;w++){delete s[t[w]];}var r="opaque";if(s.wmode){r=s.wmode;}h(s,"components");h(s,"providers");if(typeof s["dock.position"]!="undefined"){if(s["dock.position"].toString().toLowerCase()=="false"){s.dock=s["dock.position"];delete s["dock.position"];}}var y=a.utils.getCookies();for(var n in y){if(typeof(s[n])=="undefined"){s[n]=y[n];}}var A="#000000";var v;if(a.utils.isIE()){var x='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" bgcolor="'+A+'" width="100%" height="100%" id="'+f.id+'" name="'+f.id+'" tabindex=0"">';x+='<param name="movie" value="'+g.src+'">';x+='<param name="allowfullscreen" value="true">';x+='<param name="allowscriptaccess" value="always">';x+='<param name="seamlesstabbing" value="true">';x+='<param name="wmode" value="'+r+'">';x+='<param name="flashvars" value="'+c(s)+'">';x+="</object>";a.utils.setOuterHTML(f,x);v=document.getElementById(f.id);}else{var u=document.createElement("object");u.setAttribute("type","application/x-shockwave-flash");u.setAttribute("data",g.src);u.setAttribute("width","100%");u.setAttribute("height","100%");u.setAttribute("bgcolor","#000000");u.setAttribute("id",f.id);u.setAttribute("name",f.id);u.setAttribute("tabindex",0);m(u,"allowfullscreen","true");m(u,"allowscriptaccess","always");m(u,"seamlesstabbing","true");m(u,"wmode",r);m(u,"flashvars",c(s));f.parentNode.replaceChild(u,f);v=u;}j.container=v;j.setPlayer(v,"flash");};this.supportsConfig=function(){if(a.utils.hasFlash()){if(l){var o=a.utils.getFirstPlaylistItemFromConfig(l);if(typeof o.file=="undefined"&&typeof o.levels=="undefined"){return true;}else{if(o.file){return flashCanPlay(o.file,o.provider);}else{if(o.levels&&o.levels.length){for(var n=0;n<o.levels.length;n++){if(o.levels[n].file&&flashCanPlay(o.levels[n].file,o.provider)){return true;}}}}}}else{return true;}}return false;};flashCanPlay=function(n,q){var o=["video","http","sound","image"];if(q&&(o.toString().indexOf(q)<0)){return true;}var r=a.utils.extension(n);if(!r){return true;}if(a.utils.exists(a.utils.extensionmap[r])&&!a.utils.exists(a.utils.extensionmap[r].flash)){return false;}return true;};};})(jwplayer);(function(a){a.embed.html5=function(c,g,b,d,f){function e(j,k,h){return function(l){var m=document.getElementById(c.id+"_displayarea");if(h){m.appendChild(k);}j.resize(m.clientWidth,m.clientHeight);k.left=m.style.left;k.top=m.style.top;};}this.embed=function(){if(a.html5){d.setupPlugins(f,b,e);c.innerHTML="";var j=a.utils.extend({screencolor:"0x000000"},b);var h=["plugins","modes","events"];for(var k=0;k<h.length;k++){delete j[h[k]];}if(j.levels&&!j.sources){j.sources=b.levels;}if(j.skin&&j.skin.toLowerCase().indexOf(".zip")>0){j.skin=j.skin.replace(/\.zip/i,".xml");}var l=new (a.html5(c)).setup(j);f.container=document.getElementById(f.id);f.setPlayer(l,"html5");}else{return null;}};this.supportsConfig=function(){if(!!a.vid.canPlayType){if(b){var j=a.utils.getFirstPlaylistItemFromConfig(b);if(typeof j.file=="undefined"&&typeof j.levels=="undefined"){return true;}else{if(j.file){return html5CanPlay(a.vid,j.file,j.provider,j.playlistfile);}else{if(j.levels&&j.levels.length){for(var h=0;h<j.levels.length;h++){if(j.levels[h].file&&html5CanPlay(a.vid,j.levels[h].file,j.provider,j.playlistfile)){return true;}}}}}}else{return true;}}return false;};html5CanPlay=function(k,j,l,h){if(h){return false;}if(l&&l=="youtube"){return true;}if(l&&l!="video"&&l!="http"&&l!="sound"){return false;}if(navigator.userAgent.match(/BlackBerry/i)!==null){return false;}var m=a.utils.extension(j);if(!a.utils.exists(m)||!a.utils.exists(a.utils.extensionmap[m])){return true;}if(!a.utils.exists(a.utils.extensionmap[m].html5)){return false;}if(a.utils.isLegacyAndroid()&&m.match(/m4v|mp4/)){return true;}return browserCanPlay(k,a.utils.extensionmap[m].html5);};browserCanPlay=function(j,h){if(!h){return true;}if(j.canPlayType(h)){return true;}else{if(h=="audio/mp3"&&navigator.userAgent.match(/safari/i)){return j.canPlayType("audio/mpeg");}else{return false;}}};};})(jwplayer);(function(a){a.embed.logo=function(m,l,d){var j={prefix:"http://l.longtailvideo.com/"+l+"/",file:"logo.png",link:"http://www.longtailvideo.com/players/jw-flv-player/",linktarget:"_top",margin:8,out:0.5,over:1,timeout:5,hide:false,position:"bottom-left"};_css=a.utils.css;var b;var h;k();function k(){o();c();f();}function o(){if(j.prefix){var r=a.version.split(/\W/).splice(0,2).join("/");if(j.prefix.indexOf(r)<0){j.prefix+=r+"/";}}h=a.utils.extend({},j,m);}function q(){var t={border:"none",textDecoration:"none",position:"absolute",cursor:"pointer",zIndex:10};t.display=h.hide?"none":"block";var s=h.position.toLowerCase().split("-");for(var r in s){t[s[r]]=h.margin;}return t;}function c(){b=document.createElement("img");b.id=d+"_jwplayer_logo";b.style.display="none";b.onload=function(r){_css(b,q());e();};if(!h.file){return;}if(h.file.indexOf("http://")===0){b.src=h.file;}else{b.src=h.prefix+h.file;}}if(!h.file){return;}function f(){if(h.link){b.onmouseover=g;b.onmouseout=e;b.onclick=n;}else{this.mouseEnabled=false;}}function n(r){if(typeof r!="undefined"){r.preventDefault();r.stopPropagation();}if(h.link){window.open(h.link,h.linktarget);}return;}function e(r){if(h.link){b.style.opacity=h.out;}return;}function g(r){if(h.hide){b.style.opacity=h.over;}return;}return b;};})(jwplayer);(function(a){a.html5=function(b){var c=b;this.setup=function(d){a.utils.extend(this,new a.html5.api(c,d));return this;};return this;};})(jwplayer);(function(a){var d=a.utils;var b=d.css;var c=d.isIOS();a.html5.view=function(n,I,h){var m=n;var z=I;var j=h;var S;var g;var u;var o;var G;var Q;var P;var F=false;var y=false;var B,O;var f,T,v;function M(){S=document.createElement("div");S.id=z.id;S.className=z.className;_videowrapper=document.createElement("div");_videowrapper.id=S.id+"_video_wrapper";z.id=S.id+"_video";b(S,{position:"relative",height:j.height,width:j.width,padding:0,backgroundColor:V(),zIndex:0});function V(){if(m.skin.getComponentSettings("display")&&m.skin.getComponentSettings("display").backgroundcolor){return m.skin.getComponentSettings("display").backgroundcolor;}return parseInt("000000",16);}b(z,{width:"100%",height:"100%",top:0,left:0,zIndex:1,margin:"auto",display:"block"});b(_videowrapper,{overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0});d.wrap(z,S);d.wrap(z,_videowrapper);o=document.createElement("div");o.id=S.id+"_displayarea";S.appendChild(o);_instreamArea=document.createElement("div");_instreamArea.id=S.id+"_instreamarea";b(_instreamArea,{overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:100,background:"000000",display:"none"});S.appendChild(_instreamArea);}function L(){for(var V=0;V<j.plugins.order.length;V++){var W=j.plugins.order[V];if(d.exists(j.plugins.object[W].getDisplayElement)){j.plugins.object[W].height=d.parseDimension(j.plugins.object[W].getDisplayElement().style.height);j.plugins.object[W].width=d.parseDimension(j.plugins.object[W].getDisplayElement().style.width);j.plugins.config[W].currentPosition=j.plugins.config[W].position;}}w();}function t(V){y=j.fullscreen;}function q(V){if(T){return;}switch(V.newstate){case a.api.events.state.PLAYING:if(j.getMedia()&&j.getMedia().hasChrome()){o.style.display="none";}break;default:o.style.display="block";break;}l();}function w(W){var Y=j.getMedia()?j.getMedia().getDisplayElement():null;if(d.exists(Y)){if(P!=Y){if(P&&P.parentNode){P.parentNode.replaceChild(Y,P);}P=Y;}for(var V=0;V<j.plugins.order.length;V++){var X=j.plugins.order[V];if(d.exists(j.plugins.object[X].getDisplayElement)){j.plugins.config[X].currentPosition=j.plugins.config[X].position;}}}H(j.width,j.height);}this.setup=function(){if(j&&j.getMedia()){z=j.getMedia().getDisplayElement();}M();L();m.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,q);m.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_LOADED,w);m.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_BEFOREPLAY,t);m.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_META,function(W){l();});var V;if(d.exists(window.onresize)){V=window.onresize;}window.onresize=function(W){if(d.exists(V)){try{V(W);}catch(Y){}}if(m.jwGetFullscreen()){if(!C()){var X=d.getBoundingClientRect(document.body);j.width=Math.abs(X.left)+Math.abs(X.right);j.height=window.innerHeight;H(j.width,j.height);}}else{H(j.width,j.height);}};};function N(V){switch(V.keyCode){case 27:if(m.jwGetFullscreen()){m.jwSetFullscreen(false);}break;case 32:if(m.jwGetState()!=a.api.events.state.IDLE&&m.jwGetState()!=a.api.events.state.PAUSED){m.jwPause();}else{m.jwPlay();}break;}}function H(V,ae){if(S.style.display=="none"){return;}var Y=[].concat(j.plugins.order);Y.reverse();G=Y.length+2;if(y&&C()){try{if(j.fullscreen&&!j.getMedia().getDisplayElement().webkitDisplayingFullscreen){j.fullscreen=false;}}catch(ab){}}if(!j.fullscreen){g=V;u=ae;if(typeof V=="string"&&V.indexOf("%")>0){g=d.getElementWidth(d.parentNode(S))*parseInt(V.replace("%"),"")/100;}else{g=V;}if(typeof ae=="string"&&ae.indexOf("%")>0){u=d.getElementHeight(d.parentNode(S))*parseInt(ae.replace("%"),"")/100;}else{u=ae;}var Z={top:0,bottom:0,left:0,right:0,width:g,height:u,position:"absolute"};b(o,Z);var af={};var ac;try{ac=j.plugins.object.display.getDisplayElement();}catch(ab){}if(ac){af.width=d.parseDimension(ac.style.width);af.height=d.parseDimension(ac.style.height);}var ad=d.extend({},Z,af,{zIndex:_instreamArea.style.zIndex,display:_instreamArea.style.display});b(_instreamArea,ad);b(S,{height:u,width:g});var aa=x(J,Y);if(aa.length>0){G+=aa.length;var X=aa.indexOf("playlist"),W=aa.indexOf("controlbar");if(X>=0&&W>=0){aa[X]=aa.splice(W,1,aa[X])[0];}x(r,aa,true);}B=d.getElementWidth(o);O=d.getElementHeight(o);}else{if(!C()&&!c){x(e,Y,true);}}l();}var s;function x(ac,Y,Z){s=0;var aa=[];for(var X=0;X<Y.length;X++){var ab=Y[X];if(d.exists(j.plugins.object[ab].getDisplayElement)){if(j.plugins.config[ab].currentPosition!=a.html5.view.positions.NONE){var V=ac(ab,G--);if(!V){aa.push(ab);}else{var W=V.width;var ad=V.height;if(Z){delete V.width;delete V.height;}b(j.plugins.object[ab].getDisplayElement(),V);j.plugins.object[ab].resize(W,ad);}}else{b(j.plugins.object[ab].getDisplayElement(),{display:"none"});}}}return aa;}function J(W,X){if(d.exists(j.plugins.object[W].getDisplayElement)){if(j.plugins.config[W].position&&U(j.plugins.config[W].position)){if(!d.exists(j.plugins.object[W].getDisplayElement().parentNode)){S.appendChild(j.plugins.object[W].getDisplayElement());}var V=A(W);V.zIndex=X;return V;}}return false;}function r(V,W){if(!d.exists(j.plugins.object[V].getDisplayElement().parentNode)){o.appendChild(j.plugins.object[V].getDisplayElement());}return{position:"absolute",width:(d.getElementWidth(o)-d.parseDimension(o.style.right)),height:(d.getElementHeight(o)-d.parseDimension(o.style.bottom)),zIndex:W};}function e(V,W){return{position:"fixed",width:j.width,height:j.height,zIndex:W};}var l=this.resizeMedia=function(){o.style.position="absolute";var X=j.getMedia()?j.getMedia().getDisplayElement():v;if(!X){return;}if(X&&X.tagName.toLowerCase()=="video"){if(!X.videoWidth||!X.videoHeight){X.style.width=o.style.width;X.style.height=o.style.height;return;}X.style.position="absolute";d.fadeTo(X,1,0.25);if(X.parentNode){X.parentNode.style.left=o.style.left;X.parentNode.style.top=o.style.top;}if(j.fullscreen&&m.jwGetStretching()==a.utils.stretching.EXACTFIT&&!d.isMobile()){var V=document.createElement("div");d.stretch(a.utils.stretching.UNIFORM,V,d.getElementWidth(o),d.getElementHeight(o),B,O);d.stretch(a.utils.stretching.EXACTFIT,X,d.parseDimension(V.style.width),d.parseDimension(V.style.height),X.videoWidth?X.videoWidth:400,X.videoHeight?X.videoHeight:300);b(X,{left:V.style.left,top:V.style.top});}else{if(!c){d.stretch(m.jwGetStretching(),X,d.getElementWidth(o),d.getElementHeight(o),X.videoWidth?X.videoWidth:400,X.videoHeight?X.videoHeight:300);}}}else{var W=j.plugins.object.display.getDisplayElement();if(W){j.getMedia().resize(d.parseDimension(W.style.width),d.parseDimension(W.style.height));}else{j.getMedia().resize(d.parseDimension(o.style.width),d.parseDimension(o.style.height));}}};var A=this.getComponentPosition=function(W){var X={position:"absolute",margin:0,padding:0,top:null};var V=j.plugins.config[W].currentPosition.toLowerCase();switch(V.toUpperCase()){case a.html5.view.positions.TOP:X.top=d.parseDimension(o.style.top);X.left=d.parseDimension(o.style.left);X.width=d.getElementWidth(o)-d.parseDimension(o.style.left)-d.parseDimension(o.style.right);X.height=j.plugins.object[W].height;o.style[V]=d.parseDimension(o.style[V])+j.plugins.object[W].height+"px";o.style.height=d.getElementHeight(o)-X.height+"px";break;case a.html5.view.positions.RIGHT:X.top=d.parseDimension(o.style.top);X.right=d.parseDimension(o.style.right);X.width=j.plugins.object[W].width;X.height=d.getElementHeight(o)-d.parseDimension(o.style.top)-d.parseDimension(o.style.bottom);o.style.width=d.getElementWidth(o)-X.width+"px";break;case a.html5.view.positions.BOTTOM:X.left=d.parseDimension(o.style.left);X.width=d.getElementWidth(o)-d.parseDimension(o.style.left)-d.parseDimension(o.style.right);X.height=j.plugins.object[W].height;X.bottom=d.parseDimension(o.style.bottom+s);s+=X.height;o.style.height=d.getElementHeight(o)-X.height+"px";break;case a.html5.view.positions.LEFT:X.top=d.parseDimension(o.style.top);X.left=d.parseDimension(o.style.left);X.width=j.plugins.object[W].width;X.height=d.getElementHeight(o)-d.parseDimension(o.style.top)-d.parseDimension(o.style.bottom);o.style[V]=d.parseDimension(o.style[V])+j.plugins.object[W].width+"px";o.style.width=d.getElementWidth(o)-X.width+"px";break;default:break;}return X;};this.resize=H;var K,k,R;var D=this.fullscreen=function(X){if(c){return;}var Z;try{Z=j.getMedia().getDisplayElement();}catch(Y){}if(X){k=j.width;R=j.height;}var ab={position:"fixed",width:"100%",height:"100%",top:0,left:0,zIndex:2147483000},aa={position:"relative",height:k,width:R,zIndex:0};if(C()&&Z&&Z.webkitSupportsFullscreen){if(X&&!Z.webkitDisplayingFullscreen){try{b(Z,ab);d.transform(Z);K=o.style.display;o.style.display="none";Z.webkitEnterFullscreen();}catch(W){}}else{if(!X){b(Z,aa);l();if(Z.webkitDisplayingFullscreen){try{Z.webkitExitFullscreen();}catch(W){}}o.style.display=K;}}F=false;}else{if(X){document.onkeydown=N;clearInterval(Q);var V=d.getBoundingClientRect(document.body);j.width=Math.abs(V.left)+Math.abs(V.right);j.height=window.innerHeight;b(S,ab);ab.zIndex=1;if(j.getMedia()&&j.getMedia().getDisplayElement()){b(j.getMedia().getDisplayElement(),ab);}ab.zIndex=2;b(o,ab);F=true;}else{document.onkeydown="";j.width=g;j.height=u;b(S,aa);F=false;}H(j.width,j.height);}};function U(V){return([a.html5.view.positions.TOP,a.html5.view.positions.RIGHT,a.html5.view.positions.BOTTOM,a.html5.view.positions.LEFT].toString().indexOf(V.toUpperCase())>-1);}function C(){if(m.jwGetState()!=a.api.events.state.IDLE&&!F&&(j.getMedia()&&j.getMedia().getDisplayElement()&&j.getMedia().getDisplayElement().webkitSupportsFullscreen)&&d.useNativeFullscreen()){return true;}return false;}this.setupInstream=function(V,W){d.css(_instreamArea,{display:"block",position:"absolute"});o.style.display="none";_instreamArea.appendChild(V);v=W;T=true;};var E=this.destroyInstream=function(){_instreamArea.style.display="none";_instreamArea.innerHTML="";o.style.display="block";v=null;T=false;H(j.width,j.height);};};a.html5.view.positions={TOP:"TOP",RIGHT:"RIGHT",BOTTOM:"BOTTOM",LEFT:"LEFT",OVER:"OVER",NONE:"NONE"};})(jwplayer);(function(a){var b={backgroundcolor:"",margin:10,font:"Arial,sans-serif",fontsize:10,fontcolor:parseInt("000000",16),fontstyle:"normal",fontweight:"bold",buttoncolor:parseInt("ffffff",16),position:a.html5.view.positions.BOTTOM,idlehide:false,hideplaylistcontrols:false,forcenextprev:false,layout:{left:{position:"left",elements:[{name:"play",type:"button"},{name:"divider",type:"divider"},{name:"prev",type:"button"},{name:"divider",type:"divider"},{name:"next",type:"button"},{name:"divider",type:"divider"},{name:"elapsed",type:"text"}]},center:{position:"center",elements:[{name:"time",type:"slider"}]},right:{position:"right",elements:[{name:"duration",type:"text"},{name:"blank",type:"button"},{name:"divider",type:"divider"},{name:"mute",type:"button"},{name:"volume",type:"slider"},{name:"divider",type:"divider"},{name:"fullscreen",type:"button"}]}}};_utils=a.utils;_css=_utils.css;_hide=function(c){_css(c,{display:"none"});};_show=function(c){_css(c,{display:"block"});};a.html5.controlbar=function(m,Z){window.controlbar=this;var l=m;var E=_utils.extend({},b,l.skin.getComponentSettings("controlbar"),Z);if(E.position==a.html5.view.positions.NONE||typeof a.html5.view.positions[E.position]=="undefined"){return;}if(_utils.mapLength(l.skin.getComponentLayout("controlbar"))>0){E.layout=l.skin.getComponentLayout("controlbar");}var ah;var S;var ag;var F;var x="none";var h;var k;var ai;var g;var f;var A;var T={};var r=false;var c={};var R=-1;var ad;var j=false;var q;var d;var W=false;var H=false;var I;var ab=new a.html5.eventdispatcher();_utils.extend(this,ab);function L(){if(!ad){ad=l.skin.getSkinElement("controlbar","background");if(!ad){ad={width:0,height:0,src:null};}}return ad;}function P(){ag=0;F=0;S=0;if(!r){var aq={height:L().height,backgroundColor:E.backgroundcolor};ah=document.createElement("div");ah.id=l.id+"_jwplayer_controlbar";_css(ah,aq);}var ap=(l.skin.getSkinElement("controlbar","capLeft"));var ao=(l.skin.getSkinElement("controlbar","capRight"));if(ap){z("capLeft","left",false,ah);}ae("background",ah,{position:"absolute",height:L().height,left:(ap?ap.width:0),zIndex:0},"img");if(L().src){T.background.src=L().src;}ae("elements",ah,{position:"relative",height:L().height,zIndex:1});if(ao){z("capRight","right",false,ah);}}this.getDisplayElement=function(){return ah;};this.resize=function(aq,ao){U();_utils.cancelAnimation(ah);f=aq;A=ao;if(H!=l.jwGetFullscreen()){H=l.jwGetFullscreen();if(!H){aa();}d=undefined;}var ap=y();K({id:l.id,duration:ai,position:k});w({id:l.id,bufferPercent:g});return ap;};this.show=function(){if(j){j=false;_show(ah);X();}};this.hide=function(){if(!j){j=true;_hide(ah);af();}};function s(){var ap=["timeSlider","volumeSlider","timeSliderRail","volumeSliderRail"];for(var aq in ap){var ao=ap[aq];if(typeof T[ao]!="undefined"){c[ao]=_utils.getBoundingClientRect(T[ao]);}}}var e;function aa(ao){if(j){return;}clearTimeout(q);if(E.position==a.html5.view.positions.OVER||l.jwGetFullscreen()){switch(l.jwGetState()){case a.api.events.state.PAUSED:case a.api.events.state.IDLE:if(ah&&ah.style.opacity<1&&(!E.idlehide||_utils.exists(ao))){e=false;setTimeout(function(){if(!e){Y();}},100);}if(E.idlehide){q=setTimeout(function(){B();},2000);}break;default:e=true;if(ao){Y();}q=setTimeout(function(){B();},2000);break;}}else{Y();}}function B(){if(!j){af();if(ah.style.opacity==1){_utils.cancelAnimation(ah);_utils.fadeTo(ah,0,0.1,1,0);}}}function Y(){if(!j){X();if(ah.style.opacity==0){_utils.cancelAnimation(ah);_utils.fadeTo(ah,1,0.1,0,0);}}}function J(ao){return function(){if(W&&d!=ao){d=ao;ab.sendEvent(ao,{component:"controlbar",boundingRect:Q()});}};}var X=J(a.api.events.JWPLAYER_COMPONENT_SHOW);var af=J(a.api.events.JWPLAYER_COMPONENT_HIDE);function Q(){if(E.position==a.html5.view.positions.OVER||l.jwGetFullscreen()){return _utils.getDimensions(ah);}else{return{x:0,y:0,width:0,height:0};}}function ae(at,ar,aq,ao){var ap;if(!r){if(!ao){ao="div";}ap=document.createElement(ao);T[at]=ap;ap.id=ah.id+"_"+at;ar.appendChild(ap);}else{ap=document.getElementById(ah.id+"_"+at);}if(_utils.exists(aq)){_css(ap,aq);}return ap;}function O(){if(l.jwGetHeight()<=40){E.layout=_utils.clone(E.layout);for(var ao=0;ao<E.layout.left.elements.length;ao++){if(E.layout.left.elements[ao].name=="fullscreen"){E.layout.left.elements.splice(ao,1);}}for(ao=0;ao<E.layout.right.elements.length;ao++){if(E.layout.right.elements[ao].name=="fullscreen"){E.layout.right.elements.splice(ao,1);}}o();}an(E.layout.left);an(E.layout.center);an(E.layout.right);}function an(ar,ao){var at=ar.position=="right"?"right":"left";var aq=_utils.extend([],ar.elements);if(_utils.exists(ao)){aq.reverse();}var ar=ae(ar.position+"Group",T.elements,{"float":"left",styleFloat:"left",cssFloat:"left",height:"100%"});for(var ap=0;ap<aq.length;ap++){D(aq[ap],at,ar);}}function M(){return S++;}function D(at,av,ax){var ar,ap,aq,ao,ay;if(!ax){ax=T.elements;}if(at.type=="divider"){z("divider"+M(),av,true,ax,undefined,at.width,at.element);return;}switch(at.name){case"play":z("playButton",av,false,ax);z("pauseButton",av,true,ax);V("playButton","jwPlay");V("pauseButton","jwPause");break;case"prev":z("prevButton",av,true,ax);V("prevButton","jwPlaylistPrev");break;case"stop":z("stopButton",av,true,ax);V("stopButton","jwStop");break;case"next":z("nextButton",av,true,ax);V("nextButton","jwPlaylistNext");break;case"elapsed":z("elapsedText",av,true,ax,null,null,l.skin.getSkinElement("controlbar","elapsedBackground"));break;case"time":ap=!_utils.exists(l.skin.getSkinElement("controlbar","timeSliderCapLeft"))?0:l.skin.getSkinElement("controlbar","timeSliderCapLeft").width;aq=!_utils.exists(l.skin.getSkinElement("controlbar","timeSliderCapRight"))?0:l.skin.getSkinElement("controlbar","timeSliderCapRight").width;ar=av=="left"?ap:aq;ay={height:L().height,position:"relative","float":"left",styleFloat:"left",cssFloat:"left"};var au=ae("timeSlider",ax,ay);z("timeSliderCapLeft",av,true,au,"relative");z("timeSliderRail",av,false,au,"relative");z("timeSliderBuffer",av,false,au,"absolute");z("timeSliderProgress",av,false,au,"absolute");z("timeSliderThumb",av,false,au,"absolute");z("timeSliderCapRight",av,true,au,"relative");ac("time");break;case"fullscreen":z("fullscreenButton",av,false,ax);z("normalscreenButton",av,true,ax);V("fullscreenButton","jwSetFullscreen",true);V("normalscreenButton","jwSetFullscreen",false);break;case"volume":ap=!_utils.exists(l.skin.getSkinElement("controlbar","volumeSliderCapLeft"))?0:l.skin.getSkinElement("controlbar","volumeSliderCapLeft").width;aq=!_utils.exists(l.skin.getSkinElement("controlbar","volumeSliderCapRight"))?0:l.skin.getSkinElement("controlbar","volumeSliderCapRight").width;ar=av=="left"?ap:aq;ao=l.skin.getSkinElement("controlbar","volumeSliderRail").width+ap+aq;ay={height:L().height,position:"relative",width:ao,"float":"left",styleFloat:"left",cssFloat:"left"};var aw=ae("volumeSlider",ax,ay);z("volumeSliderCapLeft",av,false,aw,"relative");z("volumeSliderRail",av,false,aw,"relative");z("volumeSliderProgress",av,false,aw,"absolute");z("volumeSliderThumb",av,false,aw,"absolute");z("volumeSliderCapRight",av,false,aw,"relative");ac("volume");break;case"mute":z("muteButton",av,false,ax);z("unmuteButton",av,true,ax);V("muteButton","jwSetMute",true);V("unmuteButton","jwSetMute",false);break;case"duration":z("durationText",av,true,ax,null,null,l.skin.getSkinElement("controlbar","durationBackground"));break;}}function z(ar,av,ap,ay,at,ao,aq){if(_utils.exists(l.skin.getSkinElement("controlbar",ar))||ar.indexOf("Text")>0||ar.indexOf("divider")===0){var au={height:"100%",position:at?at:"relative",display:"block","float":"left",styleFloat:"left",cssFloat:"left"};if((ar.indexOf("next")===0||ar.indexOf("prev")===0)&&(l.jwGetPlaylist().length<2||E.hideplaylistcontrols.toString()=="true")){if(E.forcenextprev.toString()!="true"){ap=false;au.display="none";}}var az;if(ar.indexOf("Text")>0){ar.innerhtml="00:00";au.font=E.fontsize+"px/"+(L().height+1)+"px "+E.font;au.color=E.fontcolor;au.textAlign="center";au.fontWeight=E.fontweight;au.fontStyle=E.fontstyle;au.cursor="default";if(aq){au.background="url("+aq.src+") no-repeat center";au.backgroundSize="100% "+L().height+"px";}au.padding="0 5px";}else{if(ar.indexOf("divider")===0){if(ao){if(!isNaN(parseInt(ao))){az=parseInt(ao);}}else{if(aq){var aw=l.skin.getSkinElement("controlbar",aq);if(aw){au.background="url("+aw.src+") repeat-x center left";az=aw.width;}}else{au.background="url("+l.skin.getSkinElement("controlbar","divider").src+") repeat-x center left";az=l.skin.getSkinElement("controlbar","divider").width;}}}else{au.background="url("+l.skin.getSkinElement("controlbar",ar).src+") repeat-x center left";az=l.skin.getSkinElement("controlbar",ar).width;}}if(av=="left"){if(ap){ag+=az;}}else{if(av=="right"){if(ap){F+=az;}}}if(_utils.typeOf(ay)=="undefined"){ay=T.elements;}au.width=az;if(r){_css(T[ar],au);}else{var ax=ae(ar,ay,au);if(_utils.exists(l.skin.getSkinElement("controlbar",ar+"Over"))){ax.onmouseover=function(aA){ax.style.backgroundImage=["url(",l.skin.getSkinElement("controlbar",ar+"Over").src,")"].join("");};ax.onmouseout=function(aA){ax.style.backgroundImage=["url(",l.skin.getSkinElement("controlbar",ar).src,")"].join("");};}if(ar.indexOf("divider")==0){ax.setAttribute("class","divider");}ax.innerHTML="&nbsp;";}}}function G(){l.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,C);l.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_ITEM,u);l.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_BUFFER,w);l.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,t);l.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_TIME,K);l.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_MUTE,am);l.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_VOLUME,n);l.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_COMPLETE,N);}function C(){if(!E.hideplaylistcontrols){if(l.jwGetPlaylist().length>1||E.forcenextprev.toString()=="true"){_show(T.nextButton);_show(T.prevButton);}else{_hide(T.nextButton);_hide(T.prevButton);}y();aj();}}function u(ao){ai=l.jwGetPlaylist()[ao.index].duration;R=-1;K({id:l.id,duration:ai,position:0});w({id:l.id,bufferProgress:0});}function aj(){K({id:l.id,duration:l.jwGetDuration(),position:0});w({id:l.id,bufferProgress:0});am({id:l.id,mute:l.jwGetMute()});t({id:l.id,newstate:a.api.events.state.IDLE});n({id:l.id,volume:l.jwGetVolume()});}function V(aq,ar,ap){if(r){return;}if(_utils.exists(l.skin.getSkinElement("controlbar",aq))){var ao=T[aq];if(_utils.exists(ao)){_css(ao,{cursor:"pointer"});if(ar=="fullscreen"){ao.onmouseup=function(at){at.stopPropagation();l.jwSetFullscreen(!l.jwGetFullscreen());};}else{ao.onmouseup=function(at){at.stopPropagation();if(_utils.exists(ap)){l[ar](ap);}else{l[ar]();}};}}}}function ac(ao){if(r){return;}var ap=T[ao+"Slider"];_css(T.elements,{cursor:"pointer"});_css(ap,{cursor:"pointer"});ap.onmousedown=function(aq){x=ao;};ap.onmouseup=function(aq){aq.stopPropagation();al(aq.pageX);};ap.onmousemove=function(aq){if(x=="time"){h=true;var ar=aq.pageX-c[ao+"Slider"].left-window.pageXOffset;_css(T[x+"SliderThumb"],{left:ar});}};}function al(ap){h=false;var ao;if(x=="time"){ao=ap-c.timeSliderRail.left+window.pageXOffset;var ar=ao/c.timeSliderRail.width*ai;if(ar<0){ar=0;}else{if(ar>ai){ar=ai-3;}}if(l.jwGetState()==a.api.events.state.PAUSED||l.jwGetState()==a.api.events.state.IDLE){l.jwPlay();}l.jwSeek(ar);}else{if(x=="volume"){ao=ap-c.volumeSliderRail.left-window.pageXOffset;var aq=Math.round(ao/c.volumeSliderRail.width*100);if(aq<10){aq=0;}else{if(aq>100){aq=100;}}if(l.jwGetMute()){l.jwSetMute(false);}l.jwSetVolume(aq);}}x="none";}function w(ap){if(_utils.exists(ap.bufferPercent)){g=ap.bufferPercent;}if(c.timeSliderRail){var ar=l.skin.getSkinElement("controlbar","timeSliderCapLeft");var aq=c.timeSliderRail.width;var ao=isNaN(Math.round(aq*g/100))?0:Math.round(aq*g/100);_css(T.timeSliderBuffer,{width:ao,left:ar?ar.width:0});}}function am(ao){if(ao.mute){_hide(T.muteButton);_show(T.unmuteButton);_hide(T.volumeSliderProgress);}else{_show(T.muteButton);_hide(T.unmuteButton);_show(T.volumeSliderProgress);}}function t(ao){if(ao.newstate==a.api.events.state.BUFFERING||ao.newstate==a.api.events.state.PLAYING){_show(T.pauseButton);_hide(T.playButton);}else{_hide(T.pauseButton);_show(T.playButton);}aa();if(ao.newstate==a.api.events.state.IDLE){_hide(T.timeSliderBuffer);_hide(T.timeSliderProgress);_hide(T.timeSliderThumb);K({id:l.id,duration:l.jwGetDuration(),position:0});}else{_show(T.timeSliderBuffer);if(ao.newstate!=a.api.events.state.BUFFERING){_show(T.timeSliderProgress);_show(T.timeSliderThumb);}}}function N(ao){w({bufferPercent:0});K(_utils.extend(ao,{position:0,duration:ai}));}function K(au){if(_utils.exists(au.position)){k=au.position;}var ap=false;if(_utils.exists(au.duration)&&au.duration!=ai){ai=au.duration;ap=true;}var ar=(k===ai===0)?0:k/ai;var aw=c.timeSliderRail;if(aw){var aq=isNaN(Math.round(aw.width*ar))?0:Math.round(aw.width*ar);var av=l.skin.getSkinElement("controlbar","timeSliderCapLeft");var at=aq+(av?av.width:0);if(T.timeSliderProgress){_css(T.timeSliderProgress,{width:aq,left:av?av.width:0});if(!h){if(T.timeSliderThumb){T.timeSliderThumb.style.left=at+"px";}}}}if(T.durationText){T.durationText.innerHTML=_utils.timeFormat(ai);}if(T.elapsedText){var ao=_utils.timeFormat(k);T.elapsedText.innerHTML=ao;if(R!=ao.length){ap=true;R=ao.length;}}if(ap){y();}}function o(){var ao=T.elements.childNodes;var au,ar;for(var aq=0;aq<ao.length;aq++){var at=ao[aq].childNodes;for(var ap in at){if(isNaN(parseInt(ap,10))){continue;}if(at[ap].id.indexOf(ah.id+"_divider")===0&&ar&&ar.id.indexOf(ah.id+"_divider")===0&&at[ap].style.backgroundImage==ar.style.backgroundImage){at[ap].style.display="none";}else{if(at[ap].id.indexOf(ah.id+"_divider")===0&&au&&au.style.display!="none"){at[ap].style.display="block";}}if(at[ap].style.display!="none"){ar=at[ap];}au=at[ap];}}}function ak(){if(l.jwGetFullscreen()){_show(T.normalscreenButton);_hide(T.fullscreenButton);}else{_hide(T.normalscreenButton);_show(T.fullscreenButton);}if(l.jwGetState()==a.api.events.state.BUFFERING||l.jwGetState()==a.api.events.state.PLAYING){_show(T.pauseButton);_hide(T.playButton);}else{_hide(T.pauseButton);_show(T.playButton);}if(l.jwGetMute()==true){_hide(T.muteButton);_show(T.unmuteButton);_hide(T.volumeSliderProgress);}else{_show(T.muteButton);_hide(T.unmuteButton);_show(T.volumeSliderProgress);}}function y(){o();ak();var aq={width:f};var ay={"float":"left",styleFloat:"left",cssFloat:"left"};if(E.position==a.html5.view.positions.OVER||l.jwGetFullscreen()){aq.left=E.margin;aq.width-=2*E.margin;aq.top=A-L().height-E.margin;aq.height=L().height;}var at=l.skin.getSkinElement("controlbar","capLeft");var aw=l.skin.getSkinElement("controlbar","capRight");ay.width=aq.width-(at?at.width:0)-(aw?aw.width:0);var ar=_utils.getBoundingClientRect(T.leftGroup).width;var av=_utils.getBoundingClientRect(T.rightGroup).width;var au=ay.width-ar-av-1;var ap=au;var ao=l.skin.getSkinElement("controlbar","timeSliderCapLeft");var ax=l.skin.getSkinElement("controlbar","timeSliderCapRight");if(_utils.exists(ao)){ap-=ao.width;}if(_utils.exists(ax)){ap-=ax.width;}T.timeSlider.style.width=au+"px";T.timeSliderRail.style.width=ap+"px";_css(ah,aq);_css(T.elements,ay);_css(T.background,ay);s();return aq;}function n(au){if(_utils.exists(T.volumeSliderRail)){var aq=isNaN(au.volume/100)?1:au.volume/100;var ar=_utils.parseDimension(T.volumeSliderRail.style.width);var ao=isNaN(Math.round(ar*aq))?0:Math.round(ar*aq);var av=_utils.parseDimension(T.volumeSliderRail.style.right);var ap=(!_utils.exists(l.skin.getSkinElement("controlbar","volumeSliderCapLeft")))?0:l.skin.getSkinElement("controlbar","volumeSliderCapLeft").width;_css(T.volumeSliderProgress,{width:ao,left:ap});if(T.volumeSliderThumb){var at=(ao-Math.round(_utils.parseDimension(T.volumeSliderThumb.style.width)/2));at=Math.min(Math.max(at,0),ar-_utils.parseDimension(T.volumeSliderThumb.style.width));_css(T.volumeSliderThumb,{left:at});}if(_utils.exists(T.volumeSliderCapLeft)){_css(T.volumeSliderCapLeft,{left:0});}}}function U(){try{var ap=(l.id.indexOf("_instream")>0?l.id.replace("_instream",""):l.id);I=document.getElementById(ap);I.addEventListener("mousemove",aa);}catch(ao){_utils.log("Could not add mouse listeners to controlbar: "+ao);}}function v(){P();O();s();r=true;G();E.idlehide=(E.idlehide.toString().toLowerCase()=="true");if(E.position==a.html5.view.positions.OVER&&E.idlehide){ah.style.opacity=0;W=true;}else{ah.style.opacity=1;setTimeout((function(){W=true;X();}),1);}U();aj();}v();return this;};})(jwplayer);(function(b){var a=["width","height","state","playlist","item","position","buffer","duration","volume","mute","fullscreen"];var c=b.utils;b.html5.controller=function(o,L,f,h){var n=o,m=f,j=h,z=L,N=true,H=-1,B=false,d=false,Q,D=[],r=false;var E=(c.exists(m.config.debug)&&(m.config.debug.toString().toLowerCase()=="console")),O=new b.html5.eventdispatcher(z.id,E);c.extend(this,O);function M(U){if(r){O.sendEvent(U.type,U);}else{D.push(U);}}function t(U){if(!r){r=true;O.sendEvent(b.api.events.JWPLAYER_READY,U);if(b.utils.exists(window.playerReady)){playerReady(U);}if(b.utils.exists(window[f.config.playerReady])){window[f.config.playerReady](U);}while(D.length>0){var W=D.shift();O.sendEvent(W.type,W);}if(f.config.autostart&&!b.utils.isIOS()){P();}while(y.length>0){var V=y.shift();C(V.method,V.arguments);}}}m.addGlobalListener(M);m.addEventListener(b.api.events.JWPLAYER_MEDIA_BUFFER_FULL,function(){m.getMedia().play();});m.addEventListener(b.api.events.JWPLAYER_MEDIA_TIME,function(U){if(U.position>=m.playlist[m.item].start&&H>=0){m.playlist[m.item].start=H;H=-1;}});m.addEventListener(b.api.events.JWPLAYER_MEDIA_COMPLETE,function(U){setTimeout(F,25);});m.addEventListener(b.api.events.JWPLAYER_PLAYLIST_LOADED,P);m.addEventListener(b.api.events.JWPLAYER_FULLSCREEN,q);function G(){try{Q=G;if(!B){B=true;O.sendEvent(b.api.events.JWPLAYER_MEDIA_BEFOREPLAY);B=false;if(d){d=false;Q=null;return;}}w(m.item);if(m.playlist[m.item].levels[0].file.length>0){if(N||m.state==b.api.events.state.IDLE){m.getMedia().load(m.playlist[m.item]);N=false;}else{if(m.state==b.api.events.state.PAUSED){m.getMedia().play();}}}return true;}catch(U){O.sendEvent(b.api.events.JWPLAYER_ERROR,U);Q=null;}return false;}function e(){try{if(m.playlist[m.item].levels[0].file.length>0){switch(m.state){case b.api.events.state.PLAYING:case b.api.events.state.BUFFERING:if(m.getMedia()){m.getMedia().pause();}break;default:if(B){d=true;}}}return true;}catch(U){O.sendEvent(b.api.events.JWPLAYER_ERROR,U);}return false;}function A(U){try{if(m.playlist[m.item].levels[0].file.length>0){if(typeof U!="number"){U=parseFloat(U);}switch(m.state){case b.api.events.state.IDLE:if(H<0){H=m.playlist[m.item].start;m.playlist[m.item].start=U;}if(!B){G();}break;case b.api.events.state.PLAYING:case b.api.events.state.PAUSED:case b.api.events.state.BUFFERING:m.seek(U);break;}}return true;}catch(V){O.sendEvent(b.api.events.JWPLAYER_ERROR,V);}return false;}function x(U){Q=null;if(!c.exists(U)){U=true;}try{if((m.state!=b.api.events.state.IDLE||U)&&m.getMedia()){m.getMedia().stop(U);}if(B){d=true;}return true;}catch(V){O.sendEvent(b.api.events.JWPLAYER_ERROR,V);}return false;}function k(){try{if(m.playlist[m.item].levels[0].file.length>0){if(m.config.shuffle){w(T());}else{if(m.item+1==m.playlist.length){w(0);}else{w(m.item+1);}}}if(m.state!=b.api.events.state.IDLE){var V=m.state;m.state=b.api.events.state.IDLE;O.sendEvent(b.api.events.JWPLAYER_PLAYER_STATE,{oldstate:V,newstate:b.api.events.state.IDLE});}G();return true;}catch(U){O.sendEvent(b.api.events.JWPLAYER_ERROR,U);}return false;}function J(){try{if(m.playlist[m.item].levels[0].file.length>0){if(m.config.shuffle){w(T());}else{if(m.item===0){w(m.playlist.length-1);}else{w(m.item-1);}}}if(m.state!=b.api.events.state.IDLE){var V=m.state;m.state=b.api.events.state.IDLE;O.sendEvent(b.api.events.JWPLAYER_PLAYER_STATE,{oldstate:V,newstate:b.api.events.state.IDLE});}G();return true;}catch(U){O.sendEvent(b.api.events.JWPLAYER_ERROR,U);}return false;}function T(){var U=null;if(m.playlist.length>1){while(!c.exists(U)){U=Math.floor(Math.random()*m.playlist.length);if(U==m.item){U=null;}}}else{U=0;}return U;}function I(V){if(!m.playlist||!m.playlist[V]){return false;}try{if(m.playlist[V].levels[0].file.length>0){var W=m.state;if(W!==b.api.events.state.IDLE){if(m.playlist[m.item]&&m.playlist[m.item].provider==m.playlist[V].provider){x(false);}else{x();}}w(V);G();}return true;}catch(U){O.sendEvent(b.api.events.JWPLAYER_ERROR,U);}return false;}function w(U){if(!m.playlist[U]){return;}m.setActiveMediaProvider(m.playlist[U]);if(m.item!=U){m.item=U;N=true;O.sendEvent(b.api.events.JWPLAYER_PLAYLIST_ITEM,{index:U});}}function g(V){try{w(m.item);var W=m.getMedia();switch(typeof(V)){case"number":W.volume(V);break;case"string":W.volume(parseInt(V,10));break;}m.setVolume(V);return true;}catch(U){O.sendEvent(b.api.events.JWPLAYER_ERROR,U);}return false;}function s(V){try{w(m.item);var W=m.getMedia();if(typeof V=="undefined"){W.mute(!m.mute);m.setMute(!m.mute);}else{if(V.toString().toLowerCase()=="true"){W.mute(true);m.setMute(true);}else{W.mute(false);m.setMute(false);}}return true;}catch(U){O.sendEvent(b.api.events.JWPLAYER_ERROR,U);}return false;}function K(V,U){try{m.width=V;m.height=U;j.resize(V,U);O.sendEvent(b.api.events.JWPLAYER_RESIZE,{width:m.width,height:m.height});return true;}catch(W){O.sendEvent(b.api.events.JWPLAYER_ERROR,W);}return false;}function v(V,W){try{if(typeof V=="undefined"){V=!m.fullscreen;}if(typeof W=="undefined"){W=true;}if(V!=m.fullscreen){m.fullscreen=(V.toString().toLowerCase()=="true");j.fullscreen(m.fullscreen);if(W){O.sendEvent(b.api.events.JWPLAYER_FULLSCREEN,{fullscreen:m.fullscreen});}O.sendEvent(b.api.events.JWPLAYER_RESIZE,{width:m.width,height:m.height});}return true;}catch(U){O.sendEvent(b.api.events.JWPLAYER_ERROR,U);}return false;}function S(U){try{x();if(B){d=false;}m.loadPlaylist(U);if(m.playlist[m.item].provider){w(m.item);if(m.config.autostart.toString().toLowerCase()=="true"&&!c.isIOS()&&!B){G();}return true;}else{return false;}}catch(V){O.sendEvent(b.api.events.JWPLAYER_ERROR,V);}return false;}function P(U){if(!c.isIOS()){w(m.item);if(m.config.autostart.toString().toLowerCase()=="true"&&!c.isIOS()){G();}}}function q(U){v(U.fullscreen,false);}function u(){try{return m.getMedia().detachMedia();}catch(U){return null;}}function l(){try{var U=m.getMedia().attachMedia();if(typeof Q=="function"){Q();}}catch(V){return null;}}b.html5.controller.repeatoptions={LIST:"LIST",ALWAYS:"ALWAYS",SINGLE:"SINGLE",NONE:"NONE"};function F(){if(m.state!=b.api.events.state.IDLE){return;}Q=F;switch(m.config.repeat.toUpperCase()){case b.html5.controller.repeatoptions.SINGLE:G();break;case b.html5.controller.repeatoptions.ALWAYS:if(m.item==m.playlist.length-1&&!m.config.shuffle){I(0);}else{k();}break;case b.html5.controller.repeatoptions.LIST:if(m.item==m.playlist.length-1&&!m.config.shuffle){x();w(0);}else{k();}break;default:x();break;}}var y=[];function R(U){return function(){if(r){C(U,arguments);}else{y.push({method:U,arguments:arguments});}};}function C(W,V){var U=[];for(i=0;i<V.length;i++){U.push(V[i]);}W.apply(this,U);}this.play=R(G);this.pause=R(e);this.seek=R(A);this.stop=R(x);this.next=R(k);this.prev=R(J);this.item=R(I);this.setVolume=R(g);this.setMute=R(s);this.resize=R(K);this.setFullscreen=R(v);this.load=R(S);this.playerReady=t;this.detachMedia=u;this.attachMedia=l;this.beforePlay=function(){return B;};this.destroy=function(){if(m.getMedia()){m.getMedia().destroy();}};};})(jwplayer);(function(a){a.html5.defaultSkin=function(){this.text='<?xml version="1.0" ?><skin author="LongTail Video" name="Five" version="1.1"><components><component name="controlbar"><settings><setting name="margin" value="20"/><setting name="fontsize" value="11"/><setting name="fontcolor" value="0x000000"/></settings><layout><group position="left"><button name="play"/><divider name="divider"/><button name="prev"/><divider name="divider"/><button name="next"/><divider name="divider"/><text name="elapsed"/></group><group position="center"><slider name="time"/></group><group position="right"><text name="duration"/><divider name="divider"/><button name="blank"/><divider name="divider"/><button name="mute"/><slider name="volume"/><divider name="divider"/><button name="fullscreen"/></group></layout><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAIAAABvFaqvAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAElJREFUOI3t1LERACAMQlFgGvcfxNIhHMK4gsUvUviOmgtNsiAZkBSEKxKEnCYkkQrJn/YwbUNiSDDYRZaQRDaShv+oX9GBZEIuK+8hXVLs+/YAAAAASUVORK5CYII="/><element name="blankButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAYCAYAAAAyJzegAAAAFElEQVQYV2P8//8/AzpgHBUc7oIAGZdH0RjKN8EAAAAASUVORK5CYII="/><element name="capLeft" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAQElEQVQIWz3LsRGAMADDQJ0XB5bMINABZ9GENGrszxhjT2WLSqxEJG2JQrTMdV2q5LpOAvyRaVmsi7WdeZ/7+AAaOTq7BVrfOQAAAABJRU5ErkJggg=="/><element name="capRight" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAQElEQVQIWz3LsRGAMADDQJ0XB5bMINABZ9GENGrszxhjT2WLSqxEJG2JQrTMdV2q5LpOAvyRaVmsi7WdeZ/7+AAaOTq7BVrfOQAAAABJRU5ErkJggg=="/><element name="divider" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAIAAAC0rgCNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADhJREFUCB0FwcENgEAAw7Aq+893g8APUILNOQcbFRktVGqUVFRkWNz3xTa2sUaLNUosKlRUvvf5AdbWOTtzmzyWAAAAAElFTkSuQmCC"/><element name="playButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAANUlEQVR42u2RsQkAAAjD/NTTPaW6dXLrINJA1kBpGPMAjDWmOgp1HFQXx+b1KOefO4oxY57R73YnVYCQUCQAAAAASUVORK5CYII="/><element name="pauseButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAIUlEQVQ4jWNgGAWjYOiD/0gYG3/U0FFDB4Oho2AUDAYAAEwiL9HrpdMVAAAAAElFTkSuQmCC"/><element name="prevButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAQklEQVQ4y2NgGAWjYOiD/1AMA/JAfB5NjCJD/YH4PRaLyDa0H4lNNUP/DxlD59PCUBCIp3ZEwYA+NZLUKBgFgwEAAN+HLX9sB8u8AAAAAElFTkSuQmCC"/><element name="nextButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAQElEQVQ4y2NgGAWjYOiD/0B8Hojl0cT+U2ooCL8HYn9qGwrD/bQw9P+QMXQ+tSMqnpoRBUpS+tRMUqNgFAwGAADxZy1/mHvFnAAAAABJRU5ErkJggg=="/><element name="timeSliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAOElEQVRIDe3BwQkAIRADwAhhw/nU/kWwUK+KPITMABFh19Y+F0acY8CJvX9wYpXgRElwolSIiMf9ZWEDhtwurFsAAAAASUVORK5CYII="/><element name="timeSliderBuffer" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAN0lEQVRIDe3BwQkAMQwDMBcc55mRe9zi7RR+FCwBEWG39vcfGHFm4MTuhhMlwYlVBSdKhYh43AW/LQMKm1spzwAAAABJRU5ErkJggg=="/><element name="timeSliderProgress" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAIElEQVRIiWNgGAWjYBTQBfynMR61YCRYMApGwSigMQAAiVWPcbq6UkIAAAAASUVORK5CYII="/><element name="timeSliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAYCAYAAAA/OUfnAAAAO0lEQVQYlWP4//8/Awwz0JgDBP/BeN6Cxf/hnI2btiI4u/fsQ3AOHjqK4Jw4eQbBOX/hEoKDYjSd/AMA4cS4mfLsorgAAAAASUVORK5CYII="/><element name="muteButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAJklEQVQ4y2NgGAUjDcwH4v/kaPxPikZkxcNVI9mBQ5XoGAWDFwAAsKAXKQQmfbUAAAAASUVORK5CYII="/><element name="unmuteButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAMklEQVQ4y2NgGAWDHPyntub5xBr6Hwv/Pzk2/yfVG/8psRFE25Oq8T+tQnsIaB4FVAcAi2YVysVY52AAAAAASUVORK5CYII="/><element name="volumeSliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYAgMAAACdGdVrAAAACVBMVEUAAACmpqampqbBXAu8AAAAAnRSTlMAgJsrThgAAAArSURBVAhbY2AgErBAyA4I2QEhOyBkB4TsYOhAoaCCUCUwDTDtMMNgRuMHAFB5FoGH5T0UAAAAAElFTkSuQmCC"/><element name="volumeSliderProgress" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYAgMAAACdGdVrAAAACVBMVEUAAAAAAAAAAACDY+nAAAAAAnRSTlMAgJsrThgAAAArSURBVAhbY2AgErBAyA4I2QEhOyBkB4TsYOhAoaCCUCUwDTDtMMNgRuMHAFB5FoGH5T0UAAAAAElFTkSuQmCC"/><element name="volumeSliderCapRight" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAYCAYAAAAyJzegAAAAFElEQVQYV2P8//8/AzpgHBUc7oIAGZdH0RjKN8EAAAAASUVORK5CYII="/><element name="fullscreenButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAQklEQVRIiWNgGAWjYMiD/0iYFDmSLbDHImdPLQtgBpEiR7Zl2NijAA5oEkT/0Whi5UiyAJ8BVMsHNMtoo2AUDAIAAGdcIN3IDNXoAAAAAElFTkSuQmCC"/><element name="normalscreenButton" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAP0lEQVRIx2NgGAWjYMiD/1RSQ5QB/wmIUWzJfzx8qhj+n4DYCAY0DyJ7PBbYU8sHMEvwiZFtODXUjIJRMJgBACpWIN2ZxdPTAAAAAElFTkSuQmCC"/></elements></component><component name="display"><elements><element name="background" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyAQMAAAAk8RryAAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlOZpuml+rYAAAASSURBVBhXY2AYJuA/GBwY6jQAyDyoK8QcL4QAAAAASUVORK5CYII="/><element name="playIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiUlEQVR42u3XSw2AMBREURwgAQlIQAISKgUpSEFKJeCg5b0E0kWBTVcD9ySTsL0Jn9IBAAAA+K2UUrBlW/Rr5ZDoIeeuoFkxJD9ss03aIXXQqB9SttoG7ZA6qNcOKdttiwcJh9RB+iFl4SshkRBuLR72+9cvH0SOKI2HRo7x/Fi1/uoCAAAAwLsD8ki99IlO2dQAAAAASUVORK5CYII="/><element name="muteIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAVUlEQVR42u3WMQrAIAxAUW/g/SdvGmvpoOBeSHgPsjj5QTANAACARCJilIhYM0tEvJM+Ik3Id9E957kQIb+F3OdCPC0hPkQriqWx9hp/x/QGAABQyAPLB22VGrpLDgAAAABJRU5ErkJggg=="/><element name="errorIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAA/0lEQVR42u2U0QmEMBAF7cASLMESUoIlpARLSCkpwRJSgiWkhOvAXD4WsgRkyaG5DbyB+Yvg8KITAAAAAAAYk+u61mwk15EjPtlEfihmqIiZR1Qx80ghjgdUuiHXGHSVsoag0x6x8DUoyjD5KovmEJ9NTDMRPIT0mtdIUkjlonuNohO+Ha99DTmkuGgKCTcvebAzx82ZoCWC3/3aIMWSRucaxcjORSFY4xpFdjYJGp1rFGcyCYZ/RVh6AUnfcNZ2zih3/mGj1jVCdiNDwyrq1rA/xMdeEXvDVdnYc1vDc3uPkDObXrlaxbNHSOohQhr/WOeLEWfWTgAAAAAAADzNF9sHJ7PJ57MlAAAAAElFTkSuQmCC"/><element name="bufferIcon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAACBklEQVR42u3Zv0sCYRzH8USTzOsHHEWGkC1HgaDgkktGDjUYtDQ01RDSljQ1BLU02+rk1NTm2NLq4Nx/0L/h9fnCd3j4cnZe1/U8xiO8h3uurufF0/3COd/3/0UWYiEWYiEWYiGJQ+J8xuPxKhXjEMZANinjIZhkGuVRNioE4wVURo4JkHm0xKWmhRAc1bh1EyCUw5BcBIjHiApKa4CErko6DEJwuRo6IRKzyJD8FJAyI3Zp2zRImiBcRhlfo5RtlxCcE3CcDNpGrhYIT2IhAJKilO0VRmzJ32fAMTpBTS0QMfGwlcuKMRftE0DJ0wCJdcOsCkBdXP3Mh9CEFUBTPS9mDZJBG6io4aqVzMdCokCw9H3kT6j/C/9iDdSeUMNC7DkyyxAs/Rk6Qss8FPWRZgdVtUH4DjxEn1zxh+/zj1wHlf4MQhNGrwqA6sY40U8JonRJwEQh+AO3AvCG6gHv4U7IY4krxkroWoAOkoQMGfCBrgIm+YBGqPENpIJ66CJg3x66Y0gnSUidAEEnNr9jjLiWMn5DiWP0OC/oAsCgkq43xBdGDMQr7YASP/vEkHvdl1+JOCcEV5sC4hGEOzTlPuKgd0b0xD4JkRcOgnRRTjdErkYhAsQVq6IdUuPJtmk7BCL3t/h88cx91pKQkI/pkDx6pmYTIjEoxiHsN1YWYiEWYiEWknhflZ5IErA5nr8AAAAASUVORK5CYII="/></elements></component><component name="dock"><settings><setting name="fontcolor" value="0xffffff"/></settings><elements><element name="button" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyAQMAAAAk8RryAAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlOZpuml+rYAAAASSURBVBhXY2AYJuA/GBwY6jQAyDyoK8QcL4QAAAAASUVORK5CYII="/></elements></component><component name="playlist"><settings><setting name="backgroundcolor" value="0xe8e8e8"/></settings><elements><element name="item" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAIAAAC1nk4lAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHBJREFUaN7t2MENwCAMBEEe9N8wSKYC/D8YV7CyJoRkVtVImxkZPQInMxoP0XiIxkM0HsGbjjSNBx544IEHHnjggUe/6UQeey0PIh7XTftGxKPj4eXCtLsHHh+ZxkO0Iw8PR55Ni8ZD9Hu/EAoP0dc5RRg9qeRjVF8AAAAASUVORK5CYII="/><element name="sliderCapTop" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAHCAYAAADnCQYGAAAAFUlEQVQokWP8//8/A7UB46ihI9hQAKt6FPPXhVGHAAAAAElFTkSuQmCC"/><element name="sliderRail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAUCAYAAABiS3YzAAAAKElEQVQ4y2P4//8/Az68bNmy/+iYkB6GUUNHDR01dNTQUUNHDaXcUABUDOKhcxnsSwAAAABJRU5ErkJggg=="/><element name="sliderThumb" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAUCAYAAABiS3YzAAAAJUlEQVQ4T2P4//8/Ay4MBP9xYbz6Rg0dNXTU0FFDRw0dNZRyQwHH4NBa7GJsXAAAAABJRU5ErkJggg=="/><element name="sliderCapBottom" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAHCAYAAADnCQYGAAAAFUlEQVQokWP8//8/A7UB46ihI9hQAKt6FPPXhVGHAAAAAElFTkSuQmCC"/></elements></component></components></skin>';this.xml=null;if(window.DOMParser){parser=new DOMParser();this.xml=parser.parseFromString(this.text,"text/xml");}else{this.xml=new ActiveXObject("Microsoft.XMLDOM");this.xml.async="false";this.xml.loadXML(this.text);}return this;};})(jwplayer);(function(a){_utils=a.utils;_css=_utils.css;_hide=function(b){_css(b,{display:"none"});};_show=function(b){_css(b,{display:"block"});};a.html5.display=function(k,L){var j={icons:true,showmute:false};var Y=_utils.extend({},j,L);var h=k;var X={};var e;var x;var A;var U;var v;var N;var F;var O=!_utils.exists(h.skin.getComponentSettings("display").bufferrotation)?15:parseInt(h.skin.getComponentSettings("display").bufferrotation,10);var t=!_utils.exists(h.skin.getComponentSettings("display").bufferinterval)?100:parseInt(h.skin.getComponentSettings("display").bufferinterval,10);var E=-1;var w=a.api.events.state.IDLE;var P=true;var d;var D=false,W=true;var q="";var g=false;var o=false;var m;var z,S;var M=new a.html5.eventdispatcher();_utils.extend(this,M);var I={display:{style:{cursor:"pointer",top:0,left:0,overflow:"hidden"},click:n},display_icon:{style:{cursor:"pointer",position:"absolute",top:((h.skin.getSkinElement("display","background").height-h.skin.getSkinElement("display","playIcon").height)/2),left:((h.skin.getSkinElement("display","background").width-h.skin.getSkinElement("display","playIcon").width)/2),border:0,margin:0,padding:0,zIndex:3,display:"none"}},display_iconBackground:{style:{cursor:"pointer",position:"absolute",top:((x-h.skin.getSkinElement("display","background").height)/2),left:((e-h.skin.getSkinElement("display","background").width)/2),border:0,backgroundImage:(["url(",h.skin.getSkinElement("display","background").src,")"]).join(""),width:h.skin.getSkinElement("display","background").width,height:h.skin.getSkinElement("display","background").height,margin:0,padding:0,zIndex:2,display:"none"}},display_image:{style:{display:"none",width:e,height:x,position:"absolute",cursor:"pointer",left:0,top:0,margin:0,padding:0,textDecoration:"none",zIndex:1}},display_text:{style:{zIndex:4,position:"relative",opacity:0.8,backgroundColor:parseInt("000000",16),color:parseInt("ffffff",16),textAlign:"center",fontFamily:"Arial,sans-serif",padding:"0 5px",fontSize:14}}};h.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,r);h.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_MUTE,r);h.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,Q);h.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_ITEM,r);h.jwAddEventListener(a.api.events.JWPLAYER_ERROR,s);R();function R(){X.display=H("div","display");X.display_text=H("div","display_text");X.display.appendChild(X.display_text);X.display_image=H("img","display_image");X.display_image.onerror=function(Z){_hide(X.display_image);};X.display_image.onload=C;X.display_icon=H("div","display_icon");X.display_iconBackground=H("div","display_iconBackground");X.display.appendChild(X.display_image);X.display_iconBackground.appendChild(X.display_icon);X.display.appendChild(X.display_iconBackground);f();setTimeout((function(){o=true;if(Y.icons.toString()=="true"){K();}}),1);}this.getDisplayElement=function(){return X.display;};this.resize=function(aa,Z){if(h.jwGetFullscreen()&&_utils.isMobile()){return;}_css(X.display,{width:aa,height:Z});_css(X.display_text,{width:(aa-10),top:((Z-_utils.getBoundingClientRect(X.display_text).height)/2)});_css(X.display_iconBackground,{top:((Z-h.skin.getSkinElement("display","background").height)/2),left:((aa-h.skin.getSkinElement("display","background").width)/2)});if(e!=aa||x!=Z){e=aa;x=Z;d=undefined;K();}if(!h.jwGetFullscreen()){z=aa;S=Z;}c();r({});};this.show=function(){if(g){g=false;u(h.jwGetState());}};this.hide=function(){if(!g){G();g=true;}};function C(Z){A=X.display_image.naturalWidth;U=X.display_image.naturalHeight;c();if(h.jwGetState()==a.api.events.state.IDLE||h.jwGetPlaylist()[h.jwGetPlaylistIndex()].provider=="sound"){_css(X.display_image,{display:"block",opacity:0});_utils.fadeTo(X.display_image,1,0.1);}D=false;}function c(){if(h.jwGetFullscreen()&&h.jwGetStretching()==a.utils.stretching.EXACTFIT){var Z=document.createElement("div");_utils.stretch(a.utils.stretching.UNIFORM,Z,e,x,z,S);_utils.stretch(a.utils.stretching.EXACTFIT,X.display_image,_utils.parseDimension(Z.style.width),_utils.parseDimension(Z.style.height),A,U);_css(X.display_image,{left:Z.style.left,top:Z.style.top});}else{_utils.stretch(h.jwGetStretching(),X.display_image,e,x,A,U);}}function H(Z,ab){var aa=document.createElement(Z);aa.id=h.id+"_jwplayer_"+ab;_css(aa,I[ab].style);return aa;}function f(){for(var Z in X){if(_utils.exists(I[Z].click)){X[Z].onclick=I[Z].click;}}}function n(Z){if(typeof Z.preventDefault!="undefined"){Z.preventDefault();}else{Z.returnValue=false;}if(typeof m=="function"){m(Z);return;}else{if(h.jwGetState()!=a.api.events.state.PLAYING){h.jwPlay();}else{h.jwPause();}}}function V(Z){if(F){G();return;}X.display_icon.style.backgroundImage=(["url(",h.skin.getSkinElement("display",Z).src,")"]).join("");_css(X.display_icon,{width:h.skin.getSkinElement("display",Z).width,height:h.skin.getSkinElement("display",Z).height,top:(h.skin.getSkinElement("display","background").height-h.skin.getSkinElement("display",Z).height)/2,left:(h.skin.getSkinElement("display","background").width-h.skin.getSkinElement("display",Z).width)/2});b();if(_utils.exists(h.skin.getSkinElement("display",Z+"Over"))){X.display_icon.onmouseover=function(aa){X.display_icon.style.backgroundImage=["url(",h.skin.getSkinElement("display",Z+"Over").src,")"].join("");};X.display_icon.onmouseout=function(aa){X.display_icon.style.backgroundImage=["url(",h.skin.getSkinElement("display",Z).src,")"].join("");};}else{X.display_icon.onmouseover=null;X.display_icon.onmouseout=null;}}function G(){if(Y.icons.toString()=="true"){_hide(X.display_icon);_hide(X.display_iconBackground);T();}}function b(){if(!g&&Y.icons.toString()=="true"){_show(X.display_icon);_show(X.display_iconBackground);K();}}function s(Z){F=true;G();X.display_text.innerHTML=Z.message;_show(X.display_text);X.display_text.style.top=((x-_utils.getBoundingClientRect(X.display_text).height)/2)+"px";}function J(){W=false;X.display_image.style.display="none";}function Q(){w="";}function r(Z){if((Z.type==a.api.events.JWPLAYER_PLAYER_STATE||Z.type==a.api.events.JWPLAYER_PLAYLIST_ITEM)&&F){F=false;_hide(X.display_text);}var aa=h.jwGetState();if(aa==w){return;}w=aa;if(E>=0){clearTimeout(E);}if(P||h.jwGetState()==a.api.events.state.PLAYING||h.jwGetState()==a.api.events.state.PAUSED){u(h.jwGetState());}else{E=setTimeout(l(h.jwGetState()),500);}}function l(Z){return(function(){u(Z);});}function u(Z){if(_utils.exists(N)){clearInterval(N);N=null;_utils.animations.rotate(X.display_icon,0);}switch(Z){case a.api.events.state.BUFFERING:if(_utils.isIPod()){J();G();}else{if(h.jwGetPlaylist()[h.jwGetPlaylistIndex()].provider=="sound"){y();}v=0;N=setInterval(function(){v+=O;_utils.animations.rotate(X.display_icon,v%360);},t);V("bufferIcon");P=true;}break;case a.api.events.state.PAUSED:if(!_utils.isIPod()){if(h.jwGetPlaylist()[h.jwGetPlaylistIndex()].provider!="sound"){_css(X.display_image,{background:"transparent no-repeat center center"});}V("playIcon");P=true;}break;case a.api.events.state.IDLE:if(h.jwGetPlaylist()[h.jwGetPlaylistIndex()]&&h.jwGetPlaylist()[h.jwGetPlaylistIndex()].image){y();}else{J();}V("playIcon");P=true;break;default:if(h.jwGetPlaylist()[h.jwGetPlaylistIndex()]&&h.jwGetPlaylist()[h.jwGetPlaylistIndex()].provider=="sound"){if(_utils.isIPod()){J();P=false;}else{y();}}else{J();P=false;}if(h.jwGetMute()&&Y.showmute){V("muteIcon");}else{G();}break;}E=-1;}function y(){if(h.jwGetPlaylist()[h.jwGetPlaylistIndex()]){var Z=h.jwGetPlaylist()[h.jwGetPlaylistIndex()].image;if(Z){if(Z!=q){q=Z;D=true;X.display_image.src=_utils.getAbsolutePath(Z);}else{if(!(D||W)){W=true;X.display_image.style.opacity=0;X.display_image.style.display="block";_utils.fadeTo(X.display_image,1,0.1);}}}}}function B(Z){return function(){if(!o){return;}if(!g&&d!=Z){d=Z;M.sendEvent(Z,{component:"display",boundingRect:_utils.getDimensions(X.display_iconBackground)});}};}var K=B(a.api.events.JWPLAYER_COMPONENT_SHOW);var T=B(a.api.events.JWPLAYER_COMPONENT_HIDE);this.setAlternateClickHandler=function(Z){m=Z;};this.revertAlternateClickHandler=function(){m=undefined;};return this;};})(jwplayer);(function(a){var c=a.utils;var b=c.css;a.html5.dock=function(x,E){function y(){return{align:a.html5.view.positions.RIGHT};}var n=c.extend({},y(),E);if(n.align=="FALSE"){return;}var j={};var B=[];var k;var G;var f=false;var D=false;var g={x:0,y:0,width:0,height:0};var A;var o;var z;var m=new a.html5.eventdispatcher();c.extend(this,m);var s=document.createElement("div");s.id=x.id+"_jwplayer_dock";s.style.opacity=1;q();x.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,r);this.getDisplayElement=function(){return s;};this.setButton=function(L,I,J,K){if(!I&&j[L]){c.arrays.remove(B,L);s.removeChild(j[L].div);delete j[L];}else{if(I){if(!j[L]){j[L]={};}j[L].handler=I;j[L].outGraphic=J;j[L].overGraphic=K;if(!j[L].div){B.push(L);j[L].div=document.createElement("div");j[L].div.style.position="absolute";s.appendChild(j[L].div);j[L].div.appendChild(document.createElement("div"));j[L].div.childNodes[0].style.position="relative";j[L].div.childNodes[0].style.width="100%";j[L].div.childNodes[0].style.height="100%";j[L].div.childNodes[0].style.zIndex=10;j[L].div.childNodes[0].style.cursor="pointer";j[L].div.appendChild(document.createElement("img"));j[L].div.childNodes[1].style.position="absolute";j[L].div.childNodes[1].style.left=0;j[L].div.childNodes[1].style.top=0;if(x.skin.getSkinElement("dock","button")){j[L].div.childNodes[1].src=x.skin.getSkinElement("dock","button").src;}j[L].div.childNodes[1].style.zIndex=9;j[L].div.childNodes[1].style.cursor="pointer";j[L].div.onmouseover=function(){if(j[L].overGraphic){j[L].div.childNodes[0].style.background=h(j[L].overGraphic);}if(x.skin.getSkinElement("dock","buttonOver")){j[L].div.childNodes[1].src=x.skin.getSkinElement("dock","buttonOver").src;}};j[L].div.onmouseout=function(){if(j[L].outGraphic){j[L].div.childNodes[0].style.background=h(j[L].outGraphic);}if(x.skin.getSkinElement("dock","button")){j[L].div.childNodes[1].src=x.skin.getSkinElement("dock","button").src;}};if(x.skin.getSkinElement("dock","button")){j[L].div.childNodes[1].src=x.skin.getSkinElement("dock","button").src;}}if(j[L].outGraphic){j[L].div.childNodes[0].style.background=h(j[L].outGraphic);}else{if(j[L].overGraphic){j[L].div.childNodes[0].style.background=h(j[L].overGraphic);}}if(I){j[L].div.onclick=function(M){M.preventDefault();a(x.id).callback(L);if(j[L].overGraphic){j[L].div.childNodes[0].style.background=h(j[L].overGraphic);}if(x.skin.getSkinElement("dock","button")){j[L].div.childNodes[1].src=x.skin.getSkinElement("dock","button").src;}};}}}l(k,G);};function h(I){return"url("+I+") no-repeat center center";}function u(I){}function l(I,U){q();if(B.length>0){var J=10;var T=J;var Q=-1;var R=x.skin.getSkinElement("dock","button").height;var P=x.skin.getSkinElement("dock","button").width;var N=I-P-J;var S,M;if(n.align==a.html5.view.positions.LEFT){Q=1;N=J;}for(var K=0;K<B.length;K++){var V=Math.floor(T/U);if((T+R+J)>((V+1)*U)){T=((V+1)*U)+J;V=Math.floor(T/U);}var L=j[B[K]].div;L.style.top=(T%U)+"px";L.style.left=(N+(x.skin.getSkinElement("dock","button").width+J)*V*Q)+"px";var O={x:c.parseDimension(L.style.left),y:c.parseDimension(L.style.top),width:P,height:R};if(!S||(O.x<=S.x&&O.y<=S.y)){S=O;}if(!M||(O.x>=M.x&&O.y>=M.y)){M=O;}L.style.width=P+"px";L.style.height=R+"px";T+=x.skin.getSkinElement("dock","button").height+J;}g={x:S.x,y:S.y,width:M.x-S.x+M.width,height:S.y-M.y+M.height};}if(D!=x.jwGetFullscreen()||k!=I||G!=U){k=I;G=U;D=x.jwGetFullscreen();A=undefined;setTimeout(t,1);}}function d(I){return function(){if(!f&&A!=I&&B.length>0){A=I;m.sendEvent(I,{component:"dock",boundingRect:g});}};}function r(I){if(c.isMobile()){if(I.newstate==a.api.events.state.IDLE){w();}else{e();}}else{C();}}function C(I){if(f){return;}clearTimeout(z);if(E.position==a.html5.view.positions.OVER||x.jwGetFullscreen()){switch(x.jwGetState()){case a.api.events.state.PAUSED:case a.api.events.state.IDLE:if(s&&s.style.opacity<1&&(!E.idlehide||c.exists(I))){F();}if(E.idlehide){z=setTimeout(function(){v();},2000);}break;default:if(c.exists(I)){F();}z=setTimeout(function(){v();},2000);break;}}else{F();}}var t=d(a.api.events.JWPLAYER_COMPONENT_SHOW);var H=d(a.api.events.JWPLAYER_COMPONENT_HIDE);this.resize=l;var w=function(){b(s,{display:"block"});if(f){f=false;t();}};var e=function(){b(s,{display:"none"});if(!f){H();f=true;}};function v(){if(!f){H();if(s.style.opacity==1){c.cancelAnimation(s);c.fadeTo(s,0,0.1,1,0);}}}function F(){if(!f){t();if(s.style.opacity==0){c.cancelAnimation(s);c.fadeTo(s,1,0.1,0,0);}}}function q(){try{o=document.getElementById(x.id);o.addEventListener("mousemove",C);}catch(I){c.log("Could not add mouse listeners to dock: "+I);}}this.hide=e;this.show=w;return this;};})(jwplayer);(function(a){a.html5.eventdispatcher=function(d,b){var c=new a.events.eventdispatcher(b);a.utils.extend(this,c);this.sendEvent=function(e,f){if(!a.utils.exists(f)){f={};}a.utils.extend(f,{id:d,version:a.version,type:e});c.sendEvent(e,f);};};})(jwplayer);(function(a){var b=a.utils;a.html5.instream=function(z,m,y,A){var u={controlbarseekable:"always",controlbarpausable:true,controlbarstoppable:true,playlistclickable:true};var w,B,D=z,F=m,j=y,x=A,s,I,o,H,e,f,g,l,r,h=false,k,d,n=this;this.load=function(N,L){c();h=true;B=b.extend(u,L);w=a.html5.playlistitem(N);G();d=document.createElement("div");d.id=n.id+"_instream_container";x.detachMedia();s=g.getDisplayElement();f=F.playlist[F.item];e=D.jwGetState();if(e==a.api.events.state.BUFFERING||e==a.api.events.state.PLAYING){s.pause();}I=s.src?s.src:s.currentSrc;o=s.innerHTML;H=s.currentTime;r=new a.html5.display(n,b.extend({},F.plugins.config.display));r.setAlternateClickHandler(function(O){if(_fakemodel.state==a.api.events.state.PAUSED){n.jwInstreamPlay();}else{E(a.api.events.JWPLAYER_INSTREAM_CLICK,O);}});d.appendChild(r.getDisplayElement());if(!b.isMobile()){l=new a.html5.controlbar(n,b.extend({},F.plugins.config.controlbar,{}));if(F.plugins.config.controlbar.position==a.html5.view.positions.OVER){d.appendChild(l.getDisplayElement());}else{var M=F.plugins.object.controlbar.getDisplayElement().parentNode;M.appendChild(l.getDisplayElement());}}j.setupInstream(d,s);q();g.load(w);};this.jwInstreamDestroy=function(L){if(!h){return;}h=false;if(e!=a.api.events.state.IDLE){g.load(f,false);g.stop(false);}else{g.stop(true);}g.detachMedia();j.destroyInstream();if(l){try{l.getDisplayElement().parentNode.removeChild(l.getDisplayElement());}catch(M){}}E(a.api.events.JWPLAYER_INSTREAM_DESTROYED,{reason:(L?"complete":"destroyed")},true);x.attachMedia();if(e==a.api.events.state.BUFFERING||e==a.api.events.state.PLAYING){s.play();if(F.playlist[F.item]==f){F.getMedia().seek(H);}}return;};this.jwInstreamAddEventListener=function(L,M){k.addEventListener(L,M);};this.jwInstreamRemoveEventListener=function(L,M){k.removeEventListener(L,M);};this.jwInstreamPlay=function(){if(!h){return;}g.play(true);};this.jwInstreamPause=function(){if(!h){return;}g.pause(true);};this.jwInstreamSeek=function(L){if(!h){return;}g.seek(L);};this.jwInstreamGetState=function(){if(!h){return undefined;}return _fakemodel.state;};this.jwInstreamGetPosition=function(){if(!h){return undefined;}return _fakemodel.position;};this.jwInstreamGetDuration=function(){if(!h){return undefined;}return _fakemodel.duration;};this.playlistClickable=function(){return(!h||B.playlistclickable.toString().toLowerCase()=="true");};function t(){_fakemodel=new a.html5.model(this,F.getMedia()?F.getMedia().getDisplayElement():F.container,F);k=new a.html5.eventdispatcher();D.jwAddEventListener(a.api.events.JWPLAYER_RESIZE,q);D.jwAddEventListener(a.api.events.JWPLAYER_FULLSCREEN,q);}function c(){_fakemodel.setMute(F.mute);_fakemodel.setVolume(F.volume);}function G(){if(!g){g=new a.html5.mediavideo(_fakemodel,F.getMedia()?F.getMedia().getDisplayElement():F.container);g.addGlobalListener(J);g.addEventListener(a.api.events.JWPLAYER_MEDIA_META,K);g.addEventListener(a.api.events.JWPLAYER_MEDIA_COMPLETE,v);g.addEventListener(a.api.events.JWPLAYER_MEDIA_BUFFER_FULL,C);}g.attachMedia();}function J(L){if(h){E(L.type,L);}}function C(L){if(h){g.play();}}function v(L){if(h){setTimeout(function(){n.jwInstreamDestroy(true);},10);}}function K(L){if(L.metadata.width&&L.metadata.height){j.resizeMedia();}}function E(L,M,N){if(h||N){k.sendEvent(L,M);}}function q(){var L=F.plugins.object.display.getDisplayElement().style;if(l){var M=F.plugins.object.controlbar.getDisplayElement().style;l.resize(b.parseDimension(L.width),b.parseDimension(L.height));_css(l.getDisplayElement(),b.extend({},M,{zIndex:1001,opacity:1}));}if(r){r.resize(b.parseDimension(L.width),b.parseDimension(L.height));_css(r.getDisplayElement(),b.extend({},L,{zIndex:1000}));}if(j){j.resizeMedia();}}this.jwPlay=function(L){if(B.controlbarpausable.toString().toLowerCase()=="true"){this.jwInstreamPlay();}};this.jwPause=function(L){if(B.controlbarpausable.toString().toLowerCase()=="true"){this.jwInstreamPause();}};this.jwStop=function(){if(B.controlbarstoppable.toString().toLowerCase()=="true"){this.jwInstreamDestroy();D.jwStop();}};this.jwSeek=function(L){switch(B.controlbarseekable.toLowerCase()){case"always":this.jwInstreamSeek(L);break;case"backwards":if(_fakemodel.position>L){this.jwInstreamSeek(L);}break;}};this.jwGetPosition=function(){};this.jwGetDuration=function(){};this.jwGetWidth=D.jwGetWidth;this.jwGetHeight=D.jwGetHeight;this.jwGetFullscreen=D.jwGetFullscreen;this.jwSetFullscreen=D.jwSetFullscreen;this.jwGetVolume=function(){return F.volume;};this.jwSetVolume=function(L){g.volume(L);D.jwSetVolume(L);};this.jwGetMute=function(){return F.mute;};this.jwSetMute=function(L){g.mute(L);D.jwSetMute(L);};this.jwGetState=function(){return _fakemodel.state;};this.jwGetPlaylist=function(){return[w];};this.jwGetPlaylistIndex=function(){return 0;};this.jwGetStretching=function(){return F.config.stretching;};this.jwAddEventListener=function(M,L){k.addEventListener(M,L);};this.jwRemoveEventListener=function(M,L){k.removeEventListener(M,L);};this.skin=D.skin;this.id=D.id+"_instream";t();return this;};})(jwplayer);(function(a){var b={prefix:null,file:null,link:"",linktarget:"_top",margin:8,out:0.5,over:1,timeout:5,hide:true,position:"bottom-left"};_css=a.utils.css;a.html5.logo=function(n,s){var r=n;var v;var d;var u;var h=false;g();function g(){o();r.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,j);c();l();}function o(){if(b.prefix){var w=n.version.split(/\W/).splice(0,2).join("/");if(b.prefix.indexOf(w)<0){b.prefix+=w+"/";}}if(s.position==a.html5.view.positions.OVER){s.position=b.position;}try{if(window.location.href.indexOf("https")==0){b.prefix=b.prefix.replace("http://l.longtailvideo.com","https://securel.longtailvideo.com");}}catch(x){}d=a.utils.extend({},b,s);}function c(){u=document.createElement("img");u.id=r.id+"_jwplayer_logo";u.style.display="none";u.onload=function(w){_css(u,k());q();};if(!d.file){return;}if(d.file.indexOf("/")>=0){u.src=d.file;}else{u.src=d.prefix+d.file;}}if(!d.file){return;}this.resize=function(x,w){};this.getDisplayElement=function(){return u;};function l(){if(d.link){u.onmouseover=f;u.onmouseout=q;u.onclick=t;}else{this.mouseEnabled=false;}}function t(w){if(typeof w!="undefined"){w.stopPropagation();}if(!h){return;}r.jwPause();r.jwSetFullscreen(false);if(d.link){window.open(d.link,d.linktarget);}return;}function q(w){if(d.link&&h){u.style.opacity=d.out;}return;}function f(w){if(h){u.style.opacity=d.over;}return;}function k(){var y={textDecoration:"none",position:"absolute",cursor:"pointer"};y.display=(d.hide.toString()=="true"&&!h)?"none":"block";var x=d.position.toLowerCase().split("-");for(var w in x){y[x[w]]=parseInt(d.margin);}return y;}function m(){if(d.hide.toString()=="true"){u.style.display="block";u.style.opacity=0;a.utils.fadeTo(u,d.out,0.1,parseFloat(u.style.opacity));v=setTimeout(function(){e();},d.timeout*1000);}h=true;}function e(){h=false;if(d.hide.toString()=="true"){a.utils.fadeTo(u,0,0.1,parseFloat(u.style.opacity));}}function j(w){if(w.newstate==a.api.events.state.BUFFERING){clearTimeout(v);m();}}return this;};})(jwplayer);(function(b){var d={ended:b.api.events.state.IDLE,playing:b.api.events.state.PLAYING,pause:b.api.events.state.PAUSED,buffering:b.api.events.state.BUFFERING};var f=b.utils;var a=f.isMobile();var g,e;var c={};b.html5.mediavideo=function(k,J){var N={abort:B,canplay:s,canplaythrough:s,durationchange:x,emptied:B,ended:s,error:r,loadeddata:x,loadedmetadata:x,loadstart:s,pause:s,play:B,playing:s,progress:H,ratechange:B,seeked:s,seeking:s,stalled:s,suspend:s,timeupdate:R,volumechange:n,waiting:s,canshowcurrentframe:B,dataunavailable:B,empty:B,load:j,loadedfirstframe:B,webkitfullscreenchange:m};var F={};var O=new b.html5.eventdispatcher();f.extend(this,O);var l=k,E=J,o,h,G,X,I,Q,P=false,w=false,A=false,M,K,U;V();this.load=function(Z,aa){if(typeof aa=="undefined"){aa=true;}if(!w){return;}X=Z;A=(X.duration>0);l.duration=X.duration;f.empty(o);o.style.display="block";o.style.opacity=1;if(g&&e){o.style.width=g;o.style.height=e;g=_previousHieght=0;}U=0;t(Z.levels);if(Z.levels&&Z.levels.length>0){if(Z.levels.length==1||f.isIOS()){o.src=Z.levels[0].file;}else{if(o.src){o.removeAttribute("src");}for(var Y=0;Y<Z.levels.length;Y++){var ab=o.ownerDocument.createElement("source");ab.src=Z.levels[Y].file;o.appendChild(ab);U++;}}}else{o.src=Z.file;}o.volume=l.volume/100;o.muted=l.mute;if(a){T();}M=K=G=false;l.buffer=0;if(!f.exists(Z.start)){Z.start=0;}Q=(Z.start>0)?Z.start:-1;v(b.api.events.JWPLAYER_MEDIA_LOADED);if((!a&&Z.levels.length==1)||!P){o.load();}P=false;if(aa){z(b.api.events.state.BUFFERING);v(b.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:0});D();}if(o.videoWidth>0&&o.videoHeight>0){x();}};this.play=function(){if(!w){return;}D();if(K){z(b.api.events.state.PLAYING);}else{o.load();z(b.api.events.state.BUFFERING);}o.play();};this.pause=function(){if(!w){return;}o.pause();z(b.api.events.state.PAUSED);};this.seek=function(Y){if(!w){return;}if(!G&&o.readyState>0){if(!(l.duration<=0||isNaN(l.duration))&&!(l.position<=0||isNaN(l.position))){o.currentTime=Y;o.play();}}else{Q=Y;}};var C=this.stop=function(Y){if(!w){return;}if(!f.exists(Y)){Y=true;}u();if(Y){K=false;var Z=navigator.userAgent;if(o.webkitSupportsFullscreen){try{o.webkitExitFullscreen();}catch(aa){}}o.style.opacity=0;y();if(f.isIE()){o.src="";}else{o.removeAttribute("src");}f.empty(o);o.load();P=true;}if(f.isIPod()){g=o.style.width;e=o.style.height;o.style.width=0;o.style.height=0;}else{if(f.isIPad()){o.style.display="none";try{o.webkitExitFullscreen();}catch(ab){}}}z(b.api.events.state.IDLE);};this.fullscreen=function(Y){if(Y===true){this.resize("100%","100%");}else{this.resize(l.config.width,l.config.height);}};this.resize=function(Z,Y){};this.volume=function(Y){if(!a){o.volume=Y/100;v(b.api.events.JWPLAYER_MEDIA_VOLUME,{volume:(Y/100)});}};this.mute=function(Y){if(!a){o.muted=Y;v(b.api.events.JWPLAYER_MEDIA_MUTE,{mute:Y});}};this.getDisplayElement=function(){return o;};this.hasChrome=function(){return a&&(h==b.api.events.state.PLAYING);};this.detachMedia=function(){w=false;return this.getDisplayElement();};this.attachMedia=function(){w=true;};this.destroy=function(){if(o&&o.parentNode){u();for(var Y in N){o.removeEventListener(Y,L(Y,N[Y]),true);}f.empty(o);E=o.parentNode;o.parentNode.removeChild(o);delete c[l.id];o=null;}};function L(Z,Y){if(F[Z]){return F[Z];}else{F[Z]=function(aa){if(f.exists(aa.target.parentNode)){Y(aa);}};return F[Z];}}function V(){h=b.api.events.state.IDLE;w=true;o=q();o.setAttribute("x-webkit-airplay","allow");if(E.parentNode){o.id=E.id;E.parentNode.replaceChild(o,E);}}function q(){var Y=c[l.id];if(!Y){if(E.tagName.toLowerCase()=="video"){Y=E;}else{Y=document.createElement("video");}c[l.id]=Y;if(!Y.id){Y.id=E.id;}}for(var Z in N){Y.addEventListener(Z,L(Z,N[Z]),true);}return Y;}function z(Y){if(Y==b.api.events.state.PAUSED&&h==b.api.events.state.IDLE){return;}if(a){switch(Y){case b.api.events.state.PLAYING:T();break;case b.api.events.state.BUFFERING:case b.api.events.state.PAUSED:y();break;}}if(h!=Y){var Z=h;l.state=h=Y;v(b.api.events.JWPLAYER_PLAYER_STATE,{oldstate:Z,newstate:Y});}}function B(Y){}function n(Y){var Z=Math.round(o.volume*100);v(b.api.events.JWPLAYER_MEDIA_VOLUME,{volume:Z},true);v(b.api.events.JWPLAYER_MEDIA_MUTE,{mute:o.muted},true);}function H(aa){if(!w){return;}var Z;if(f.exists(aa)&&aa.lengthComputable&&aa.total){Z=aa.loaded/aa.total*100;}else{if(f.exists(o.buffered)&&(o.buffered.length>0)){var Y=o.buffered.length-1;if(Y>=0){Z=o.buffered.end(Y)/o.duration*100;}}}if(f.useNativeFullscreen()&&f.exists(o.webkitDisplayingFullscreen)){if(l.fullscreen!=o.webkitDisplayingFullscreen){v(b.api.events.JWPLAYER_FULLSCREEN,{fullscreen:o.webkitDisplayingFullscreen},true);}}if(K===false&&h==b.api.events.state.BUFFERING){v(b.api.events.JWPLAYER_MEDIA_BUFFER_FULL);K=true;}if(!M){if(Z==100){M=true;}if(f.exists(Z)&&(Z>l.buffer)){l.buffer=Math.round(Z);v(b.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:Math.round(Z)});}}}function R(Z){if(!w){return;}if(f.exists(Z)&&f.exists(Z.target)){if(A>0){if(!isNaN(Z.target.duration)&&(isNaN(l.duration)||l.duration<1)){if(Z.target.duration==Infinity){l.duration=0;}else{l.duration=Math.round(Z.target.duration*10)/10;}}}if(!G&&o.readyState>0){z(b.api.events.state.PLAYING);}if(h==b.api.events.state.PLAYING){if(o.readyState>0&&(Q>-1||!G)){G=true;try{if(o.currentTime!=Q&&Q>-1){o.currentTime=Q;Q=-1;}}catch(Y){}o.volume=l.volume/100;o.muted=l.mute;}l.position=l.duration>0?(Math.round(Z.target.currentTime*10)/10):0;v(b.api.events.JWPLAYER_MEDIA_TIME,{position:l.position,duration:l.duration});if(l.position>=l.duration&&(l.position>0||l.duration>0)){S();return;}}}H(Z);}function j(Y){}function s(Y){if(!w){return;}if(g&&e){o.style.width=g;o.style.height=e;g=_previousHieght=0;}if(d[Y.type]){if(Y.type=="ended"){S();}else{z(d[Y.type]);}}}function x(Z){if(!w){return;}var Y=Math.round(o.duration*10)/10;var aa={height:o.videoHeight,width:o.videoWidth,duration:Y};if(!A){if((l.duration<Y||isNaN(l.duration))&&o.duration!=Infinity){l.duration=Y;}}v(b.api.events.JWPLAYER_MEDIA_META,{metadata:aa});}function r(aa){if(!w){return;}if(h==b.api.events.state.IDLE){return;}var Z="There was an error: ";if((aa.target.error&&aa.target.tagName.toLowerCase()=="video")||aa.target.parentNode.error&&aa.target.parentNode.tagName.toLowerCase()=="video"){var Y=!f.exists(aa.target.error)?aa.target.parentNode.error:aa.target.error;switch(Y.code){case Y.MEDIA_ERR_ABORTED:f.log("User aborted the video playback.");return;case Y.MEDIA_ERR_NETWORK:Z="A network error caused the video download to fail part-way: ";break;case Y.MEDIA_ERR_DECODE:Z="The video playback was aborted due to a corruption problem or because the video used features your browser did not support: ";break;case Y.MEDIA_ERR_SRC_NOT_SUPPORTED:Z="The video could not be loaded, either because the server or network failed or because the format is not supported: ";break;default:Z="An unknown error occurred: ";break;}}else{if(aa.target.tagName.toLowerCase()=="source"){U--;if(U>0){return;}if(f.userAgentMatch(/firefox/i)){f.log("The video could not be loaded, either because the server or network failed or because the format is not supported.");C(false);return;}else{Z="The video could not be loaded, either because the server or network failed or because the format is not supported: ";}}else{f.log("An unknown error occurred.  Continuing...");return;}}C(false);Z+=W();_error=true;v(b.api.events.JWPLAYER_ERROR,{message:Z});return;}function W(){var aa="";for(var Z in X.levels){var Y=X.levels[Z];var ab=E.ownerDocument.createElement("source");aa+=b.utils.getAbsolutePath(Y.file);if(Z<(X.levels.length-1)){aa+=", ";}}return aa;}function D(){if(!f.exists(I)){I=setInterval(function(){H();},100);}}function u(){clearInterval(I);I=null;}function S(){if(h==b.api.events.state.PLAYING){C(false);v(b.api.events.JWPLAYER_MEDIA_BEFORECOMPLETE);v(b.api.events.JWPLAYER_MEDIA_COMPLETE);}}function m(Y){if(f.exists(o.webkitDisplayingFullscreen)){if(l.fullscreen&&!o.webkitDisplayingFullscreen){v(b.api.events.JWPLAYER_FULLSCREEN,{fullscreen:false},true);}}}function t(aa){if(aa.length>0&&f.userAgentMatch(/Safari/i)&&!f.userAgentMatch(/Chrome/i)){var Y=-1;for(var Z=0;Z<aa.length;Z++){switch(f.extension(aa[Z].file)){case"mp4":if(Y<0){Y=Z;}break;case"webm":aa.splice(Z,1);break;}}if(Y>0){var ab=aa.splice(Y,1)[0];aa.unshift(ab);}}}function T(){setTimeout(function(){o.setAttribute("controls","controls");},100);}function y(){setTimeout(function(){o.removeAttribute("controls");},250);}function v(Y,aa,Z){if(w||Z){if(aa){O.sendEvent(Y,aa);}else{O.sendEvent(Y);}}}};})(jwplayer);(function(a){var c={ended:a.api.events.state.IDLE,playing:a.api.events.state.PLAYING,pause:a.api.events.state.PAUSED,buffering:a.api.events.state.BUFFERING};var b=a.utils.css;a.html5.mediayoutube=function(j,e){var f=new a.html5.eventdispatcher();a.utils.extend(this,f);var l=j;var h=document.getElementById(e.id);var g=a.api.events.state.IDLE;var n,m;function k(q){if(g!=q){var r=g;l.state=q;g=q;f.sendEvent(a.api.events.JWPLAYER_PLAYER_STATE,{oldstate:r,newstate:q});}}this.getDisplayElement=this.detachMedia=function(){return h;};this.attachMedia=function(){};this.play=function(){if(g==a.api.events.state.IDLE){f.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:100});f.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER_FULL);k(a.api.events.state.PLAYING);}else{if(g==a.api.events.state.PAUSED){k(a.api.events.state.PLAYING);}}};this.pause=function(){k(a.api.events.state.PAUSED);};this.seek=function(q){};this.stop=function(q){if(!_utils.exists(q)){q=true;}l.position=0;k(a.api.events.state.IDLE);if(q){b(h,{display:"none"});}};this.volume=function(q){l.setVolume(q);f.sendEvent(a.api.events.JWPLAYER_MEDIA_VOLUME,{volume:Math.round(q)});};this.mute=function(q){h.muted=q;f.sendEvent(a.api.events.JWPLAYER_MEDIA_MUTE,{mute:q});};this.resize=function(r,q){if(r*q>0&&n){n.width=m.width=r;n.height=m.height=q;}};this.fullscreen=function(q){if(q===true){this.resize("100%","100%");}else{this.resize(l.config.width,l.config.height);}};this.load=function(q){o(q);b(n,{display:"block"});k(a.api.events.state.BUFFERING);f.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:0});f.sendEvent(a.api.events.JWPLAYER_MEDIA_LOADED);this.play();};this.hasChrome=function(){return(g!=a.api.events.state.IDLE);};function o(w){var t=w.levels[0].file;t=["http://www.youtube.com/v/",d(t),"&amp;hl=en_US&amp;fs=1&autoplay=1"].join("");n=document.createElement("object");n.id=h.id;n.style.position="absolute";var v={movie:t,allowfullscreen:"true",allowscriptaccess:"always"};for(var q in v){var u=document.createElement("param");u.name=q;u.value=v[q];n.appendChild(u);}m=document.createElement("embed");n.appendChild(m);var r={src:t,type:"application/x-shockwave-flash",allowfullscreen:"true",allowscriptaccess:"always",width:n.width,height:n.height};for(var s in r){m.setAttribute(s,r[s]);}n.appendChild(m);n.style.zIndex=2147483000;if(h!=n&&h.parentNode){h.parentNode.replaceChild(n,h);}h=n;}function d(r){var q=r.split(/\?|\#\!/);var t="";for(var s=0;s<q.length;s++){if(q[s].substr(0,2)=="v="){t=q[s].substr(2);}}if(t==""){if(r.indexOf("/v/")>=0){t=r.substr(r.indexOf("/v/")+3);}else{if(r.indexOf("youtu.be")>=0){t=r.substr(r.indexOf("youtu.be/")+9);}else{t=r;}}}if(t.indexOf("?")>-1){t=t.substr(0,t.indexOf("?"));}if(t.indexOf("&")>-1){t=t.substr(0,t.indexOf("&"));}return t;}this.embed=m;return this;};})(jwplayer);(function(jwplayer){var _configurableStateVariables=["width","height","start","duration","volume","mute","fullscreen","item","plugins","stretching"];var _utils=jwplayer.utils;jwplayer.html5.model=function(api,container,options){var _api=api;var _container=container;var _cookies=_utils.getCookies();var _model={id:_container.id,playlist:[],state:jwplayer.api.events.state.IDLE,position:0,buffer:0,container:_container,config:{width:480,height:320,item:-1,skin:undefined,file:undefined,image:undefined,start:0,duration:0,bufferlength:5,volume:_cookies.volume?_cookies.volume:90,mute:_cookies.mute&&_cookies.mute.toString().toLowerCase()=="true"?true:false,fullscreen:false,repeat:"",stretching:jwplayer.utils.stretching.UNIFORM,autostart:false,debug:undefined,screencolor:undefined}};var _media;var _eventDispatcher=new jwplayer.html5.eventdispatcher();var _components=["display","logo","controlbar","playlist","dock"];jwplayer.utils.extend(_model,_eventDispatcher);for(var option in options){if(typeof options[option]=="string"){var type=/color$/.test(option)?"color":null;options[option]=jwplayer.utils.typechecker(options[option],type);}var config=_model.config;var path=option.split(".");for(var edge in path){if(edge==path.length-1){config[path[edge]]=options[option];}else{if(!jwplayer.utils.exists(config[path[edge]])){config[path[edge]]={};}config=config[path[edge]];}}}for(var index in _configurableStateVariables){var configurableStateVariable=_configurableStateVariables[index];_model[configurableStateVariable]=_model.config[configurableStateVariable];}var pluginorder=_components.concat([]);if(jwplayer.utils.exists(_model.plugins)){if(typeof _model.plugins=="string"){var userplugins=_model.plugins.split(",");for(var userplugin in userplugins){if(typeof userplugins[userplugin]=="string"){pluginorder.push(userplugins[userplugin].replace(/^\s+|\s+$/g,""));}}}}if(jwplayer.utils.isMobile()){pluginorder=["display","logo","dock","playlist"];if(!jwplayer.utils.exists(_model.config.repeat)){_model.config.repeat="list";}}else{if(_model.config.chromeless){pluginorder=["logo","dock","playlist"];if(!jwplayer.utils.exists(_model.config.repeat)){_model.config.repeat="list";}}}_model.plugins={order:pluginorder,config:{},object:{}};if(typeof _model.config.components!="undefined"){for(var component in _model.config.components){_model.plugins.config[component]=_model.config.components[component];}}var playlistVisible=false;for(var pluginIndex in _model.plugins.order){var pluginName=_model.plugins.order[pluginIndex];var pluginConfig=!jwplayer.utils.exists(_model.plugins.config[pluginName])?{}:_model.plugins.config[pluginName];_model.plugins.config[pluginName]=!jwplayer.utils.exists(_model.plugins.config[pluginName])?pluginConfig:jwplayer.utils.extend(_model.plugins.config[pluginName],pluginConfig);if(!jwplayer.utils.exists(_model.plugins.config[pluginName].position)){if(pluginName=="playlist"){_model.plugins.config[pluginName].position=jwplayer.html5.view.positions.NONE;}else{_model.plugins.config[pluginName].position=jwplayer.html5.view.positions.OVER;}}else{if(pluginName=="playlist"){playlistVisible=true;}_model.plugins.config[pluginName].position=_model.plugins.config[pluginName].position.toString().toUpperCase();}}if(_model.plugins.config.controlbar&&playlistVisible){_model.plugins.config.controlbar.hideplaylistcontrols=true;}if(typeof _model.plugins.config.dock!="undefined"){if(typeof _model.plugins.config.dock!="object"){var position=_model.plugins.config.dock.toString().toUpperCase();_model.plugins.config.dock={position:position};}if(typeof _model.plugins.config.dock.position!="undefined"){_model.plugins.config.dock.align=_model.plugins.config.dock.position;_model.plugins.config.dock.position=jwplayer.html5.view.positions.OVER;}if(typeof _model.plugins.config.dock.idlehide=="undefined"){try{_model.plugins.config.dock.idlehide=_model.plugins.config.controlbar.idlehide;}catch(e){}}}function _loadExternal(playlistfile){var loader=new jwplayer.html5.playlistloader();loader.addEventListener(jwplayer.api.events.JWPLAYER_PLAYLIST_LOADED,function(evt){_model.playlist=new jwplayer.html5.playlist(evt);_loadComplete(true);});loader.addEventListener(jwplayer.api.events.JWPLAYER_ERROR,function(evt){_model.playlist=new jwplayer.html5.playlist({playlist:[]});_loadComplete(false);});loader.load(playlistfile);}function _loadComplete(){if(_model.config.shuffle){_model.item=_getShuffleItem();}else{if(_model.config.item>=_model.playlist.length){_model.config.item=_model.playlist.length-1;}else{if(_model.config.item<0){_model.config.item=0;}}_model.item=_model.config.item;}_model.position=0;_model.duration=_model.playlist.length>0?_model.playlist[_model.item].duration:0;_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_PLAYLIST_LOADED,{playlist:_model.playlist});_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_PLAYLIST_ITEM,{index:_model.item});}_model.loadPlaylist=function(arg){var input;if(typeof arg=="string"){if(arg.indexOf("[")==0||arg.indexOf("{")=="0"){try{input=eval(arg);}catch(err){input=arg;}}else{input=arg;}}else{input=arg;}var config;switch(jwplayer.utils.typeOf(input)){case"object":config=input;break;case"array":config={playlist:input};break;default:config={file:input};break;}_model.playlist=new jwplayer.html5.playlist(config);_model.item=_model.config.item>=0?_model.config.item:0;if(!_model.playlist[0].provider&&_model.playlist[0].file){_loadExternal(_model.playlist[0].file);}else{_loadComplete();}};function _getShuffleItem(){var result=null;if(_model.playlist.length>1){while(!jwplayer.utils.exists(result)){result=Math.floor(Math.random()*_model.playlist.length);if(result==_model.item){result=null;}}}else{result=0;}return result;}function forward(evt){switch(evt.type){case jwplayer.api.events.JWPLAYER_MEDIA_LOADED:_container=_media.getDisplayElement();break;case jwplayer.api.events.JWPLAYER_MEDIA_MUTE:this.mute=evt.mute;break;case jwplayer.api.events.JWPLAYER_MEDIA_VOLUME:this.volume=evt.volume;break;}_eventDispatcher.sendEvent(evt.type,evt);}var _mediaProviders={};_model.setActiveMediaProvider=function(playlistItem){if(playlistItem.provider=="audio"){playlistItem.provider="sound";}var provider=playlistItem.provider;var current=_media?_media.getDisplayElement():null;if(provider=="sound"||provider=="http"||provider==""){provider="video";}if(!jwplayer.utils.exists(_mediaProviders[provider])){switch(provider){case"video":_media=new jwplayer.html5.mediavideo(_model,current?current:_container);break;case"youtube":_media=new jwplayer.html5.mediayoutube(_model,current?current:_container);break;}if(!jwplayer.utils.exists(_media)){return false;}_media.addGlobalListener(forward);_mediaProviders[provider]=_media;}else{if(_media!=_mediaProviders[provider]){if(_media){_media.stop();}_media=_mediaProviders[provider];}}return true;};_model.getMedia=function(){return _media;};_model.seek=function(pos){_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_MEDIA_SEEK,{position:_model.position,offset:pos});return _media.seek(pos);};_model.setVolume=function(newVol){_utils.saveCookie("volume",newVol);_model.volume=newVol;};_model.setMute=function(state){_utils.saveCookie("mute",state);_model.mute=state;};_model.setupPlugins=function(){if(!jwplayer.utils.exists(_model.plugins)||!jwplayer.utils.exists(_model.plugins.order)||_model.plugins.order.length==0){jwplayer.utils.log("No plugins to set up");return _model;}for(var i=0;i<_model.plugins.order.length;i++){try{var pluginName=_model.plugins.order[i];if(jwplayer.utils.exists(jwplayer.html5[pluginName])){if(pluginName=="playlist"){_model.plugins.object[pluginName]=new jwplayer.html5.playlistcomponent(_api,_model.plugins.config[pluginName]);}else{_model.plugins.object[pluginName]=new jwplayer.html5[pluginName](_api,_model.plugins.config[pluginName]);}}else{_model.plugins.order.splice(plugin,plugin+1);}if(typeof _model.plugins.object[pluginName].addGlobalListener=="function"){_model.plugins.object[pluginName].addGlobalListener(forward);}}catch(err){jwplayer.utils.log("Could not setup "+pluginName);}}};return _model;};})(jwplayer);(function(a){a.html5.playlist=function(b){var d=[];if(b.playlist&&b.playlist instanceof Array&&b.playlist.length>0){for(var c in b.playlist){if(!isNaN(parseInt(c))){d.push(new a.html5.playlistitem(b.playlist[c]));}}}else{d.push(new a.html5.playlistitem(b));}return d;};})(jwplayer);(function(a){var c={size:180,position:a.html5.view.positions.NONE,itemheight:60,thumbs:true,fontcolor:"#000000",overcolor:"",activecolor:"",backgroundcolor:"#f8f8f8",font:"_sans",fontsize:"",fontstyle:"",fontweight:""};var b={_sans:"Arial, Helvetica, sans-serif",_serif:"Times, Times New Roman, serif",_typewriter:"Courier New, Courier, monospace"};_utils=a.utils;_css=_utils.css;_hide=function(d){_css(d,{display:"none"});};_show=function(d){_css(d,{display:"block"});};a.html5.playlistcomponent=function(s,D){var y=s;var e=a.utils.extend({},c,y.skin.getComponentSettings("playlist"),D);if(e.position==a.html5.view.positions.NONE||typeof a.html5.view.positions[e.position]=="undefined"){return;}var z;var l;var E;var d;var g;var f;var k=-1;var h={background:undefined,item:undefined,itemOver:undefined,itemImage:undefined,itemActive:undefined};this.getDisplayElement=function(){return z;};this.resize=function(H,F){l=H;E=F;if(y.jwGetFullscreen()){_hide(z);}else{var G={display:"block",width:l,height:E};_css(z,G);}};this.show=function(){_show(z);};this.hide=function(){_hide(z);};function j(){z=document.createElement("div");z.id=y.id+"_jwplayer_playlistcomponent";z.style.overflow="hidden";switch(e.position){case a.html5.view.positions.RIGHT:case a.html5.view.positions.LEFT:z.style.width=e.size+"px";break;case a.html5.view.positions.TOP:case a.html5.view.positions.BOTTOM:z.style.height=e.size+"px";break;}C();if(h.item){e.itemheight=h.item.height;}z.style.backgroundColor="#C6C6C6";y.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,t);y.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_ITEM,w);y.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,m);}function q(){var F=document.createElement("ul");_css(F,{width:z.style.width,minWidth:z.style.width,height:z.style.height,backgroundColor:e.backgroundcolor,backgroundImage:h.background?"url("+h.background.src+")":"",color:e.fontcolor,listStyle:"none",margin:0,padding:0,fontFamily:b[e.font]?b[e.font]:b._sans,fontSize:(e.fontsize?e.fontsize:11)+"px",fontStyle:e.fontstyle,fontWeight:e.fontweight,overflowY:"auto"});return F;}function A(F){return function(){var G=f.getElementsByClassName("item")[F];var H=e.fontcolor;var I=h.item?"url("+h.item.src+")":"";if(F==y.jwGetPlaylistIndex()){if(e.activecolor!==""){H=e.activecolor;}if(h.itemActive){I="url("+h.itemActive.src+")";}}_css(G,{color:e.overcolor!==""?e.overcolor:H,backgroundImage:h.itemOver?"url("+h.itemOver.src+")":I});};}function o(F){return function(){var G=f.getElementsByClassName("item")[F];var H=e.fontcolor;var I=h.item?"url("+h.item.src+")":"";if(F==y.jwGetPlaylistIndex()){if(e.activecolor!==""){H=e.activecolor;}if(h.itemActive){I="url("+h.itemActive.src+")";}}_css(G,{color:H,backgroundImage:I});};}function r(K){var R=d[K];var Q=document.createElement("li");Q.className="item";_css(Q,{height:e.itemheight,display:"block",cursor:"pointer",backgroundImage:h.item?"url("+h.item.src+")":"",backgroundSize:"100% "+e.itemheight+"px"});Q.onmouseover=A(K);Q.onmouseout=o(K);var L=document.createElement("div");var H=new Image();var M=0;var N=0;var O=0;if(x()&&(R.image||R["playlist.image"]||h.itemImage)){H.className="image";if(h.itemImage){M=(e.itemheight-h.itemImage.height)/2;N=h.itemImage.width;O=h.itemImage.height;}else{N=e.itemheight*4/3;O=e.itemheight;}_css(L,{height:O,width:N,"float":"left",styleFloat:"left",cssFloat:"left",margin:"0 5px 0 0",background:"black",overflow:"hidden",margin:M+"px",position:"relative"});_css(H,{position:"relative"});L.appendChild(H);H.onload=function(){a.utils.stretch(a.utils.stretching.FILL,H,N,O,this.naturalWidth,this.naturalHeight);};if(R["playlist.image"]){H.src=R["playlist.image"];}else{if(R.image){H.src=R.image;}else{if(h.itemImage){H.src=h.itemImage.src;}}}Q.appendChild(L);}var G=l-N-M*2;if(E<e.itemheight*d.length){G-=15;}var F=document.createElement("div");_css(F,{position:"relative",height:"100%",overflow:"hidden"});var I=document.createElement("span");if(R.duration>0){I.className="duration";_css(I,{fontSize:(e.fontsize?e.fontsize:11)+"px",fontWeight:(e.fontweight?e.fontweight:"bold"),width:"40px",height:e.fontsize?e.fontsize+10:20,lineHeight:24,"float":"right",styleFloat:"right",cssFloat:"right"});I.innerHTML=_utils.timeFormat(R.duration);F.appendChild(I);}var P=document.createElement("span");P.className="title";_css(P,{padding:"5px 5px 0 "+(M?0:"5px"),height:e.fontsize?e.fontsize+10:20,lineHeight:e.fontsize?e.fontsize+10:20,overflow:"hidden","float":"left",styleFloat:"left",cssFloat:"left",width:((R.duration>0)?G-50:G)-10+"px",fontSize:(e.fontsize?e.fontsize:13)+"px",fontWeight:(e.fontweight?e.fontweight:"bold")});P.innerHTML=R?R.title:"";F.appendChild(P);if(R.description){var J=document.createElement("span");J.className="description";_css(J,{display:"block","float":"left",styleFloat:"left",cssFloat:"left",margin:0,paddingLeft:P.style.paddingLeft,paddingRight:P.style.paddingRight,lineHeight:(e.fontsize?e.fontsize+4:16)+"px",overflow:"hidden",position:"relative"});J.innerHTML=R.description;F.appendChild(J);}Q.appendChild(F);return Q;}function t(G){z.innerHTML="";d=u();if(!d){return;}items=[];f=q();for(var H=0;H<d.length;H++){var F=r(H);F.onclick=B(H);f.appendChild(F);items.push(F);}k=y.jwGetPlaylistIndex();o(k)();z.appendChild(f);if(_utils.isIOS()&&window.iScroll){f.style.height=e.itemheight*d.length+"px";var I=new iScroll(z.id);}}function u(){var G=y.jwGetPlaylist();var H=[];for(var F=0;F<G.length;F++){if(!G[F]["ova.hidden"]){H.push(G[F]);}}return H;}function B(F){return function(){y.jwPlaylistItem(F);y.jwPlay(true);};}function n(){f.scrollTop=y.jwGetPlaylistIndex()*e.itemheight;}function x(){return e.thumbs.toString().toLowerCase()=="true";}function w(F){if(k>=0){o(k)();k=F.index;}o(F.index)();n();}function m(){if(e.position==a.html5.view.positions.OVER){switch(y.jwGetState()){case a.api.events.state.IDLE:_show(z);break;default:_hide(z);break;}}}function C(){for(var F in h){h[F]=v(F);}}function v(F){return y.skin.getSkinElement("playlist",F);}j();return this;};})(jwplayer);(function(b){b.html5.playlistitem=function(d){var e={author:"",date:"",description:"",image:"",link:"",mediaid:"",tags:"",title:"",provider:"",file:"",streamer:"",duration:-1,start:0,currentLevel:-1,levels:[]};var c=b.utils.extend({},e,d);if(c.type){c.provider=c.type;delete c.type;}if(c.levels.length===0){c.levels[0]=new b.html5.playlistitemlevel(c);}if(!c.provider){c.provider=a(c.levels[0]);}else{c.provider=c.provider.toLowerCase();}return c;};function a(e){if(b.utils.isYouTube(e.file)){return"youtube";}else{var f=b.utils.extension(e.file);var c;if(f&&b.utils.extensionmap[f]){if(f=="m3u8"){return"video";}c=b.utils.extensionmap[f].html5;}else{if(e.type){c=e.type;}}if(c){var d=c.split("/")[0];if(d=="audio"){return"sound";}else{if(d=="video"){return d;}}}}return"";}})(jwplayer);(function(a){a.html5.playlistitemlevel=function(b){var d={file:"",streamer:"",bitrate:0,width:0};for(var c in d){if(a.utils.exists(b[c])){d[c]=b[c];}}return d;};})(jwplayer);(function(a){a.html5.playlistloader=function(){var c=new a.html5.eventdispatcher();a.utils.extend(this,c);this.load=function(e){a.utils.ajax(e,d,b);};function d(g){var f=[];try{var f=a.utils.parsers.rssparser.parse(g.responseXML.firstChild);c.sendEvent(a.api.events.JWPLAYER_PLAYLIST_LOADED,{playlist:new a.html5.playlist({playlist:f})});}catch(h){b("Could not parse the playlist");}}function b(e){c.sendEvent(a.api.events.JWPLAYER_ERROR,{message:e?e:"Could not load playlist an unknown reason."});}};})(jwplayer);(function(a){a.html5.skin=function(){var b={};var c=false;this.load=function(d,e){new a.html5.skinloader(d,function(f){c=true;b=f;e();},function(){new a.html5.skinloader("",function(f){c=true;b=f;e();});});};this.getSkinElement=function(d,e){if(c){try{return b[d].elements[e];}catch(f){a.utils.log("No such skin component / element: ",[d,e]);}}return null;};this.getComponentSettings=function(d){if(c&&b&&b[d]){return b[d].settings;}return null;};this.getComponentLayout=function(d){if(c){return b[d].layout;}return null;};};})(jwplayer);(function(a){a.html5.skinloader=function(f,q,k){var o={};var c=q;var l=k;var e=true;var j;var n=f;var t=false;function m(){if(typeof n!="string"||n===""){d(a.html5.defaultSkin().xml);}else{a.utils.ajax(a.utils.getAbsolutePath(n),function(u){try{if(a.utils.exists(u.responseXML)){d(u.responseXML);return;}}catch(v){h();}d(a.html5.defaultSkin().xml);},function(u){d(a.html5.defaultSkin().xml);});}}function d(z){var F=z.getElementsByTagName("component");if(F.length===0){return;}for(var I=0;I<F.length;I++){var D=F[I].getAttribute("name");var C={settings:{},elements:{},layout:{}};o[D]=C;var H=F[I].getElementsByTagName("elements")[0].getElementsByTagName("element");for(var G=0;G<H.length;G++){b(H[G],D);}var A=F[I].getElementsByTagName("settings")[0];if(A&&A.childNodes.length>0){var L=A.getElementsByTagName("setting");for(var Q=0;Q<L.length;Q++){var R=L[Q].getAttribute("name");var J=L[Q].getAttribute("value");var y=/color$/.test(R)?"color":null;o[D].settings[R]=a.utils.typechecker(J,y);}}var M=F[I].getElementsByTagName("layout")[0];if(M&&M.childNodes.length>0){var N=M.getElementsByTagName("group");for(var x=0;x<N.length;x++){var B=N[x];o[D].layout[B.getAttribute("position")]={elements:[]};for(var P=0;P<B.attributes.length;P++){var E=B.attributes[P];o[D].layout[B.getAttribute("position")][E.name]=E.value;}var O=B.getElementsByTagName("*");for(var w=0;w<O.length;w++){var u=O[w];o[D].layout[B.getAttribute("position")].elements.push({type:u.tagName});for(var v=0;v<u.attributes.length;v++){var K=u.attributes[v];o[D].layout[B.getAttribute("position")].elements[w][K.name]=K.value;}if(!a.utils.exists(o[D].layout[B.getAttribute("position")].elements[w].name)){o[D].layout[B.getAttribute("position")].elements[w].name=u.tagName;}}}}e=false;s();}}function s(){clearInterval(j);if(!t){j=setInterval(function(){r();},100);}}function b(z,y){var x=new Image();var u=z.getAttribute("name");var w=z.getAttribute("src");var B;if(w.indexOf("data:image/png;base64,")===0){B=w;}else{var v=a.utils.getAbsolutePath(n);var A=v.substr(0,v.lastIndexOf("/"));B=[A,y,w].join("/");}o[y].elements[u]={height:0,width:0,src:"",ready:false,image:x};x.onload=function(C){g(x,u,y);};x.onerror=function(C){t=true;s();l();};x.src=B;}function h(){for(var v in o){var x=o[v];for(var u in x.elements){var y=x.elements[u];var w=y.image;w.onload=null;w.onerror=null;delete y.image;delete x.elements[u];}delete o[v];}}function r(){for(var u in o){if(u!="properties"){for(var v in o[u].elements){if(!o[u].elements[v].ready){return;}}}}if(e===false){clearInterval(j);c(o);}}function g(u,w,v){if(o[v]&&o[v].elements[w]){o[v].elements[w].height=u.height;o[v].elements[w].width=u.width;o[v].elements[w].src=u.src;o[v].elements[w].ready=true;s();}else{a.utils.log("Loaded an image for a missing element: "+v+"."+w);}}m();};})(jwplayer);(function(a){a.html5.api=function(c,q){var n={};var g=document.createElement("div");c.parentNode.replaceChild(g,c);g.id=c.id;n.version=a.version;n.id=g.id;var m=new a.html5.model(n,g,q);var k=new a.html5.view(n,g,m);var l=new a.html5.controller(n,g,m,k);n.skin=new a.html5.skin();n.jwPlay=function(r){if(typeof r=="undefined"){f();}else{if(r.toString().toLowerCase()=="true"){l.play();}else{l.pause();}}};n.jwPause=function(r){if(typeof r=="undefined"){f();}else{if(r.toString().toLowerCase()=="true"){l.pause();}else{l.play();}}};function f(){if(m.state==a.api.events.state.PLAYING||m.state==a.api.events.state.BUFFERING){l.pause();}else{l.play();}}n.jwStop=l.stop;n.jwSeek=l.seek;n.jwPlaylistItem=function(r){if(d){if(d.playlistClickable()){d.jwInstreamDestroy();return l.item(r);}}else{return l.item(r);}};n.jwPlaylistNext=l.next;n.jwPlaylistPrev=l.prev;n.jwResize=l.resize;n.jwLoad=l.load;n.jwDetachMedia=l.detachMedia;n.jwAttachMedia=l.attachMedia;function j(r){return function(){return m[r];};}function e(r,t,s){return function(){var u=m.plugins.object[r];if(u&&u[t]&&typeof u[t]=="function"){u[t].apply(u,s);}};}n.jwGetPlaylistIndex=j("item");n.jwGetPosition=j("position");n.jwGetDuration=j("duration");n.jwGetBuffer=j("buffer");n.jwGetWidth=j("width");n.jwGetHeight=j("height");n.jwGetFullscreen=j("fullscreen");n.jwSetFullscreen=l.setFullscreen;n.jwGetVolume=j("volume");n.jwSetVolume=l.setVolume;n.jwGetMute=j("mute");n.jwSetMute=l.setMute;n.jwGetStretching=function(){return m.stretching.toUpperCase();};n.jwGetState=j("state");n.jwGetVersion=function(){return n.version;};n.jwGetPlaylist=function(){return m.playlist;};n.jwAddEventListener=l.addEventListener;n.jwRemoveEventListener=l.removeEventListener;n.jwSendEvent=l.sendEvent;n.jwDockSetButton=function(u,r,s,t){if(m.plugins.object.dock&&m.plugins.object.dock.setButton){m.plugins.object.dock.setButton(u,r,s,t);}};n.jwControlbarShow=e("controlbar","show");n.jwControlbarHide=e("controlbar","hide");n.jwDockShow=e("dock","show");n.jwDockHide=e("dock","hide");n.jwDisplayShow=e("display","show");n.jwDisplayHide=e("display","hide");var d;n.jwLoadInstream=function(s,r){if(!d){d=new a.html5.instream(n,m,k,l);}setTimeout(function(){d.load(s,r);},10);};n.jwInstreamDestroy=function(){if(d){d.jwInstreamDestroy();}};n.jwInstreamAddEventListener=o("jwInstreamAddEventListener");n.jwInstreamRemoveEventListener=o("jwInstreamRemoveEventListener");n.jwInstreamGetState=o("jwInstreamGetState");n.jwInstreamGetDuration=o("jwInstreamGetDuration");n.jwInstreamGetPosition=o("jwInstreamGetPosition");n.jwInstreamPlay=o("jwInstreamPlay");n.jwInstreamPause=o("jwInstreamPause");n.jwInstreamSeek=o("jwInstreamSeek");function o(r){return function(){if(d&&typeof d[r]=="function"){return d[r].apply(this,arguments);}else{_utils.log("Could not call instream method - instream API not initialized");}};}n.jwDestroy=function(){l.destroy();};n.jwGetLevel=function(){};n.jwGetBandwidth=function(){};n.jwGetLockState=function(){};n.jwLock=function(){};n.jwUnlock=function(){};function b(){if(m.config.playlistfile){m.addEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,h);m.loadPlaylist(m.config.playlistfile);}else{if(typeof m.config.playlist=="string"){m.addEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,h);m.loadPlaylist(m.config.playlist);}else{m.loadPlaylist(m.config);setTimeout(h,25);}}}function h(r){m.removeEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,h);m.setupPlugins();k.setup();var r={id:n.id,version:n.version};l.playerReady(r);}if(m.config.chromeless&&!a.utils.isIOS()){b();}else{n.skin.load(m.config.skin,b);}return n;};})(jwplayer);}(function(a){a.event.special.swipe={setup:function(){a(this).bind("touchstart",a.event.special.swipe.handler);},teardown:function(){a(this).unbind("touchstart",a.event.special.swipe.handler);},handler:function(c){var k=[].slice.call(arguments,1),g=c.originalEvent.touches,h,f,e=0,d=0,j=this;c=a.event.fix(c);if(g.length==1){h=g[0].pageX;f=g[0].pageY;this.addEventListener("touchmove",b,false);}function l(){j.removeEventListener("touchmove",b);h=f=null;}function b(q){var o=h-q.touches[0].pageX,n=f-q.touches[0].pageY;var m=false;if(Math.abs(o)>=20){l();m=true;e=(o>0)?-1:1;}else{if(Math.abs(n)>=20){l();m=true;d=(n>0)?1:-1;}}if(m){q.preventDefault();}c.type="swipe";k.unshift(c,e,d);return(a.event.dispatch||a.event.handle).apply(j,k);}}};})(window.jQuery||window.Zepto);(function(a){a.fn.spin=function(d,c){var b={tiny:{lines:8,length:2,width:2,radius:3},small:{lines:8,length:4,width:3,radius:5},large:{lines:10,length:8,width:4,radius:8}};if(Spinner){return this.each(function(){var f=a(this),e=f.data();if(e.spinner){e.spinner.stop();delete e.spinner;}if(d!==false){if(typeof d==="string"){if(d in b){d=b[d];}else{d={};}if(c){d.color=c;}}e.spinner=new Spinner(a.extend({color:f.css("color")},d)).spin(this);}});}else{throw"Spinner class not available.";}};})(jQuery);(function(j,l,a){var e=["webkit","Moz","ms","O"];var r={};var q;function g(s,v){var t=l.createElement(s||"div");var u;for(u in v){t[u]=v[u];}return t;}function h(t){for(var s=1,u=arguments.length;s<u;s++){t.appendChild(arguments[s]);}return t;}var k=function(){var s=g("style");h(l.getElementsByTagName("head")[0],s);return s.sheet||s.styleSheet;}();function c(w,s,x,B){var t=["opacity",s,~~(w*100),x,B].join("-");var u=0.01+x/B*100;var A=Math.max(1-(1-w)/s*(100-u),w);var y=q.substring(0,q.indexOf("Animation")).toLowerCase();var v=y&&"-"+y+"-"||"";if(!r[t]){k.insertRule("@"+v+"keyframes "+t+"{0%{opacity:"+A+"}"+u+"%{opacity:"+w+"}"+(u+0.01)+"%{opacity:1}"+(u+s)%100+"%{opacity:"+w+"}100%{opacity:"+A+"}}",0);r[t]=1;}return t;}function o(w,x){var v=w.style;var t;var u;if(v[x]!==a){return x;}x=x.charAt(0).toUpperCase()+x.slice(1);for(u=0;u<e.length;u++){t=e[u]+x;if(v[t]!==a){return t;}}}function f(s,u){for(var t in u){s.style[o(s,t)||t]=u[t];}return s;}function n(u){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var v in t){if(u[v]===a){u[v]=t[v];}}}return u;}function m(s){var t={x:s.offsetLeft,y:s.offsetTop};while((s=s.offsetParent)){t.x+=s.offsetLeft;t.y+=s.offsetTop;}return t;}var d={lines:12,length:7,width:5,radius:10,rotate:0,color:"#000",speed:1,trail:100,opacity:1/4,fps:20,zIndex:2000000000,className:"spinner",top:"auto",left:"auto"};var b=function b(s){if(!this.spin){return new b(s);}this.opts=n(s||{},b.defaults,d);};b.defaults={};n(b.prototype,{spin:function(z){this.stop();var D=this;var s=D.opts;var t=D.el=f(g(0,{className:s.className}),{position:"relative",zIndex:s.zIndex});var C=s.radius+s.length+s.width;var E;var B;if(z){z.insertBefore(t,z.firstChild||null);B=m(z);E=m(t);f(t,{left:(s.left=="auto"?B.x-E.x+(z.offsetWidth>>1):s.left+C)+"px",top:(s.top=="auto"?B.y-E.y+(z.offsetHeight>>1):s.top+C)+"px"});}t.setAttribute("aria-role","progressbar");D.lines(t,D.opts);if(!q){var w=0;var u=s.fps;var y=u/s.speed;var x=(1-s.opacity)/(y*s.trail/100);var A=y/s.lines;!function v(){w++;for(var F=s.lines;F;F--){var G=Math.max(1-(w+F*A)%y*x,s.opacity);D.opacity(t,s.lines-F,G,s);}D.timeout=D.el&&setTimeout(v,~~(1000/u));}();}return D;},stop:function(){var s=this.el;if(s){clearTimeout(this.timeout);if(s.parentNode){s.parentNode.removeChild(s);}this.el=a;}return this;},lines:function(u,w){var t=0;var s;function v(x,y){return f(g(),{position:"absolute",width:(w.length+w.width)+"px",height:w.width+"px",background:x,boxShadow:y,transformOrigin:"left",transform:"rotate("+~~(360/w.lines*t+w.rotate)+"deg) translate("+w.radius+"px,0)",borderRadius:(w.width>>1)+"px"});}for(;t<w.lines;t++){s=f(g(),{position:"absolute",top:1+~(w.width/2)+"px",transform:w.hwaccel?"translate3d(0,0,0)":"",opacity:w.opacity,animation:q&&c(w.opacity,w.trail,t,w.lines)+" "+1/w.speed+"s linear infinite"});if(w.shadow){h(s,f(v("#000","0 0 4px #000"),{top:2+"px"}));}h(u,h(s,v(w.color,"0 0 1px rgba(0,0,0,.1)")));}return u;},opacity:function(t,s,u){if(s<t.childNodes.length){t.childNodes[s].style.opacity=u;}}});!function(){function t(v,s){return g("<"+v+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',s);}var u=f(g("group"),{behavior:"url(#default#VML)"});if(!o(u,"transform")&&u.adj){k.addRule(".spin-vml","behavior:url(#default#VML)");b.prototype.lines=function(x,w){var v=w.length+w.width;var D=2*v;function C(){return f(t("group",{coordsize:D+" "+D,coordorigin:-v+" "+-v}),{width:D,height:D});}var y=-(w.width+w.length)*2+"px";var B=f(C(),{position:"absolute",top:y,left:y});var A;function z(E,s,F){h(B,h(f(C(),{rotation:360/w.lines*E+"deg",left:~~s}),h(f(t("roundrect",{arcsize:1}),{width:v,height:w.width,left:w.radius,top:-w.width>>1,filter:F}),t("fill",{color:w.color,opacity:w.opacity}),t("stroke",{opacity:0}))));}if(w.shadow){for(A=1;A<=w.lines;A++){z(A,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");}}for(A=1;A<=w.lines;A++){z(A);}return h(x,B);};b.prototype.opacity=function(v,s,x,w){var y=v.firstChild;w=w.shadow&&w.lines||0;if(y&&s+w<y.childNodes.length){y=y.childNodes[s+w];y=y&&y.firstChild;y=y&&y.firstChild;if(y){y.opacity=x;}}};}else{q=o(u,"animation");}}();j.Spinner=b;})(window,document);(function(a){a.fn.ellipsis=function(c){var b=a.extend({},c);return this.each(function(){var h=a(this);if(h.css("overflow")=="hidden"){var k=h.html();var e=b.multiline||h.hasClass("multiline");var f=a(this.cloneNode(true)).hide().css("position","absolute").css("overflow","visible").width(e?h.width():"auto").height(e?"auto":h.height());h.after(f);function d(){return f.height()>h.height();}function g(){return f.width()>h.width();}var j=e?d:g;while(k.length>0&&j()){k=k.substr(0,k.length-1);f.html(k+"...");}h.html(f.html());f.remove();}});};})(jQuery);(function(b){var a={destroy:function(){return this.each(function(){});}};b.fn.videoGallery=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1));}else{if(typeof d==="object"||!d){return c.apply(this,arguments);}else{b.error("Method "+d+" does not exist on jQuery.videoGallery");}}function c(e){var e=b.extend({},b.fn.videoGallery.defaults,e);var f=window.document.title;return this.each(function(){var j=b(this);var h="http://cdn.jacaranda.co.uk/json/oriental/main";var g=window.document.title;j.jdGallery({galleryApiUrl:h,apiUrlBase:h,columns:1,pageSize:200,emptyMessage:"Coming soon",seo:true,galleryItemOpts:{thumbnail:{},title:{},description:{append:'<a href="" class="video">Watch video</a>'}},playerOpts:{el:"#video-player",width:640,height:360,loadFirst:false,reqParam:"jdvkey",playerOptions:{autostart:true,controlbar:"over",backcolor:"000000",image:"auto",frontcolor:"",lightcolor:"",events:{onComplete:function(k){b.fn.videoGallery.buildPreview(j,false);}}}},tabOpts:{el:"#video-gallery-nav",reqParam:"jdgkey",items:[{key:"latest",label:"Latest videos",apiUrl:h,maxResults:20},{key:"fso",label:" FSO",apiUrl:h+"/-/fso"},{key:"mopu",label:"MOPU",apiUrl:h+"/-/mopu"},{key:"opupdate",label:"Operational Updates",apiUrl:h+"/-/operational+updates"},{key:"all",label:"All videos",apiUrl:h}]},onDisplayItem:function(n){var m=n.data("jdGallery").displayedEntry;var l=b("#video-preview");l.empty().hide();var k=n.data("jdGallery").plyrEl;k.show();window.document.title=g+" : "+m.title;if(b(document).scrollTop()>b("#video-holder").offset().top){b(document).scrollTop(b("#video-holder").offset().top-10);}},onInit:b.fn.videoGallery.showPreview});});}};b.fn.videoGallery.showPreview=function(c){b.fn.videoGallery.buildPreview(c,true);};b.fn.videoGallery.buildPreview=function(l,t){var h=l.data("jdGallery");var q=(h.displayedEntry)?h.displayedEntry:h.feed.entries[0];if(q){if(t){l.jdGallery("displayItem",q);}var u=b("#video-preview");u.empty().show();var d=h.plyrEl;d.hide();var m=u.width();var f=Math.floor(m/16*9);var c=b("<div/>").addClass("jvp-preview-image").css({width:m,height:f,"background-image":"url("+q.images[0].url+"?width="+m+")","background-repeat":"no-repeat"}).appendTo(u);var r=b("<div/>").addClass("jvp-preview-overlay").appendTo(c);if(b.browser.msie&&b.browser.version=="6.0"){r.fixPNG();}var n=b('<p class="jvp-preview-title"/>').text(q.title).appendTo(r);var g=b('<p class="jvp-preview-description"/>').text(q.description).appendTo(r);var k=b('<a class="video"/>').text("Watch video").click(function(v){u.hide();d.show();d.jdVideo("play");return false;}).appendTo(r);var o=n.outerHeight(true)+g.outerHeight(true)+k.outerHeight(true);var j=Math.floor(u.height()*0.7);if(o>j){if(n.outerHeight(true)+k.outerHeight(true)<=j){var s=j-(n.outerHeight(true)+k.outerHeight(true));if(s>=Math.floor(g.outerHeight(true))*0.3){var e=s-(g.outerHeight(true)-g.innerHeight());g.css({overflow:"hidden",height:e});g.ellipsis({multiline:true});}else{g.remove();}}else{g.remove();var s=j-k.outerHeight(true);if(s<n.outerHeight()){var e=s-(n.outerHeight(true)-n.innerHeight());n.css({overflow:"hidden",height:e});n.ellipsis({multiline:true});}}}}};b.fn.videoGallery.defaults={};})(jQuery);