/*jquery.mb.ytplayer 27-07-2018
_ jquery.mb.components
_ email: matteo@open-lab.com
_ copyright (c) 2001-2018. matteo bicocchi (pupunzi);
_ blog: http://pupunzi.open-lab.com
_ open lab s.r.l., florence - italy
*/
function onyoutubeiframeapiready(){ytp.ytapiready||(ytp.ytapiready=!0,jquery(document).trigger("ytapiready"))}function uncamel(a){return a.replace(/([a-z])/g,function(a){return"-"+a.tolowercase()})}function setunit(a,b){return"string"!=typeof a||a.match(/^[\-0-9\.]+jquery/)?""+a+b:a}function setfilter(a,b,c){var d=uncamel(b),e=jquery.browser.mozilla?"":jquery.css.sfx;a[e+"filter"]=a[e+"filter"]||"",c=setunit(c>jquery.css.filters[b].max?jquery.css.filters[b].max:c,jquery.css.filters[b].unit),a[e+"filter"]+=d+"("+c+") ",delete a[b]}function istouchsupported(){var a=nagt.msmaxtouchpoints,b="ontouchstart"in document.createelement("div");return!(!a&&!b)}function istouchsupported(){var a=nagt.msmaxtouchpoints,b="ontouchstart"in document.createelement("div");return!(!a&&!b)}var ytp=ytp||{},getytpvideoid=function(a){var b,c;return a.indexof("youtu.be")>0?(b=a.substr(a.lastindexof("/")+1,a.length),c=b.indexof("?list=")>0?b.substr(b.lastindexof("="),b.length):null,b=c?b.substr(0,b.lastindexof("?")):b):a.indexof("http")>-1?(b=a.match(/[\\?&]v=([^]*)/)[1],c=a.indexof("list=")>0?a.match(/[\\?&]list=([^]*)/)[1]:null):(b=a.length>15?null:a,c=b?null:a),{videoid:b,playlistid:c}};!function(jquery,ytp){jquery.mbytplayer={name:"jquery.mb.ytplayer",version:"3.2.5",build:"7244",author:"matteo bicocchi (pupunzi)",apikey:"",defaults:{videourl:null,containment:"body",ratio:"auto",fadeonstarttime:1500,startat:0,stopat:0,autoplay:!0,coverimage:!1,loop:!0,addraster:!1,mask:!1,opacity:1,quality:"default",vol:50,mute:!1,showcontrols:!0,anchor:"center,center",showannotations:!1,cc_load_policy:!1,showytlogo:!0,useonmobile:!0,mobilefallbackimage:null,playonlyifvisible:!1,onscreenpercentage:30,stopmovieonblur:!0,realfullscreen:!0,optimizedisplay:!0,abundance:.2,gatrack:!0,remember_last_time:!1,addfilters:!1,onready:function(a){},onerror:function(a,b){}},controls:{play:"p",pause:"p",mute:"m",unmute:"a",onlyyt:"o",showsite:"r",ytlogo:"y"},controlbar:null,locationprotocol:"https:",defaultfilters:{grayscale:{value:0,unit:"%"},hue_rotate:{value:0,unit:"deg"},invert:{value:0,unit:"%"},opacity:{value:0,unit:"%"},saturate:{value:0,unit:"%"},sepia:{value:0,unit:"%"},brightness:{value:0,unit:"%"},contrast:{value:0,unit:"%"},blur:{value:0,unit:"px"}},buildplayer:function(options){function isiframe(){var a=!1;try{self.location.href!=top.location.href&&(a=!0)}catch(b){a=!0}return a}if(ytp.ytapiready||"undefined"!=typeof window.yt)settimeout(function(){jquery(document).trigger("ytapiready"),ytp.ytapiready=!0},100);else{jquery("#ytapi").remove();var tag=jquery("").attr({src:jquery.mbytplayer.locationprotocol+"//www.youtube.com/iframe_api?v="+jquery.mbytplayer.version,id:"ytapi"});jquery("head").prepend(tag)}return this.each(function(){var ytplayer=this,$ytplayer=jquery(ytplayer);$ytplayer.hide(),ytplayer.loop=0,ytplayer.state=0,ytplayer.filters=jquery.extend(!0,{},jquery.mbytplayer.defaultfilters),ytplayer.filtersenabled=!0,ytplayer.id=ytplayer.id||"ytp_"+(new date).gettime(),$ytplayer.addclass("mb_ytplayer");var property=$ytplayer.data("property")&&"string"==typeof $ytplayer.data("property")?eval("("+$ytplayer.data("property")+")"):$ytplayer.data("property");"object"!=typeof property&&(property={}),ytplayer.opt=jquery.extend(!0,{},jquery.mbytplayer.defaults,ytplayer.opt,options,property),ytplayer.opt.elementid=ytplayer.id,0===ytplayer.opt.vol&&(ytplayer.opt.vol=1,ytplayer.opt.mute=!0),ytplayer.opt.autoplay&&0==ytplayer.opt.mute&&jquery.mbbrowser.chrome&&(jquery(document).one("mousedown.ytpstart",function(){$ytplayer.ytpplay()}),console.info("ytplayer info: on webkit browsers you can not autoplay the video if the audio is on.")),ytplayer.opt.loop&&"boolean"==typeof ytplayer.opt.loop&&(ytplayer.opt.loop=9999);var fullscreenavailable=document.fullscreenenabled||document.webkitfullscreenenabled||document.mozfullscreenenabled||document.msfullscreenenabled;ytplayer.opt.realfullscreen=isiframe()||!fullscreenavailable?!1:ytplayer.opt.realfullscreen,ytplayer.opt.showannotations=ytplayer.opt.showannotations?"1":"3",ytplayer.opt.cc_load_policy=ytplayer.opt.cc_load_policy?"1":"0",ytplayer.opt.coverimage=ytplayer.opt.coverimage||ytplayer.opt.backgroundimage,jquery.mbbrowser.msie&&jquery.mbbrowser.version<9&&(ytplayer.opt.opacity=1),ytplayer.opt.containment="self"===ytplayer.opt.containment?$ytplayer:jquery(ytplayer.opt.containment),ytplayer.isretina=window.retina||window.devicepixelratio>1,ytplayer.opt.ratio="auto"===ytplayer.opt.ratio?16/9:ytplayer.opt.ratio,ytplayer.opt.ratio=eval(ytplayer.opt.ratio),$ytplayer.attr("id")||$ytplayer.attr("id","ytp_"+(new date).gettime()),ytplayer.playerid="iframe_"+ytplayer.id,ytplayer.isalone=!1,ytplayer.hasfocus=!0,ytplayer.videoid=ytplayer.opt.videourl?getytpvideoid(ytplayer.opt.videourl).videoid:$ytplayer.attr("href")?getytpvideoid($ytplayer.attr("href")).videoid:!1,ytplayer.playlistid=ytplayer.opt.videourl?getytpvideoid(ytplayer.opt.videourl).playlistid:$ytplayer.attr("href")?getytpvideoid($ytplayer.attr("href")).playlistid:!1;var start_from_last=0;if(jquery.mbcookie.get("ytplayer_start_from"+ytplayer.videoid)&&(start_from_last=parsefloat(jquery.mbcookie.get("ytplayer_start_from"+ytplayer.videoid))),ytplayer.opt.remember_last_time&&start_from_last&&(ytplayer.start_from_last=start_from_last,jquery.mbcookie.remove("ytplayer_start_from"+ytplayer.videoid)),ytplayer.isplayer=$ytplayer.is(ytplayer.opt.containment),ytplayer.isbackground=ytplayer.opt.containment.is("body"),!ytplayer.isbackground||!ytp.backgroundisinited){ytplayer.isplayer&&$ytplayer.show(),ytplayer.overlay=jquery("
").css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}).addclass("ytpoverlay"),ytplayer.wrapper=jquery("").attr("id","wrapper_"+ytplayer.id).css({position:"absolute",zindex:0,minwidth:"100%",minheight:"100%",left:0,top:0,overflow:"hidden",opacity:0}).addclass("mbytp_wrapper"),ytplayer.isplayer&&(ytplayer.inlineplaybutton=jquery("").addclass("inlineplaybutton").html(jquery.mbytplayer.controls.play),$ytplayer.append(ytplayer.inlineplaybutton),ytplayer.inlineplaybutton.on("click",function(a){$ytplayer.ytpplay(),a.stoppropagation()}),ytplayer.opt.autoplay&&ytplayer.inlineplaybutton.hide(),ytplayer.overlay.on("click",function(){$ytplayer.ytptoggleplay()}).css({cursor:"pointer"}));var playerbox=jquery("").attr("id",ytplayer.playerid).addclass("playerbox");if(playerbox.css({position:"absolute",zindex:0,width:"100%",height:"100%",top:0,left:0,overflow:"hidden",opacity:1}),ytplayer.wrapper.append(playerbox),playerbox.after(ytplayer.overlay),ytplayer.isplayer&&(ytplayer.inlinewrapper=jquery("").addclass("inline-ytplayer"),ytplayer.inlinewrapper.css({position:"relative",maxwidth:ytplayer.opt.containment.css("width")}),ytplayer.opt.containment.css({position:"relative",paddingbottom:"56.25%",overflow:"hidden",height:0}),ytplayer.opt.containment.wrap(ytplayer.inlinewrapper)),ytplayer.opt.containment.children().not("script, style").each(function(){"static"==jquery(this).css("position")&&jquery(this).css("position","relative")}),ytplayer.isbackground?(jquery("body").css({boxsizing:"border-box"}),ytplayer.wrapper.css({position:"fixed",top:0,left:0,zindex:0})):"static"==ytplayer.opt.containment.css("position")&&(ytplayer.opt.containment.css({position:"relative"}),$ytplayer.show()),ytplayer.opt.containment.prepend(ytplayer.wrapper),ytplayer.isbackground||ytplayer.overlay.on("mouseenter",function(){ytplayer.controlbar&&ytplayer.controlbar.length&&ytplayer.controlbar.addclass("visible")}).on("mouseleave",function(){ytplayer.controlbar&&ytplayer.controlbar.length&&ytplayer.controlbar.removeclass("visible")}),jquery.mbbrowser.mobile&&!ytplayer.opt.useonmobile)return ytplayer.opt.mobilefallbackimage&&(ytplayer.wrapper.css({backgroundimage:"url("+ytplayer.opt.mobilefallbackimage+")",backgroundposition:"center center",backgroundsize:"cover",backgroundrepeat:"no-repeat",opacity:1}),ytplayer.wrapper.css({opacity:1})),$ytplayer;jquery.mbbrowser.mobile&&ytplayer.opt.autoplay&&ytplayer.opt.useonmobile&&jquery("body").one("touchstart",function(){ytplayer.player.playvideo()}),jquery(document).one("ytapiready",function(){$ytplayer.trigger("ytapiready_"+ytplayer.id),ytp.ytapiready=!0}),ytplayer.isonscreen=jquery.mbytplayer.isonscreen(ytplayer,ytplayer.opt.onscreenpercentage),$ytplayer.one("ytapiready_"+ytplayer.id,function(){var a=this,b=jquery(a);a.isbackground&&ytp.backgroundisinited||a.isinit||(a.isbackground&&(ytp.backgroundisinited=!0),a.opt.autoplay="undefined"==typeof a.opt.autoplay?!!a.isbackground:a.opt.autoplay,a.opt.vol=a.opt.vol?a.opt.vol:100,jquery.mbytplayer.getdatafromapi(a),jquery(a).on("ytpchanged",function(c){if(!a.isinit){a.isinit=!0;var d={modestbranding:1,autoplay:0,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,playerapiid:a.playerid,origin:"*",allowfullscreen:!0,wmode:"transparent",iv_load_policy:a.opt.showannotations,cc_load_policy:a.opt.cc_load_policy,playsinline:jquery.mbbrowser.mobile?1:0,html5:document.createelement("video").canplaytype?1:0};new yt.player(a.playerid,{playervars:d,events:{onready:function(c){a.player=c.target,a.player.loadvideobyid({videoid:a.videoid.tostring(),suggestedquality:a.opt.quality}),b.trigger("ytplayerisready_"+a.id)},onstatechange:function(b){if("function"==typeof b.target.getplayerstate){var c=b.target.getplayerstate();if(a.preventtrigger||a.isstarting)return void(a.preventtrigger=!1);a.state=c;var d;switch(c){case-1:d="ytpunstarted";break;case 0:d="ytprealend";break;case 1:d="ytpplay",a.controlbar.length&&a.controlbar.find(".mb_ytpplaypause").html(jquery.mbytplayer.controls.pause),a.isplayer&&a.inlineplaybutton.hide(),jquery(document).off("mousedown.ytpstart");break;case 2:d="ytppause",a.controlbar.length&&a.controlbar.find(".mb_ytpplaypause").html(jquery.mbytplayer.controls.play),a.isplayer&&a.inlineplaybutton.show();break;case 3:a.player.setplaybackquality(a.opt.quality),d="ytpbuffering",a.controlbar.length&&a.controlbar.find(".mb_ytpplaypause").html(jquery.mbytplayer.controls.play);break;case 5:d="ytpcued"}var e=jquery.event(d);e.time=a.currenttime,jquery(a).trigger(e)}},onplaybackqualitychange:function(b){var c=b.target.getplaybackquality(),d=jquery.event("ytpqualitychange");d.quality=c,jquery(a).trigger(d)},onerror:function(c){switch("function"==typeof a.opt.onerror&&a.opt.onerror(b,c),c.data){case 2:console.error("video id:: "+a.videoid+": the request contains an invalid parameter value. for example, this error occurs if you specify a video id that does not have 11 characters, or if the video id contains invalid characters, such as exclamation points or asterisks.");break;case 5:console.error("video id:: "+a.videoid+": the requested content cannot be played in an html5 player or another error related to the html5 player has occurred.");break;case 100:console.error("video id:: "+a.videoid+": the video requested was not found. this error occurs when a video has been removed (for any reason) or has been marked as private.");break;case 101:case 150:console.error("video id:: "+a.videoid+": the owner of the requested video does not allow it to be played in embedded players.")}a.islist&&jquery(a).ytpplaynext()}}}),b.on("ytplayerisready_"+a.id,function(){return a.isready?this:(a.playerel=a.player.getiframe(),jquery(a.playerel).unselectable(),b.optimizedisplay(),jquery(window).off("resize.ytp_"+a.id).on("resize.ytp_"+a.id,function(){b.optimizedisplay()}),a.opt.remember_last_time&&jquery(window).on("unload.ytp_"+a.id,function(){var b=a.player.getcurrenttime();jquery.mbcookie.set("ytplayer_start_from"+a.videoid,b,0)}),void b.ytpcheckforstate())})}}))}),$ytplayer.off("ytptime.mask"),jquery.mbytplayer.applymask(ytplayer)}})},isonscreen:function(a,b){b=b||10;var c=a.wrapper,d=jquery(window).scrolltop(),e=d+jquery(window).height(),f=c.height()*b/100,g=c.offset().top+f,h=c.offset().top+(c.height()-f);return e>=h&&g>=d},getdatafromapi:function(a){if(a.videodata=jquery.mbstorage.get("ytplayer_data_"+a.videoid),jquery(a).off("ytpdata.ytplayer").on("ytpdata.ytplayer",function(){if(a.hasdata&&a.isplayer&&!a.opt.autoplay){var b="false"!=a.opt.coverimage?a.opt.coverimage:a.videodata.thumb_max||a.videodata.thumb_high||a.videodata.thumb_medium;a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+b+") center center",backgroundsize:"cover"})}}),a.videodata)settimeout(function(){a.datareceived=!0;var b=jquery.event("ytpchanged");b.time=a.currenttime,b.videoid=a.videoid,b.opt=a.opt,jquery(a).trigger(b);var c=jquery.event("ytpdata");c.prop={};for(var d in a.videodata)c.prop[d]=a.videodata[d];jquery(a).trigger(c)},a.opt.fadeonstarttime),a.hasdata=!0;else if(jquery.mbytplayer.apikey)jquery.getjson(jquery.mbytplayer.locationprotocol+"//www.googleapis.com/youtube/v3/videos?id="+a.videoid+"&key="+jquery.mbytplayer.apikey+"&part=snippet",function(b){function c(b){a.videodata={},a.videodata.id=a.videoid,a.videodata.channeltitle=b.channeltitle,a.videodata.title=b.title,a.videodata.description=b.description.length<400?b.description:b.description.substring(0,400)+" ...",a.videodata.thumb_max=b.thumbnails.maxres?b.thumbnails.maxres.url:null,a.videodata.thumb_high=b.thumbnails.high?b.thumbnails.high.url:null,a.videodata.thumb_medium=b.thumbnails.medium?b.thumbnails.medium.url:null,jquery.mbstorage.set("ytplayer_data_"+a.videoid,a.videodata)}a.datareceived=!0;var d=jquery.event("ytpchanged");d.time=a.currenttime,d.videoid=a.videoid,jquery(a).trigger(d),b.items[0]?(c(b.items[0].snippet),a.hasdata=!0):(a.videodata={},a.hasdata=!1);var e=jquery.event("ytpdata");e.prop={};for(var f in a.videodata)e.prop[f]=a.videodata[f];jquery(a).trigger(e)});else{if(settimeout(function(){var b=jquery.event("ytpchanged");b.time=a.currenttime,b.videoid=a.videoid,jquery(a).trigger(b)},50),!a.opt.autoplay){var b="false"!=a.opt.coverimage?a.opt.coverimage:jquery.mbytplayer.locationprotocol+"//i.ytimg.com/vi/"+a.videoid+"/maxresdefault.jpg";b&&a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+b+") center center",backgroundsize:"cover"})}a.videodata=null}a.opt.ratio="auto"==a.opt.ratio?"16/9":a.opt.ratio,a.isplayer&&!a.opt.autoplay&&(a.loading=jquery("").addclass("loading").html("loading").hide(),jquery(a).append(a.loading),a.loading.fadein())},removestoreddata:function(){jquery.mbstorage.remove()},getvideodata:function(){var a=this.get(0);return a.videodata},getvideoid:function(){var a=this.get(0);return a.videoid||!1},getplaylistid:function(){var a=this.get(0);return a.playlistid||!1},setvideoquality:function(a){var b=this.get(0);return b.player.setplaybackquality(a),this},playlist:function(a,b,c){function d(h,i){i=i||"";var j="https://www.googleapis.com/youtube/v3/playlistitems";jquery.getjson(j,{part:"snippet,contentdetails",playlistid:h,maxresults:50,pagetoken:i,key:jquery.mbytplayer.apikey}).done(function(h){e(h),h.nextpagetoken?(i=h.nextpagetoken,d(plid,i,a)):f.ytplaylist(g.videos,b,c)})}function e(a){for(var b=a.items.length,c=0;b>c;c++)g.videos.push({videourl:a.items[c].contentdetails.videoid})}var f=this,g=f.get(0);return"string"==typeof a&&""!=jquery.mbytplayer.apikey?(d(a),this):(g.islist=!0,b&&(a=jquery.shuffle(a)),g.videoid||(g.videos=a,g.videocounter=1,g.videolength=a.length,jquery(g).data("property",a[0]),jquery(g).ytplayer()),"function"==typeof c&&jquery(g).one("ytpchanged",function(){c(g)}),jquery(g).on("ytpend",function(){jquery(g).ytpplaynext()}),this)},playnext:function(){var a=this.get(0);return a.videocounter++,a.videocounter>a.videolength&&(a.videocounter=1),jquery(a).ytpplayindex(a.videocounter),this},playprev:function(){var a=this.get(0);return a.videocounter--,a.videocounter<=0&&(a.videocounter=a.videolength),jquery(a).ytpplayindex(a.videocounter),this},playindex:function(a){var b=this.get(0);b.checkforstartat&&(clearinterval(b.checkforstartat),clearinterval(b.getstate)),b.videocounter=a,b.videocounter>=b.videolength&&(b.videocounter=b.videolength);var c=b.videos[b.videocounter-1];return jquery(b).ytpchangevideo(c),this},changevideo:function(a){var b=this,c=b.get(0);c.opt.startat=0,c.opt.stopat=0,c.opt.mask=!1,c.opt.mute=!0,c.opt.autoplay=!0,c.opt.addfilters=!1,c.opt.coverimage=!1,c.hasdata=!1,c.haschanged=!0,c.player.looptime=void 0,a&&jquery.extend(c.opt,a),c.videoid=getytpvideoid(c.opt.videourl).videoid,c.opt.loop&&"boolean"==typeof c.opt.loop&&(c.opt.loop=9999),c.wrapper.css({background:"none"}),jquery(c.playerel).cssanimate({opacity:0},c.opt.fadeonstarttime,function(){jquery.mbytplayer.getdatafromapi(c),b.ytpgetplayer().loadvideobyid({videoid:c.videoid,suggestedquality:c.opt.quality}),b.ytppause(),b.optimizedisplay(),b.ytpcheckforstate()});var d=jquery.event("ytpchangevideo");return d.time=c.currenttime,jquery(c).trigger(d),jquery.mbytplayer.applymask(c),this},getplayer:function(){return jquery(this).get(0).player},playerdestroy:function(){var a=this.get(0);return ytp.ytapiready=!0,ytp.backgroundisinited=!1,a.isinit=!1,a.videoid=null,a.isready=!1,a.wrapper.remove(),jquery("#controlbar_"+a.id).remove(),clearinterval(a.checkforstartat),clearinterval(a.getstate),this},fullscreen:function(real){function hidemouse(){ytplayer.overlay.css({cursor:"none"})}function runprefixmethod(a,b){for(var c,d,e=["webkit","moz","ms","o",""],f=0;f10&&a.volumebar.updatesliderval(0);var b=jquery("#controlbar_"+a.id),c=b.find(".mb_ytpmuteunmute");c.html(jquery.mbytplayer.controls.unmute),jquery(a).addclass("ismuted"),a.volumebar&&a.volumebar.length&&a.volumebar.addclass("muted");var d=jquery.event("ytpmuted");return d.time=a.currenttime,a.preventtrigger||jquery(a).trigger(d),this},unmute:function(){var a=this.get(0);if(!a.ismute)return this;a.player.unmute(),a.ismute=!1,jquery(a).ytpsetvolume(a.opt.vol),a.volumebar&&a.volumebar.length&&a.volumebar.updatesliderval(a.opt.vol>10?a.opt.vol:10);var b=jquery("#controlbar_"+a.id),c=b.find(".mb_ytpmuteunmute");c.html(jquery.mbytplayer.controls.mute),jquery(a).removeclass("ismuted"),a.volumebar&&a.volumebar.length&&a.volumebar.removeclass("muted");var d=jquery.event("ytpunmuted");return d.time=a.currenttime,a.preventtrigger||jquery(a).trigger(d),this},applyfilter:function(a,b){var c=this,d=c.get(0);d.filters[a].value=b,d.filtersenabled&&c.ytpenablefilters()},applyfilters:function(a){var b=this,c=b.get(0);if(!c.isready)return jquery(c).on("ytpready",function(){b.ytpapplyfilters(a)}),this;for(var d in a)b.ytpapplyfilter(d,a[d]);b.trigger("ytpfiltersapplied")},togglefilter:function(a,b){var c=this,d=c.get(0);return d.filters[a].value?d.filters[a].value=0:d.filters[a].value=b,d.filtersenabled&&jquery(d).ytpenablefilters(),this},togglefilters:function(a){var b=this,c=b.get(0);return c.filtersenabled?(jquery(c).trigger("ytpdisablefilters"),jquery(c).ytpdisablefilters()):(jquery(c).ytpenablefilters(),jquery(c).trigger("ytpenablefilters")),"function"==typeof a&&a(c.filtersenabled),this},disablefilters:function(){var a=this,b=a.get(0),c=jquery(b.playerel);return c.css("-webkit-filter",""),c.css("filter",""),b.filtersenabled=!1,this},enablefilters:function(){var a=this,b=a.get(0),c=jquery(b.playerel),d="";for(var e in b.filters)b.filters[e].value&&(d+=e.replace("_","-")+"("+b.filters[e].value+b.filters[e].unit+") ");return c.css("-webkit-filter",d),c.css("filter",d),b.filtersenabled=!0,this},removefilter:function(a,b){var c=this,d=c.get(0);if("function"==typeof a&&(b=a,a=null),a)c.ytpapplyfilter(a,0),"function"==typeof b&&b(a);else{for(var e in d.filters)c.ytpapplyfilter(e,0);"function"==typeof b&&b(e),d.filters=jquery.extend(!0,{},jquery.mbytplayer.defaultfilters)}var f=jquery.event("ytpfiltersapplied");return c.trigger(f),this},getfilters:function(){var a=this.get(0);return a.filters},addmask:function(a){var b=this.get(0);a||(a=b.actualmask);var c=jquery("").attr("src",a).on("load",function(){b.overlay.cssanimate({opacity:0},b.opt.fadeonstarttime,function(){b.hasmask=!0,c.remove(),b.overlay.css({backgroundimage:"url("+a+")",backgroundrepeat:"no-repeat",backgroundposition:"center center",backgroundsize:"cover"}),b.overlay.cssanimate({opacity:1},b.opt.fadeonstarttime)})});return this},removemask:function(){var a=this.get(0);return a.overlay.cssanimate({opacity:0},a.opt.fadeonstarttime,function(){a.hasmask=!1,a.overlay.css({backgroundimage:"",backgroundrepeat:"",backgroundposition:"",backgroundsize:""}),a.overlay.cssanimate({opacity:1},a.opt.fadeonstarttime)}),this},applymask:function(a){var b=jquery(a);if(b.off("ytptime.mask"),a.opt.mask)if("string"==typeof a.opt.mask)b.ytpaddmask(a.opt.mask),a.actualmask=a.opt.mask;else if("object"==typeof a.opt.mask){for(var c in a.opt.mask)if(a.opt.mask[c]){jquery("").attr("src",a.opt.mask[c])}a.opt.mask[0]&&b.ytpaddmask(a.opt.mask[0]),b.on("ytptime.mask",function(c){for(var d in a.opt.mask)c.time==d&&(a.opt.mask[d]?(b.ytpaddmask(a.opt.mask[d]),a.actualmask=a.opt.mask[d]):b.ytpremovemask())})}},togglemask:function(){var a=this.get(0),b=jquery(a);return a.hasmask?b.ytpremovemask():b.ytpaddmask(),this},manageprogress:function(){var a=this.get(0),b=jquery("#controlbar_"+a.id),c=b.find(".mb_ytpprogress"),d=b.find(".mb_ytploaded"),e=b.find(".mb_ytpseekbar"),f=c.outerwidth(),g=math.floor(a.player.getcurrenttime()),h=math.floor(a.player.getduration()),i=g*f/h,j=0,k=100*a.player.getvideoloadedfraction();return d.css({left:j,width:k+"%"}),e.css({left:0,width:i}),{totaltime:h,currenttime:g}},buildcontrols:function(ytplayer){if(jquery("#controlbar_"+ytplayer.id).remove(),!ytplayer.opt.showcontrols)return void(ytplayer.controlbar=!1);if(ytplayer.opt.showytlogo=ytplayer.opt.showytlogo||ytplayer.opt.printurl,!jquery("#controlbar_"+ytplayer.id).length){ytplayer.controlbar=jquery("").attr("id","controlbar_"+ytplayer.id).addclass("mb_ytpbar").css({whitespace:"nowrap",position:ytplayer.isbackground?"fixed":"absolute",zindex:ytplayer.isbackground?1e4:1e3}).hide().on("click",function(a){a.stoppropagation()});var buttonbar=jquery("").addclass("buttonbar"),playpause=jquery(""+jquery.mbytplayer.controls.play+"").addclass("mb_ytpplaypause ytpicon").on("click",function(a){a.stoppropagation(),jquery(ytplayer).ytptoggleplay()}),muteunmute=jquery(""+jquery.mbytplayer.controls.mute+"").addclass("mb_ytpmuteunmute ytpicon").on("click",function(a){a.stoppropagation(),jquery(ytplayer).ytptogglevolume()}),volumebar=jquery("").addclass("mb_ytpvolumebar").css({display:"inline-block"});ytplayer.volumebar=volumebar;var idx=jquery("").addclass("mb_ytptime"),vurl=ytplayer.opt.videourl?ytplayer.opt.videourl:"";vurl.indexof("http")<0&&(vurl=jquery.mbytplayer.locationprotocol+"//www.youtube.com/watch?v="+ytplayer.opt.videourl);var movieurl=jquery("").html(jquery.mbytplayer.controls.ytlogo).addclass("mb_ytpurl ytpicon").attr("title","view on youtube").on("click",function(){window.open(vurl,"viewonyt")}),onlyvideo=jquery("").html(jquery.mbytplayer.controls.onlyyt).addclass("mb_onlyyt ytpicon").on("click",function(a){a.stoppropagation(),jquery(ytplayer).ytpfullscreen(ytplayer.opt.realfullscreen)}),progressbar=jquery("").addclass("mb_ytpprogress").css("position","absolute").on("click",function(a){a.stoppropagation(),timebar.css({width:a.clientx-timebar.offset().left}),ytplayer.timew=a.clientx-timebar.offset().left,ytplayer.controlbar.find(".mb_ytploaded").css({width:0});var b=math.floor(ytplayer.player.getduration());ytplayer["goto"]=timebar.outerwidth()*b/progressbar.outerwidth(),ytplayer.player.seekto(parsefloat(ytplayer["goto"]),!0),ytplayer.controlbar.find(".mb_ytploaded").css({width:0})}),loadedbar=jquery("").addclass("mb_ytploaded").css("position","absolute"),timebar=jquery("").addclass("mb_ytpseekbar").css("position","absolute");progressbar.append(loadedbar).append(timebar),buttonbar.append(playpause).append(muteunmute).append(volumebar).append(idx),ytplayer.opt.showytlogo&&buttonbar.append(movieurl),(ytplayer.isbackground||eval(ytplayer.opt.realfullscreen)&&!ytplayer.isbackground)&&buttonbar.append(onlyvideo),ytplayer.controlbar.append(buttonbar).append(progressbar),ytplayer.isbackground?jquery("body").after(ytplayer.controlbar):(ytplayer.controlbar.addclass("inlineplayer"),ytplayer.wrapper.before(ytplayer.controlbar)),volumebar.simpleslider({initialval:ytplayer.opt.vol,scale:100,orientation:"h",callback:function(a){0==a.value?jquery(ytplayer).ytpmute():jquery(ytplayer).ytpunmute(),ytplayer.player.setvolume(a.value),ytplayer.ismute||(ytplayer.opt.vol=a.value)}})}},checkforstate:function(){var ytplayer=this.get(0),$ytplayer=jquery(ytplayer);clearinterval(ytplayer.getstate);var interval=100;return jquery.contains(document,ytplayer)?(jquery.mbytplayer.checkforstart(ytplayer),void(ytplayer.getstate=setinterval(function(){var $ytplayer=jquery(ytplayer);if(ytplayer.isready){var prog=jquery(ytplayer).ytpmanageprogress(),stopat=ytplayer.opt.stopat>ytplayer.opt.startat?ytplayer.opt.stopat:0;if(stopat=stopat400&&ytplayer.iscompact&&(ytplayer.controlbar.removeclass("compact"),ytplayer.iscompact=!1,!ytplayer.ismute&&ytplayer.volumebar&&ytplayer.volumebar.updatesliderval(ytplayer.opt.vol)),ytplayer.player.getplayerstate()>0&&(parsefloat(ytplayer.player.getduration()-.5)0&&parsefloat(ytplayer.player.getcurrenttime())>stopat)){if(ytplayer.isended)return;if(ytplayer.isended=!0,settimeout(function(){ytplayer.isended=!1},1e3),ytplayer.islist){if(!ytplayer.opt.loop||ytplayer.opt.loop>0&&ytplayer.player.looptime===ytplayer.opt.loop-1){ytplayer.player.looptime=void 0,clearinterval(ytplayer.getstate);var ytpend=jquery.event("ytpend");return ytpend.time=ytplayer.currenttime,void jquery(ytplayer).trigger(ytpend)}}else if(!ytplayer.opt.loop||ytplayer.opt.loop>0&&ytplayer.player.looptime===ytplayer.opt.loop-1){ytplayer.player.looptime=void 0,ytplayer.state=2;var bgndurl="false"!=ytplayer.opt.coverimage?ytplayer.opt.coverimage:ytplayer.videodata.thumb_max||ytplayer.videodata.thumb_high||ytplayer.videodata.thumb_medium;return ytplayer.opt.containment.css({background:"rgba(0,0,0,0.5) url("+bgndurl+") center center",backgroundsize:"cover"}),jquery(ytplayer).ytppause(),void ytplayer.wrapper.cssanimate({opacity:0},ytplayer.opt.fadeonstarttime,function(){ytplayer.controlbar.length&&ytplayer.controlbar.find(".mb_ytpplaypause").html(jquery.mbytplayer.controls.play);var a=jquery.event("ytpend");a.time=ytplayer.currenttime,jquery(ytplayer).trigger(a),
ytplayer.player.seekto(ytplayer.opt.startat,!0),ytplayer.isbackground?ytplayer.orig_background&&jquery(ytplayer).css("background-image",ytplayer.orig_background):ytplayer.opt.coverimage&&ytplayer.isplayer&&(ytplayer.opt.coverimage=ytplayer.opt.coverimage||ytplayer.orig_background,ytplayer.opt.containment.css({background:"url("+ytplayer.opt.coverimage+") center center",backgroundsize:"cover"}))})}ytplayer.player.looptime=ytplayer.player.looptime?++ytplayer.player.looptime:1,ytplayer.opt.startat=ytplayer.opt.startat||1,ytplayer.preventtrigger=!0,ytplayer.state=2,ytplayer.player.pausevideo(),ytplayer.player.seekto(ytplayer.opt.startat,!0),ytplayer.player.playvideo()}}},interval))):($ytplayer.ytpplayerdestroy(),clearinterval(ytplayer.getstate),void clearinterval(ytplayer.checkforstartat))},checkforstart:function(ytplayer){var $ytplayer=jquery(ytplayer);if(!jquery.contains(document,ytplayer))return void $ytplayer.ytpplayerdestroy();if(jquery.mbytplayer.buildcontrols(ytplayer),ytplayer.overlay)if(ytplayer.opt.addraster){var classn="dot"==ytplayer.opt.addraster?"raster-dot":"raster";ytplayer.overlay.addclass(ytplayer.isretina?classn+" retina":classn)}else ytplayer.overlay.removeclass(function(a,b){var c=b.split(" "),d=[];return jquery.each(c,function(a,b){/raster.*/.test(b)&&d.push(b)}),d.push("retina"),d.join(" ")});ytplayer.preventtrigger=!0,ytplayer.state=2,$ytplayer.ytppause(),$ytplayer.ytpmute(),ytplayer.preventtrigger=!0,ytplayer.player.playvideo(),ytplayer.isstarting=!0;var startat=ytplayer.start_from_last?ytplayer.start_from_last:ytplayer.opt.startat?ytplayer.opt.startat:1;return ytplayer.checkforstartat=setinterval(function(){ytplayer.player.seekto(startat,!0);var canplayvideo=ytplayer.player.getvideoloadedfraction()>=startat/ytplayer.player.getduration();if(ytplayer.player.getduration()>0&&ytplayer.player.getcurrenttime()>=startat&&canplayvideo){ytplayer.start_from_last=null,clearinterval(ytplayer.checkforstartat),"function"==typeof ytplayer.opt.onready&&ytplayer.opt.onready(ytplayer),ytplayer.isready=!0,$ytplayer.ytpremovefilter(),ytplayer.opt.addfilters?$ytplayer.ytpapplyfilters(ytplayer.opt.addfilters):$ytplayer.ytpapplyfilters({}),$ytplayer.ytpenablefilters();var ytpready=jquery.event("ytpready");if(ytpready.time=ytplayer.currenttime,jquery(ytplayer).trigger(ytpready),ytplayer.state=2,jquery(ytplayer).ytppause(),ytplayer.opt.mute||jquery(ytplayer).ytpunmute(),"undefined"!=typeof _gaq&&eval(ytplayer.opt.gatrack)?_gaq.push(["_trackevent","ytplayer","play",ytplayer.hasdata?ytplayer.videodata.title:ytplayer.videoid.tostring()]):"undefined"!=typeof ga&&eval(ytplayer.opt.gatrack)&&ga("send","event","ytplayer","play",ytplayer.hasdata?ytplayer.videodata.title:ytplayer.videoid.tostring()),ytplayer.opt.autoplay){var ytpstart=jquery.event("ytpstart");ytpstart.time=ytplayer.currenttime,jquery(ytplayer).trigger(ytpstart),ytplayer.isstarting=!1,"mac"==jquery.mbbrowser.os.name&&jquery.mbbrowser.safari?settimeout(function(){$ytplayer.ytpplay()},10):$ytplayer.ytpplay()}else ytplayer.player.pausevideo(),settimeout(function(){ytplayer.start_from_last&&ytplayer.player.seekto(startat,!0),ytplayer.isplayer||(ytplayer.opt.coverimage?(ytplayer.wrapper.css({opacity:0}),settimeout(function(){ytplayer.wrapper.css({background:"rgba(0,0,0,0.5) url("+ytplayer.opt.coverimage+") center center",backgroundsize:"cover",backgroundrepeat:"no-repeat"})},ytplayer.opt.fadeonstarttime)):(jquery(ytplayer.playerel).cssanimate({opacity:1},ytplayer.opt.fadeonstarttime),ytplayer.wrapper.cssanimate({opacity:ytplayer.isalone?1:ytplayer.opt.opacity},ytplayer.opt.fadeonstarttime))),ytplayer.isstarting=!1},150),ytplayer.controlbar.length&&ytplayer.controlbar.find(".mb_ytpplaypause").html(jquery.mbytplayer.controls.play);ytplayer.isplayer&&!ytplayer.opt.autoplay&&ytplayer.loading&&ytplayer.loading.length&&(ytplayer.loading.html("ready"),settimeout(function(){ytplayer.loading.fadeout()},100)),ytplayer.controlbar&&ytplayer.controlbar.length&&ytplayer.controlbar.slidedown(1e3)}else"mac"==jquery.mbbrowser.os.name&&jquery.mbbrowser.safari&&(ytplayer.player.playvideo(),startat>=0&&ytplayer.player.seekto(startat,!0))},100),$ytplayer},gettime:function(){var a=this.get(0);return jquery.mbytplayer.formattime(a.currenttime)},gettotaltime:function(a){var b=this.get(0);return jquery.mbytplayer.formattime(b.totaltime)},formattime:function(a){var b=math.floor(a/60),c=math.floor(a-60*b);return(9>=b?"0"+b:b)+" : "+(9>=c?"0"+c:c)},setanchor:function(a){var b=this;b.optimizedisplay(a)},getanchor:function(){var a=this.get(0);return a.opt.anchor}},jquery.fn.optimizedisplay=function(anchor){var ytplayer=this.get(0),vid={};ytplayer.opt.anchor=anchor||ytplayer.opt.anchor,ytplayer.opt.anchor="undefined "!=typeof ytplayer.opt.anchor?ytplayer.opt.anchor:"center,center";var ytpalign=ytplayer.opt.anchor.split(","),el=ytplayer.wrapper,iframe=jquery(ytplayer.playerel);if(ytplayer.opt.optimizedisplay){var abundance=iframe.height()*ytplayer.opt.abundance,win={};win.width=el.outerwidth(),win.height=el.outerheight()+abundance,ytplayer.opt.ratio="auto"===ytplayer.opt.ratio?16/9:ytplayer.opt.ratio,ytplayer.opt.ratio=eval(ytplayer.opt.ratio),vid.width=win.width,vid.height=math.ceil(vid.width/ytplayer.opt.ratio),vid.margintop=math.ceil(-((vid.height-win.height)/2)),vid.marginleft=0;var lowest=vid.heightwin.width&&(vid.marginleft=-((vid.width-win.width)/2))}}}else vid.width="100%",vid.height="100%",vid.margintop=0,vid.marginleft=0;iframe.css({width:vid.width,height:vid.height,margintop:vid.margintop,marginleft:vid.marginleft,maxwidth:"initial"})},jquery.shuffle=function(a){for(var b=a.slice(),c=b.length,d=c;d--;){var e=parseint(math.random()*c),f=b[d];b[d]=b[e],b[e]=f}return b},jquery.fn.unselectable=function(){return this.each(function(){jquery(this).css({"-moz-user-select":"none","-webkit-user-select":"none","user-select":"none"}).attr("unselectable","on")})},jquery.fn.ytplayer=jquery.mbytplayer.buildplayer,jquery.fn.mb_ytplayer=jquery.mbytplayer.buildplayer,jquery.fn.ytpcheckforstate=jquery.mbytplayer.checkforstate,jquery.fn.ytpgetplayer=jquery.mbytplayer.getplayer,jquery.fn.ytpgetvideoid=jquery.mbytplayer.getvideoid,jquery.fn.ytpgetplaylistid=jquery.mbytplayer.getplaylistid,jquery.fn.ytpchangevideo=jquery.fn.ytpchangemovie=jquery.mbytplayer.changevideo,jquery.fn.ytpplayerdestroy=jquery.mbytplayer.playerdestroy,jquery.fn.ytpplay=jquery.mbytplayer.play,jquery.fn.ytptoggleplay=jquery.mbytplayer.toggleplay,jquery.fn.ytpstop=jquery.mbytplayer.stop,jquery.fn.ytppause=jquery.mbytplayer.pause,jquery.fn.ytpseekto=jquery.mbytplayer.seekto,jquery.fn.ytplaylist=jquery.mbytplayer.playlist,jquery.fn.ytpplaynext=jquery.mbytplayer.playnext,jquery.fn.ytpplayprev=jquery.mbytplayer.playprev,jquery.fn.ytpplayindex=jquery.mbytplayer.playindex,jquery.fn.ytpmute=jquery.mbytplayer.mute,jquery.fn.ytpunmute=jquery.mbytplayer.unmute,jquery.fn.ytptogglevolume=jquery.mbytplayer.togglevolume,jquery.fn.ytpsetvolume=jquery.mbytplayer.setvolume,jquery.fn.ytpgetvolume=jquery.mbytplayer.getvolume,jquery.fn.ytpgetvideodata=jquery.mbytplayer.getvideodata,jquery.fn.ytpfullscreen=jquery.mbytplayer.fullscreen,jquery.fn.ytptoggleloops=jquery.mbytplayer.toggleloops,jquery.fn.ytpsetvideoquality=jquery.mbytplayer.setvideoquality,jquery.fn.ytpmanageprogress=jquery.mbytplayer.manageprogress,jquery.fn.ytpapplyfilter=jquery.mbytplayer.applyfilter,jquery.fn.ytpapplyfilters=jquery.mbytplayer.applyfilters,jquery.fn.ytptogglefilter=jquery.mbytplayer.togglefilter,jquery.fn.ytptogglefilters=jquery.mbytplayer.togglefilters,jquery.fn.ytpremovefilter=jquery.mbytplayer.removefilter,jquery.fn.ytpdisablefilters=jquery.mbytplayer.disablefilters,jquery.fn.ytpenablefilters=jquery.mbytplayer.enablefilters,jquery.fn.ytpgetfilters=jquery.mbytplayer.getfilters,jquery.fn.ytpgettime=jquery.mbytplayer.gettime,jquery.fn.ytpgettotaltime=jquery.mbytplayer.gettotaltime,jquery.fn.ytpaddmask=jquery.mbytplayer.addmask,jquery.fn.ytpremovemask=jquery.mbytplayer.removemask,jquery.fn.ytptogglemask=jquery.mbytplayer.togglemask,jquery.fn.ytpsetanchor=jquery.mbytplayer.setanchor,jquery.fn.ytpgetanchor=jquery.mbytplayer.getanchor}(jquery,ytp),jquery.support.csstransition=function(){var a=(document.body||document.documentelement).style;return void 0!==a.transition||void 0!==a.webkittransition||void 0!==a.moztransition||void 0!==a.mstransition||void 0!==a.otransition}(),jquery.css={name:"mb.cssanimate",author:"matteo bicocchi",version:"2.0.0",transitionend:"transitionend",sfx:"",filters:{blur:{min:0,max:100,unit:"px"},brightness:{min:0,max:400,unit:"%"},contrast:{min:0,max:400,unit:"%"},grayscale:{min:0,max:100,unit:"%"},huerotate:{min:0,max:360,unit:"deg"},invert:{min:0,max:100,unit:"%"},saturate:{min:0,max:400,unit:"%"},sepia:{min:0,max:100,unit:"%"}},normalizecss:function(a){var b=jquery.extend(!0,{},a);jquery.browser.webkit||jquery.browser.opera?jquery.css.sfx="-webkit-":jquery.browser.mozilla?jquery.css.sfx="-moz-":jquery.browser.msie&&(jquery.css.sfx="-ms-"),jquery.css.sfx="";for(var c in b){if("transform"===c&&(b[jquery.css.sfx+"transform"]=b[c],delete b[c]),"transform-origin"===c&&(b[jquery.css.sfx+"transform-origin"]=a[c],delete b[c]),"filter"!==c||jquery.browser.mozilla||(b[jquery.css.sfx+"filter"]=a[c],delete b[c]),"blur"===c&&setfilter(b,"blur",a[c]),"brightness"===c&&setfilter(b,"brightness",a[c]),"contrast"===c&&setfilter(b,"contrast",a[c]),"grayscale"===c&&setfilter(b,"grayscale",a[c]),"huerotate"===c&&setfilter(b,"huerotate",a[c]),"invert"===c&&setfilter(b,"invert",a[c]),"saturate"===c&&setfilter(b,"saturate",a[c]),"sepia"===c&&setfilter(b,"sepia",a[c]),"x"===c){var d=jquery.css.sfx+"transform";b[d]=b[d]||"",b[d]+=" translatex("+setunit(a[c],"px")+")",delete b[c]}"y"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" translatey("+setunit(a[c],"px")+")",delete b[c]),"z"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" translatez("+setunit(a[c],"px")+")",delete b[c]),"rotate"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotate("+setunit(a[c],"deg")+")",delete b[c]),"rotatex"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotatex("+setunit(a[c],"deg")+")",delete b[c]),"rotatey"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotatey("+setunit(a[c],"deg")+")",delete b[c]),"rotatez"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotatez("+setunit(a[c],"deg")+")",delete b[c]),"scale"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" scale("+setunit(a[c],"")+")",delete b[c]),"scalex"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" scalex("+setunit(a[c],"")+")",delete b[c]),"scaley"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaley("+setunit(a[c],"")+")",delete b[c]),"scalez"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" scalez("+setunit(a[c],"")+")",delete b[c]),"skew"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" skew("+setunit(a[c],"deg")+")",delete b[c]),"skewx"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" skewx("+setunit(a[c],"deg")+")",delete b[c]),"skewy"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" skewy("+setunit(a[c],"deg")+")",delete b[c]),"perspective"===c&&(d=jquery.css.sfx+"transform",b[d]=b[d]||"",b[d]+=" perspective("+setunit(a[c],"px")+")",delete b[c])}return b},getprop:function(a){var b,c=[];for(b in a)0>c.indexof(b)&&c.push(uncamel(b));return c.join(",")},animate:function(a,b,c,d,e){return this.each(function(){function f(){g.called=!0,g.cssaisrunning=!1,h.off(jquery.css.transitionend+"."+g.id),cleartimeout(g.timeout),h.css(jquery.css.sfx+"transition",""),"function"==typeof e&&e.apply(g),"function"==typeof g.cssqueue&&(g.cssqueue(),g.cssqueue=null)}var g=this,h=jquery(this);g.id=g.id||"cssa_"+(new date).gettime();var i=i||{type:"noevent"};if(g.cssaisrunning&&g.eventtype==i.type&&!jquery.browser.msie&&9>=jquery.browser.version)g.cssqueue=function(){h.cssanimate(a,b,c,d,e)};else if(g.cssqueue=null,g.eventtype=i.type,0!==h.length&&a){if(a=jquery.normalizecss(a),g.cssaisrunning=!0,"function"==typeof b&&(e=b,b=jquery.fx.speeds._default),"function"==typeof c&&(d=c,c=0),"string"==typeof c&&(e=c,c=0),"function"==typeof d&&(e=d,d="cubic-bezier(0.65,0.03,0.36,0.72)"),"string"==typeof b)for(var j in jquery.fx.speeds){if(b==j){b=jquery.fx.speeds[j];break}b=jquery.fx.speeds._default}if(b||(b=jquery.fx.speeds._default),"string"==typeof e&&(d=e,e=null),jquery.support.csstransition){var k={"default":"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeoutcubic:"cubic-bezier(.215,.61,.355,1)",easeinoutcubic:"cubic-bezier(.645,.045,.355,1)",easeincirc:"cubic-bezier(.6,.04,.98,.335)",easeoutcirc:"cubic-bezier(.075,.82,.165,1)",easeinoutcirc:"cubic-bezier(.785,.135,.15,.86)",easeinexpo:"cubic-bezier(.95,.05,.795,.035)",easeoutexpo:"cubic-bezier(.19,1,.22,1)",easeinoutexpo:"cubic-bezier(1,0,0,1)",easeinquad:"cubic-bezier(.55,.085,.68,.53)",easeoutquad:"cubic-bezier(.25,.46,.45,.94)",easeinoutquad:"cubic-bezier(.455,.03,.515,.955)",easeinquart:"cubic-bezier(.895,.03,.685,.22)",easeoutquart:"cubic-bezier(.165,.84,.44,1)",easeinoutquart:"cubic-bezier(.77,0,.175,1)",easeinquint:"cubic-bezier(.755,.05,.855,.06)",easeoutquint:"cubic-bezier(.23,1,.32,1)",easeinoutquint:"cubic-bezier(.86,0,.07,1)",easeinsine:"cubic-bezier(.47,0,.745,.715)",easeoutsine:"cubic-bezier(.39,.575,.565,1)",easeinoutsine:"cubic-bezier(.445,.05,.55,.95)",easeinback:"cubic-bezier(.6,-.28,.735,.045)",easeoutback:"cubic-bezier(.175, .885,.32,1.275)",easeinoutback:"cubic-bezier(.68,-.55,.265,1.55)"};k[d]&&(d=k[d]),h.off(jquery.css.transitionend+"."+g.id),k=jquery.css.getprop(a);var l={};jquery.extend(l,a),l[jquery.css.sfx+"transition-property"]=k,l[jquery.css.sfx+"transition-duration"]=b+"ms",l[jquery.css.sfx+"transition-delay"]=c+"ms",l[jquery.css.sfx+"transition-timing-function"]=d,settimeout(function(){h.one(jquery.css.transitionend+"."+g.id,f),h.css(l)},1),g.timeout=settimeout(function(){g.called||!e?(g.called=!1,g.cssaisrunning=!1):(h.css(jquery.css.sfx+"transition",""),e.apply(g),g.cssaisrunning=!1,"function"==typeof g.cssqueue&&(g.cssqueue(),g.cssqueue=null))},b+c+10)}else{for(k in a)"transform"===k&&delete a[k],"filter"===k&&delete a[k],"transform-origin"===k&&delete a[k],"auto"===a[k]&&delete a[k],"x"===k&&(i=a[k],j="left",a[j]=i,delete a[k]),"y"===k&&(i=a[k],j="top",a[j]=i,delete a[k]),"-ms-transform"!==k&&"-ms-filter"!==k||delete a[k];h.delay(c).animate(a,b,e)}}})}},jquery.fn.cssanimate=jquery.css.animate,jquery.normalizecss=jquery.css.normalizecss,jquery.fn.css3=function(a){return this.each(function(){var b=jquery(this),c=jquery.normalizecss(a);b.css(c)})};var nagt=navigator.useragent;jquery.browser=jquery.browser||{},jquery.browser.mozilla=!1,jquery.browser.webkit=!1,jquery.browser.opera=!1,jquery.browser.safari=!1,jquery.browser.chrome=!1,jquery.browser.androidstock=!1,jquery.browser.msie=!1,jquery.browser.edge=!1,jquery.browser.ua=nagt;var getos=function(){var a={version:"unknown version",name:"unknown os"};return-1!=navigator.appversion.indexof("win")&&(a.name="windows"),-1!=navigator.appversion.indexof("mac")&&0>navigator.appversion.indexof("mobile")&&(a.name="mac"),-1!=navigator.appversion.indexof("linux")&&(a.name="linux"),/mac os x/.test(nagt)&&!/mobile/.test(nagt)&&(a.version=/mac os x (10[\.\_\d]+)/.exec(nagt)[1],a.version=a.version.replace(/_/g,".").substring(0,5)),/windows/.test(nagt)&&(a.version="unknown.unknown"),/windows nt 5.1/.test(nagt)&&(a.version="5.1"),/windows nt 6.0/.test(nagt)&&(a.version="6.0"),/windows nt 6.1/.test(nagt)&&(a.version="6.1"),/windows nt 6.2/.test(nagt)&&(a.version="6.2"),/windows nt 10.0/.test(nagt)&&(a.version="10.0"),/linux/.test(nagt)&&/linux/.test(nagt)&&(a.version="unknown.unknown"),a.name=a.name.tolowercase(),a.major_version="unknown",a.minor_version="unknown","unknown.unknown"!=a.version&&(a.major_version=parsefloat(a.version.split(".")[0]),a.minor_version=parsefloat(a.version.split(".")[1])),a};jquery.browser.os=getos(),jquery.browser.hastouch=istouchsupported(),jquery.browser.name=navigator.appname,jquery.browser.fullversion=""+parsefloat(navigator.appversion),jquery.browser.majorversion=parseint(navigator.appversion,10);var nameoffset,veroffset,ix;if(-1!=(veroffset=nagt.indexof("opera")))jquery.browser.opera=!0,jquery.browser.name="opera",jquery.browser.fullversion=nagt.substring(veroffset+6),-1!=(veroffset=nagt.indexof("version"))&&(jquery.browser.fullversion=nagt.substring(veroffset+8));else if(-1!=(veroffset=nagt.indexof("opr")))jquery.browser.opera=!0,jquery.browser.name="opera",jquery.browser.fullversion=nagt.substring(veroffset+4);else if(-1!=(veroffset=nagt.indexof("msie")))jquery.browser.msie=!0,jquery.browser.name="microsoft internet explorer",jquery.browser.fullversion=nagt.substring(veroffset+5);else if(-1!=nagt.indexof("trident")){jquery.browser.msie=!0,jquery.browser.name="microsoft internet explorer";var start=nagt.indexof("rv:")+3,end=start+4;jquery.browser.fullversion=nagt.substring(start,end)}else-1!=(veroffset=nagt.indexof("edge"))?(jquery.browser.edge=!0,jquery.browser.name="microsoft edge",jquery.browser.fullversion=nagt.substring(veroffset+5)):-1!=(veroffset=nagt.indexof("chrome"))?(jquery.browser.webkit=!0,jquery.browser.chrome=!0,jquery.browser.name="chrome",jquery.browser.fullversion=nagt.substring(veroffset+7)):-1e;e++){if(c[e]&&!d[e]&&0parseint(d[e]))return 1;if(d[e]&&!c[e]&&0navigator.appversion.indexof("mobile")&&(a.name="mac"),-1!=navigator.appversion.indexof("linux")&&(a.name="linux"),/mac os x/.test(nagt)&&!/mobile/.test(nagt)&&(a.version=/mac os x (10[\.\_\d]+)/.exec(nagt)[1],a.version=a.version.replace(/_/g,".").substring(0,5)),/windows/.test(nagt)&&(a.version="unknown.unknown"),/windows nt 5.1/.test(nagt)&&(a.version="5.1"),/windows nt 6.0/.test(nagt)&&(a.version="6.0"),/windows nt 6.1/.test(nagt)&&(a.version="6.1"),/windows nt 6.2/.test(nagt)&&(a.version="6.2"),/windows nt 10.0/.test(nagt)&&(a.version="10.0"),/linux/.test(nagt)&&/linux/.test(nagt)&&(a.version="unknown.unknown"),a.name=a.name.tolowercase(),a.major_version="unknown",a.minor_version="unknown","unknown.unknown"!=a.version&&(a.major_version=parsefloat(a.version.split(".")[0]),a.minor_version=parsefloat(a.version.split(".")[1])),a};jquery.browser.os=getos(),jquery.browser.hastouch=istouchsupported(),jquery.browser.name=navigator.appname,jquery.browser.fullversion=""+parsefloat(navigator.appversion),jquery.browser.majorversion=parseint(navigator.appversion,10);var nameoffset,veroffset,ix;if(-1!=(veroffset=nagt.indexof("opera")))jquery.browser.opera=!0,jquery.browser.name="opera",jquery.browser.fullversion=nagt.substring(veroffset+6),-1!=(veroffset=nagt.indexof("version"))&&(jquery.browser.fullversion=nagt.substring(veroffset+8));else if(-1!=(veroffset=nagt.indexof("opr")))jquery.browser.opera=!0,jquery.browser.name="opera",jquery.browser.fullversion=nagt.substring(veroffset+4);else if(-1!=(veroffset=nagt.indexof("msie")))jquery.browser.msie=!0,jquery.browser.name="microsoft internet explorer",jquery.browser.fullversion=nagt.substring(veroffset+5);else if(-1!=nagt.indexof("trident")){jquery.browser.msie=!0,jquery.browser.name="microsoft internet explorer";var start=nagt.indexof("rv:")+3,end=start+4;jquery.browser.fullversion=nagt.substring(start,end)}else-1!=(veroffset=nagt.indexof("edge"))?(jquery.browser.edge=!0,jquery.browser.name="microsoft edge",jquery.browser.fullversion=nagt.substring(veroffset+5)):-1!=(veroffset=nagt.indexof("chrome"))?(jquery.browser.webkit=!0,jquery.browser.chrome=!0,jquery.browser.name="chrome",jquery.browser.fullversion=nagt.substring(veroffset+7)):-1e;e++){if(c[e]&&!d[e]&&0parseint(d[e]))return 1;if(d[e]&&!c[e]&&0").addclass("level").addclass(e),d.prepend(e),c.level=e,d.css({cursor:"default"}),"auto"==c.opt.scale&&(c.opt.scale=a(c).outerwidth()),d.updatesliderval(),c.opt.readonly||(d.on(a.simpleslider.events.start,function(b){a.browser.mobile&&(b=b.changedtouches[0]),c.canslide=!0,d.updatesliderval(b),"h"==c.opt.orientation?d.css({cursor:"col-resize"}):d.css({cursor:"row-resize"}),a.browser.mobile||(b.preventdefault(),b.stoppropagation())}),a(document).on(a.simpleslider.events.move,function(b){a.browser.mobile&&(b=b.changedtouches[0]),c.canslide&&(a(document).css({cursor:"default"}),d.updatesliderval(b),a.browser.mobile||(b.preventdefault(),b.stoppropagation()))}).on(a.simpleslider.events.end,function(){a(document).css({cursor:"auto"}),c.canslide=!1,d.css({cursor:"auto"})}))})},updatesliderval:function(b){var c=this.get(0);if(c.opt){c.opt.initialval="number"==typeof c.opt.initialval?c.opt.initialval:c.opt.initialval(c);var d=a(c).outerwidth(),e=a(c).outerheight();c.x="object"==typeof b?b.clientx+document.body.scrollleft-this.offset().left:"number"==typeof b?b*d/c.opt.scale:c.opt.initialval*d/c.opt.scale,c.y="object"==typeof b?b.clienty+document.body.scrolltop-this.offset().top:"number"==typeof b?(c.opt.scale-c.opt.initialval-b)*e/c.opt.scale:c.opt.initialval*e/c.opt.scale,c.y=this.outerheight()-c.y,c.scalex=c.x*c.opt.scale/d,c.scaley=c.y*c.opt.scale/e,c.outofrangex=c.scalex>c.opt.scale?c.scalex-c.opt.scale:0>c.scalex?c.scalex:0,c.outofrangey=c.scaley>c.opt.scale?c.scaley-c.opt.scale:0>c.scaley?c.scaley:0,c.outofrange="h"==c.opt.orientation?c.outofrangex:c.outofrangey,c.value="undefined"!=typeof b?"h"==c.opt.orientation?c.x>=this.outerwidth()?c.opt.scale:0>=c.x?0:c.scalex:c.y>=this.outerheight()?c.opt.scale:0>=c.y?0:c.scaley:"h"==c.opt.orientation?c.scalex:c.scaley,"h"==c.opt.orientation?c.level.width(math.floor(100*c.x/d)+"%"):c.level.height(math.floor(100*c.y/e)),"function"==typeof c.opt.callback&&c.opt.callback(c)}}},a.fn.simpleslider=a.simpleslider.init,a.fn.updatesliderval=a.simpleslider.updatesliderval}(jquery),function(a){a.mbcookie={set:function(a,b,c,d){"object"==typeof b&&(b=json.stringify(b)),d=d?"; domain="+d:"";var e=new date,f="";c>0&&(e.settime(e.gettime()+864e5*c),f="; expires="+e.togmtstring()),document.cookie=a+"="+b+f+"; path=/"+d},get:function(a){a+="=";for(var b=document.cookie.split(";"),c=0;c