/************************************************
* revolution 5.2 extension - layer animation
* @version: 2.6 (30.05.2016)
* @requires jquery.themepunch.revolution.js
* @author themepunch
************************************************/
!function(a){function e(a,e,t,i,n,o,r){var d=a.find(e);d.css("borderwidth",o+"px"),d.css(t,0-o+"px"),d.css(i,"0px solid transparent"),d.css(n,r)}var t=jquery.fn.revolution;t.is_mobile();jquery.extend(!0,t,{animcompleted:function(a,e){var i=a.data("videotype"),n=a.data("autoplay"),o=a.data("autoplayonlyfirsttime");void 0!=i&&"none"!=i&&(1==n||"true"==n||"on"==n||"1sttime"==n||o?(t.playvideo(a,e),t.togglestate(a.data("videotoggledby")),(o||"1sttime"==n)&&(a.data("autoplayonlyfirsttime",!1),a.data("autoplay","off"))):("no1sttime"==n&&a.data("autoplay","on"),t.untogglestate(a.data("videotoggledby"))))},handlestaticlayers:function(a,e){var t=parseint(a.data("startslide"),0),i=parseint(a.data("endslide"),0);0>t&&(t=0),0>i&&(i=e.slideamount),0===t&&i===e.slideamount-1&&(i=e.slideamount+1),a.data("startslide",t),a.data("endslide",i)},animatethecaptions:function(a,e,i,n){var o="carousel"===e.slidertype?0:e.width/2-e.gridwidth[e.curwinrange]*e.bw/2,r=0,d=a.data("index");e.layers=e.layers||new object,e.layers[d]=e.layers[d]||a.find(".tp-caption"),e.layers["static"]=e.layers["static"]||e.c.find(".tp-static-layers").find(".tp-caption");var s=new array;if(e.conh=e.c.height(),e.conw=e.c.width(),e.ulw=e.ul.width(),e.ulh=e.ul.height(),e.debugmode){a.addclass("indebugmode"),a.find(".helpgrid").remove(),e.c.find(".hglayerinfo").remove(),a.append('
');var l=a.find(".helpgrid");l.append('zoom:'+math.round(100*e.bw)+"% device level:"+e.curwinrange+" grid preset:"+e.gridwidth[e.curwinrange]+"x"+e.gridheight[e.curwinrange]+"
"),e.c.append(''),l.append('')}s&&jquery.each(s,function(a){var e=jquery(this);punchgs.tweenlite.set(e.find(".tp-videoposter"),{autoalpha:1}),punchgs.tweenlite.set(e.find("iframe"),{autoalpha:0})}),e.layers[d]&&jquery.each(e.layers[d],function(a,e){s.push(e)}),e.layers["static"]&&jquery.each(e.layers["static"],function(a,e){s.push(e)}),s&&jquery.each(s,function(a){t.animatesinglecaption(jquery(this),e,o,r,a,i)});var p=jquery("body").find("#"+e.c.attr("id")).find(".tp-bannertimer");p.data("opt",e),void 0!=n&&settimeout(function(){n.resume()},30)},animatesinglecaption:function(a,r,s,f,b,x,t){var l=x,w=g(a,r,"in",!0),j=a.data("_pw")||a.closest(".tp-parallax-wrap"),i=a.data("_lw")||a.closest(".tp-loop-wrap"),c=a.data("_mw")||a.closest(".tp-mask-wrap"),r=a.data("responsive")||"on",k=a.data("responsive_offset")||"on",_=a.data("basealign")||"grid",z="grid"===_?r.width:r.ulw,q="grid"===_?r.height:r.ulh,s=jquery("body").hasclass("rtl");if(a.data("_pw")||(a.data("staticlayer")?a.data("_li",a.closest(".tp-static-layers")):a.data("_li",a.closest(".tp-revslider-slidesli")),a.data("slidelink",a.hasclass("slidelink")),a.data("_pw",j),a.data("_lw",i),a.data("_mw",c)),!a.data("togglelisteners")&&a.find(".rs-toggled-content")&&(a.on("click",function(){a.toggleclass("rs-toggle-content-active")}),a.data("togglelisteners",!0)),"fullscreen"==r.sliderlayout&&(f=q/2-r.gridheight[r.curwinrange]*r.bh/2),("on"==r.autoheight||void 0!=r.minheight&&r.minheight>0)&&(f=r.conh/2-r.gridheight[r.curwinrange]*r.bh/2),0>f&&(f=0),r.debugmode){a.closest("li").find(".helpgrid").css({top:f+"px",left:s+"px"});var m=r.c.find(".hglayerinfo");a.on("hover, mouseenter",function(){var e="";a.data()&&jquery.each(a.data(),function(a,t){"object"!=typeof t&&(e=e+''+a+":"+t+" ")}),m.html(e)})}var o=c(a.data("visibility"),r)[r.forcedwinrange]||c(a.data("visibility"),r)||"on";if("off"==o||zs&&(s=0),void 0!=a.data("thumbimage")&&void 0==a.data("videoposter")&&a.data("videoposter",a.data("thumbimage")),a.find("img").length>0){var h=a.find("img");a.data("layertype","image"),0==h.width()&&h.css({width:"auto"}),0==h.height()&&h.css({height:"auto"}),void 0==h.data("ww")&&h.width()>0&&h.data("ww",h.width()),void 0==h.data("hh")&&h.height()>0&&h.data("hh",h.height());var b=h.data("ww"),p=h.data("hh"),a="slide"==_?r.ulw:r.gridwidth[r.curwinrange],d="slide"==_?r.ulh:r.gridheight[r.curwinrange],b=c(h.data("ww"),r)[r.curwinrange]||c(h.data("ww"),r)||"auto",p=c(h.data("hh"),r)[r.curwinrange]||c(h.data("hh"),r)||"auto",f="full"===b||"full-proportional"===b,x="full"===p||"full-proportional"===p;if("full-proportional"===b){var y=h.data("owidth"),v=h.data("oheight");v/d>y/a?(b=a,p=v*(a/y)):(p=d,b=y*(d/v))}else b=f?a:parsefloat(b),p=x?d:parsefloat(p);void 0==b&&(b=0),void 0==p&&(p=0),"off"!==r?("grid"!=_&&f?h.width(b):h.width(b*r.bw),"grid"!=_&&x?h.height(p):h.height(p*r.bh)):(h.width(b),h.height(p))}"slide"===_&&(s=0,f=0);var n="html5"==a.data("audio")?"audio":"video";if(a.hasclass("tp-videolayer")||a.hasclass("tp-audiolayer")||a.find("iframe").length>0||a.find(n).length>0){if(a.data("layertype","video"),t.managevideolayer&&t.managevideolayer(a,r,x,l),!x&&!l){a.data("videotype");t.resetvideo&&t.resetvideo(a,r)}var $=a.data("aspectratio");void 0!=$&&$.split(":").length>1&&t.preparecoveredvideo($,r,a);var h=a.find("iframe")?a.find("iframe"):h=a.find(n),z=a.find("iframe")?!1:!0,g=a.hasclass("coverscreenvideo");h.css({display:"block"}),void 0==a.data("videowidth")&&(a.data("videowidth",h.width()),a.data("videoheight",h.height()));var u,b=c(a.data("videowidth"),r)[r.curwinrange]||c(a.data("videowidth"),r)||"auto",p=c(a.data("videoheight"),r)[r.curwinrange]||c(a.data("videoheight"),r)||"auto";b=parsefloat(b),p=parsefloat(p),void 0===a.data("cssobj")&&(u=v(a,0),a.data("cssobj",u));var q=u(a.data("cssobj"),r);if("auto"==q.lineheight&&(q.lineheight=q.fontsize+4),a.hasclass("fullscreenvideo")||g){s=0,f=0,a.data("x",0),a.data("y",0);var e=q;"on"==r.autoheight&&(e=r.conh),a.css({width:z,height:e})}else punchgs.tweenlite.set(a,{paddingtop:math.round(q.paddingtop*r.bh)+"px",paddingbottom:math.round(q.paddingbottom*r.bh)+"px",paddingleft:math.round(q.paddingleft*r.bw)+"px",paddingright:math.round(q.paddingright*r.bw)+"px",margintop:q.margintop*r.bh+"px",marginbottom:q.marginbottom*r.bh+"px",marginleft:q.marginleft*r.bw+"px",marginright:q.marginright*r.bw+"px",bordertopwidth:math.round(q.bordertopwidth*r.bh)+"px",borderbottomwidth:math.round(q.borderbottomwidth*r.bh)+"px",borderleftwidth:math.round(q.borderleftwidth*r.bw)+"px",borderrightwidth:math.round(q.borderrightwidth*r.bw)+"px",width:b*r.bw+"px",height:p*r.bh+"px"});(0==z&&!g||1!=a.data("forcecover")&&!a.hasclass("fullscreenvideo")&&!g)&&(h.width(b*r.bw),h.height(p*r.bh))}var j=a.data("slidelink")||!1;a.find(".tp-resizeme, .tp-resizeme *").each(function(){w(jquery(this),r,"rekursive",r)}),a.hasclass("tp-resizeme")&&a.find("*").each(function(){w(jquery(this),r,"rekursive",r)}),w(a,r,0,r);var k=a.outerheight(),aa=a.css("backgroundcolor");e(a,".frontcorner","left","borderright","bordertopcolor",k,aa),e(a,".frontcornertop","left","borderright","borderbottomcolor",k,aa),e(a,".backcorner","right","borderleft","borderbottomcolor",k,aa),e(a,".backcornertop","right","borderleft","bordertopcolor",k,aa),"on"==r.fullscreenalignforce&&(s=0,f=0);var ea=a.data("arrobj");if(void 0===ea){var ea=new object;ea.voa=c(a.data("voffset"),r)[r.curwinrange]||c(a.data("voffset"),r)[0],ea.hoa=c(a.data("hoffset"),r)[r.curwinrange]||c(a.data("hoffset"),r)[0],ea.elx=c(a.data("x"),r)[r.curwinrange]||c(a.data("x"),r)[0],ea.ely=c(a.data("y"),r)[r.curwinrange]||c(a.data("y"),r)[0]}var ta=0==ea.voa.length?0:ea.voa,ia=0==ea.hoa.length?0:ea.hoa,na=0==ea.elx.length?0:ea.elx,oa=0==ea.ely.length?0:ea.ely,ra=a.outerwidth(!0),da=a.outerheight(!0);0==ra&&0==da&&(ra=r.ulw,da=r.ulh);var sa="off"!==k?parseint(ta,0)*r.bw:parseint(ta,0),la="off"!==k?parseint(ia,0)*r.bw:parseint(ia,0),pa="grid"===_?r.gridwidth[r.curwinrange]*r.bw:z,ha="grid"===_?r.gridheight[r.curwinrange]*r.bw:q;"on"==r.fullscreenalignforce&&(pa=r.ulw,ha=r.ulh),na="center"===na||"middle"===na?pa/2-ra/2+la:"left"===na?la:"right"===na?pa-ra-la:"off"!==k?na*r.bw:na,oa="center"==oa||"middle"==oa?ha/2-da/2+sa:"top"==oa?sa:"bottom"==oa?ha-da-sa:"off"!==k?oa*r.bw:oa,s&&!j&&(na+=ra),j&&(na=0);var ca=a.data("lasttriggerstate"),ga=a.data("triggerstate"),ma=void 0!=a.data("start")?a.data("start"):100,va=a.data("end"),ua=t?0:"bytrigger"===ma||"sliderenter"===ma?0:parsefloat(ma)/1e3,fa=na+s,wa=oa+f,ya=a.css("z-index");t||("reset"==ca&&"bytrigger"!=ma?(a.data("triggerstate","on"),a.data("animdirection","in"),ga="on"):"reset"==ca&&"bytrigger"==ma&&(a.data("triggerstate","off"),a.data("animdirection","out"),ga="off")),punchgs.tweenlite.set(j,{zindex:ya,top:wa,left:fa,overwrite:"auto"}),0==w&&(l=!0),void 0==a.data("timeline")||l||(2!=w&&a.data("timeline").gotoandplay(0),l=!0),!x&&a.data("timeline_out")&&2!=w&&0!=w&&(a.data("timeline_out").kill(),a.data("outstarted",0)),t&&void 0!=a.data("timeline")&&(a.removedata("$anims"),a.data("timeline").pause(0),a.data("timeline").kill(),void 0!=a.data("newhoveranim")&&(a.data("newhoveranim").progress(0),a.data("newhoveranim").kill()),a.removedata("timeline"),punchgs.tweenlite.killtweensof(a),a.unbind("hover"),a.removeclass("rs-hover-ready"),a.removedata("newhoveranim"));var ba=a.data("timeline")?a.data("timeline").time():0,xa=void 0!==a.data("timeline")?a.data("timeline").progress():0,ta=a.data("timeline")||new punchgs.timelinelite({smoothchildtiming:!0});xa=jquery.isnumeric(xa)?xa:0,ta.pause();var la={};if(la.svg=void 0!=a.data("svg_src")?a.find("svg"):!1,1>xa&&1!=a.data("outstarted")||2==w||t){var wa=a;if(void 0!=a.data("mysplittext")&&a.data("mysplittext").revert(),void 0!=a.data("splitin")&&a.data("splitin").match(/chars|words|lines/g)||void 0!=a.data("splitout")&&a.data("splitout").match(/chars|words|lines/g)){var ja=a.find("a").length>0?a.find("a"):a;a.data("mysplittext",new punchgs.splittext(ja,{type:"lines,words,chars",charsclass:"tp-splitted tp-charsplit",wordsclass:"tp-splitted tp-wordsplit",linesclass:"tp-splitted tp-linesplit"})),a.addclass("splitted")}void 0!==a.data("mysplittext")&&a.data("splitin")&&a.data("splitin").match(/chars|words|lines/g)&&(wa=a.data("mysplittext")[a.data("splitin")]);var ia=new object;la.svg&&(la.idle=o(a.data("svg_idle"),n()),punchgs.tweenlite.set(la.svg,la.idle.anim));var ca=void 0!=a.data("transform_in")?a.data("transform_in").match(/\(r\)/gi):!1;if(!a.data("$anims")||t||ca){var ra=i(),ka=i(),_a=d(),za=void 0!==a.data("transform_hover")||void 0!==a.data("style_hover");ka=p(ka,a.data("transform_idle")),ra=p(ka,a.data("transform_in"),1==r.sdir),za&&(_a=p(_a,a.data("transform_hover")),_a=m(_a,a.data("style_hover")),la.svg&&($svghover=o(a.data("svg_hover"),n()),void 0!=_a.anim.color&&($svghover.anim.fill=_a.anim.color),a.data("hoversvg",$svghover)),a.data("hover",_a)),ra.elemdelay=void 0==a.data("elementdelay")?0:a.data("elementdelay"),ka.anim.ease=ra.anim.ease=ra.anim.ease||punchgs.power1.easeinout,za&&!a.hasclass("rs-hover-ready")&&(a.addclass("rs-hover-ready"),a.hover(function(a){var e=jquery(a.currenttarget),t=e.data("hover"),i=e.data("timeline");i&&1==i.progress()&&(void 0===e.data("newhoveranim")||"none"===e.data("newhoveranim")?(e.data("newhoveranim",punchgs.tweenlite.to(e,t.speed,t.anim)),t.anim&&t.anim.zindex&&e.data("newhoverparanim",punchgs.tweenlite.to(e.data("_pw"),t.speed,{zindex:t.anim.zindex})),la.svg&&e.data("newsvghoveranim",punchgs.tweenlite.to(la.svg,t.speed,e.data("hoversvg").anim))):(e.data("newhoveranim").progress(0).play(),(t.anim&&t.anim.zindex||t.anim.css&&t.anim.css.zindex)&&e.data("newhoverparanim").progress(0).play(),la.svg&&e.data("newsvghoveranim").progress(0).play()))},function(a){var e=jquery(a.currenttarget),t=e.data("timeline");t&&1==t.progress()&&void 0!=e.data("newhoveranim")&&(e.data("newhoveranim").reverse(),e.data("newhoverparanim")&&e.data("newhoverparanim").reverse(),la.svg&&e.data("newsvghoveranim").reverse())})),ia=new object,ia.f=ra,ia.r=ka,a.data("$anims")}else ia=a.data("$anims");var qa=h(a.data("mask_in")),sa=new punchgs.timelinelite;if(ia.f.anim.x=ia.f.anim.x*r.bw||l(ia.f.anim.x,r,ra,da,wa,fa,"horizontal"),ia.f.anim.y=ia.f.anim.y*r.bw||l(ia.f.anim.y,r,ra,da,wa,fa,"vertical"),2!=w||t){if(wa!=a){var ma=ia.r.anim.ease;ta.add(punchgs.tweenlite.set(a,ia.r.anim)),ia.r=i(),ia.r.anim.ease=ma}if(ia.f.anim.visibility="hidden",a.data("eow",ra),a.data("eoh",da),a.data("speed",ia.f.speed),a.data("ease",ia.r.anim.ease),sa.eventcallback("onstart",function(){punchgs.tweenlite.set(a,{visibility:"visible"}),a.data("iframes")&&a.find("iframe").each(function(){punchgs.tweenlite.set(jquery(this),{autoalpha:1})}),punchgs.tweenlite.set(j,{visibility:"visible"});var e={};e.layer=a,e.eventtype="enterstage",e.layertype=a.data("layertype"),a.data("active",!0),e.layersettings=a.data(),r.c.trigger("revolution.layeraction",[e])}),sa.eventcallback("oncomplete",function(){var e={};e.layer=a,e.eventtype="enteredstage",e.layertype=a.data("layertype"),e.layersettings=a.data(),r.c.trigger("revolution.layeraction",[e]),t.animcompleted(a,r)}),"sliderenter"==ma&&r.overcontainer&&(ua=.6),ta.add(sa.staggerfromto(wa,ia.f.speed,ia.f.anim,ia.r.anim,ia.f.elemdelay),ua),qa){var oa=new object;oa.ease=ia.r.anim.ease,oa.overflow=qa.anim.overflow="hidden",oa.overwrite="all",oa.x=oa.y=0,qa.anim.x=qa.anim.x*r.bw||l(qa.anim.x,r,ra,da,wa,fa,"horizontal"),qa.anim.y=qa.anim.y*r.bw||l(qa.anim.y,r,ra,da,wa,fa,"vertical"),ta.add(punchgs.tweenlite.fromto(c,ia.f.speed,qa.anim,oa,ra.elemdelay),ua)}else ta.add(punchgs.tweenlite.set(c,{overflow:"visible"},ra.elemdelay),0)}if(a.data("timeline",ta),r.sliderscrope=void 0===r.sliderscrope?math.round(99999*math.random()):r.sliderscrope,w=g(a,r,"in"),void 0===r.endtimeouts&&(r.endtimeouts=[]),(0===xa||2==w)&&"bytrigger"!==va&&!t&&"sliderleave"!=va){if(void 0!=va&&(-1==w||2==w)&&"bytriger"!==va)var ha=settimeout(function(){t.endmovecaption(a,c,j,r)},parseint(a.data("end"),0));r.endtimeouts.push(ha)}ta=a.data("timeline"),"on"==a.data("loopanimation")&&y(i,r.bw),("sliderenter"!=ma||"sliderenter"==ma&&r.overcontainer)&&(-1==w||1==w||t||0==w&&1>xa&&a.hasclass("rev-static-visbile"))&&(1>xa&&xa>0||0==xa&&"bytrigger"!=ma&&"keep"!=ca||0==xa&&"bytrigger"!=ma&&"keep"==ca&&"on"==ga||"bytrigger"==ma&&"keep"==ca&&"on"==ga)&&(ta.resume(ba),t.togglestate(a.data("layertoggledby")))}"on"==a.data("loopanimation")&&punchgs.tweenlite.set(i,{minwidth:ra,minheight:da}),0==a.data("slidelink")||1!=a.data("slidelink")&&!a.hasclass("slidelink")?(punchgs.tweenlite.set(c,{width:"auto",height:"auto"}),a.data("slidelink",0)):(punchgs.tweenlite.set(c,{width:"100%",height:"100%"}),a.data("slidelink",1))},endmovecaption:function(a,e,n,o){if(e=void 0!=e?e:a.data("_mw"),n=void 0!=n?n:a.data("_pw"),a.data("outstarted",1),a.data("timeline"))a.data("timeline").pause();else if(void 0===a.data("_pw"))return;var d=new punchgs.timelinelite,s=new punchgs.timelinelite,c=new punchgs.timelinelite,g=p(i(),a.data("transform_in"),1==o.sdir),m=a.data("transform_out")?p(r(),a.data("transform_out"),1==o.sdir):p(r(),a.data("transform_in"),1==o.sdir),v=a.data("splitout")&&a.data("splitout").match(/words|chars|lines/g)?a.data("mysplittext")[a.data("splitout")]:a,u=void 0==a.data("endelementdelay")?0:a.data("endelementdelay"),f=a.innerwidth(),w=a.innerheight(),y=n.position();a.data("transform_out")&&a.data("transform_out").match(/auto:auto/g)&&(g.speed=m.speed,g.anim.ease=m.anim.ease,m=g);var b=h(a.data("mask_out"));m.anim.x=m.anim.x*o.bw||l(m.anim.x,o,f,w,y.top,y.left,"horizontal"),m.anim.y=m.anim.y*o.bw||l(m.anim.y,o,f,w,y.top,y.left,"vertical"),s.eventcallback("onstart",function(){var e={};e.layer=a,e.eventtype="leavestage",e.layertype=a.data("layertype"),e.layersettings=a.data(),a.data("active",!1),o.c.trigger("revolution.layeraction",[e])}),s.eventcallback("oncomplete",function(){punchgs.tweenlite.set(a,{visibility:"hidden"}),punchgs.tweenlite.set(n,{visibility:"hidden"});var e={};e.layer=a,e.eventtype="leftstage",a.data("active",!1),e.layertype=a.data("layertype"),e.layersettings=a.data(),o.c.trigger("revolution.layeraction",[e]),t.stopvideo&&t.stopvideo(a,o)}),d.add(s.staggerto(v,m.speed,m.anim,u),0),b?(b.anim.ease=m.anim.ease,b.anim.overflow="hidden",b.anim.x=b.anim.x*o.bw||l(b.anim.x,o,f,w,y.top,y.left,"horizontal"),b.anim.y=b.anim.y*o.bw||l(b.anim.y,o,f,w,y.top,y.left,"vertical"),d.add(c.to(e,m.speed,b.anim,u),0)):d.add(c.set(e,{overflow:"visible",overwrite:"auto"},u),0),a.data("timeline_out",d)},removethecaptions:function(a,e){var i=a.data("index"),n=new array;e.layers[i]&&jquery.each(e.layers[i],function(a,e){n.push(e)}),e.layers["static"]&&jquery.each(e.layers["static"],function(a,e){n.push(e)}),e.endtimeouts&&e.endtimeouts.length>0&&jquery.each(e.endtimeouts,function(a,e){cleartimeout(e)}),e.endtimeouts=new array,n&&jquery.each(n,function(a){var i=jquery(this),n=g(i,e,"out");0!=n&&(b(i),cleartimeout(i.data("videoplaywait")),t.stopvideo&&t.stopvideo(i,e),t.endmovecaption(i,null,null,e),t.removemediafromlist&&t.removemediafromlist(i,e),e.lastplayedvideos=[])})}});var i=function(){var a=new object;return a.anim=new object,a.anim.x=0,a.anim.y=0,a.anim.z=0,a.anim.rotationx=0,a.anim.rotationy=0,a.anim.rotationz=0,a.anim.scalex=1,a.anim.scaley=1,a.anim.skewx=0,a.anim.skewy=0,a.anim.opacity=1,a.anim.transformorigin="50% 50%",a.anim.transformperspective=600,a.anim.rotation=0,a.anim.ease=punchgs.power3.easeout,a.anim.force3d="auto",a.speed=.3,a.anim.autoalpha=1,a.anim.visibility="visible",a.anim.overwrite="all",a},n=function(){var a=new object;return a.anim=new object,a.anim.stroke="none",a.anim.strokewidth=0,a.anim.strokedasharray="none",a.anim.strokedashoffset="0",a},o=function(a,e){var t=a.split(";");return t&&jquery.each(t,function(a,t){var i=t.split(":"),n=i[0],o=i[1];"sc"==n&&(e.anim.stroke=o),"sw"==n&&(e.anim.strokewidth=o),"sda"==n&&(e.anim.strokedasharray=o),"sdo"==n&&(e.anim.strokedashoffset=o)}),e},r=function(){var a=new object;return a.anim=new object,a.anim.x=0,a.anim.y=0,a.anim.z=0,a},d=function(){var a=new object;return a.anim=new object,a.speed=.2,a},s=function(a,e){if(jquery.isnumeric(parsefloat(a)))return parsefloat(a);if(void 0===a||"inherit"===a)return e;if(a.split("{").length>1){var t=a.split(","),i=parsefloat(t[1].split("}")[0]);t=parsefloat(t[0].split("{")[1]),a=math.random()*(i-t)+t}return a},l=function(a,e,t,i,n,o,r){return!jquery.isnumeric(a)&&a.match(/%]/g)?(a=a.split("[")[1].split("]")[0],"horizontal"==r?a=(t+2)*parseint(a,0)/100:"vertical"==r&&(a=(i+2)*parseint(a,0)/100)):(a="layer_left"===a?0-t:"layer_right"===a?t:a,a="layer_top"===a?0-i:"layer_bottom"===a?i:a,a="left"===a||"stage_left"===a?0-t-o:"right"===a||"stage_right"===a?e.conw-o:"center"===a||"stage_center"===a?e.conw/2-t/2-o:a,a="top"===a||"stage_top"===a?0-i-n:"bottom"===a||"stage_bottom"===a?e.conh-n:"middle"===a||"stage_middle"===a?e.conh/2-i/2-n:a),a},p=function(a,e,t){var i=new object;if(i=jquery.extend(!0,{},i,a),void 0===e)return i;var n=e.split(";");return n&&jquery.each(n,function(a,e){var n=e.split(":"),o=n[0],r=n[1];t&&void 0!=r&&r.length>0&&r.match(/\(r\)/)&&(r=r.replace("(r)",""),r="right"===r?"left":"left"===r?"right":"top"===r?"bottom":"bottom"===r?"top":r,"["===r[0]&&"-"===r[1]?r=r.replace("[-","["):"["===r[0]&&"-"!==r[1]?r=r.replace("[","[-"):"-"===r[0]?r=r.replace("-",""):r[0].match(/[1-9]/)&&(r="-"+r)),void 0!=r&&(r=r.replace(/\(r\)/,""),("rotationx"==o||"rx"==o)&&(i.anim.rotationx=s(r,i.anim.rotationx)+"deg"),("rotationy"==o||"ry"==o)&&(i.anim.rotationy=s(r,i.anim.rotationy)+"deg"),("rotationz"==o||"rz"==o)&&(i.anim.rotation=s(r,i.anim.rotationz)+"deg"),("scalex"==o||"sx"==o)&&(i.anim.scalex=s(r,i.anim.scalex)),("scaley"==o||"sy"==o)&&(i.anim.scaley=s(r,i.anim.scaley)),("opacity"==o||"o"==o)&&(i.anim.opacity=s(r,i.anim.opacity)),i.anim.opacity=0==i.anim.opacity?1e-4:i.anim.opacity,("skewx"==o||"skx"==o)&&(i.anim.skewx=s(r,i.anim.skewx)),("skewy"==o||"sky"==o)&&(i.anim.skewy=s(r,i.anim.skewy)),"x"==o&&(i.anim.x=s(r,i.anim.x)),"y"==o&&(i.anim.y=s(r,i.anim.y)),"z"==o&&(i.anim.z=s(r,i.anim.z)),("transformorigin"==o||"to"==o)&&(i.anim.transformorigin=r.tostring()),("transformperspective"==o||"tp"==o)&&(i.anim.transformperspective=parseint(r,0)),("speed"==o||"s"==o)&&(i.speed=parsefloat(r)/1e3),("ease"==o||"e"==o)&&(i.anim.ease=r))}),i},h=function(a){if(void 0===a)return!1;var e=new object;e.anim=new object;var t=a.split(";");return t&&jquery.each(t,function(a,t){t=t.split(":");var i=t[0],n=t[1];"x"==i&&(e.anim.x=n),"y"==i&&(e.anim.y=n),"s"==i&&(e.speed=parsefloat(n)/1e3),("e"==i||"ease"==i)&&(e.anim.ease=n)}),e},c=function(a,e,t){if(void 0==a&&(a=0),!jquery.isarray(a)&&"string"===jquery.type(a)&&(a.split(",").length>1||a.split("[").length>1)){a=a.replace("[",""),a=a.replace("]","");var i=a.match(/'/g)?a.split("',"):a.split(",");a=new array,i&&jquery.each(i,function(e,t){t=t.replace("'",""),t=t.replace("'",""),a.push(t)})}else{var n=a;jquery.isarray(a)||(a=new array,a.push(n))}var n=a[a.length-1];if(a.lengths||s>r?2:0:s>=o&&r>=s||o==s||r==s?(i||(a.addclass("rev-static-visbile"),a.removeclass("rev-static-hidden")),n=1):n=0:a.hasclass("rev-static-visbile")?o>s||s>r?(n=2,i||(a.removeclass("rev-static-visbile"),a.addclass("rev-static-hidden"))):n=0:n=2}return n},m=function(a,e){if(void 0===e)return a;e=e.replace("c:","color:"),e=e.replace("bg:","background-color:"),e=e.replace("bw:","border-width:"),e=e.replace("bc:","border-color:"),e=e.replace("br:","borderradius:"),e=e.replace("bs:","border-style:"),e=e.replace("td:","text-decoration:"),e=e.replace("zi:","zindex:");var t=e.split(";");return t&&jquery.each(t,function(e,t){var i=t.split(":");i[0].length>0&&(a.anim[i[0]]=i[1])}),a},v=function(a,e){var t,i=new object,n=!1;if("rekursive"==e&&(t=a.closest(".tp-caption"),t&&a.css("fontsize")===t.css("fontsize")&&(n=!0)),i.basealign=a.data("basealign")||"grid",i.fontsize=n?void 0===t.data("fontsize")?parseint(t.css("fontsize"),0)||0:t.data("fontsize"):void 0===a.data("fontsize")?parseint(a.css("fontsize"),0)||0:a.data("fontsize"),i.fontweight=n?void 0===t.data("fontweight")?parseint(t.css("fontweight"),0)||0:t.data("fontweight"):void 0===a.data("fontweight")?parseint(a.css("fontweight"),0)||0:a.data("fontweight"),i.whitespace=n?void 0===t.data("whitespace")?t.css("whitespace")||"normal":t.data("whitespace"):void 0===a.data("whitespace")?a.css("whitespace")||"normal":a.data("whitespace"),i.zindex=n?void 0===t.data("zindex")?t.css("zindex")||"inherit":t.data("zindex"):void 0===a.data("zindex")?a.css("zindex")||"inherit":a.data("zindex"),-1!==jquery.inarray(a.data("layertype"),["video","image","audio"])||a.is("img")?i.lineheight=0:i.lineheight=n?void 0===t.data("lineheight")?parseint(t.css("lineheight"),0)||0:t.data("lineheight"):void 0===a.data("lineheight")?parseint(a.css("lineheight"),0)||0:a.data("lineheight"),i.letterspacing=n?void 0===t.data("letterspacing")?parsefloat(t.css("letterspacing"),0)||0:t.data("letterspacing"):void 0===a.data("letterspacing")?parsefloat(a.css("letterspacing"))||0:a.data("letterspacing"),i.paddingtop=void 0===a.data("paddingtop")?parseint(a.css("paddingtop"),0)||0:a.data("paddingtop"),i.paddingbottom=void 0===a.data("paddingbottom")?parseint(a.css("paddingbottom"),0)||0:a.data("paddingbottom"),i.paddingleft=void 0===a.data("paddingleft")?parseint(a.css("paddingleft"),0)||0:a.data("paddingleft"),i.paddingright=void 0===a.data("paddingright")?parseint(a.css("paddingright"),0)||0:a.data("paddingright"),i.margintop=void 0===a.data("margintop")?parseint(a.css("margintop"),0)||0:a.data("margintop"),i.marginbottom=void 0===a.data("marginbottom")?parseint(a.css("marginbottom"),0)||0:a.data("marginbottom"),i.marginleft=void 0===a.data("marginleft")?parseint(a.css("marginleft"),0)||0:a.data("marginleft"),i.marginright=void 0===a.data("marginright")?parseint(a.css("marginright"),0)||0:a.data("marginright"),i.bordertopwidth=void 0===a.data("bordertopwidth")?parseint(a.css("bordertopwidth"),0)||0:a.data("bordertopwidth"),i.borderbottomwidth=void 0===a.data("borderbottomwidth")?parseint(a.css("borderbottomwidth"),0)||0:a.data("borderbottomwidth"),i.borderleftwidth=void 0===a.data("borderleftwidth")?parseint(a.css("borderleftwidth"),0)||0:a.data("borderleftwidth"),i.borderrightwidth=void 0===a.data("borderrightwidth")?parseint(a.css("borderrightwidth"),0)||0:a.data("borderrightwidth"),"rekursive"!=e){if(i.color=void 0===a.data("color")?"nopredefinedcolor":a.data("color"),i.whitespace=n?void 0===t.data("whitespace")?t.css("whitespace")||"nowrap":t.data("whitespace"):void 0===a.data("whitespace")?a.css("whitespace")||"nowrap":a.data("whitespace"),i.minwidth=void 0===a.data("width")?parseint(a.css("minwidth"),0)||0:a.data("width"),i.minheight=void 0===a.data("height")?parseint(a.css("minheight"),0)||0:a.data("height"),void 0!=a.data("videowidth")&&void 0!=a.data("videoheight")){var o=a.data("videowidth"),r=a.data("videoheight");o="100%"===o?"none":o,r="100%"===r?"none":r,a.data("width",o),a.data("height",r)}i.maxwidth=void 0===a.data("width")?parseint(a.css("maxwidth"),0)||"none":a.data("width"),i.maxheight=void 0===a.data("height")?parseint(a.css("maxheight"),0)||"none":a.data("height"),i.wan=void 0===a.data("wan")?parseint(a.css("-webkit-transition"),0)||"none":a.data("wan"),i.moan=void 0===a.data("moan")?parseint(a.css("-moz-animation-transition"),0)||"none":a.data("moan"),i.man=void 0===a.data("man")?parseint(a.css("-ms-animation-transition"),0)||"none":a.data("man"),i.ani=void 0===a.data("ani")?parseint(a.css("transition"),0)||"none":a.data("ani")}return i.styleprops=a.css(["background-color","border-top-color","border-bottom-color","border-right-color","border-left-color","border-top-style","border-bottom-style","border-left-style","border-right-style","border-left-width","border-right-width","border-bottom-width","border-top-width","color","text-decoration","font-style","bordertopleftradius","bordertoprightradius","borderbottomleftradius","borderbottomrightradius"]),i},u=function(a,e){var t=new object;return a&&jquery.each(a,function(i,n){t[i]=c(n,e)[e.curwinrange]||a[i]}),t},f=function(a,e,t,i){return a=jquery.isnumeric(a)?a*e+"px":a,a="full"===a?i:"auto"===a||"none"===a?t:a},w=function(a,e,t,i){var n;try{if("br"==a[0].nodename||"br"==a[0].tagname)return!1}catch(o){}void 0===a.data("cssobj")?(n=v(a,t),a.data("cssobj",n)):n=a.data("cssobj");var r=u(n,e),d=e.bw,s=e.bh;if("off"===i&&(d=1,s=1),"auto"==r.lineheight&&(r.lineheight=r.fontsize+4),!a.hasclass("tp-splitted")){a.css("-webkit-transition","none"),a.css("-moz-transition","none"),a.css("-ms-transition","none"),a.css("transition","none");var l=void 0!==a.data("transform_hover")||void 0!==a.data("style_hover");if(l&&punchgs.tweenlite.set(a,r.styleprops),punchgs.tweenlite.set(a,{fontsize:math.round(r.fontsize*d)+"px",fontweight:r.fontweight,letterspacing:math.floor(r.letterspacing*d)+"px",paddingtop:math.round(r.paddingtop*s)+"px",paddingbottom:math.round(r.paddingbottom*s)+"px",paddingleft:math.round(r.paddingleft*d)+"px",paddingright:math.round(r.paddingright*d)+"px",margintop:r.margintop*s+"px",marginbottom:r.marginbottom*s+"px",marginleft:r.marginleft*d+"px",marginright:r.marginright*d+"px",bordertopwidth:math.round(r.bordertopwidth*s)+"px",borderbottomwidth:math.round(r.borderbottomwidth*s)+"px",borderleftwidth:math.round(r.borderleftwidth*d)+"px",borderrightwidth:math.round(r.borderrightwidth*d)+"px",lineheight:math.round(r.lineheight*s)+"px",overwrite:"auto"}),"rekursive"!=t){var p="slide"==r.basealign?e.ulw:e.gridwidth[e.curwinrange],h="slide"==r.basealign?e.ulh:e.gridheight[e.curwinrange],c=f(r.maxwidth,d,"none",p),g=f(r.maxheight,s,"none",h),m=f(r.minwidth,d,"0px",p),w=f(r.minheight,s,"0px",h);if(punchgs.tweenlite.set(a,{maxwidth:c,maxheight:g,minwidth:m,minheight:w,whitespace:r.whitespace,overwrite:"auto"}),"nopredefinedcolor"!=r.color&&punchgs.tweenlite.set(a,{color:r.color,overwrite:"auto"}),void 0!=a.data("svg_src")){var y="nopredefinedcolor"!=r.color&&void 0!=r.color?r.color:void 0!=r.css&&"nopredefinedcolor"!=r.css.color&&void 0!=r.css.color?r.css.color:void 0!=r.styleprops.color?r.styleprops.color:void 0!=r.styleprops.css&&void 0!=r.styleprops.css.color?r.styleprops.css.color:!1;0!=y&&punchgs.tweenlite.set(a.find("svg"),{fill:y,overwrite:"auto"})}}settimeout(function(){a.css("-webkit-transition",a.data("wan")),a.css("-moz-transition",a.data("moan")),a.css("-ms-transition",a.data("man")),a.css("transition",a.data("ani"))},30)}},y=function(a,e){if(a.hasclass("rs-pendulum")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.timelinelite);var t=void 0==a.data("startdeg")?-20:a.data("startdeg"),i=void 0==a.data("enddeg")?20:a.data("enddeg"),n=void 0==a.data("speed")?2:a.data("speed"),o=void 0==a.data("origin")?"50% 50%":a.data("origin"),r=void 0==a.data("easing")?punchgs.power2.easeinout:a.data("ease");t*=e,i*=e,a.data("loop-timeline").append(new punchgs.tweenlite.fromto(a,n,{force3d:"auto",rotation:t,transformorigin:o},{rotation:i,ease:r})),a.data("loop-timeline").append(new punchgs.tweenlite.fromto(a,n,{force3d:"auto",rotation:i,transformorigin:o},{rotation:t,ease:r,oncomplete:function(){a.data("loop-timeline").restart()}}))}if(a.hasclass("rs-rotate")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.timelinelite);var t=void 0==a.data("startdeg")?0:a.data("startdeg"),i=void 0==a.data("enddeg")?360:a.data("enddeg");n=void 0==a.data("speed")?2:a.data("speed"),o=void 0==a.data("origin")?"50% 50%":a.data("origin"),r=void 0==a.data("easing")?punchgs.power2.easeinout:a.data("easing"),t*=e,i*=e,a.data("loop-timeline").append(new punchgs.tweenlite.fromto(a,n,{force3d:"auto",rotation:t,transformorigin:o},{rotation:i,ease:r,oncomplete:function(){a.data("loop-timeline").restart()}}))}if(a.hasclass("rs-slideloop")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.timelinelite);var d=void 0==a.data("xs")?0:a.data("xs"),s=void 0==a.data("ys")?0:a.data("ys"),l=void 0==a.data("xe")?0:a.data("xe"),p=void 0==a.data("ye")?0:a.data("ye"),n=void 0==a.data("speed")?2:a.data("speed"),r=void 0==a.data("easing")?punchgs.power2.easeinout:a.data("easing");d*=e,s*=e,l*=e,p*=e,a.data("loop-timeline").append(new punchgs.tweenlite.fromto(a,n,{force3d:"auto",x:d,y:s},{x:l,y:p,ease:r})),a.data("loop-timeline").append(new punchgs.tweenlite.fromto(a,n,{force3d:"auto",x:l,y:p},{x:d,y:s,oncomplete:function(){a.data("loop-timeline").restart()}}))}if(a.hasclass("rs-pulse")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.timelinelite);var h=void 0==a.data("zoomstart")?0:a.data("zoomstart"),c=void 0==a.data("zoomend")?0:a.data("zoomend"),n=void 0==a.data("speed")?2:a.data("speed"),r=void 0==a.data("easing")?punchgs.power2.easeinout:a.data("easing");a.data("loop-timeline").append(new punchgs.tweenlite.fromto(a,n,{force3d:"auto",scale:h},{scale:c,ease:r})),a.data("loop-timeline").append(new punchgs.tweenlite.fromto(a,n,{force3d:"auto",scale:c},{scale:h,oncomplete:function(){a.data("loop-timeline").restart()}}))}if(a.hasclass("rs-wave")&&void 0==a.data("loop-timeline")){a.data("loop-timeline",new punchgs.timelinelite);var g=void 0==a.data("angle")?10:parseint(a.data("angle"),0),m=void 0==a.data("radius")?10:parseint(a.data("radius"),0),n=void 0==a.data("speed")?-20:a.data("speed"),o=void 0==a.data("origin")?"50% 50%":a.data("origin"),v=o.split(" "),u=new object;v.length>=1?(u.x=v[0],u.y=v[1]):(u.x="50%",u.y="50%"),g*=e,m*=e;var f=0-a.height()/2+m*(-1+parseint(u.y,0)/100),w=a.width()*(-.5+parseint(u.x,0)/100),y={a:0,ang:g,element:a,unit:m,xoffset:w,yoffset:f};a.data("loop-timeline").append(new punchgs.tweenlite.fromto(y,n,{
a:360},{a:0,force3d:"auto",ease:punchgs.linear.easenone,onupdate:function(){var a=(y.a+y.ang)*(math.pi/180);punchgs.tweenlite.to(y.element,.1,{force3d:"auto",x:y.xoffset+math.cos(a)*y.unit,y:y.unit*(1-math.sin(a))+y.yoffset/.5})},oncomplete:function(){a.data("loop-timeline").restart()}}))}},b=function(a){a.find(".rs-pendulum, .rs-slideloop, .rs-pulse, .rs-wave").each(function(){var a=jquery(this);void 0!=a.data("loop-timeline")&&(a.data("loop-timeline").pause(),a.data("loop-timeline",null))})}}(jquery);