/********************************************
* revolution 5.0 extension - layer animation
* @version: 1.3 (26.11.2015)
* @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,n,r,u,w,y,b){var x=y,t=h(a,n,"in",!0),l=a.data("_pw")||a.closest(".tp-parallax-wrap"),w=a.data("_lw")||a.closest(".tp-loop-wrap"),c=a.data("_mw")||a.closest(".tp-mask-wrap"),j=a.data("responsive")||"on",i=a.data("responsive_offset")||"on",r=a.data("basealign")||"grid",k="grid"===r?n.width:n.ulw,_="grid"===r?n.height:n.ulh,s=jquery("body").hasclass("rtl");if(a.data("_pw")||(a.data("_pw",l),a.data("_lw",w),a.data("_mw",c)),"fullscreen"==n.sliderlayout&&(u=_/2-n.gridheight[n.curwinrange]*n.bh/2),("on"==n.autoheight||void 0!=n.minheight&&n.minheight>0)&&(u=n.conh/2-n.gridheight[n.curwinrange]*n.bh/2),0>u&&(u=0),n.debugmode){a.closest("li").find(".helpgrid").css({top:u+"px",left:r+"px"});var z=n.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+" ")}),z.html(e)})}var q=p(a.data("visibility"),n)[n.forcedwinrange]||p(a.data("visibility"),n)||"on";if("off"==q||kr&&(r=0),void 0!=a.data("thumbimage")&&void 0==a.data("videoposter")&&a.data("videoposter",a.data("thumbimage")),a.find("img").length>0){var m=a.find("img");a.data("layertype","image"),0==m.width()&&m.css({width:"auto"}),0==m.height()&&m.css({height:"auto"}),void 0==m.data("ww")&&m.width()>0&&m.data("ww",m.width()),void 0==m.data("hh")&&m.height()>0&&m.data("hh",m.height());var o=m.data("ww"),h=m.data("hh"),b="slide"==r?n.ulw:n.gridwidth[n.curwinrange],a="slide"==r?n.ulh:n.gridheight[n.curwinrange],o=p(m.data("ww"),n)[n.curwinrange]||p(m.data("ww"),n)||"auto",h=p(m.data("hh"),n)[n.curwinrange]||p(m.data("hh"),n)||"auto",f="full"===o||"full-proportional"===o,d="full"===h||"full-proportional"===h;if("full-proportional"===o){var p=m.data("owidth"),x=m.data("oheight");x/a>p/b?(o=b,h=x*(b/p)):(h=a,o=p*(a/x))}else o=f?b:parsefloat(o),h=d?a:parsefloat(h);void 0==o&&(o=0),void 0==h&&(h=0),"off"!==j?("grid"!=r&&f?m.width(o):m.width(o*n.bw),"grid"!=r&&d?m.height(h):m.height(h*n.bh)):(m.width(o),m.height(h))}if("slide"===r&&(r=0,u=0),a.hasclass("tp-videolayer")||a.find("iframe").length>0||a.find("video").length>0){if(a.data("layertype","video"),t.managevideolayer(a,n,y,x),!y&&!x){a.data("videotype");t.resetvideo(a,n)}var y=a.data("aspectratio");void 0!=y&&y.split(":").length>1&&t.preparecoveredvideo(y,n,a);var m=a.find("iframe")?a.find("iframe"):m=a.find("video"),v=a.find("iframe")?!1:!0,n=a.hasclass("coverscreenvideo");m.css({display:"block"}),void 0==a.data("videowidth")&&(a.data("videowidth",m.width()),a.data("videoheight",m.height()));var z,o=p(a.data("videowidth"),n)[n.curwinrange]||p(a.data("videowidth"),n)||"auto",h=p(a.data("videoheight"),n)[n.curwinrange]||p(a.data("videoheight"),n)||"auto";o=parsefloat(o),h=parsefloat(h),void 0===a.data("cssobj")&&(z=g(a,0),a.data("cssobj",z));var $=m(a.data("cssobj"),n);if("auto"==$.lineheight&&($.lineheight=$.fontsize+4),a.hasclass("fullscreenvideo")||n){r=0,u=0,a.data("x",0),a.data("y",0);var g=_;"on"==n.autoheight&&(g=n.conh),a.css({width:k,height:g})}else punchgs.tweenlite.set(a,{paddingtop:math.round($.paddingtop*n.bh)+"px",paddingbottom:math.round($.paddingbottom*n.bh)+"px",paddingleft:math.round($.paddingleft*n.bw)+"px",paddingright:math.round($.paddingright*n.bw)+"px",margintop:$.margintop*n.bh+"px",marginbottom:$.marginbottom*n.bh+"px",marginleft:$.marginleft*n.bw+"px",marginright:$.marginright*n.bw+"px",bordertopwidth:math.round($.bordertopwidth*n.bh)+"px",borderbottomwidth:math.round($.borderbottomwidth*n.bh)+"px",borderleftwidth:math.round($.borderleftwidth*n.bw)+"px",borderrightwidth:math.round($.borderrightwidth*n.bw)+"px",width:o*n.bw+"px",height:h*n.bh+"px"});(0==v&&!n||1!=a.data("forcecover")&&!a.hasclass("fullscreenvideo")&&!n)&&(m.width(o*n.bw),m.height(h*n.bh))}a.find(".tp-resizeme, .tp-resizeme *").each(function(){v(jquery(this),n,"rekursive",j)}),a.hasclass("tp-resizeme")&&a.find("*").each(function(){v(jquery(this),n,"rekursive",j)}),v(a,n,0,j);var u=a.outerheight(),q=a.css("backgroundcolor");e(a,".frontcorner","left","borderright","bordertopcolor",u,q),e(a,".frontcornertop","left","borderright","borderbottomcolor",u,q),e(a,".backcorner","right","borderleft","borderbottomcolor",u,q),e(a,".backcornertop","right","borderleft","bordertopcolor",u,q),"on"==n.fullscreenalignforce&&(r=0,u=0);var e=a.data("arrobj");if(void 0===e){var e=new object;e.voa=p(a.data("voffset"),n)[n.curwinrange]||p(a.data("voffset"),n)[0],e.hoa=p(a.data("hoffset"),n)[n.curwinrange]||p(a.data("hoffset"),n)[0],e.elx=p(a.data("x"),n)[n.curwinrange]||p(a.data("x"),n)[0],e.ely=p(a.data("y"),n)[n.curwinrange]||p(a.data("y"),n)[0]}var j=0==e.voa.length?0:e.voa,k=0==e.hoa.length?0:e.hoa,aa=0==e.elx.length?0:e.elx,ea=0==e.ely.length?0:e.ely,ta=a.outerwidth(!0),ia=a.outerheight(!0);0==ta&&0==ia&&(ta=n.ulw,ia=n.ulh);var na="off"!==i?parseint(j,0)*n.bw:parseint(j,0),oa="off"!==i?parseint(k,0)*n.bw:parseint(k,0),ra="grid"===r?n.gridwidth[n.curwinrange]*n.bw:k,da="grid"===r?n.gridheight[n.curwinrange]*n.bw:_;"on"==n.fullscreenalignforce&&(ra=n.ulw,da=n.ulh),aa="center"===aa||"middle"===aa?ra/2-ta/2+oa:"left"===aa?oa:"right"===aa?ra-ta-oa:"off"!==i?aa*n.bw:aa,ea="center"==ea||"middle"==ea?da/2-ia/2+na:"top"==ea?na:"bottom"==ea?da-ia-na:"off"!==i?ea*n.bw:ea,s&&(aa+=ta);var sa=a.data("lasttriggerstate"),la=a.data("triggerstate"),pa=a.data("start")||100,ha=a.data("end"),ca=b?0:"bytrigger"===pa||"sliderenter"===pa?0:parsefloat(pa)/1e3,ga=aa+r,ma=ea+u,ua=a.css("z-index");b||("reset"==sa&&"bytrigger"!=pa?(a.data("triggerstate","on"),a.data("animdirection","in"),la="on"):"reset"==sa&&"bytrigger"==pa&&(a.data("triggerstate","off"),a.data("animdirection","out"),la="off")),punchgs.tweenlite.set(l,{zindex:ua,top:ma,left:ga,overwrite:"auto"}),0==t&&(x=!0),void 0==a.data("timeline")||x||(2!=t&&a.data("timeline").gotoandplay(0),x=!0),!y&&a.data("timeline_out")&&2!=t&&0!=t&&(a.data("timeline_out").kill(),a.data("outstarted",0)),b&&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 va=a.data("timeline")?a.data("timeline").time():0,fa=void 0!==a.data("timeline")?a.data("timeline").progress():0,wa=a.data("timeline")||new punchgs.timelinelite({smoothchildtiming:!0});if(fa=jquery.isnumeric(fa)?fa:0,wa.pause(),1>fa&&1!=a.data("outstarted")||2==t||b){var ya=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 ba=a.find("a").length>0?a.find("a"):a;a.data("mysplittext",new punchgs.splittext(ba,{type:"lines,words,chars",charsclass:"tp-splitted",wordsclass:"tp-splitted",linesclass:"tp-splitted"})),a.addclass("splitted")}void 0!==a.data("mysplittext")&&a.data("splitin")&&a.data("splitin").match(/chars|words|lines/g)&&(ya=a.data("mysplittext")[a.data("splitin")]);var xa=new object,ta=void 0!=a.data("transform_in")?a.data("transform_in").match(/\(r\)/gi):!1;if(!a.data("$anims")||b||ta){var la=i(),wa=i(),ca=o(),ja=void 0!==a.data("transform_hover")||void 0!==a.data("style_hover");wa=s(wa,a.data("transform_idle")),la=s(wa,a.data("transform_in"),1==n.sdir),ja&&(ca=s(ca,a.data("transform_hover")),ca=c(ca,a.data("style_hover")),a.data("hover",ca)),la.elemdelay=void 0==a.data("elementdelay")?0:a.data("elementdelay"),wa.anim.ease=la.anim.ease=la.anim.ease||punchgs.power1.easeinout,ja&&!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)):(e.data("newhoveranim").progress(0),e.data("newhoveranim").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()})),xa=new object,xa.f=la,xa.r=wa,a.data("$anims")}else xa=a.data("$anims");var ia=l(a.data("mask_in")),ra=new punchgs.timelinelite;if(xa.f.anim.x=xa.f.anim.x*n.bw||d(xa.f.anim.x,n,ta,ia,ma,ga,"horizontal"),xa.f.anim.y=xa.f.anim.y*n.bw||d(xa.f.anim.y,n,ta,ia,ma,ga,"vertical"),2!=t||b){if(ya!=a){var ka=xa.r.anim.ease;wa.add(punchgs.tweenlite.set(a,xa.r.anim)),xa.r=i(),xa.r.anim.ease=ka}if(xa.f.anim.visibility="hidden",ra.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(l,{visibility:"visible"});var e={};e.layer=a,e.eventtype="enterstage",e.layertype=a.data("layertype"),e.layersettings=a.data(),n.c.trigger("revolution.layeraction",e)}),ra.eventcallback("oncomplete",function(){var e={};e.layer=a,e.eventtype="enteredstage",e.layertype=a.data("layertype"),e.layersettings=a.data(),n.c.trigger("revolution.layeraction",e),t.animcompleted(a,n)}),"sliderenter"==pa&&n.overcontainer&&(ca=.6),wa.add(ra.staggerfromto(ya,xa.f.speed,xa.f.anim,xa.r.anim,xa.f.elemdelay),ca),ia){var _a=new object;_a.ease=xa.r.anim.ease,_a.overflow=ia.anim.overflow="hidden",_a.x=_a.y=0,ia.anim.x=ia.anim.x*n.bw||d(ia.anim.x,n,ta,ia,ma,ga,"horizontal"),ia.anim.y=ia.anim.y*n.bw||d(ia.anim.y,n,ta,ia,ma,ga,"vertical"),wa.add(punchgs.tweenlite.fromto(c,xa.f.speed,ia.anim,_a,la.elemdelay),ca)}else wa.add(punchgs.tweenlite.set(c,{overflow:"visible"},la.elemdelay),0)}a.data("timeline",wa),n.sliderscrope=void 0===n.sliderscrope?math.round(99999*math.random()):n.sliderscrope,t=h(a,n,"in"),0!==fa&&2!=t||"bytrigger"===ha||b||"sliderleave"==ha||(void 0==ha||-1!=t&&2!=t||"bytriger"===ha?punchgs.tweenlite.delayedcall(999999,t.endmovecaption,[a,c,l,n],n.sliderscrope):punchgs.tweenlite.delayedcall(parseint(a.data("end"),0)/1e3,t.endmovecaption,[a,c,l,n],n.sliderscrope)),wa=a.data("timeline"),"on"==a.data("loopanimation")&&f(w,n.bw),("sliderenter"!=pa||"sliderenter"==pa&&n.overcontainer)&&(-1==t||1==t||b||0==t&&1>fa&&a.hasclass("rev-static-visbile"))&&(1>fa&&fa>0||0==fa&&"bytrigger"!=pa&&"keep"!=sa||0==fa&&"bytrigger"!=pa&&"keep"==sa&&"on"==la||"bytrigger"==pa&&"keep"==sa&&"on"==la)&&(wa.resume(va),t.togglestate(a.data("layertoggledby")))}"on"==a.data("loopanimation")&&punchgs.tweenlite.set(w,{minwidth:ta,minheight:ia}),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,t,o){if(e=e||a.data("_mw"),t=t||a.data("_pw"),a.data("outstarted",1),a.data("timeline"))a.data("timeline").pause();else if(void 0===a.data("_pw"))return;var r=new punchgs.timelinelite,p=new punchgs.timelinelite,h=new punchgs.timelinelite,c=s(i(),a.data("transform_in"),1==o.sdir),g=a.data("transform_out")?s(n(),a.data("transform_out"),1==o.sdir):s(n(),a.data("transform_in"),1==o.sdir),m=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"),v=a.innerwidth(),f=a.innerheight(),w=t.position();a.data("transform_out")&&a.data("transform_out").match(/auto:auto/g)&&(c.speed=g.speed,c.anim.ease=g.anim.ease,g=c);var y=l(a.data("mask_out"));g.anim.x=g.anim.x*o.bw||d(g.anim.x,o,v,f,w.top,w.left,"horizontal"),g.anim.y=g.anim.y*o.bw||d(g.anim.y,o,v,f,w.top,w.left,"vertical"),p.eventcallback("onstart",function(){var e={};e.layer=a,e.eventtype="leavestage",e.layertype=a.data("layertype"),e.layersettings=a.data(),o.c.trigger("revolution.layeraction",e)}),p.eventcallback("oncomplete",function(){punchgs.tweenlite.set(a,{visibility:"hidden"}),punchgs.tweenlite.set(t,{visibility:"hidden"});var e={};e.layer=a,e.eventtype="leftstage",e.layertype=a.data("layertype"),e.layersettings=a.data(),o.c.trigger("revolution.layeraction",e)}),r.add(p.staggerto(m,g.speed,g.anim,u),0),y?(y.anim.ease=g.anim.ease,y.anim.overflow="hidden",y.anim.x=y.anim.x*o.bw||d(y.anim.x,o,v,f,w.top,w.left,"horizontal"),y.anim.y=y.anim.y*o.bw||d(y.anim.y,o,v,f,w.top,w.left,"vertical"),r.add(h.to(e,g.speed,y.anim,u),0)):r.add(h.set(e,{overflow:"visible",overwrite:"auto"},u),0),a.data("timeline_out",r)},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)}),punchgs.tweenlite.killdelayedcallsto(t.endmovecaption,!1,e.sliderscrope),n&&jquery.each(n,function(a){var i=jquery(this),n=h(i,e,"out");0!=n&&(w(i),cleartimeout(i.data("videoplaywait")),t.stopvideo&&t.stopvideo(i,e),t.endmovecaption(i,null,null,e),e.playingvideos=[],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.x=0,a.anim.y=0,a.anim.z=0,a},o=function(){var a=new object;return a.anim=new object,a.speed=.2,a},r=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},d=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},s=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],d=n[1];t&&void 0!=d&&d.length>0&&d.match(/\(r\)/)&&(d=d.replace("(r)",""),d="right"===d?"left":"left"===d?"right":"top"===d?"bottom":"bottom"===d?"top":d,"["===d[0]&&"-"===d[1]?d=d.replace("[-","["):"["===d[0]&&"-"!==d[1]?d=d.replace("[","[-"):"-"===d[0]?d=d.replace("-",""):d[0].match(/[1-9]/)&&(d="-"+d)),void 0!=d&&(d=d.replace(/\(r\)/,""),("rotationx"==o||"rx"==o)&&(i.anim.rotationx=r(d,i.anim.rotationx)+"deg"),("rotationy"==o||"ry"==o)&&(i.anim.rotationy=r(d,i.anim.rotationy)+"deg"),("rotationz"==o||"rz"==o)&&(i.anim.rotation=r(d,i.anim.rotationz)+"deg"),("scalex"==o||"sx"==o)&&(i.anim.scalex=r(d,i.anim.scalex)),("scaley"==o||"sy"==o)&&(i.anim.scaley=r(d,i.anim.scaley)),("opacity"==o||"o"==o)&&(i.anim.opacity=r(d,i.anim.opacity)),("skewx"==o||"skx"==o)&&(i.anim.skewx=r(d,i.anim.skewx)),("skewy"==o||"sky"==o)&&(i.anim.skewy=r(d,i.anim.skewy)),"x"==o&&(i.anim.x=r(d,i.anim.x)),"y"==o&&(i.anim.y=r(d,i.anim.y)),"z"==o&&(i.anim.z=r(d,i.anim.z)),("transformorigin"==o||"to"==o)&&(i.anim.transformorigin=d.tostring()),("transformperspective"==o||"tp"==o)&&(i.anim.transformperspective=parseint(d,0)),("speed"==o||"s"==o)&&(i.speed=parsefloat(d)/1e3),("ease"==o||"e"==o)&&(i.anim.ease=d))}),i},l=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},p=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},c=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:");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},g=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.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","border-radius"]),i},m=function(a,e){var t=new object;return a&&jquery.each(a,function(i,n){t[i]=p(n,e)[e.curwinrange]||a[i]}),t},u=function(a,e,t,i){return a=jquery.isnumeric(a)?a*e+"px":a,a="full"===a?i:"auto"===a||"none"===a?t:a},v=function(a,e,t,i){var n;void 0===a.data("cssobj")?(n=g(a,t),a.data("cssobj",n)):n=a.data("cssobj");var o=m(n,e),r=e.bw,d=e.bh;if("off"===i&&(r=1,d=1),"auto"==o.lineheight&&(o.lineheight=o.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 s=void 0!==a.data("transform_hover")||void 0!==a.data("style_hover");if(s&&punchgs.tweenlite.set(a,o.styleprops),punchgs.tweenlite.set(a,{fontsize:math.round(o.fontsize*r)+"px",fontweight:o.fontweight,letterspacing:math.floor(o.letterspacing*r)+"px",paddingtop:math.round(o.paddingtop*d)+"px",paddingbottom:math.round(o.paddingbottom*d)+"px",paddingleft:math.round(o.paddingleft*r)+"px",paddingright:math.round(o.paddingright*r)+"px",margintop:o.margintop*d+"px",marginbottom:o.marginbottom*d+"px",marginleft:o.marginleft*r+"px",marginright:o.marginright*r+"px",bordertopwidth:math.round(o.bordertopwidth*d)+"px",borderbottomwidth:math.round(o.borderbottomwidth*d)+"px",borderleftwidth:math.round(o.borderleftwidth*r)+"px",borderrightwidth:math.round(o.borderrightwidth*r)+"px",lineheight:math.round(o.lineheight*d)+"px",overwrite:"auto"}),"rekursive"!=t){var l="slide"==o.basealign?e.ulw:e.gridwidth[e.curwinrange],p="slide"==o.basealign?e.ulh:e.gridheight[e.curwinrange],h=u(o.maxwidth,r,"none",l),c=u(o.maxheight,d,"none",p),v=u(o.minwidth,r,"0px",l),f=u(o.minheight,d,"0px",p);punchgs.tweenlite.set(a,{maxwidth:h,maxheight:c,minwidth:v,minheight:f,whitespace:o.whitespace,overwrite:"auto"}),"nopredefinedcolor"!=o.color&&punchgs.tweenlite.set(a,{color:o.color,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)}},f=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"),u=o.split(" "),v=new object;u.length>=1?(v.x=u[0],v.y=u[1]):(v.x="50%",v.y="50%"),g*=e,m*=e;var f=0-a.height()/2+m*(-1+parseint(v.y,0)/100),w=a.width()*(-.5+parseint(v.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*(math.pi/180);punchgs.tweenlite.to(y.element,.1,{force3d:"auto",x:y.xoffset+math.cos(a)*y.unit,y:y.yoffset+y.unit*(1-math.sin(a))})},oncomplete:function(){a.data("loop-timeline").restart()}}))}},w=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);