/* copyright (c) 2013 yendif! technologies ltd. @license gnu/gpl http://www.gnu.org/licenses/gpl-2.0.html @link http://www.yendifplayer.com @version version 5.0.0 */ (function(d,k,g){function w(a,b){this.$el=d(a);this.config=b;++pid;var c=(new date).gettime().tostring()+""+pid;this.yendif={id:this.$el.attr("id")||c,uid:c,index:0,media:"video",engine:b.engine,volume:b.volume,playlistposition:b.playlistposition,l:b.logo,lc:b.license,isl:!1,iser:!1,isw:!1,isp:!1,isfs:!1,isr:!0,markup:"",status:-1,interval:[]};this.yendif.id.replace("yf","");this.playlist={};this.init();return this}function a(a,b){var c,e,h;function f(a){d("body").addclass("noselect");var b=parseint(n.obj.css(t), 10);c=u?a.pagex:a.pagey;e="auto"==b?0:b;touchevents?(g.ontouchmove=function(a){a.preventdefault();v(a.touches[0])},g.ontouchend=k):(d(g).bind("mousemove",v),d(g).bind("mouseup",k),n.obj.bind("mouseup",k));a.preventdefault()}function v(a){1>m.ratio&&(h=touchevents?math.min(p[b.axis]-n[b.axis],math.max(0,e+(c-(u?a.pagex:a.pagey)))):math.min(p[b.axis]-n[b.axis],math.max(0,e+((u?a.pagex:a.pagey)-c))),q=h*s.ratio,m.obj.css(t,-q),n.obj.css(t,h));a.preventdefault()}function k(){d("body").removeclass("noselect"); d(g).unbind("mousemove",v);d(g).unbind("mouseup",k);n.obj.unbind("mouseup",k);g.ontouchmove=g.ontouchend=null}var l={obj:d(".yf-viewport",a)},m={obj:d(".yf-overview",a)},s={obj:d(".yf-scrollbar",a)},p={obj:d(".yf-track",s.obj)},n={obj:d(".yf-thumb",s.obj)},u="x"===b.axis,t=u?"left":"top",r=u?"width":"height",q=0;h=e=0;c=void 0;this.update=function(a){l[b.axis]=l.obj[0]["offset"+r];m[b.axis]=m.obj[0]["scroll"+r];m.ratio=l[b.axis]/m[b.axis];s.obj.toggleclass("disable",1<=m.ratio);p[b.axis]=l[b.axis]; n[b.axis]=math.min(p[b.axis],math.max(0,p[b.axis]*m.ratio));s.ratio=m[b.axis]/p[b.axis];q="relative"===a&&1>=m.ratio?math.min(m[b.axis]-l[b.axis],math.max(0,q)):0;q="bottom"===a&&1>=m.ratio?m[b.axis]-l[b.axis]:isnan(parseint(a,10))?q:parseint(a,10);a=r.tolowercase();n.obj.css(t,q/s.ratio);m.obj.css(t,-q);c=n.obj.offset()[t];s.obj.css(a,p[b.axis]);p.obj.css(a,p[b.axis]);n.obj.css(a,n[b.axis])};this.update();(function(){touchevents?l.obj[0].ontouchstart=function(a){1===a.touches.length&&(f(a.touches[0]), a.stoppropagation())}:(n.obj.bind("mousedown",f),p.obj.bind("mouseup",v))})();return this}var x=/\.(\w{3,4})(\?.*)?$/i,r=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,b=/^(([0-9]{2}:)?[0-9]{2}:[0-9]{2}[,.]{1}[0-9]{3}) --\> (([0-9]{2}:)?[0-9]{2}:[0-9]{2}[,.]{1}[0-9]{3})(.*)/;script=g.getelementsbytagname("script");script=script[script.length-1].src;file=/embed.js/.test(script)?"embed.js":"yendifplayer.js";base=script.split(file)[0];focused="";pid=0;isnfs=1;device={mobile:!1};touchevents= "ontouchstart"in g.documentelement;browser=function(){var a=navigator.appname,b=navigator.useragent,c,e=b.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);e&&null!=(c=b.match(/version\/([\.\d]+)/i))&&(e[2]=c[1]);return e=e?[e[1].tolowercase(),e[2]]:[a,navigator.appversion,"-?"]}();switch(browser[0]){case "chrome":case "safari":vendor="webkit";break;case "firefox":vendor="moz";break;case "msie":vendor="ms";break;case "opera":vendor="o";break;default:vendor=""}support={html5:!1,mp4:!1, webm:!1,ogg:!1,mpegurl:!1,mp3:!1,wav:!1,flash:!1,youtube:!1};/android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.useragent)&&(device.mobile=!0);try{var y=g.createelement("video"),z=g.createelement("audio");if(y.canplaytype){var l=function(a){return/audio/.test(a)?"function"===typeof z.canplaytype&&""!==z.canplaytype(a)?!0:!1:""!==y.canplaytype(a)?!0:!1};support.html5=!0;support.mp4=l("video/mp4");support.webm=l("video/webm");support.ogg=l("video/ogg")||l("audio/ogg");support.mpegurl=l("application/x-mpegurl"); support.mp3=l("audio/mpeg");support.wav=l("audio/wav")}}catch(c){}try{new activexobject("shockwaveflash.shockwaveflash")&&(support.flash=!0)}catch(d){"undefined"!=typeof navigator.plugins&&"object"==typeof navigator.plugins["shockwave flash"]&&(support.flash=!0)}k.onyoutubeiframeapiready=function(){support.youtube=!0};k.attachevent&&k.attachevent("onbeforeunload",function(){__flash_savedunloadhandler=__flash_unloadhandler=function(){}});w.prototype={init:function(){this.config.isef?this.pm():this.im(); this.$el.attr("id",this.yendif.id).addclass("yendifplayer "+this.config.theme+" is-"+this.media).show();0===this.config.muted&&(this.yendif.volume=0);if(!this.config.origin){var a=base.split("/");this.config.origin=a[0]+"//"+a[2]+"/"}this.engine?this.engine.create(this):this.onerror("error")},pm:function(){var a=this,b={};this.$media=this.$el.find("video, audio");this.media=this.$media.is("video")?"video":"audio";b.id="yf-engine-"+this.yendif.uid;"video"===this.media&&(b["x-webkit-airplay"]="allow"); !0===device.mobile&&(b.controls=!0);this.$media.attr(b).addclass("yf-engine");this.$clone=this.$el.html();this.playlist.poster=this.config.poster;this.playlist.vid=this.config.vid;(src=this.config.src)?(b=src.split(x)[1],b=/flv|f4v|mov/.test(b)?"flash":/mp4|m4v/.test(b)?"mp4":b,this.playlist[b]=src):this.$el.find("source").each(function(){var b=d(this).attr("src"),e=d(this).attr("type")||b.split(x)[1],e=/mpegurl/.test(e)?"mpegurl":/mpeg/.test(e)?"mp3":e.replace(a.media+"/","");"m4v"===e&&(e="mp4"); switch(e){case "flash":a.playlist.flash=b;a.playlist.rtmp=d(this).attr("data-rtmp")||"";break;case "youtube":a.py.apply(a,[b]);break;default:a.playlist[e]=b}});this.$track=this.$el.find("track:first");this.$track.length&&(this.playlist.captions=this.$track.attr("src"),this.pvtt(this.playlist.captions));this.se(this.yendif.engine)},im:function(){this.media=this.config.videos?"video":"audio";this.yendif.playlist=this.config[this.media+"s"]||"";this.gpd(-1)},gpd:function(a){var b=tracks="";if(this.playlist= this.yendif.playlist){0>a?(a="[object array]"===object.prototype.tostring.call(this.playlist)?!0:!1,a&&(this.yendif.isp=!0,this.playlist=this.playlist[0],this.config.loop=0)):(this.yendif.index=a,this.yendif.status=2,this.playlist=this.playlist[a],this.config.autoplay=1,this.$el.addclass("is-playing").removeclass("is-paused is-embed"));for(var c in this.playlist)switch(a=this.playlist[c],c){case "flash":b+='';break;case "youtube":this.py(a); b+='';break;case "captions":tracks+='';break;default:/mp4|webm|ogg|mpegurl|mp3|wav/.test(c)&&(type="mpegurl"==c?"application/x-mpegurl":"mp3"==c?"audio/mpeg":this.media+"/"+c,b+='')}}c="";"video"===this.media&&(c+=' x-webkit-airplay="allow"');!0===device.mobile&&(c+=' controls="true"');this.$clone="<"+this.media+' id="yf-engine-'+this.yendif.uid+'" class="yf-engine"'+c+">"+b+tracks+"";this.playlist.captions&&this.pvtt(this.playlist.captions);this.se(this.yendif.engine)},py:function(a){this.yendif.engine="youtube";this.playlist.yid=a.match(r)[2];this.playlist.poster=this.playlist.poster||"http://img.youtube.com/vi/"+this.playlist.yid+"/0.jpg"},pvtt:function(a){function b(a){a=a.split(":");2==a.length&&a.unshift(0);return 3600*a[0]+60*a[1]+parsefloat(a[2].replace(",","."))}if(a){var c=this;this.playlist.subtitles=[];d.get(a,function(a,h){var f=a.split("\n"),g=f.length; for(i=0;i"+f[++i]+"


";d.trim(f[++i])&&i"+f[i]+"


";c.playlist.subtitles.push({start:b(timecode[1]),end:b(timecode[2]||timecode[3]),content:text})}})}},se:function(a){var b=isflash=!1;if(!0===support.html5)for(var c="mp4 mpegurl mp3 webm ogg wav".split(" "),d=0;6>d;d++)if(format=c[d],this.playlist[format]&&support[format]){this.playlist.html5=this.playlist[format];b=!0;break}!0===support.flash&&(this.playlist.flash||this.playlist.mp4|| this.playlist.mp3)&&(isflash=!0);switch(a){case "flash":this.engine=!0===isflash?this.flash:!0===b?this.html5:null;break;case "youtube":this.engine=200>this.$el.width()||200>this.yendif.height?null:!0===support.flash?this.flash:this.youtube;break;default:this.engine=!0===b?this.html5:!0===isflash?this.flash:null}},html5:{create:function(a){a.yendif.engine="html5";!0===device.mobile?(a.isc(),a.$media[0].loop=!1,"video"===a.media&&(a.$media[0].poster=a.playlist.poster),a.$media[0].src=a.playlist.currentsrc= a.playlist.html5):(a.icc(),a.$media[0].controls=!1,a.$media[0].poster="",a.$media[0].autoplay=a.config.autoplay,a.$media[0].loop=a.config.loop);a.yendif.iser=!0;a.$media[0].volume=a.config.volume;a.$media[0].load();if(!0===device.mobile)a.config.autoplay&&a.$media[0].play(),a.$media.on("play",function(){obj=["media plays",a.playlist.currentsrc];a.te.apply(a,[obj])}),a.$media.on("ended",function(){obj=["media completes",a.playlist.currentsrc];a.te.apply(a,[obj]);a.config.loop&&a.$media[0].play()}), a.$media.on("error",function(b){err=a.$media[0].networkstate;3<=err&&a.onerror.apply(a,[err])});else if(a.$media.on("play",function(){a.onplay.apply(a)}),a.$media.on("pause",function(){a.onpause.apply(a)}),a.$media.on("ended",function(){a.onended.apply(a)}),a.$media.on("volumechange",function(){a.config.volumebtn&&a.onvolumechange.apply(a)}),d("source:last",a.$el).on("error",function(b){err=a.$media[0].networkstate;3<=err&&a.onerror.apply(a,[err])}),0this.yendif.status&&(this.yendif.status= 2,this.sctrls());this.$media[0].paused&&this.$media[0].play()},pause:function(){this.$media[0].paused||this.$media[0].pause()},time:function(){var a=this.$media[0].currenttime,b=this.playlist.seekedtime;math.round(a)==math.round(b)&&(this.playlist.seekedtime=b=-1);return b&&-1!==b?b:a},buffered:function(){var a=this.$media[0].seekable;return a&&0=this.$media[0].readystate)){var b= this.$media[0].seekable;b&&0b&&(this.playlist.currenttime=a=b));this.$media[0].currenttime=this.playlist.seekedtime=a;this.$media[0].paused&&this.$media[0].play()}},setvolume:function(a){this.$media[0].volume=a},muted:function(a){this.$media[0].muted=a},onended:function(){this.$media[0].currenttime=0;this.$media[0].pause()},destroy:function(){!0===this.yendif.iser&&(this.$media.off("pause"),this.$media[0].pause())},changevideo:function(a){var b=this;!1===device.mobile&&(this.$media[0].poster= "",this.sl(),this.rc(),this.$media.off("error").on("error",function(a){err=b.$media[0].networkstate;3<=err&&b.onerror.apply(b,[err])}));this.$media[0].src=this.playlist.currentsrc=this.playlist.html5;this.$media[0].load();this.$media[0].play()}},flash:{create:function(a){a.yendif.engine="flash";a.yendif.isfs&&a.sfse(!1);var b=(new date).gettime().tostring(),c=a.config.swf||base+"player.swf",e={id:a.yendif.id,theme:a.config.theme,analytics:a.config.analytics||"",baseref:base,origin:a.config.origin, license:a.config.license||"",logo:a.config.logo||"",poster:a.playlist.poster||"",flash:a.playlist.flash||"",server:a.playlist.rtmp||"",youtubeid:a.playlist.yid||"",mp4:a.playlist.mp4||"",webm:a.playlist.webm||"",ogg:a.playlist.ogg||"",mp3:a.playlist.mp3||"",captions:a.playlist.captions||"",autoplay:a.config.autoplay,loop:a.config.loop,autoplaylist:a.config.autoplaylist,volume:a.yendif.volume,playbtn:a.config.playbtn,controlbar:a.config.controlbar,playpause:a.config.playpause,currenttime:a.config.currenttime, progressbar:a.config.progress,duration:a.config.duration,volumebtn:a.config.volumebtn,fullscreen:a.config.fullscreen,embed:a.config.embed,keyboard:a.config.keyboard,browser:browser[0],vid:a.config.vid},c=c+("?"+b),h;h='':' data="'+c+'"');h+=' type="application/x-shockwave-flash">';var c={movie:c,name:"yf-engine-"+b,width:"100%", height:"100%",allowscriptaccess:"always",allowfullscreen:"true",quality:"high",wmode:"transparent",flashvars:""},f;for(f in e)""!==e[f]&&(c.flashvars+=f+"="+e[f]+"&");for(f in c)h+='';h+="";a.yendif.isw?a.$mediacon.html(h):(a.$el.html('
'+h+"
"),a.$mediacon=d("#yf-media-"+b),a.lp(),a.yendif.isw=!0);a.$media=d("#yf-engine-"+b)},destroy:function(){!0===this.yendif.iser&&(this.yendif.volume=this.$media[0].getvolume())}, changevideo:function(a){this.yendif.engine="flash";a.youtube&&(a.youtubeid=a.yid||a.youtube.match(r)[2]);this.$media[0].updatevideo(a)}},youtube:{create:function(a){a.yendif.engine=a.config.engine;if(support.html5||support.flash){if(!support.youtube){var b=g.createelement("script");b.src="https://www.youtube.com/iframe_api";var c=g.getelementsbytagname("script")[0];c.parentnode.insertbefore(b,c)}a.yendif.interval[1]=k.setinterval(function(){if(support.youtube){clearinterval(a.yendif.interval[1]); var b={autoplay:a.config.autoplay,rel:0,showinfo:0,iv_load_policy:0,wmode:"opaque",modestbranding:1};!1===device.mobile?(a.icc(),b.controls=0,a.config.loop&&(b.loop=a.config.loop,b.playlist=a.playlist.yid),_events={onready:function(b){a.yendif.iser=!0;a.playlist.currentsrc=a.playlist.yid;a.$el.trigger("onplayerready");a.volumeto(-1)},onstatechange:function(b){switch(b.data){case yt.playerstate.ended:a.onended.apply(a);break;case yt.playerstate.playing:a.playlist.duration=a.$media.getduration();a.config.duration&& a.$durationdock.html(a.timeformat(a.playlist.duration));a.onplay.apply(a);break;case yt.playerstate.cued:a.onplay.apply(a)}},onerror:function(b){150!=b.data&&a.onerror.apply(a,[b.data])}}):(a.isc(),b.controls=1,_events={onready:function(b){a.playlist.currentsrc=a.playlist.yid},onstatechange:function(b){switch(b.data){case yt.playerstate.ended:obj=["media completes",a.playlist.currentsrc];a.te.apply(a,[obj]);a.config.loop&&a.$media.playvideo();break;case yt.playerstate.playing:a.yendif.iser=!0,obj= ["media plays",a.playlist.currentsrc],a.te.apply(a,[obj])}},onerror:function(b){150!==b.data&&a.onerror.apply(a,[b.data])}});a.$media=new yt.player("yf-engine-"+a.yendif.uid,{height:"100%",width:"100%",playervars:b,videoid:a.playlist.yid,events:_events})}},500)}else a.engine=null,a.onerror()},play:function(){2>this.yendif.status&&(this.yendif.status=2,this.sctrls());this.$media.playvideo();this.onplay()},pause:function(){this.$media.pausevideo();this.onpause()},time:function(){var a=this.$media.getcurrenttime(), b=this.playlist.seekedtime;math.round(a)==math.round(b)&&(this.playlist.seekedtime=b=-1);return b&&-1!==b?b:a},buffered:function(){return 100},seekto:function(a){this.playlist.seekedtime=a;this.$media.seekto(a);this.youtube.play.apply(this)},setvolume:function(a){this.$media.setvolume(100*a);this.onvolumechange()},muted:function(a){a?this.$media.mute():this.$media.unmute();this.onvolumechange()},onended:function(){},destroy:function(){!0===this.yendif.iser&&this.$media.destroy()},changevideo:function(a){if(support.html5|| support.flash)!1===device.mobile&&this.rc(),this.yendif.engine=this.config.engine,a.yid=this.playlist.currentsrc=a.yid||a.youtube.match(r)[2],this.$media.loadvideobyid(a.yid);else this.onerror("error")}},isc:function(){uid=this.yendif.uid;!1===this.yendif.isw?(this.$el.html('
'+this.$clone+"
"),this.$mediacon=d("#yf-media-"+uid),this.lp(),this.yendif.isw=!0):this.$mediacon.html(this.$clone);this.$media=d("#yf-engine-"+uid)},icc:function(){var a=this.yendif.uid; if(""===this.yendif.markup){"audio"===this.media&&(this.config.playbtn=this.config.embed=this.config.fullscreen=0);for(var b="playbtn controlbar playpause currenttime progress duration volumebtn fullscreen embed".split(" "),c=browser[0].match(/msie/)?" is-"+browser[0]:"",c=c+(0===this.config.autoplay?" is-paused":" is-playing"),e=0;9>e;e++){var h=b[e];0==this.config[h]&&(c+=" no-"+h)}this.yendif.markup+='
';"video"==this.media&&(this.yendif.markup+='
',this.yendif.markup+='
');this.config.playbtn&&(this.yendif.markup+='
');"video"==this.media&&(this.yendif.markup+='
');this.yendif.markup+='
';this.config.playpause&&(this.yendif.markup+='');"audio"==this.media&& (this.yendif.markup+='');this.config.currenttime&&(this.yendif.markup+='
00:00
');this.config.progress&&(this.yendif.markup+='
',this.yendif.markup+='
',this.yendif.markup+="
");this.config.duration&&(this.yendif.markup+= '
00:00
');this.config.volumebtn&&(this.yendif.markup+='
',this.yendif.markup+='',this.yendif.markup+='
',this.yendif.markup+="
");this.config.fullscreen&&(this.yendif.markup+='');this.yendif.markup+= "
";"video"===this.media&&(this.yendif.markup+='
');this.config.embed&&(this.yendif.markup+='
',this.yendif.markup+='
',this.yendif.markup+='paste this code in your html page',this.yendif.markup+='select
');if("video"===this.media){b=function(a){for(var b="",c=a.length-1;0<=c;c--)b+=a[c];return b};h=document.createelement("a");h.href=this.config.origin;_d=h.hostname.replace("www.","");_totd=_d.length;_k=(""+this.yendif.lc).substring(1,11);_e=0;for(e=_totd-1;0<=e;e--)_e+=9187263540*_d.charcodeat(e);_e=(""+_e).substring(0,10);_r=math.random().tostring(36).slice(2);_l=this.yendif.l;_k!==_e?(this.yendif.markup+=""+b("! fidney yb derewop")+"",this.yendif.l="."+_r):_l&&(this.yendif.markup+="",this.yendif.l=".yf-wm")}this.yendif.markup+= "
";this.config.isef?this.$el.addclass(c).append(this.yendif.markup).wrapinner('
'):this.$el.addclass(c).html('
'+this.$clone+this.yendif.markup+"
");c="poster";this.$mediacon=d("#yf-media-"+a);this.$skin=d("#yf-skin-"+a);this.lp();this.yendif.isw=!0}else this.$mediacon.html(this.$clone+this.yendif.markup);this.$media=d("#yf-engine-"+a);this.bpe()},lp:function(){if(this.yendif.isp){var a=this,b=this.yendif.playlist, c=this.yendif.uid,e="";list='
';"webkit"!==vendor?list+='
':e=' style="overflow-x:hidden; overflow-y:auto;"';list+='
    ';for(var h=b.length,f=0;f",e="yf-pcontent",poster=b[f].poster,duration= b[f].duration,b[f].youtube&&!poster&&(yid=b[f].youtube.match(r)[2],poster="http://img.youtube.com/vi/"+yid+"/0.jpg"),poster?(list+='
    ',duration&&(list+=''+duration+""),list+="
    "):(e+=" yf-noimage","audio"===a.media&&(list+='
    ')),duration||(e+=" yf-nodur"),list+='
    ',b[f].title&&(list+='
    '+b[f].title+"
    "),b[f].description&&(list+='
    '+ b[f].description+"
    "),!poster&&duration&&(list+='
    '+duration+"
    "),list+="
    ",list+='
    ',list+="",list+="";list+="
";e="is-playlist";if("audio"===this.media||400>this.$el.width())this.yendif.playlistposition="bottom";"bottom"===this.yendif.playlistposition&&(e+=" playlist-bottom");this.$el.addclass(e).append('
'+list+"
");this.$playlist=d("#yf-playlist-"+c);this.$playlistitem= d("a",this.$playlist);this.$playlistscrollbar=d("#yf-scrollbar-"+c);this.$playlistviewport=d("#yf-viewport-"+c);this.$playlist.on("click","a",function(b){b.preventdefault();b.stoppropagation();b=d(this).attr("data-index");b!=a.yendif.index&&a.lpi.apply(a,[b])})}this.spd()},lpi:function(a){if(this.yendif.isp){a>=this.yendif.playlist.length&&(this.yendif.index=a=0);this.cai();this.playlist=[];var b=this.engine;this.gpd(a);if(null!==b&&"msie"!==browser[0]&&b===this.engine&&!0===this.yendif.iser)files= this.yendif.playlist,b.changevideo.apply(this,[files[a]]);else if(b?b.destroy.apply(this):this.se(this.yendif.engine),this.engine)this.yendif.iser=!1,this.engine.create(this);else this.onerror("error");this.$playlistitem.removeclass("active");d("#"+this.yendif.uid+"_item"+a).addclass("active")}},spd:function(){var a=this,b=this.$el.width(),c=device.mobile&&"flash"!==this.yendif.engine?36:26,e=this.yendif.isp&&"bottom"===this.yendif.playlistposition?this.config.playlistheight:0;this.config.responsive? (pwid=this.$el.parent().actual("width"),pct=b/pwid,hei="audio"===this.media?c+e:b*this.config.ratio+e,this.$el.css({width:b+"px",height:hei+"px"}),d(k).resize(function(){if(!1!==a.yendif.isr){var b=a.$el.parent().actual("width")*pct;a.yendif.isp&&"right"===a.config.playlistposition&&"video"===a.media&&(400>b?"right"===a.yendif.playlistposition&&(a.yendif.playlistposition="bottom",a.$el.addclass("playlist-bottom")):"bottom"===a.yendif.playlistposition&&(a.yendif.playlistposition="right",a.$el.removeclass("playlist-bottom"))); var d=a.yendif.isp&&"bottom"===a.yendif.playlistposition?a.config.playlistheight:0;hei="audio"===a.media?c+d:b*a.config.ratio+d;a.$el.css({width:b+"px",height:hei+"px"});a.spld.apply(a,[b,hei,!1])}})):(hei="audio"===this.media?c+e:this.$el.height()||b*this.config.ratio+e,this.$el.css({width:b+"px",height:hei+"px"}));this.spld.apply(this,[b,hei,!0])},spld:function(a,b,c){this.yendif.isp&&("right"===this.yendif.playlistposition?(this.$mediacon.css({width:a-this.config.playlistwidth+"px",height:b+"px"}), this.$playlist.css({width:this.config.playlistwidth+"px",height:""}),this.$playlistviewport.css("height",b+"px")):(this.$mediacon.css({width:"",height:b-this.config.playlistheight+"px"}),this.$playlist.css({width:"",height:this.config.playlistheight+"px"}),this.$playlistviewport.css("height",this.config.playlistheight+"px")),"webkit"!==vendor&&(!0===c&&this.$playlist.yendifscrollbar(),this.$playlist.yendifscrollbar("update")))},bpe:function(){var a=this,b=this.yendif.uid;this.$poster=d("#yf-poster-"+ b).hide();this.playlist.poster&&(this.$poster.css("background-image",'url("'+this.playlist.poster+'")'),0===this.config.autoplay&&this.$poster.show());this.$loading=d("#yf-loading-"+b);"video"==this.media&&(this.$playbtn=d("#yf-playbtn-"+b),this.$screen=d("#yf-screen-"+b),this.$screen.on("click",function(){a.tpp.apply(a)}));this.$controls=d("#yf-controls-"+b);"video"==this.media&&this.$controls.hide();this.config.playpause&&(this.$playpausebtn=d("#yf-playpause-"+b),this.$playpausebtn.on("click",function(b){b.preventdefault(); a.tpp.apply(a)}));this.config.currenttime&&(this.$currenttimedock=d("#yf-currenttime-"+b));this.config.progress&&(this.$progresswrapper=d("#yf-timeline-"+b),this.$bufferbar=d("#yf-buffer-"+b),this.$progressbar=d("#yf-progress-"+b),this.$progresswrapper.on("mousedown",function(b){focused=a;0a.yendif.status&& (0===a.yendif.status?a.engine.play.apply(a):a.yendif.status=1)});1===this.config.autoplay&&(this.sl(),this.yendif.status=2,this.sctrls())},gec:function(){var a='