var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(e,b,a){e instanceof String&&(e=String(e));for(var d=e.length,c=0;c").css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}).addClass("vimeo_player_overlay");var g="vimeo_player_"+c.id,f=jQuery("
").addClass("vimeo_player_wrapper").attr("id","vimeo_player_wrapper_"+
g);f.css({position:"absolute",zIndex:0,minWidth:"100%",minHeight:"100%",left:0,top:0,overflow:"hidden",opacity:0});c.playerBox=jQuery("").attr("id",g).addClass("playerBox");c.playerBox.css({position:"absolute",zIndex:0,width:"100%",height:"100%",top:-10,frameBorder:0,overflow:"hidden",left:0}).attr({src:"https://player.vimeo.com/video/"+c.videoID+"?background=1&autopause=0"});if(!jQuery.browser.mobile||c.canPlayOnMobile){f.append(c.playerBox);c.opt.containment.children().not("script, style").each(function(){"static"==
jQuery(this).css("position")&&jQuery(this).css("position","relative")});c.isBackground?(jQuery("body").css({boxSizing:"border-box"}),f.css({position:"fixed",top:0,left:0,zIndex:0})):"static"==c.opt.containment.css("position")&&c.opt.containment.css({position:"relative"});c.opt.containment.prepend(f);c.wrapper=f;c.playerBox.css({opacity:1});jQuery.browser.mobile||(c.playerBox.after(e),c.overlay=e);if(!c.isBackground)e.on("mouseenter",function(){c.controlBar&&c.controlBar.length&&c.controlBar.addClass("visible")}).on("mouseleave",
function(){c.controlBar&&c.controlBar.length&&c.controlBar.removeClass("visible")});jQuery(document).on("vimeo_api_loaded",function(){c.player=new Vimeo.Player(g,b);c.player.ready().then(function(){function a(){c.isReady=!0;c.opt.mute&&setTimeout(function(){d.v_mute()},1E3);c.opt.showControls&&jQuery.vimeo_player.buildControls(c);c.opt.autoPlay?setTimeout(function(){d.v_play();setTimeout(function(){b=jQuery.Event("VPStart");d.trigger(b)},1500)},100):d.v_pause();b=jQuery.Event("VPReady");d.trigger(b)}
var b;c.opt.startAt?(c.player.play().then(function(){c.player.pause()}),d.v_seekTo(c.opt.startAt,function(){a()})):a();d.v_optimize_display();jQuery(window).off("resize.vimeo_player_"+c.id).on("resize.vimeo_player_"+c.id,function(){d.v_optimize_display()});c.player.on("progress",function(b){console.debug("progress:: ",b)});c.player.on("error",function(a){c.state=-1;b=jQuery.Event("VPError");b.error=a;d.trigger(b)});c.player.on("play",function(a){c.state=1;d.trigger("change_state");c.controlBar&&c.controlBar.length&&
c.controlBar.find(".vimeo_player_pause").html(jQuery.vimeo_player.controls.pause);"undefined"!=typeof _gaq&&eval(c.opt.gaTrack)&&_gaq.push(["_trackEvent","vimeo_player","Play",c.videoID]);"undefined"!=typeof ga&&eval(c.opt.gaTrack)&&ga("send","event","vimeo_player","play",c.videoID);b=jQuery.Event("VPPlay");b.error=a;d.trigger(b)});c.player.on("pause",function(a){c.state=2;d.trigger("change_state");c.controlBar&&c.controlBar.length&&c.controlBar.find(".vimeo_player_pause").html(jQuery.vimeo_player.controls.play);
b=jQuery.Event("VPPause");b.time=a;d.trigger(b)});c.player.on("seeked",function(b){c.state=3;d.trigger("change_state")});c.player.on("ended",function(a){c.state=0;d.trigger("change_state");b=jQuery.Event("VPEnd");b.time=a;d.trigger(b)});c.player.on("timeupdate",function(a){c.duration=a.duration;c.percent=a.percent;c.seconds=a.seconds;c.state=1;c.player.getPaused().then(function(a){a&&(c.state=2)});c.opt.stopMovieOnBlur&&!document.hasFocus()&&1==c.state&&(c.hasFocus=!1,d.v_pause(),c.document_focus=
setInterval(function(){document.hasFocus()&&!c.hasFocus&&(c.hasFocus=!0,d.v_play(),clearInterval(c.document_focus))},300));if(c.opt.showControls){var e=jQuery("#controlBar_"+c.id),l=e.find(".vimeo_player_pogress"),f=e.find(".vimeo_player_loaded");e=e.find(".vimeo_player_seek_bar");l=l.outerWidth();l=Math.floor(a.seconds)*l/Math.floor(a.duration);f.css({left:0,width:100*a.percent+"%"});e.css({left:0,width:l});a.duration?c.controlBar.find(".vimeo_player_time").html(jQuery.vimeo_player.formatTime(a.seconds)+
" / "+jQuery.vimeo_player.formatTime(a.duration)):c.controlBar.find(".vimeo_player_time").html("-- : -- / -- : --")}c.opt.addRaster?(f="dot"==c.opt.addRaster?"raster-dot":"raster",c.overlay.addClass(c.isRetina?f+" retina":f)):c.overlay.removeClass(function(a,b){a=b.split(" ");var c=[];jQuery.each(a,function(a,b){/raster.*/.test(b)&&c.push(b)});c.push("retina");return c.join(" ")});c.opt.stopAt=c.opt.stopAt>a.duration?a.duration-.6:c.opt.stopAt;a.seconds>=(c.opt.stopAt||a.duration-.6)&&(c.loop=c.loop||
0,c.opt.loop&&c.loop=a?"0"+a:a)+" : "+(9>=b?"0"+b:b)},play:function(){var b=this.get(0);if(!b.isReady)return this;b.player.play();setTimeout(function(){b.wrapper.fadeTo(1E3,b.opt.opacity)},1E3);var a=jQuery("#controlBar_"+b.id);a.length&&a.find(".mb_YTPPvimeo_player_playpause").html(jQuery.vimeo_player.controls.pause);b.state=1;jQuery(b).css("background-image","none");return this},togglePlay:function(b){var a=this.get(0);1==a.state?
this.v_pause():this.v_play();"function"==typeof b&&b(a.state);return this},pause:function(){var b=this.get(0);b.player.pause();b.state=2;return this},seekTo:function(b,a){var d=this.get(0);d.player.setCurrentTime(d.opt.stopAt&&b>=d.opt.stopAt?d.opt.stopAt-.5:b).then(function(b){"function"==typeof a&&a(b)});return this},setVolume:function(b){var a=this.get(0);console.debug("setVolume:: ",b);console.debug("volume:: ",a.opt.vol);b||a.opt.vol||!a.isMute?!b&&!a.isMute||b&&a.opt.vol==b?a.isMute?jQuery(a).v_mute():
jQuery(a).v_unmute():(a.opt.vol=b,a.player.setVolume(a.opt.vol),a.volumeBar&&a.volumeBar.length&&a.volumeBar.updateSliderVal(100*b)):jQuery(a).v_unmute();return this},toggleVolume:function(){var b=this.get(0);if(b){if(b.isMute)return jQuery(b).v_unmute(),!0;jQuery(b).v_mute();return!1}},mute:function(){var b=this.get(0);if(!b.isMute)return b.isMute=!0,b.player.setVolume(0),b.volumeBar&&b.volumeBar.length&&10").attr("id","controlBar_"+b.id).addClass("vimeo_player_bar").css({whiteSpace:"noWrap",position:b.isBackground?"fixed":"absolute",zIndex:b.isBackground?1E4:1E3});var d=jQuery("").addClass("buttonBar"),c=jQuery(""+jQuery.vimeo_player.controls.play+"").addClass("vimeo_player_pause vimeo_icon").click(function(){1==
b.state?jQuery(b).v_pause():jQuery(b).v_play()}),e=jQuery(""+jQuery.vimeo_player.controls.mute+"").addClass("vimeo_player_muteUnmute vimeo_icon").click(function(){b.isMute?jQuery(b).v_unmute():jQuery(b).v_mute()}),h=jQuery("").addClass("vimeo_player_volume_bar").css({display:"inline-block"});b.volumeBar=h;var g=jQuery("").addClass("vimeo_player_time"),f="https://vimeo.com/"+b.videoID,k=jQuery("").html(jQuery.vimeo_player.controls.logo).addClass("vimeo_url vimeo_icon").attr("title",
"view on Vimeo").on("click",function(){console.debug(f);window.open(f,"viewOnVimeo")}),m=jQuery("").html(jQuery.vimeo_player.controls.fullscreen).addClass("vimeo_fullscreen vimeo_icon").on("click",function(){jQuery(b).v_fullscreen(a.realfullscreen)}),n=jQuery("").addClass("vimeo_player_pogress").css("position","absolute").click(function(a){p.css({width:a.clientX-p.offset().left});b.timeW=a.clientX-p.offset().left;b.controlBar.find(".vimeo_player_loaded").css({width:0});a=Math.floor(b.duration);
b.goto=p.outerWidth()*a/n.outerWidth();console.debug(b.goto);jQuery(b).v_seekTo(parseFloat(b.goto));b.controlBar.find(".vimeo_player_loaded").css({width:0})}),q=jQuery("").addClass("vimeo_player_loaded").css("position","absolute"),p=jQuery("").addClass("vimeo_player_seek_bar").css("position","absolute");n.append(q).append(p);d.append(c).append(e).append(h).append(g);a.show_vimeo_logo&&d.append(k);(b.isBackground||eval(b.opt.realfullscreen)&&!b.isBackground)&&d.append(m);b.controlBar.append(d).append(n);
b.isBackground?jQuery("body").after(b.controlBar):b.wrapper.before(b.controlBar);h.simpleSlider({initialval:b.opt.vol,scale:100,orientation:"h",callback:function(a){0==a.value?jQuery(b).v_mute():jQuery(b).v_unmute();b.player.setVolume(a.value/100);b.isMute||(b.opt.vol=a.value)}})}},optimizeVimeoDisplay:function(b){var a=this.get(0);a.opt.align=b||a.opt.align;a.opt.align="undefined "!=typeof a.opt.align?a.opt.align:"center,center";b=a.opt.align.split(",");if(a.opt.optimizeDisplay){var d=a.isPlayer?
0:80;var c=a.wrapper;var e=c.outerWidth();var h=c.outerHeight()+d;c=e;var g="16/9"==a.opt.ratio?Math.ceil(.5625*c):Math.ceil(.75*c);var f=-((g-h)/2);var k=0;var m=ge&&(k=-((c-e)/2))}}else g=c="100%",k=f=0;a.playerBox.css({width:c,
height:g,marginTop:f,marginLeft:k,maxWidth:"initial"})},setAlign:function(b){this.v_optimize_display(b)},getAlign:function(){return this.get(0).opt.align},fullscreen:function(b){function a(a,b){for(var c=["webkit","moz","ms","o",""],d=0,e,f;d").addClass("level").addClass(c);
d.prepend(c);a.level=c;d.css({cursor:"default"});"auto"==a.opt.scale&&(a.opt.scale=e(a).outerWidth());d.updateSliderVal();a.opt.readonly||(d.on(e.simpleSlider.events.start,function(b){e.browser.mobile&&(b=b.changedTouches[0]);a.canSlide=!0;d.updateSliderVal(b);"h"==a.opt.orientation?d.css({cursor:"col-resize"}):d.css({cursor:"row-resize"});b.preventDefault();b.stopPropagation()}),e(document).on(e.simpleSlider.events.move,function(b){e.browser.mobile&&(b=b.changedTouches[0]);a.canSlide&&(e(document).css({cursor:"default"}),
d.updateSliderVal(b),b.preventDefault(),b.stopPropagation())}).on(e.simpleSlider.events.end,function(){e(document).css({cursor:"auto"});a.canSlide=!1;d.css({cursor:"auto"})}))})},updateSliderVal:function(b){var a=this.get(0);if(a.opt){a.opt.initialval="number"==typeof a.opt.initialval?a.opt.initialval:a.opt.initialval(a);var d=e(a).outerWidth(),c=e(a).outerHeight();a.x="object"==typeof b?b.clientX+document.body.scrollLeft-this.offset().left:"number"==typeof b?b*d/a.opt.scale:a.opt.initialval*d/a.opt.scale;
a.y="object"==typeof b?b.clientY+document.body.scrollTop-this.offset().top:"number"==typeof b?(a.opt.scale-a.opt.initialval-b)*c/a.opt.scale:a.opt.initialval*c/a.opt.scale;a.y=this.outerHeight()-a.y;a.scaleX=a.x*a.opt.scale/d;a.scaleY=a.y*a.opt.scale/c;a.outOfRangeX=a.scaleX>a.opt.scale?a.scaleX-a.opt.scale:0>a.scaleX?a.scaleX:0;a.outOfRangeY=a.scaleY>a.opt.scale?a.scaleY-a.opt.scale:0>a.scaleY?a.scaleY:0;a.outOfRange="h"==a.opt.orientation?a.outOfRangeX:a.outOfRangeY;a.value="undefined"!=typeof b?
"h"==a.opt.orientation?a.x>=this.outerWidth()?a.opt.scale:0>=a.x?0:a.scaleX:a.y>=this.outerHeight()?a.opt.scale:0>=a.y?0:a.scaleY:"h"==a.opt.orientation?a.scaleX:a.scaleY;"h"==a.opt.orientation?a.level.width(Math.floor(100*a.x/d)+"%"):a.level.height(Math.floor(100*a.y/c));"function"==typeof a.opt.callback&&a.opt.callback(a)}}};e.fn.simpleSlider=e.simpleSlider.init;e.fn.updateSliderVal=e.simpleSlider.updateSliderVal})(jQuery);