/******************************************** * revolution 5.3 extension - actions * @version: 1.3.2 (12.04.2016) * @requires jquery.themepunch.revolution.js * @author themepunch *********************************************/ !function($){var _r=jquery.fn.revolution,_ism=_r.is_mobile();jquery.extend(!0,_r,{checkactions:function(e,t,o){checkactions_intern(e,t,o)}});var checkactions_intern=function(e,t,o){o&&jquery.each(o,function(o,a){a.delay=parseint(a.delay,0)/1e3,e.addclass("noswipe"),t.fullscreen_esclistener||("exitfullscreen"==a.action||"togglefullscreen"==a.action)&&(jquery(document).keyup(function(t){27==t.keycode&&jquery("#rs-go-fullscreen").length>0&&e.trigger(a.event)}),t.fullscreen_esclistener=!0);var l="backgroundvideo"==a.layer?jquery(".rs-background-video-layer"):"firstvideo"==a.layer?jquery(".tp-revslider-slidesli").find(".tp-videolayer"):jquery("#"+a.layer);switch(-1!=jquery.inarray(a.action,["toggleslider","toggle_mute_video","toggle_global_mute_video","togglefullscreen"])&&e.data("togglelisteners",!0),a.action){case"togglevideo":jquery.each(l,function(t,o){o=jquery(o);var a=o.data("videotoggledby");void 0==a&&(a=new array),a.push(e),o.data("videotoggledby",a)});break;case"togglelayer":jquery.each(l,function(t,o){o=jquery(o);var a=o.data("layertoggledby");void 0==a&&(a=new array),a.push(e),o.data("layertoggledby",a)});break;case"toggle_mute_video":jquery.each(l,function(t,o){o=jquery(o);var a=o.data("videomutetoggledby");void 0==a&&(a=new array),a.push(e),o.data("videomutetoggledby",a)});break;case"toggle_global_mute_video":jquery.each(l,function(t,o){o=jquery(o);var a=o.data("videomutetoggledby");void 0==a&&(a=new array),a.push(e),o.data("videomutetoggledby",a)});break;case"toggleslider":void 0==t.slidertoggledby&&(t.slidertoggledby=new array),t.slidertoggledby.push(e);break;case"togglefullscreen":void 0==t.fullscreentoggledby&&(t.fullscreentoggledby=new array),t.fullscreentoggledby.push(e)}switch(e.on(a.event,function(){var o="backgroundvideo"==a.layer?jquery(".active-revslide .slotholder .rs-background-video-layer"):"firstvideo"==a.layer?jquery(".active-revslide .tp-videolayer").first():jquery("#"+a.layer);if("stoplayer"==a.action||"togglelayer"==a.action||"startlayer"==a.action){if(o.length>0)if("startlayer"==a.action||"togglelayer"==a.action&&"in"!=o.data("animdirection")){o.data("animdirection","in");var l=o.data("timeline_out"),i="carousel"===t.slidertype?0:t.width/2-t.gridwidth[t.curwinrange]*t.bw/2,r=0;void 0!=l&&l.pause(0).kill(),_r.animatesinglecaption&&_r.animatesinglecaption(o,t,i,r,0,!1,!0);var n=o.data("timeline");o.data("triggerstate","on"),_r.togglestate(o.data("layertoggledby")),punchgs.tweenlite.delayedcall(a.delay,function(){n.play(0)},[n])}else("stoplayer"==a.action||"togglelayer"==a.action&&"out"!=o.data("animdirection"))&&(o.data("animdirection","out"),o.data("triggered",!0),o.data("triggerstate","off"),_r.stopvideo&&_r.stopvideo(o,t),_r.endmovecaption&&punchgs.tweenlite.delayedcall(a.delay,_r.endmovecaption,[o,null,null,t]),_r.untogglestate(o.data("layertoggledby")))}else!_ism||"playvideo"!=a.action&&"stopvideo"!=a.action&&"togglevideo"!=a.action&&"mutevideo"!=a.action&&"unmutevideo"!=a.action&&"toggle_mute_video"!=a.action&&"toggle_global_mute_video"!=a.action?punchgs.tweenlite.delayedcall(a.delay,function(){actionswitches(o,t,a,e)},[o,t,a,e]):actionswitches(o,t,a,e)}),a.action){case"togglelayer":case"startlayer":case"playlayer":case"stoplayer":var l=jquery("#"+a.layer);"bytrigger"!=l.data("start")&&(l.data("triggerstate","on"),l.data("animdirection","in"))}})},actionswitches=function(tnc,opt,a,_nc){switch(a.action){case"scrollbelow":_nc.addclass("tp-scrollbelowslider"),_nc.data("scrolloffset",a.offset),_nc.data("scrolldelay",a.delay);var off=getoffconth(opt.fullscreenoffsetcontainer)||0,aof=parseint(a.offset,0)||0;off=off-aof||0,jquery("body,html").animate({scrolltop:opt.c.offset().top+jquery(opt.li[0]).height()-off+"px"},{duration:400});break;case"callback":eval(a.callback);break;case"jumptoslide":switch(a.slide.tolowercase()){case"+1":case"next":opt.sc_indicator="arrow",_r.callingnewslide(opt,opt.c,1);break;case"previous":case"prev":case"-1":opt.sc_indicator="arrow",_r.callingnewslide(opt,opt.c,-1);break;default:var ts=jquery.isnumeric(a.slide)?parseint(a.slide,0):a.slide;_r.callingnewslide(opt,opt.c,ts)}break;case"simplelink":window.open(a.url,a.target);break;case"toggleslider":opt.noloopanymore=0,"playing"==opt.sliderstatus?(opt.c.revpause(),opt.forcepause_viatoggle=!0,_r.untogglestate(opt.slidertoggledby)):(opt.forcepause_viatoggle=!1,opt.c.revresume(),_r.togglestate(opt.slidertoggledby));break;case"pauseslider":opt.c.revpause(),_r.untogglestate(opt.slidertoggledby);break;case"playslider":opt.noloopanymore=0,opt.c.revresume(),_r.togglestate(opt.slidertoggledby);break;case"playvideo":tnc.length>0&&_r.playvideo(tnc,opt);break;case"stopvideo":tnc.length>0&&_r.stopvideo&&_r.stopvideo(tnc,opt);break;case"togglevideo":tnc.length>0&&(_r.isvideoplaying(tnc,opt)?_r.stopvideo&&_r.stopvideo(tnc,opt):_r.playvideo(tnc,opt));break;case"mutevideo":tnc.length>0&&_r.mutevideo(tnc,opt);break;case"unmutevideo":tnc.length>0&&_r.unmutevideo&&_r.unmutevideo(tnc,opt);break;case"toggle_mute_video":tnc.length>0&&(_r.isvideomuted(tnc,opt)?_r.unmutevideo(tnc,opt):_r.mutevideo&&_r.mutevideo(tnc,opt)),_nc.toggleclass("rs-toggle-content-active");break;case"toggle_global_mute_video":_nc.hasclass("rs-toggle-content-active")?(opt.globalmute=!1,void 0!=opt.playingvideos&&opt.playingvideos.length>0&&jquery.each(opt.playingvideos,function(e,t){_r.unmutevideo&&_r.unmutevideo(t,opt)})):(opt.globalmute=!0,void 0!=opt.playingvideos&&opt.playingvideos.length>0&&jquery.each(opt.playingvideos,function(e,t){_r.mutevideo&&_r.mutevideo(t,opt)})),_nc.toggleclass("rs-toggle-content-active");break;case"simulateclick":tnc.length>0&&tnc.click();break;case"toggleclass":tnc.length>0&&(tnc.hasclass(a.classname)?tnc.removeclass(a.classname):tnc.addclass(a.classname));break;case"gofullscreen":case"exitfullscreen":case"togglefullscreen":if(jquery("#rs-go-fullscreen").length>0&&("togglefullscreen"==a.action||"exitfullscreen"==a.action)){jquery("#rs-go-fullscreen").appendto(jquery("#rs-was-here"));var paw=opt.c.closest(".forcefullwidth_wrapper_tp_banner").length>0?opt.c.closest(".forcefullwidth_wrapper_tp_banner"):opt.c.closest(".rev_slider_wrapper");paw.unwrap(),paw.unwrap(),opt.minheight=opt.oldminheight,opt.infullscreenmode=!1,opt.c.revredraw(),void 0!=opt.playingvideos&&opt.playingvideos.length>0&&jquery.each(opt.playingvideos,function(e,t){_r.playvideo(t,opt)}),_r.untogglestate(opt.fullscreentoggledby)}else if(0==jquery("#rs-go-fullscreen").length&&("togglefullscreen"==a.action||"gofullscreen"==a.action)){var paw=opt.c.closest(".forcefullwidth_wrapper_tp_banner").length>0?opt.c.closest(".forcefullwidth_wrapper_tp_banner"):opt.c.closest(".rev_slider_wrapper");paw.wrap('