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