/******************************************** * revolution 5.0 extension - actions * @version: 1.1 (25.11.2015) * @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,a){checkactions_intern(e,t,a)}});var checkactions_intern=function(e,t,a){a&&jquery.each(a,function(a,o){o.delay=parseint(o.delay,0)/1e3,e.addclass("noswipe"),t.fullscreen_esclistener||("exitfullscreen"==o.action||"togglefullscreen"==o.action)&&(jquery(document).keyup(function(t){27==t.keycode&&jquery("#rs-go-fullscreen").length>0&&e.trigger(o.event)}),t.fullscreen_esclistener=!0);var l="backgroundvideo"==o.layer?jquery(".rs-background-video-layer"):"firstvideo"==o.layer?jquery(".tp-revslider-slidesli").find(".tp-videolayer"):jquery("#"+o.layer);switch(o.action){case"togglevideo":jquery.each(l,function(t,a){a=jquery(a);var o=a.data("videotoggledby");void 0==o&&(o=new array),o.push(e),a.data("videotoggledby",o)});break;case"togglelayer":jquery.each(l,function(t,a){a=jquery(a);var o=a.data("layertoggledby");void 0==o&&(o=new array),o.push(e),a.data("layertoggledby",o)});break;case"toggle_mute_video":jquery.each(l,function(t,a){a=jquery(a);var o=a.data("videomutetoggledby");void 0==o&&(o=new array),o.push(e),a.data("videomutetoggledby",o)});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(o.event,function(){var a="backgroundvideo"==o.layer?jquery(".active-revslide .slotholder .rs-background-video-layer"):"firstvideo"==o.layer?jquery(".active-revslide .tp-videolayer").first():jquery("#"+o.layer);if("stoplayer"==o.action||"togglelayer"==o.action||"startlayer"==o.action){if(a.length>0)if("startlayer"==o.action||"togglelayer"==o.action&&"in"!=a.data("animdirection")){a.data("animdirection","in");var l=a.data("timeline_out"),r="carousel"===t.slidertype?0:t.width/2-t.gridwidth[t.curwinrange]*t.bw/2,i=0;void 0!=l&&l.pause(0).kill(),_r.animatesinglecaption&&_r.animatesinglecaption(a,t,r,i,0,!1,!0);var n=a.data("timeline");a.data("triggerstate","on"),_r.togglestate(a.data("layertoggledby")),punchgs.tweenlite.delayedcall(o.delay,function(){n.play(0)},[n])}else("stoplayer"==o.action||"togglelayer"==o.action&&"out"!=a.data("animdirection"))&&(a.data("animdirection","out"),a.data("triggered",!0),a.data("triggerstate","off"),_r.stopvideo&&_r.stopvideo(a,t),_r.endmovecaption&&punchgs.tweenlite.delayedcall(o.delay,_r.endmovecaption,[a,null,null,t]),_r.untogglestate(a.data("layertoggledby")))}else!_ism||"playvideo"!=o.action&&"stopvideo"!=o.action&&"togglevideo"!=o.action&&"mutevideo"!=o.action&&"unmutevideo"!=o.action&&"toggle_mute_video"!=o.action?punchgs.tweenlite.delayedcall(o.delay,function(){actionswitches(a,t,o,e)},[a,t,o,e]):actionswitches(a,t,o,e)}),o.action){case"togglelayer":case"startlayer":case"playlayer":case"stoplayer":var l=jquery("#"+o.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(),_r.untogglestate(opt.slidertoggledby)):(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"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('