/******************************************** * revolution 5.2 extension - navigation * @version: 1.3.5 (06.04.2017) * @requires jquery.themepunch.revolution.js * @author themepunch *********************************************/ !function(a){"use strict";var b=jquery.fn.revolution,c=b.is_mobile(),d={alias:"navigation min js",name:"revolution.extensions.navigation.min.js",min_core:"5.4.0",version:"1.3.5"};jquery.extend(!0,b,{hideunhidenav:function(a){var b=a.c.width(),c=a.navigation.arrows,d=a.navigation.bullets,e=a.navigation.thumbnails,f=a.navigation.tabs;m(c)&&y(a.c.find(".tparrows"),c.hide_under,b,c.hide_over),m(d)&&y(a.c.find(".tp-bullets"),d.hide_under,b,d.hide_over),m(e)&&y(a.c.parent().find(".tp-thumbs"),e.hide_under,b,e.hide_over),m(f)&&y(a.c.parent().find(".tp-tabs"),f.hide_under,b,f.hide_over),x(a)},resizethumbstabs:function(a,b){if(a.navigation&&a.navigation.tabs.enable||a.navigation&&a.navigation.thumbnails.enable){var c=(jquery(window).width()-480)/500,d=new punchgs.timelinelite,e=a.navigation.tabs,g=a.navigation.thumbnails,h=a.navigation.bullets;if(d.pause(),c=c>1?1:c<0?0:c,m(e)&&(b||e.width>e.min_width)&&f(c,d,a.c,e,a.slideamount,"tab"),m(g)&&(b||g.width>g.min_width)&&f(c,d,a.c,g,a.slideamount,"thumb"),m(h)&&b){var i=a.c.find(".tp-bullets");i.find(".tp-bullet").each(function(a){var b=jquery(this),c=a+1,d=b.outerwidth()+parseint(void 0===h.space?0:h.space,0),e=b.outerheight()+parseint(void 0===h.space?0:h.space,0);"vertical"===h.direction?(b.css({top:(c-1)*e+"px",left:"0px"}),i.css({height:(c-1)*e+b.outerheight(),width:b.outerwidth()})):(b.css({left:(c-1)*d+"px",top:"0px"}),i.css({width:(c-1)*d+b.outerwidth(),height:b.outerheight()}))})}d.play(),x(a)}return!0},updatenavindexes:function(a){function d(a){c.find(a).lenght>0&&c.find(a).each(function(a){jquery(this).data("liindex",a)})}var c=a.c;d(".tp-tab"),d(".tp-bullet"),d(".tp-thumb"),b.resizethumbstabs(a,!0),b.managenavigation(a)},managenavigation:function(a){var c=b.gethorizontaloffset(a.c.parent(),"left"),d=b.gethorizontaloffset(a.c.parent(),"right");m(a.navigation.bullets)&&("fullscreen"!=a.sliderlayout&&"fullwidth"!=a.sliderlayout&&(a.navigation.bullets.h_offset_old=void 0===a.navigation.bullets.h_offset_old?a.navigation.bullets.h_offset:a.navigation.bullets.h_offset_old,a.navigation.bullets.h_offset="center"===a.navigation.bullets.h_align?a.navigation.bullets.h_offset_old+c/2-d/2:a.navigation.bullets.h_offset_old+c-d),t(a.c.find(".tp-bullets"),a.navigation.bullets,a)),m(a.navigation.thumbnails)&&t(a.c.parent().find(".tp-thumbs"),a.navigation.thumbnails,a),m(a.navigation.tabs)&&t(a.c.parent().find(".tp-tabs"),a.navigation.tabs,a),m(a.navigation.arrows)&&("fullscreen"!=a.sliderlayout&&"fullwidth"!=a.sliderlayout&&(a.navigation.arrows.left.h_offset_old=void 0===a.navigation.arrows.left.h_offset_old?a.navigation.arrows.left.h_offset:a.navigation.arrows.left.h_offset_old,a.navigation.arrows.left.h_offset="right"===a.navigation.arrows.left.h_align?a.navigation.arrows.left.h_offset_old+d:a.navigation.arrows.left.h_offset_old+c,a.navigation.arrows.right.h_offset_old=void 0===a.navigation.arrows.right.h_offset_old?a.navigation.arrows.right.h_offset:a.navigation.arrows.right.h_offset_old,a.navigation.arrows.right.h_offset="right"===a.navigation.arrows.right.h_align?a.navigation.arrows.right.h_offset_old+d:a.navigation.arrows.right.h_offset_old+c),t(a.c.find(".tp-leftarrow.tparrows"),a.navigation.arrows.left,a),t(a.c.find(".tp-rightarrow.tparrows"),a.navigation.arrows.right,a)),m(a.navigation.thumbnails)&&e(a.c.parent().find(".tp-thumbs"),a.navigation.thumbnails),m(a.navigation.tabs)&&e(a.c.parent().find(".tp-tabs"),a.navigation.tabs)},createnavigation:function(a,f){if("stop"===b.compare_version(d).check)return!1;var g=a.parent(),j=f.navigation.arrows,n=f.navigation.bullets,r=f.navigation.thumbnails,s=f.navigation.tabs,t=m(j),v=m(n),x=m(r),y=m(s);h(a,f),i(a,f),t&&q(a,j,f),f.li.each(function(b){var c=jquery(f.li[f.li.length-1-b]),d=jquery(this);v&&(f.navigation.bullets.rtl?u(a,n,c,f):u(a,n,d,f)),x&&(f.navigation.thumbnails.rtl?w(a,r,c,"tp-thumb",f):w(a,r,d,"tp-thumb",f)),y&&(f.navigation.tabs.rtl?w(a,s,c,"tp-tab",f):w(a,s,d,"tp-tab",f))}),a.bind("revolution.slide.onafterswap revolution.nextslide.waiting",function(){var b=0==a.find(".next-revslide").length?a.find(".active-revslide").data("index"):a.find(".next-revslide").data("index");a.find(".tp-bullet").each(function(){var a=jquery(this);a.data("liref")===b?a.addclass("selected"):a.removeclass("selected")}),g.find(".tp-thumb, .tp-tab").each(function(){var a=jquery(this);a.data("liref")===b?(a.addclass("selected"),a.hasclass("tp-tab")?e(g.find(".tp-tabs"),s):e(g.find(".tp-thumbs"),r)):a.removeclass("selected")});var c=0,d=!1;f.thumbs&&jquery.each(f.thumbs,function(a,e){c=!1===d?a:c,d=e.id===b||a===b||d});var h=c>0?c-1:f.slideamount-1,i=c+1==f.slideamount?0:c+1;if(!0===j.enable){var k=j.tmp;if(void 0!=f.thumbs[h]&&jquery.each(f.thumbs[h].params,function(a,b){k=k.replace(b.from,b.to)}),j.left.j.html(k),k=j.tmp,i>f.slideamount)return;jquery.each(f.thumbs[i].params,function(a,b){k=k.replace(b.from,b.to)}),j.right.j.html(k),j.rtl?(punchgs.tweenlite.set(j.left.j.find(".tp-arr-imgholder"),{backgroundimage:"url("+f.thumbs[i].src+")"}),punchgs.tweenlite.set(j.right.j.find(".tp-arr-imgholder"),{backgroundimage:"url("+f.thumbs[h].src+")"})):(punchgs.tweenlite.set(j.left.j.find(".tp-arr-imgholder"),{backgroundimage:"url("+f.thumbs[h].src+")"}),punchgs.tweenlite.set(j.right.j.find(".tp-arr-imgholder"),{backgroundimage:"url("+f.thumbs[i].src+")"}))}}),l(j),l(n),l(r),l(s),g.on("mouseenter mousemove",function(){g.hasclass("tp-mouseover")||(g.addclass("tp-mouseover"),punchgs.tweenlite.killdelayedcallsto(p),t&&j.hide_onleave&&p(g.find(".tparrows"),j,"show"),v&&n.hide_onleave&&p(g.find(".tp-bullets"),n,"show"),x&&r.hide_onleave&&p(g.find(".tp-thumbs"),r,"show"),y&&s.hide_onleave&&p(g.find(".tp-tabs"),s,"show"),c&&(g.removeclass("tp-mouseover"),o(a,f)))}),g.on("mouseleave",function(){g.removeclass("tp-mouseover"),o(a,f)}),t&&j.hide_onleave&&p(g.find(".tparrows"),j,"hide",0),v&&n.hide_onleave&&p(g.find(".tp-bullets"),n,"hide",0),x&&r.hide_onleave&&p(g.find(".tp-thumbs"),r,"hide",0),y&&s.hide_onleave&&p(g.find(".tp-tabs"),s,"hide",0),x&&k(g.find(".tp-thumbs"),f),y&&k(g.find(".tp-tabs"),f),"carousel"===f.slidertype&&k(a,f,!0),("on"===f.navigation.touch.touchondesktop||"on"==f.navigation.touch.touchenabled&&c)&&k(a,f,"swipebased")}});var e=function(a,b){var d=(a.hasclass("tp-thumbs"),a.hasclass("tp-thumbs")?".tp-thumb-mask":".tp-tab-mask"),e=a.hasclass("tp-thumbs")?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",f=a.hasclass("tp-thumbs")?".tp-thumb":".tp-tab",g=a.find(d),h=g.find(e),i=b.direction,j="vertical"===i?g.find(f).first().outerheight(!0)+b.space:g.find(f).first().outerwidth(!0)+b.space,k="vertical"===i?g.height():g.width(),l=parseint(g.find(f+".selected").data("liindex"),0),m=k/j,n="vertical"===i?g.height():g.width(),o=0-l*j,p="vertical"===i?h.height():h.width(),q=o<0-(p-n)?0-(p-n):q>0?0:o,r=h.data("offset");m>2&&(q=o-(r+j)<=0?o-(r+j)<0-j?r:q+j:q,q=o-j+r+k0?0:q,"vertical"!==i&&g.width()>=h.width()&&(q=0),"vertical"===i&&g.height()>=h.height()&&(q=0),a.hasclass("dragged")||("vertical"===i?h.data("tmmove",punchgs.tweenlite.to(h,.5,{top:q+"px",ease:punchgs.power3.easeinout})):h.data("tmmove",punchgs.tweenlite.to(h,.5,{left:q+"px",ease:punchgs.power3.easeinout})),h.data("offset",q))},f=function(a,b,c,d,e,f){var g=c.parent().find(".tp-"+f+"s"),h=g.find(".tp-"+f+"s-inner-wrapper"),i=g.find(".tp-"+f+"-mask"),j=d.width*a300||e<-300)&&(e/=10),{spinx:b,spiny:c,pixelx:d,pixely:e}},h=function(a,c){"on"===c.navigation.keyboardnavigation&&jquery(document).keydown(function(d){("horizontal"==c.navigation.keyboard_direction&&39==d.keycode||"vertical"==c.navigation.keyboard_direction&&40==d.keycode)&&(c.sc_indicator="arrow",c.sc_indicator_dir=0,b.callingnewslide(a,1)),("horizontal"==c.navigation.keyboard_direction&&37==d.keycode||"vertical"==c.navigation.keyboard_direction&&38==d.keycode)&&(c.sc_indicator="arrow",c.sc_indicator_dir=1,b.callingnewslide(a,-1))})},i=function(a,c){if("on"===c.navigation.mousescrollnavigation||"carousel"===c.navigation.mousescrollnavigation){c.isieeleven=!!navigator.useragent.match(/trident.*rv\:11\./),c.issafari=!!navigator.useragent.match(/safari/i),c.ischrome=!!navigator.useragent.match(/chrome/i);var d=c.ischrome?-49:c.isieeleven||c.issafari?-9:navigator.useragent.match(/mozilla/i)?-29:-49,e=c.ischrome?49:c.isieeleven||c.issafari?9:navigator.useragent.match(/mozilla/i)?29:49;a.on("mousewheel dommousescroll",function(f){var h=g(f.originalevent),i=a.find(".tp-revslider-slidesli.active-revslide").index(),j=a.find(".tp-revslider-slidesli.processing-revslide").index(),k=-1!=i&&0==i||-1!=j&&0==j,l=-1!=i&&i==c.slideamount-1||1!=j&&j==c.slideamount-1,m=!0;"carousel"==c.navigation.mousescrollnavigation&&(k=l=!1),-1==j?h.pixelye&&(l||(c.sc_indicator="arrow","reverse"!==c.navigation.mousescrollreverse&&(c.sc_indicator_dir=0,b.callingnewslide(a,1)),m=!1),k||(c.sc_indicator="arrow","reverse"===c.navigation.mousescrollreverse&&(c.sc_indicator_dir=1,b.callingnewslide(a,-1)),m=!1)):m=!1;var n=c.c.offset().top-jquery("body").scrolltop(),o=n+c.c.height();return"carousel"!=c.navigation.mousescrollnavigation?("reverse"!==c.navigation.mousescrollreverse&&(n>0&&h.pixely>0||ojquery(window).height()&&h.pixely>0)&&(m=!0)):m=!1,0==m?(f.preventdefault(f),!1):void 0})}},j=function(a,b,d){return a=c?jquery(d.target).closest("."+a).length||jquery(d.srcelement).closest("."+a).length:jquery(d.toelement).closest("."+a).length||jquery(d.originaltarget).closest("."+a).length,!0===a||1===a?1:0},k=function(a,d,e){var f=d.carousel;jquery(".bullet, .bullets, .tp-bullets, .tparrows").addclass("noswipe"),f.limit="endless";var h=(c||b.get_browser(),a),i="vertical"===d.navigation.thumbnails.direction||"vertical"===d.navigation.tabs.direction?"none":"vertical",k=d.navigation.touch.swipe_direction||"horizontal";i="swipebased"==e&&"vertical"==k?"none":e?"vertical":i,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",h.swipetp({allowpagescroll:i,triggerontouchleave:!0,treshold:d.navigation.touch.swipe_treshold,fingers:d.navigation.touch.swipe_min_touches,excludeelements:jquery.fn.swipetp.defaults.excludedelements,swipestatus:function(e,g,h,i,l,m,n){var o=j("rev_slider_wrapper",a,e),p=j("tp-thumbs",a,e),q=j("tp-tabs",a,e),r=jquery(this).attr("class"),s=!!r.match(/tp-tabs|tp-thumb/gi);if("carousel"===d.slidertype&&(("move"===g||"end"===g||"cancel"==g)&&d.dragstartedoverslider&&!d.dragstartedoverthumbs&&!d.dragstartedovertabs||"start"===g&&o>0&&0===p&&0===q)){if(c&&("up"===h||"down"===h))return;switch(d.dragstartedoverslider=!0,i=h&&h.match(/left|up/g)?math.round(-1*i):i=math.round(1*i),g){case"start":void 0!==f.positionanim&&(f.positionanim.kill(),f.slide_globaloffset="off"===f.infinity?f.slide_offset:b.simp(f.slide_offset,f.maxwidth)),f.overpull="none",f.wrap.addclass("dragged");break;case"move":if(d.c.find(".tp-withaction").addclass("tp-temporarydisabled"),f.slide_offset="off"===f.infinity?f.slide_globaloffset+i:b.simp(f.slide_globaloffset+i,f.maxwidth),"off"===f.infinity){var t="center"===f.horizontal_align?(f.wrapwidth/2-f.slide_width/2-f.slide_offset)/f.slide_width:(0-f.slide_offset)/f.slide_width;"none"!==f.overpull&&0!==f.overpull||!(t<0||t>d.slideamount-1)?t>=0&&t<=d.slideamount-1&&(t>=0&&i>f.overpull||t<=d.slideamount-1&&id.slideamount-1?f.slide_offset+(f.overpull-i)/1.1-math.sqrt(math.abs((f.overpull-i)/1.1)):f.slide_offset}b.organisecarousel(d,h,!0,!0);break;case"end":case"cancel":f.slide_globaloffset=f.slide_offset,f.wrap.removeclass("dragged"),b.carouseltoevalposition(d,h),d.dragstartedoverslider=!1,d.dragstartedoverthumbs=!1,d.dragstartedovertabs=!1,settimeout(function(){d.c.find(".tp-withaction").removeclass("tp-temporarydisabled")},19)}}else{if(("move"!==g&&"end"!==g&&"cancel"!=g||d.dragstartedoverslider||!d.dragstartedoverthumbs&&!d.dragstartedovertabs)&&!("start"===g&&o>0&&(p>0||q>0))){if("end"==g&&!s){if(d.sc_indicator="arrow","horizontal"==k&&"left"==h||"vertical"==k&&"up"==h)return d.sc_indicator_dir=0,b.callingnewslide(d.c,1),!1;if("horizontal"==k&&"right"==h||"vertical"==k&&"down"==h)return d.sc_indicator_dir=1,b.callingnewslide(d.c,-1),!1}return d.dragstartedoverslider=!1,d.dragstartedoverthumbs=!1,d.dragstartedovertabs=!1,!0}p>0&&(d.dragstartedoverthumbs=!0),q>0&&(d.dragstartedovertabs=!0);var u=d.dragstartedoverthumbs?".tp-thumbs":".tp-tabs",v=d.dragstartedoverthumbs?".tp-thumb-mask":".tp-tab-mask",w=d.dragstartedoverthumbs?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",x=d.dragstartedoverthumbs?".tp-thumb":".tp-tab",y=d.dragstartedoverthumbs?d.navigation.thumbnails:d.navigation.tabs;i=h&&h.match(/left|up/g)?math.round(-1*i):i=math.round(1*i);var z=a.parent().find(v),a=z.find(w),b=y.direction,c="vertical"===b?a.height():a.width(),d="vertical"===b?z.height():z.width(),e="vertical"===b?z.find(x).first().outerheight(!0)+y.space:z.find(x).first().outerwidth(!0)+y.space,f=void 0===a.data("offset")?0:parseint(a.data("offset"),0),g=0;switch(g){case"start":a.parent().find(u).addclass("dragged"),f="vertical"===b?a.position().top:a.position().left,a.data("offset",f),a.data("tmmove")&&a.data("tmmove").pause();break;case"move":if(c<=d)return!1;g=f+i,g=g>0?"horizontal"===b?g-a.width()*(g/a.width()*g/a.width()):g-a.height()*(g/a.height()*g/a.height()):g;var h="vertical"===b?0-(a.height()-z.height()):0-(a.width()-z.width());g=g0?0:g,g=math.abs(i)>e/10?i<=0?math.floor(g/e)*e:math.ceil(g/e)*e:i<0?math.ceil(g/e)*e:math.floor(g/e)*e,g="vertical"===b?g<0-(a.height()-z.height())?0-(a.height()-z.height()):g:g<0-(a.width()-z.width())?0-(a.width()-z.width()):g,g=g>0?0:g,"vertical"===b?punchgs.tweenlite.to(a,.5,{top:g+"px",ease:punchgs.power3.easeout}):punchgs.tweenlite.to(a,.5,{left:g+"px",ease:punchgs.power3.easeout}),g=g||("vertical"===b?a.position().top:a.position().left),a.data("offset",g),a.data("distance",i),settimeout(function(){d.dragstartedoverslider=!1,d.dragstartedoverthumbs=!1,d.dragstartedovertabs=!1},100),a.parent().find(u).removeclass("dragged"),!1}}}})},l=function(a){a.hide_delay=jquery.isnumeric(parseint(a.hide_delay,0))?a.hide_delay/1e3:.2,a.hide_delay_mobile=jquery.isnumeric(parseint(a.hide_delay_mobile,0))?a.hide_delay_mobile/1e3:.2},m=function(a){return a&&a.enable},n=function(a){return a&&a.enable&&!0===a.hide_onleave&&(void 0===a.position||!a.position.match(/outer/g))},o=function(a,b){var d=a.parent();n(b.navigation.arrows)&&punchgs.tweenlite.delayedcall(c?b.navigation.arrows.hide_delay_mobile:b.navigation.arrows.hide_delay,p,[d.find(".tparrows"),b.navigation.arrows,"hide"]),n(b.navigation.bullets)&&punchgs.tweenlite.delayedcall(c?b.navigation.bullets.hide_delay_mobile:b.navigation.bullets.hide_delay,p,[d.find(".tp-bullets"),b.navigation.bullets,"hide"]),n(b.navigation.thumbnails)&&punchgs.tweenlite.delayedcall(c?b.navigation.thumbnails.hide_delay_mobile:b.navigation.thumbnails.hide_delay,p,[d.find(".tp-thumbs"),b.navigation.thumbnails,"hide"]),n(b.navigation.tabs)&&punchgs.tweenlite.delayedcall(c?b.navigation.tabs.hide_delay_mobile:b.navigation.tabs.hide_delay,p,[d.find(".tp-tabs"),b.navigation.tabs,"hide"])},p=function(a,b,c,d){switch(d=void 0===d?.5:d,c){case"show":punchgs.tweenlite.to(a,d,{autoalpha:1,ease:punchgs.power3.easeinout,overwrite:"auto"});break;case"hide":punchgs.tweenlite.to(a,d,{autoalpha:0,ease:punchgs.power3.easeinou,overwrite:"auto"})}},q=function(a,b,c){b.style=void 0===b.style?"":b.style,b.left.style=void 0===b.left.style?"":b.left.style,b.right.style=void 0===b.right.style?"":b.right.style,0===a.find(".tp-leftarrow.tparrows").length&&a.append('
'+b.tmp+"
"),0===a.find(".tp-rightarrow.tparrows").length&&a.append('
'+b.tmp+"
");var d=a.find(".tp-leftarrow.tparrows"),e=a.find(".tp-rightarrow.tparrows");b.rtl?(d.click(function(){c.sc_indicator="arrow",c.sc_indicator_dir=0,a.revnext()}),e.click(function(){c.sc_indicator="arrow",c.sc_indicator_dir=1,a.revprev()})):(e.click(function(){c.sc_indicator="arrow",c.sc_indicator_dir=0,a.revnext()}),d.click(function(){c.sc_indicator="arrow",c.sc_indicator_dir=1,a.revprev()})),b.right.j=a.find(".tp-rightarrow.tparrows"),b.left.j=a.find(".tp-leftarrow.tparrows"),b.padding_top=parseint(c.carousel.padding_top||0,0),b.padding_bottom=parseint(c.carousel.padding_bottom||0,0),t(d,b.left,c),t(e,b.right,c),b.left.opt=c,b.right.opt=c,"outer-left"!=b.position&&"outer-right"!=b.position||(c.outernav=!0)},r=function(a,b,c){var d=a.outerheight(!0),f=(a.outerwidth(!0),void 0==b.opt?0:0==c.conh?c.height:c.conh),g="layergrid"==b.container?"fullscreen"==c.sliderlayout?c.height/2-c.gridheight[c.curwinrange]*c.bh/2:"on"==c.autoheight||void 0!=c.minheight&&c.minheight>0?f/2-c.gridheight[c.curwinrange]*c.bh/2:0:0,h="top"===b.v_align?{top:"0px",y:math.round(b.v_offset+g)+"px"}:"center"===b.v_align?{top:"50%",y:math.round(0-d/2+b.v_offset)+"px"}:{top:"100%",y:math.round(0-(d+b.v_offset+g))+"px"};a.hasclass("outer-bottom")||punchgs.tweenlite.set(a,h)},s=function(a,b,c){var e=(a.outerheight(!0),a.outerwidth(!0)),f="layergrid"==b.container?"carousel"===c.slidertype?0:c.width/2-c.gridwidth[c.curwinrange]*c.bw/2:0,g="left"===b.h_align?{left:"0px",x:math.round(b.h_offset+f)+"px"}:"center"===b.h_align?{left:"50%",x:math.round(0-e/2+b.h_offset)+"px"}:{left:"100%",x:math.round(0-(e+b.h_offset+f))+"px"};punchgs.tweenlite.set(a,g)},t=function(a,b,c){var d=a.closest(".tp-simpleresponsive").length>0?a.closest(".tp-simpleresponsive"):a.closest(".tp-revslider-mainul").length>0?a.closest(".tp-revslider-mainul"):a.closest(".rev_slider_wrapper").length>0?a.closest(".rev_slider_wrapper"):a.parent().find(".tp-revslider-mainul"),e=d.width(),f=d.height();if(r(a,b,c),s(a,b,c),"outer-left"!==b.position||"fullwidth"!=b.sliderlayout&&"fullscreen"!=b.sliderlayout?"outer-right"!==b.position||"fullwidth"!=b.sliderlayout&&"fullscreen"!=b.sliderlayout||punchgs.tweenlite.set(a,{right:0-a.outerwidth()+"px",x:b.h_offset+"px"}):punchgs.tweenlite.set(a,{left:0-a.outerwidth()+"px",x:b.h_offset+"px"}),a.hasclass("tp-thumbs")||a.hasclass("tp-tabs")){var g=a.data("wr_padding"),h=a.data("maxw"),i=a.data("maxh"),j=a.hasclass("tp-thumbs")?a.find(".tp-thumb-mask"):a.find(".tp-tab-mask"),k=parseint(b.padding_top||0,0),l=parseint(b.padding_bottom||0,0);h>e&&"outer-left"!==b.position&&"outer-right"!==b.position?(punchgs.tweenlite.set(a,{left:"0px",x:0,maxwidth:e-2*g+"px"}),punchgs.tweenlite.set(j,{maxwidth:e-2*g+"px"})):(punchgs.tweenlite.set(a,{maxwidth:h+"px"}),punchgs.tweenlite.set(j,{maxwidth:h+"px"})),i+2*g>f&&"outer-bottom"!==b.position&&"outer-top"!==b.position?(punchgs.tweenlite.set(a,{top:"0px",y:0,maxheight:k+l+(f-2*g)+"px"}),punchgs.tweenlite.set(j,{maxheight:k+l+(f-2*g)+"px"})):(punchgs.tweenlite.set(a,{maxheight:i+"px"}),punchgs.tweenlite.set(j,{maxheight:i+"px"})),"outer-left"!==b.position&&"outer-right"!==b.position&&(k=0,l=0),!0===b.span&&"vertical"===b.direction?(punchgs.tweenlite.set(a,{maxheight:k+l+(f-2*g)+"px",height:k+l+(f-2*g)+"px",top:0-k,y:0}),r(j,b,c)):!0===b.span&&"horizontal"===b.direction&&(punchgs.tweenlite.set(a,{maxwidth:"100%",width:e-2*g+"px",left:0,x:0}),s(j,b,c))}},u=function(a,b,c,d){0===a.find(".tp-bullets").length&&(b.style=void 0===b.style?"":b.style,a.append('
'));var e=a.find(".tp-bullets"),f=c.data("index"),g=b.tmp;jquery.each(d.thumbs[c.index()].params,function(a,b){g=g.replace(b.from,b.to)}),e.append('
'+g+"
");var h=a.find(".justaddedbullet"),i=a.find(".tp-bullet").length,j=h.outerwidth()+parseint(void 0===b.space?0:b.space,0),k=h.outerheight()+parseint(void 0===b.space?0:b.space,0);"vertical"===b.direction?(h.css({top:(i-1)*k+"px",left:"0px"}),e.css({height:(i-1)*k+h.outerheight(),width:h.outerwidth()})):(h.css({left:(i-1)*j+"px",top:"0px"}),e.css({width:(i-1)*j+h.outerwidth(),height:h.outerheight()})),h.find(".tp-bullet-image").css({backgroundimage:"url("+d.thumbs[c.index()].src+")"}),h.data("liref",f),h.click(function(){d.sc_indicator="bullet",a.revcallslidewithid(f),a.find(".tp-bullet").removeclass("selected"),jquery(this).addclass("selected")}),h.removeclass("justaddedbullet"),b.padding_top=parseint(d.carousel.padding_top||0,0),b.padding_bottom=parseint(d.carousel.padding_bottom||0,0),b.opt=d,"outer-left"!=b.position&&"outer-right"!=b.position||(d.outernav=!0),e.addclass("nav-pos-hor-"+b.h_align),e.addclass("nav-pos-ver-"+b.v_align),e.addclass("nav-dir-"+b.direction),t(e,b,d)},w=function(a,b,c,d,e){var f="tp-thumb"===d?".tp-thumbs":".tp-tabs",g="tp-thumb"===d?".tp-thumb-mask":".tp-tab-mask",h="tp-thumb"===d?".tp-thumbs-inner-wrapper":".tp-tabs-inner-wrapper",i="tp-thumb"===d?".tp-thumb":".tp-tab",j="tp-thumb"===d?".tp-thumb-image":".tp-tab-image";if(b.visibleamount=b.visibleamount>e.slideamount?e.slideamount:b.visibleamount,b.sliderlayout=e.sliderlayout,0===a.parent().find(f).length){b.style=void 0===b.style?"":b.style;var k=!0===b.span?"tp-span-wrapper":"",l='
';"outer-top"===b.position?a.parent().prepend(l):"outer-bottom"===b.position?a.after(l):a.append(l),b.padding_top=parseint(e.carousel.padding_top||0,0),b.padding_bottom=parseint(e.carousel.padding_bottom||0,0),"outer-left"!=b.position&&"outer-right"!=b.position||(e.outernav=!0)}var m=c.data("index"),n=a.parent().find(f),o=n.find(g),p=o.find(h),q="horizontal"===b.direction?b.width*b.visibleamount+b.space*(b.visibleamount-1):b.width,r="horizontal"===b.direction?b.height:b.height*b.visibleamount+b.space*(b.visibleamount-1),s=b.tmp;jquery.each(e.thumbs[c.index()].params,function(a,b){s=s.replace(b.from,b.to)}),p.append('
'+s+"
");var u=n.find(".justaddedthumb"),v=n.find(i).length,w=u.outerwidth()+parseint(void 0===b.space?0:b.space,0),x=u.outerheight()+parseint(void 0===b.space?0:b.space,0);u.find(j).css({backgroundimage:"url("+e.thumbs[c.index()].src+")"}),"vertical"===b.direction?(u.css({top:(v-1)*x+"px",left:"0px"}),p.css({height:(v-1)*x+u.outerheight(),width:u.outerwidth()})):(u.css({left:(v-1)*w+"px",top:"0px"}),p.css({width:(v-1)*w+u.outerwidth(),height:u.outerheight()})),n.data("maxw",q),n.data("maxh",r),n.data("wr_padding",b.wrapper_padding);var y="outer-top"===b.position||"outer-bottom"===b.position?"relative":"absolute";"outer-top"!==b.position&&"outer-bottom"!==b.position||b.h_align;o.css({maxwidth:q+"px",maxheight:r+"px",overflow:"hidden",position:"relative"}),n.css({maxwidth:q+"px",maxheight:r+"px",overflow:"visible",position:y,background:b.wrapper_color,padding:b.wrapper_padding+"px",boxsizing:"contet-box"}),u.click(function(){e.sc_indicator="bullet";var b=a.parent().find(h).data("distance");b=void 0===b?0:b,math.abs(b)<10&&(a.revcallslidewithid(m),a.parent().find(f).removeclass("selected"),jquery(this).addclass("selected"))}),u.removeclass("justaddedthumb"),b.opt=e,n.addclass("nav-pos-hor-"+b.h_align),n.addclass("nav-pos-ver-"+b.v_align),n.addclass("nav-dir-"+b.direction),t(n,b,e)},x=function(a){var b=a.c.parent().find(".outer-top"),c=a.c.parent().find(".outer-bottom");a.top_outer=b.hasclass("tp-forcenotvisible")?0:b.outerheight()||0,a.bottom_outer=c.hasclass("tp-forcenotvisible")?0:c.outerheight()||0},y=function(a,b,c,d){b>c||c>d?a.addclass("tp-forcenotvisible"):a.removeclass("tp-forcenotvisible")}}(jquery);