/******************************************** * revolution 5.0 extension - navigation * @version: 1.0.4 (10.11.2015) * @requires jquery.themepunch.revolution.js * @author themepunch *********************************************/ !function(){var t=jquery.fn.revolution,e=t.is_mobile();jquery.extend(!0,t,{hideunhidenav:function(t){var e=t.c.width(),i=t.navigation.arrows,a=t.navigation.bullets,n=t.navigation.thumbnails,r=t.navigation.tabs;h(i)&&y(t.c.find(".tparrows"),i.hide_under,e,i.hide_over),h(a)&&y(t.c.find(".tp-bullets"),a.hide_under,e,a.hide_over),h(n)&&y(t.c.parent().find(".tp-thumbs"),n.hide_under,e,n.hide_over),h(r)&&y(t.c.parent().find(".tp-tabs"),r.hide_under,e,r.hide_over),x(t)},resizethumbstabs:function(t){if(t.navigation&&t.navigation.tabs.enable||t.navigation&&t.navigation.thumbnails.enable){var e=(jquery(window).width()-480)/500,i=new punchgs.timelinelite,n=t.navigation.tabs,r=t.navigation.thumbnails;i.pause(),e=e>1?1:0>e?0:e,h(n)&&n.width>n.min_width&&a(e,i,t.c,n,t.slideamount,"tab"),h(r)&&r.width>r.min_width&&a(e,i,t.c,r,t.slideamount,"thumb"),i.play(),x(t)}return!0},managenavigation:function(e){var a=t.gethorizontaloffset(e.c.parent(),"left"),n=t.gethorizontaloffset(e.c.parent(),"right");h(e.navigation.bullets)&&("fullscreen"!=e.sliderlayout&&"fullwidth"!=e.sliderlayout&&(e.navigation.bullets.h_offset_old=void 0===e.navigation.bullets.h_offset_old?e.navigation.bullets.h_offset:e.navigation.bullets.h_offset_old,e.navigation.bullets.h_offset="center"===e.navigation.bullets.h_align?e.navigation.bullets.h_offset_old+a/2-n/2:e.navigation.bullets.h_offset_old+a-n),m(e.c.find(".tp-bullets"),e.navigation.bullets)),h(e.navigation.thumbnails)&&m(e.c.parent().find(".tp-thumbs"),e.navigation.thumbnails),h(e.navigation.tabs)&&m(e.c.parent().find(".tp-tabs"),e.navigation.tabs),h(e.navigation.arrows)&&("fullscreen"!=e.sliderlayout&&"fullwidth"!=e.sliderlayout&&(e.navigation.arrows.left.h_offset_old=void 0===e.navigation.arrows.left.h_offset_old?e.navigation.arrows.left.h_offset:e.navigation.arrows.left.h_offset_old,e.navigation.arrows.left.h_offset="right"===e.navigation.arrows.left.h_align?e.navigation.arrows.left.h_offset_old+n:e.navigation.arrows.left.h_offset_old+a,e.navigation.arrows.right.h_offset_old=void 0===e.navigation.arrows.right.h_offset_old?e.navigation.arrows.right.h_offset:e.navigation.arrows.right.h_offset_old,e.navigation.arrows.right.h_offset="right"===e.navigation.arrows.right.h_align?e.navigation.arrows.right.h_offset_old+n:e.navigation.arrows.right.h_offset_old+a),m(e.c.find(".tp-leftarrow.tparrows"),e.navigation.arrows.left),m(e.c.find(".tp-rightarrow.tparrows"),e.navigation.arrows.right)),h(e.navigation.thumbnails)&&i(e.c.parent().find(".tp-thumbs"),e.navigation.thumbnails),h(e.navigation.tabs)&&i(e.c.parent().find(".tp-tabs"),e.navigation.tabs)},createnavigation:function(t,a){var n=t.parent(),o=a.navigation.arrows,p=a.navigation.bullets,g=a.navigation.thumbnails,v=a.navigation.tabs,m=h(o),w=h(p),x=h(g),y=h(v);r(t,a),s(t,a),m&&f(t,o,a),a.li.each(function(){var e=jquery(this);w&&b(t,p,e,a),x&&_(t,g,e,"tp-thumb",a),y&&_(t,v,e,"tp-tab",a)}),t.bind("revolution.slide.onafterswap revolution.nextslide.waiting",function(){var e=0==t.find(".next-revslide").length?t.find(".active-revslide").data("index"):t.find(".next-revslide").data("index");t.find(".tp-bullet").each(function(){var t=jquery(this);t.data("liref")===e?t.addclass("selected"):t.removeclass("selected")}),n.find(".tp-thumb, .tp-tab").each(function(){var t=jquery(this);t.data("liref")===e?(t.addclass("selected"),t.hasclass("tp-tab")?i(n.find(".tp-tabs"),v):i(n.find(".tp-thumbs"),g)):t.removeclass("selected")});var r=0,s=!1;a.thumbs&&jquery.each(a.thumbs,function(t,i){r=s===!1?t:r,s=i.id===e||t===e?!0:s});var d=r>0?r-1:a.slideamount-1,l=r+1==a.slideamount?0:r+1;if(o.enable===!0){var h=o.tmp;jquery.each(a.thumbs[d].params,function(t,e){h=h.replace(e.from,e.to)}),o.left.j.html(h),h=o.tmp,jquery.each(a.thumbs[l].params,function(t,e){h=h.replace(e.from,e.to)}),o.right.j.html(h),punchgs.tweenlite.set(o.left.j.find(".tp-arr-imgholder"),{backgroundimage:"url("+a.thumbs[d].src+")"}),punchgs.tweenlite.set(o.right.j.find(".tp-arr-imgholder"),{backgroundimage:"url("+a.thumbs[l].src+")"})}}),l(o),l(p),l(g),l(v),n.on("mouseenter mousemove",function(){n.hasclass("tp-mouseover")||(n.addclass("tp-mouseover"),punchgs.tweenlite.killdelayedcallsto(c),m&&o.hide_onleave&&c(n.find(".tparrows"),o,"show"),w&&p.hide_onleave&&c(n.find(".tp-bullets"),p,"show"),x&&g.hide_onleave&&c(n.find(".tp-thumbs"),g,"show"),y&&v.hide_onleave&&c(n.find(".tp-tabs"),v,"show"),e&&(n.removeclass("tp-mouseover"),u(t,a)))}),n.on("mouseleave",function(){n.removeclass("tp-mouseover"),u(t,a)}),m&&o.hide_onleave&&c(n.find(".tparrows"),o,"hide",0),w&&p.hide_onleave&&c(n.find(".tp-bullets"),p,"hide",0),x&&g.hide_onleave&&c(n.find(".tp-thumbs"),g,"hide",0),y&&v.hide_onleave&&c(n.find(".tp-tabs"),v,"hide",0),x&&d(n.find(".tp-thumbs"),a),y&&d(n.find(".tp-tabs"),a),"carousel"===a.slidertype&&d(t,a,!0),"on"==a.navigation.touch.touchenabled&&d(t,a,"swipebased")}});var i=function(t,e){var i=(t.hasclass("tp-thumbs")?".tp-thumbs":".tp-tabs",t.hasclass("tp-thumbs")?".tp-thumb-mask":".tp-tab-mask"),a=t.hasclass("tp-thumbs")?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",n=t.hasclass("tp-thumbs")?".tp-thumb":".tp-tab",r=t.find(i),s=r.find(a),o=e.direction,d="vertical"===o?r.find(n).first().outerheight(!0)+e.space:r.find(n).first().outerwidth(!0)+e.space,l="vertical"===o?r.height():r.width(),h=parseint(r.find(n+".selected").data("liindex"),0),p=l/d,u="vertical"===o?r.height():r.width(),c=0-h*d,f="vertical"===o?s.height():s.width(),g=0-(f-u)>c?0-(f-u):g>0?0:c,v=s.data("offset");p>2&&(g=0>=c-(v+d)?0-d>c-(v+d)?v:g+d:g,g=d>c-d+v+l&&c+(math.round(p)-2)*dg?0-(f-u):g>0?0:g,"vertical"!==o&&r.width()>=s.width()&&(g=0),"vertical"===o&&r.height()>=s.height()&&(g=0),t.hasclass("dragged")||("vertical"===o?s.data("tmmove",punchgs.tweenlite.to(s,.5,{top:g+"px",ease:punchgs.power3.easeinout})):s.data("tmmove",punchgs.tweenlite.to(s,.5,{left:g+"px",ease:punchgs.power3.easeinout})),s.data("offset",g))},a=function(t,e,i,a,n,r){var s=i.parent().find(".tp-"+r+"s"),o=s.find(".tp-"+r+"s-inner-wrapper"),d=s.find(".tp-"+r+"-mask"),l=a.width*ta?-1:1),n&&!i&&(i=1>n?-1:1),n=navigator.useragent.match(/mozilla/i)?10*n:n,(n>300||-300>n)&&(n/=10),{spinx:e,spiny:i,pixelx:a,pixely:n}},r=function(e,i){"on"===i.navigation.keyboardnavigation&&jquery(document).keydown(function(a){("horizontal"==i.navigation.keyboard_direction&&39==a.keycode||"vertical"==i.navigation.keyboard_direction&&40==a.keycode)&&(i.sc_indicator="arrow",i.sc_indicator_dir=0,t.callingnewslide(i,e,1)),("horizontal"==i.navigation.keyboard_direction&&37==a.keycode||"vertical"==i.navigation.keyboard_direction&&38==a.keycode)&&(i.sc_indicator="arrow",i.sc_indicator_dir=1,t.callingnewslide(i,e,-1))})},s=function(e,i){if("on"===i.navigation.mousescrollnavigation){var a=navigator.useragent.match(/mozilla/i)?-29:-49,r=navigator.useragent.match(/mozilla/i)?29:49;e.on("mousewheel dommousescroll",function(s){var o=n(s.originalevent),d=e.find(".tp-revslider-slidesli.active-revslide").index(),l=e.find(".tp-revslider-slidesli.processing-revslide").index(),h=-1!=d&&0==d||-1!=l&&0==l?!0:!1,p=-1!=d&&d==i.slideamount-1||1!=l&&l==i.slideamount-1?!0:!1;if(-1==l){if(o.pixelyr&&!p)return i.sc_indicator="arrow",i.sc_indicator_dir=1,t.callingnewslide(i,e,1),!1}else if(!p)return!1;s.preventdefault()})}},o=function(t,i,a){return t=e?jquery(a.target).closest("."+t).length||jquery(a.srcelement).closest("."+t).length:jquery(a.toelement).closest("."+t).length||jquery(a.originaltarget).closest("."+t).length,t===!0||1===t?1:0},d=function(i,a,n){i.data("opt",a);var r=a.carousel;jquery(".bullet, .bullets, .tp-bullets, .tparrows").addclass("noswipe"),r.limit="endless";var s=(e||"firefox"===t.get_browser(),i),d="vertical"===a.navigation.thumbnails.direction||"vertical"===a.navigation.tabs.direction?"none":"vertical",l=a.navigation.touch.swipe_direction||"horizontal";d="swipebased"==n&&"vertical"==l?"none":n?"vertical":d,jquery.fn.swipetp||(jquery.fn.swipetp=jquery.fn.swipe),jquery.fn.swipetp.defaults&&jquery.fn.swipetp.defaults.excludedelements||jquery.fn.swipetp.defaults||(jquery.fn.swipetp.defaults=new object),jquery.fn.swipetp.defaults.excludedelements="label, button, input, select, textarea, .noswipe",s.swipetp({allowpagescroll:d,triggerontouchleave:!0,excludeelements:jquery.fn.swipetp.defaults.excludedelements,swipestatus:function(e,n,s,d){var h=o("rev_slider_wrapper",i,e),p=o("tp-thumbs",i,e),u=o("tp-tabs",i,e),c=jquery(this).attr("class"),f=c.match(/tp-tabs|tp-thumb/gi)?!0:!1;if("carousel"===a.slidertype&&(("move"===n||"end"===n||"cancel"==n)&&a.dragstartedoverslider&&!a.dragstartedoverthumbs&&!a.dragstartedovertabs||"start"===n&&h>0&&0===p&&0===u))switch(a.dragstartedoverslider=!0,d=s&&s.match(/left|up/g)?math.round(-1*d):d=math.round(1*d),n){case"start":void 0!==r.positionanim&&(r.positionanim.kill(),r.slide_globaloffset="off"===r.infinity?r.slide_offset:t.simp(r.slide_offset,r.maxwidth)),r.overpull="none",r.wrap.addclass("dragged");break;case"move":if(r.slide_offset="off"===r.infinity?r.slide_globaloffset+d:t.simp(r.slide_globaloffset+d,r.maxwidth),"off"===r.infinity){var g="center"===r.horizontal_align?(r.wrapwidth/2-r.slide_width/2-r.slide_offset)/r.slide_width:(0-r.slide_offset)/r.slide_width;"none"!==r.overpull&&0!==r.overpull||!(0>g||g>a.slideamount-1)?g>=0&&g<=a.slideamount-1&&(g>=0&&d>r.overpull||g<=a.slideamount-1&&dg?r.slide_offset+(r.overpull-d)/1.1+math.sqrt(math.abs((r.overpull-d)/1.1)):g>a.slideamount-1?r.slide_offset+(r.overpull-d)/1.1-math.sqrt(math.abs((r.overpull-d)/1.1)):r.slide_offset}t.organisecarousel(a,s,!0,!0);break;case"end":case"cancel":r.slide_globaloffset=r.slide_offset,r.wrap.removeclass("dragged"),t.carouseltoevalposition(a,s),a.dragstartedoverslider=!1,a.dragstartedoverthumbs=!1,a.dragstartedovertabs=!1}else{if(("move"!==n&&"end"!==n&&"cancel"!=n||a.dragstartedoverslider||!a.dragstartedoverthumbs&&!a.dragstartedovertabs)&&!("start"===n&&h>0&&(p>0||u>0))){if("end"==n&&!f){if(a.sc_indicator="arrow","horizontal"==l&&"left"==s||"vertical"==l&&"up"==s)return a.sc_indicator_dir=0,t.callingnewslide(a,a.c,1),!1;if("horizontal"==l&&"right"==s||"vertical"==l&&"down"==s)return a.sc_indicator_dir=1,t.callingnewslide(a,a.c,-1),!1}return a.dragstartedoverslider=!1,a.dragstartedoverthumbs=!1,a.dragstartedovertabs=!1,!0}p>0&&(a.dragstartedoverthumbs=!0),u>0&&(a.dragstartedovertabs=!0);var v=a.dragstartedoverthumbs?".tp-thumbs":".tp-tabs",m=a.dragstartedoverthumbs?".tp-thumb-mask":".tp-tab-mask",b=a.dragstartedoverthumbs?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",w=a.dragstartedoverthumbs?".tp-thumb":".tp-tab",_=a.dragstartedoverthumbs?a.navigation.thumbnails:a.navigation.tabs;d=s&&s.match(/left|up/g)?math.round(-1*d):d=math.round(1*d);var x=i.parent().find(m),y=x.find(b),t=_.direction,l="vertical"===t?y.height():y.width(),j="vertical"===t?x.height():x.width(),c="vertical"===t?x.find(w).first().outerheight(!0)+_.space:x.find(w).first().outerwidth(!0)+_.space,s=void 0===y.data("offset")?0:parseint(y.data("offset"),0),k=0;switch(n){case"start":i.parent().find(v).addclass("dragged"),s="vertical"===t?y.position().top:y.position().left,y.data("offset",s),y.data("tmmove")&&y.data("tmmove").pause();break;case"move":if(j>=l)return!1;k=s+d,k=k>0?"horizontal"===t?k-y.width()*(k/y.width()*k/y.width()):k-y.height()*(k/y.height()*k/y.height()):k;var o="vertical"===t?0-(y.height()-x.height()):0-(y.width()-x.width());k=o>k?"horizontal"===t?k+y.width()*(k-o)/y.width()*(k-o)/y.width():k+y.height()*(k-o)/y.height()*(k-o)/y.height():k,"vertical"===t?punchgs.tweenlite.set(y,{top:k+"px"}):punchgs.tweenlite.set(y,{left:k+"px"});break;case"end":case"cancel":if(f)return k=s+d,k="vertical"===t?k<0-(y.height()-x.height())?0-(y.height()-x.height()):k:k<0-(y.width()-x.width())?0-(y.width()-x.width()):k,k=k>0?0:k,k=math.abs(d)>c/10?0>=d?math.floor(k/c)*c:math.ceil(k/c)*c:0>d?math.ceil(k/c)*c:math.floor(k/c)*c,k="vertical"===t?k<0-(y.height()-x.height())?0-(y.height()-x.height()):k:k<0-(y.width()-x.width())?0-(y.width()-x.width()):k,k=k>0?0:k,"vertical"===t?punchgs.tweenlite.to(y,.5,{top:k+"px",ease:punchgs.power3.easeout}):punchgs.tweenlite.to(y,.5,{left:k+"px",ease:punchgs.power3.easeout}),k=k?k:"vertical"===t?y.position().top:y.position().left,y.data("offset",k),y.data("distance",d),settimeout(function(){a.dragstartedoverslider=!1,a.dragstartedoverthumbs=!1,a.dragstartedovertabs=!1},100),i.parent().find(v).removeclass("dragged"),!1}}}})},l=function(t){t.hide_delay=jquery.isnumeric(parseint(t.hide_delay,0))?t.hide_delay/1e3:.2,t.hide_delay_mobile=jquery.isnumeric(parseint(t.hide_delay_mobile,0))?t.hide_delay_mobile/1e3:.2},h=function(t){return t&&t.enable},p=function(t){return t&&t.enable&&t.hide_onleave===!0&&(void 0===t.position?!0:!t.position.match(/outer/g))},u=function(t,i){var a=t.parent();p(i.navigation.arrows)&&punchgs.tweenlite.delayedcall(e?i.navigation.arrows.hide_delay_mobile:i.navigation.arrows.hide_delay,c,[a.find(".tparrows"),i.navigation.arrows,"hide"]),p(i.navigation.bullets)&&punchgs.tweenlite.delayedcall(e?i.navigation.bullets.hide_delay_mobile:i.navigation.bullets.hide_delay,c,[a.find(".tp-bullets"),i.navigation.bullets,"hide"]),p(i.navigation.thumbnails)&&punchgs.tweenlite.delayedcall(e?i.navigation.thumbnails.hide_delay_mobile:i.navigation.thumbnails.hide_delay,c,[a.find(".tp-thumbs"),i.navigation.thumbnails,"hide"]),p(i.navigation.tabs)&&punchgs.tweenlite.delayedcall(e?i.navigation.tabs.hide_delay_mobile:i.navigation.tabs.hide_delay,c,[a.find(".tp-tabs"),i.navigation.tabs,"hide"])},c=function(t,e,i,a){switch(a=void 0===a?.5:a,i){case"show":punchgs.tweenlite.to(t,a,{autoalpha:1,ease:punchgs.power3.easeinout,overwrite:"auto"});break;case"hide":punchgs.tweenlite.to(t,a,{autoalpha:0,ease:punchgs.power3.easeinou,overwrite:"auto"})}},f=function(t,e,i){e.style=void 0===e.style?"":e.style,e.left.style=void 0===e.left.style?"":e.left.style,e.right.style=void 0===e.right.style?"":e.right.style,0===t.find(".tp-leftarrow.tparrows").length&&t.append('
'+e.tmp+"
"),0===t.find(".tp-rightarrow.tparrows").length&&t.append('
'+e.tmp+"
");var a=t.find(".tp-leftarrow.tparrows"),n=t.find(".tp-rightarrow.tparrows");n.click(function(){i.sc_indicator="arrow",i.sc_indicator_dir=0,t.revnext()}),a.click(function(){i.sc_indicator="arrow",i.sc_indicator_dir=1,t.revprev()}),e.right.j=t.find(".tp-rightarrow.tparrows"),e.left.j=t.find(".tp-leftarrow.tparrows"),e.padding_top=parseint(i.carousel.padding_top||0,0),e.padding_bottom=parseint(i.carousel.padding_bottom||0,0),m(a,e.left),m(n,e.right),("outer-left"==e.position||"outer-right"==e.position)&&(i.outernav=!0)},g=function(t,e){var i=t.outerheight(!0),a=(t.outerwidth(!0),"top"===e.v_align?{top:"0px",y:math.round(e.v_offset)+"px"}:"center"===e.v_align?{top:"50%",y:math.round(0-i/2+e.v_offset)+"px"}:{top:"100%",y:math.round(0-(i+e.v_offset))+"px"});t.hasclass("outer-bottom")||punchgs.tweenlite.set(t,a)},v=function(t,e){var i=(t.outerheight(!0),t.outerwidth(!0)),a="left"===e.h_align?{left:"0px",x:math.round(e.h_offset)+"px"}:"center"===e.h_align?{left:"50%",x:math.round(0-i/2+e.h_offset)+"px"}:{left:"100%",x:math.round(0-(i+e.h_offset))+"px"};punchgs.tweenlite.set(t,a)},m=function(t,e){var i=t.closest(".tp-simpleresponsive").length>0?t.closest(".tp-simpleresponsive"):t.closest(".tp-revslider-mainul").length>0?t.closest(".tp-revslider-mainul"):t.closest(".rev_slider_wrapper").length>0?t.closest(".rev_slider_wrapper"):t.parent().find(".tp-revslider-mainul"),a=i.width(),n=i.height();if(g(t,e),v(t,e),"outer-left"!==e.position||"fullwidth"!=e.sliderlayout&&"fullscreen"!=e.sliderlayout?"outer-right"!==e.position||"fullwidth"!=e.sliderlayout&&"fullscreen"!=e.sliderlayout||punchgs.tweenlite.set(t,{right:0-t.outerwidth()+"px",x:e.h_offset+"px"}):punchgs.tweenlite.set(t,{left:0-t.outerwidth()+"px",x:e.h_offset+"px"}),t.hasclass("tp-thumbs")||t.hasclass("tp-tabs")){var r=t.data("wr_padding"),s=t.data("maxw"),o=t.data("maxh"),d=t.find(t.hasclass("tp-thumbs")?".tp-thumb-mask":".tp-tab-mask"),l=parseint(e.padding_top||0,0),h=parseint(e.padding_bottom||0,0);s>a&&"outer-left"!==e.position&&"outer-right"!==e.position?(punchgs.tweenlite.set(t,{left:"0px",x:0,maxwidth:a-2*r+"px"}),punchgs.tweenlite.set(d,{maxwidth:a-2*r+"px"})):(punchgs.tweenlite.set(t,{maxwidth:s+"px"}),punchgs.tweenlite.set(d,{maxwidth:s+"px"})),o+2*r>n&&"outer-bottom"!==e.position&&"outer-top"!==e.position?(punchgs.tweenlite.set(t,{top:"0px",y:0,maxheight:l+h+(n-2*r)+"px"}),punchgs.tweenlite.set(d,{maxheight:l+h+(n-2*r)+"px"})):(punchgs.tweenlite.set(t,{maxheight:o+"px"}),punchgs.tweenlite.set(d,{maxheight:o+"px"})),"outer-left"!==e.position&&"outer-right"!==e.position&&(l=0,h=0),e.span===!0&&"vertical"===e.direction?(punchgs.tweenlite.set(t,{maxheight:l+h+(n-2*r)+"px",height:l+h+(n-2*r)+"px",top:0-l,y:0}),g(d,e)):e.span===!0&&"horizontal"===e.direction&&(punchgs.tweenlite.set(t,{maxwidth:"100%",width:a-2*r+"px",left:0,x:0}),v(d,e))}},b=function(t,e,i,a){0===t.find(".tp-bullets").length&&(e.style=void 0===e.style?"":e.style,t.append('
'));var n=t.find(".tp-bullets"),r=i.data("index"),s=e.tmp;jquery.each(a.thumbs[i.index()].params,function(t,e){s=s.replace(e.from,e.to)}),n.append('
'+s+"
");var o=t.find(".justaddedbullet"),d=t.find(".tp-bullet").length,l=o.outerwidth()+parseint(void 0===e.space?0:e.space,0),h=o.outerheight()+parseint(void 0===e.space?0:e.space,0);"vertical"===e.direction?(o.css({top:(d-1)*h+"px",left:"0px"}),n.css({height:(d-1)*h+o.outerheight(),width:o.outerwidth()})):(o.css({left:(d-1)*l+"px",top:"0px"}),n.css({width:(d-1)*l+o.outerwidth(),height:o.outerheight()})),o.find(".tp-bullet-image").css({backgroundimage:"url("+a.thumbs[i.index()].src+")"}),o.data("liref",r),o.click(function(){a.sc_indicator="bullet",t.revcallslidewithid(r),t.find(".tp-bullet").removeclass("selected"),jquery(this).addclass("selected")}),o.removeclass("justaddedbullet"),e.padding_top=parseint(a.carousel.padding_top||0,0),e.padding_bottom=parseint(a.carousel.padding_bottom||0,0),("outer-left"==e.position||"outer-right"==e.position)&&(a.outernav=!0),m(n,e)},w=function(t,e){e=parsefloat(e),t=t.replace("#","");var i=parseint(t.substring(0,2),16),a=parseint(t.substring(2,4),16),n=parseint(t.substring(4,6),16),r="rgba("+i+","+a+","+n+","+e+")";return r},_=function(t,e,i,a,n){var r="tp-thumb"===a?".tp-thumbs":".tp-tabs",s="tp-thumb"===a?".tp-thumb-mask":".tp-tab-mask",o="tp-thumb"===a?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",d="tp-thumb"===a?".tp-thumb":".tp-tab",l="tp-thumb"===a?".tp-thumb-image":".tp-tab-image";if(e.visibleamount=e.visibleamount>n.slideamount?n.slideamount:e.visibleamount,e.sliderlayout=n.sliderlayout,0===t.parent().find(r).length){e.style=void 0===e.style?"":e.style;var h=e.span===!0?"tp-span-wrapper":"",p='
';"outer-top"===e.position?t.parent().prepend(p):"outer-bottom"===e.position?t.after(p):t.append(p),e.padding_top=parseint(n.carousel.padding_top||0,0),e.padding_bottom=parseint(n.carousel.padding_bottom||0,0),("outer-left"==e.position||"outer-right"==e.position)&&(n.outernav=!0)}var u=i.data("index"),c=t.parent().find(r),f=c.find(s),g=f.find(o),v="horizontal"===e.direction?e.width*e.visibleamount+e.space*(e.visibleamount-1):e.width,b="horizontal"===e.direction?e.height:e.height*e.visibleamount+e.space*(e.visibleamount-1),_=e.tmp;jquery.each(n.thumbs[i.index()].params,function(t,e){_=_.replace(e.from,e.to)}),g.append('
'+_+"
");var x=c.find(".justaddedthumb"),y=c.find(d).length,t=x.outerwidth()+parseint(void 0===e.space?0:e.space,0),l=x.outerheight()+parseint(void 0===e.space?0:e.space,0);x.find(l).css({backgroundimage:"url("+n.thumbs[i.index()].src+")"}),"vertical"===e.direction?(x.css({top:(y-1)*l+"px",left:"0px"}),g.css({height:(y-1)*l+x.outerheight(),width:x.outerwidth()})):(x.css({left:(y-1)*t+"px",top:"0px"}),g.css({width:(y-1)*t+x.outerwidth(),height:x.outerheight()})),c.data("maxw",v),c.data("maxh",b),c.data("wr_padding",e.wrapper_padding);var j="outer-top"===e.position||"outer-bottom"===e.position?"relative":"absolute",c="outer-top"!==e.position&&"outer-bottom"!==e.position||"center"!==e.h_align?"0":"auto";f.css({maxwidth:v+"px",maxheight:b+"px",overflow:"hidden",position:"relative"}),c.css({maxwidth:v+"px",margin:c,maxheight:b+"px",overflow:"visible",position:j,background:w(e.wrapper_color,e.wrapper_opacity),padding:e.wrapper_padding+"px",boxsizing:"contet-box"}),x.click(function(){n.sc_indicator="bullet";var e=t.parent().find(o).data("distance");e=void 0===e?0:e,math.abs(e)<10&&(t.revcallslidewithid(u),t.parent().find(r).removeclass("selected"),jquery(this).addclass("selected"))}),x.removeclass("justaddedthumb"),m(c,e)},x=function(t){var e=t.c.parent().find(".outer-top"),i=t.c.parent().find(".outer-bottom");t.top_outer=e.hasclass("tp-forcenotvisible")?0:e.outerheight()||0,t.bottom_outer=i.hasclass("tp-forcenotvisible")?0:i.outerheight()||0},y=function(t,e,i,a){e>i||i>a?t.addclass("tp-forcenotvisible"):t.removeclass("tp-forcenotvisible")}}(jquery);