var headerheight=jquery(".fusion-header-wrapper").height(),fusionreanimateslider=function(a){var b=a.find(".slide-content"),c=a.siblings(".tfs-scroll-down-indicator");jquery(b).each(function(){jquery(this).stop(!0,!0),jquery(this).css("margin-top","50px"),jquery(this).animate({opacity:"1","margin-top":"0"},1e3)}),jquery(c).each(function(){var a=jquery(this);a.stop(!0,!0),a.css("opacity","0"),b.offset().top+b.height()+25d?(d="100%",e=0,a="static"):a="absolute",jquery(this).width(d),jquery(this).css({left:e,position:a})})):(c=jquery(l).data("slider_width"),-1!==c.indexof("%")?(c=jquery(m).find(".background-image").data("imgwidth"),c||cssua.ua.mobile||(c=jquery(m).find("video").width()),c||(c=940),jquery(l).data("first_slide_width",c),cd&&(d=.5),e=jquery(l).parent().parent().parent().width(),1<=jquery(l).parents(".post-content").length&&(e=jquery(l).width()),b=d*e,b>parseint(jquery(l).data("slider_height"),10)&&(b=parseint(jquery(l).data("slider_height"),10)),200>b&&(b=200)),1==jquery(l).data("full_screen")&&(jquery(l).css("max-width","100%"),jquery(l).find(".slides, .background").css("width","100%")),"left"!==avadafusionslidervars.header_position&&"right"!==avadafusionslidervars.header_position||jquery(l).hasclass("fixed-width-slider")||1!=jquery(l).data("parallax")||(jquery(l).css("max-width",jquery("#wrapper").width()),jquery("body").hasclass("side-header-left")?jquery(l).css("left",jquery("#side-header").width()):jquery("body").hasclass("side-header-right")&&jquery(l).css("right",jquery("#side-header").width())),jquery(l).parents(".fusion-slider-container").css("height",b),jquery(l).css("height",b),jquery(l).find(".background, .mobile_video_image").css("height",b),1<=jquery(".layout-boxed-mode").length&&(f=jquery(".layout-boxed-mode #wrapper").width(),jquery(l).css("width",f),jquery(l).css("margin-left","auto"),jquery(l).css("margin-right","auto"),1!=jquery(l).data("parallax")||modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)")||(jquery(l).css("left","50%"),"left"===avadafusionslidervars.header_position||"right"===avadafusionslidervars.header_position?(f=jquery(".layout-boxed-mode #wrapper").width()-jquery(".layout-boxed-mode #side-header").width(),"right"===avadafusionslidervars.header_position&&(f=jquery(".layout-boxed-mode #wrapper").width()+jquery(".layout-boxed-mode #side-header").width()),jquery(l).css("margin-left","-"+math.floor(f/2)+"px")):jquery(l).css("margin-left","-"+f/2+"px")),jquery(l).find(".slides, .background").css("width","100%")),cssua.ua.mobile&&(jquery(l).find(".fusion-button").each(function(){jquery(this).removeclass("button-xlarge button-large button-medium"),jquery(this).addclass("button-small")}),jquery(l).find("li").each(function(){jquery(this).attr("data-autoplay","no"),jquery(this).data("autoplay","no")})),jquery(l).find("a.button").each(function(){jquery(this).data("old",jquery(this).attr("class"))}),modernizr.mq("only screen and (max-width: "+avadafusionslidervars.content_break_point+"px)")?jquery(l).find(".fusion-button").each(function(){jquery(this).data("old",jquery(this).attr("class")),jquery(this).removeclass("button-xlarge button-large button-medium"),jquery(this).addclass("button-small")}):jquery(l).find("a.button").each(function(){jquery(this).attr("class",jquery(this).data("old"))}),1==jquery(l).data("parallax")&&(!modernizr.mq("only screen and (min-width: "+avadafusionslidervars.side_header_break_point+"px)")||0!==avadafusionslidervars.header_transparency&&"0"!==avadafusionslidervars.header_transparency&&!1!==avadafusionslidervars.header_transparency||"below"!==avadafusionslidervars.slider_position||(g=jquery(l).find(".slide-content-container"),jquery(g).each(function(){jquery(this).css("padding-top",headerheight+"px")})),jquery(window).scroll(function(){jquery(window).scrolltop()>=jquery(l).parents("#sliders-container").position().top+jquery(l).parents("#sliders-container").height()?(cssua.ua.mobile||modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)")||jquery(l).css("position","static"),jquery(l).css("visibility","hidden")):(cssua.ua.mobile||modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)")||jquery(l).css("position","fixed"),jquery(l).css("visibility","visible"))})),h=jquery(window).width(),i=jquery(window).height(),jquery(window).on("resize",function(){var a,b,c,d,e,f,g,j,k,m,n,o,p;(h!==jquery(window).width()||h!==jquery(window).width()&&i!==jquery(window).height())&&(a=jquery(".fusion-header-wrapper").height(),b=0,void 0!==jquery(l).find(".flex-active-slide").find(".tfs-scroll-down-indicator").offset()&&jquery(l).find(".flex-active-slide").find(".slide-content").offset().top+jquery(l).find(".flex-active-slide").find(".slide-content").height()+25d?(d="100%",e=0,a="static"):a="absolute",jquery(this).width(d),jquery(this).css({left:e,position:a})})},100)):(d=jquery(l).data("slider_width"),-1!==d.indexof("%")?(d=jquery(l).data("first_slide_width"),dg&&(g=.5),j=jquery(l).parent().parent().parent().width(),1<=jquery(l).parents(".post-content").length&&(j=jquery(l).width(),jquery(l).parents(".tab-content").length&&(j=jquery(l).parents(".tab-content").width()-60)),c=g*j,c>parseint(jquery(l).data("slider_height"),10)&&(c=parseint(jquery(l).data("slider_height"),10)),200>c&&(c=200),cg&&!0===f&&1!=jquery(l).data("full_screen")&&(g="100%",a=0),jquery(this).width(g),jquery(this).css("left",a)})),modernizr.mq("only screen and (max-width: "+avadafusionslidervars.content_break_point+"px)")?jquery(l).find(".fusion-button").each(function(){void 0===jquery(this).data("old")&&jquery(this).data("old",jquery(this).attr("class")),jquery(this).removeclass("button-xlarge button-large button-medium"),jquery(this).addclass("button-small")}):jquery(l).find(".fusion-button").each(function(){jquery(this).attr("class",jquery(this).data("old"))}),1==jquery(l).data("full_screen")&&"fade"===jquery(l).data("animation")&&(jquery(l).css("max-width","100%"),jquery(l).find(".slides, .background").css("width","100%")),"left"!==avadafusionslidervars.header_position&&"right"!==avadafusionslidervars.header_position||jquery(l).hasclass("fixed-width-slider")||1!=jquery(l).data("parallax")||(jquery(l).css("max-width",jquery("#wrapper").width()),jquery("body").hasclass("side-header-left")?jquery(l).css("left",jquery("#side-header").width()):jquery("body").hasclass("side-header-right")&&jquery(l).css("right",jquery("#side-header").width())),jquery(l).parents(".fusion-slider-container").css("height",c),jquery(l).parents(".fusion-slider-container").css("max-height",c),jquery(l).css("height",c),jquery(l).find(".background, .mobile_video_image").css("height",c),1<=jquery(".layout-boxed-mode").length&&0===jquery(l).parents(".post-content").length&&(k=jquery(".layout-boxed-mode #wrapper").width(),jquery(l).css("width",k),jquery(l).css("margin-left","auto"),jquery(l).css("margin-right","auto"),1!=jquery(l).data("parallax")||modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)")||(jquery(l).css("left","50%"),"left"===avadafusionslidervars.header_position||"right"===avadafusionslidervars.header_position?(k=jquery(".layout-boxed-mode #wrapper").width()-jquery(".layout-boxed-mode #side-header").width(),"right"===avadafusionslidervars.header_position&&(k=jquery(".layout-boxed-mode #wrapper").width()+jquery(".layout-boxed-mode #side-header").width()),jquery(l).css("margin-left","-"+math.floor(k/2)+"px")):jquery(l).css("margin-left","-"+k/2+"px")),"slide"!==jquery(l).data("animation")&&jquery(l).find(".slides").css("width","100%"),jquery(l).find(".background").css("width","100%")),1!==jquery(l).data("parallax")||modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)")?1==jquery(l).data("parallax")&&modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)")&&(jquery(l).css("position","relative"),jquery(l).css("left","0"),jquery(l).css("margin-left","0"),"absolute"!==jquery(".fusion-header-wrapper").css("position")&&jquery(".fusion-header-wrapper").css("position","relative"),jquery("#main, .fusion-footer-widget-area, .fusion-footer-copyright-area, .fusion-page-title-bar").css("position","relative"),jquery("#main, .fusion-footer-widget-area, .fusion-footer-copyright-area, .fusion-page-title-bar").css("z-index","3"),jquery(".fusion-header-wrapper").css("z-index","5"),jquery(".fusion-header-wrapper").css("height","auto"),jquery(l).parents(".fusion-slider-container").css("margin-top",""),jquery(l).find(".flex-direction-nav li a").css("margin-top",""),jquery(l).find(".flex-control-nav").css("bottom",0),0!==avadafusionslidervars.header_transparency&&"0"!==avadafusionslidervars.header_transparency&&!1!==avadafusionslidervars.header_transparency||"below"!==avadafusionslidervars.slider_position||(o=jquery(l).find(".slide-content-container"),jquery(o).each(function(){jquery(this).css("padding-top","")}))):(jquery(l).css("position","fixed"),"absolute"!==jquery(".fusion-header-wrapper").css("position")?(jquery(".fusion-header-wrapper").css("position","relative"),p=a/2+"px","below"===avadafusionslidervars.slider_position&&jquery(l).parents(".fusion-slider-container").css("margin-top","-"+a+"px")):p="0",jquery(l).find(".flex-direction-nav li a").css("margin-top",p),jquery("#main, .fusion-footer-widget-area, .fusion-footer-copyright-area, .fusion-page-title-bar").css("position","relative"),jquery("#main, .fusion-footer-widget-area, .fusion-footer-copyright-area, .fusion-page-title-bar").css("z-index","3"),jquery(".fusion-header-wrapper").css("z-index","5"),jquery(".fusion-header-wrapper").css("height",a),jquery(l).hasclass("fixed-width-slider")&&("left"===avadafusionslidervars.header_position||"right"===avadafusionslidervars.header_position?(m=jquery(l).parents("#sliders-container").length?jquery("#sliders-container"):jquery("#main"),m.width()jquery(l).width()&&(n=-1*jquery(l).width())):n="-"+jquery(l).width()/2+"px",jquery(l).css("left","50%"),jquery(l).css("margin-left",n)),jquery(l).find(".flex-control-nav").css("bottom",a/2),0!==avadafusionslidervars.header_transparency&&"0"!==avadafusionslidervars.header_transparency&&!1!==avadafusionslidervars.header_transparency||"below"!==avadafusionslidervars.slider_position||(o=jquery(l).find(".slide-content-container"),jquery(o).each(function(){jquery(this).css("padding-top",a+"px")}))),modernizr.mq("only screen and (max-width: 640px)")?(jquery(l).parents(".fusion-slider-container").css("height",c),jquery(l).css("height",c),jquery(l).find(".background, .mobile_video_image").css("height",c)):(modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)"),jquery(l).parents(".fusion-slider-container").css("height",c),jquery(l).css("height",c),jquery(l).find(".background, .mobile_video_image").css("height",c)),o=jquery(l).find(".slide-content-container"),1<=jquery(l).parents(".post-content").length&&(jquery(l).parents(".fusion-slider-container").css("height","auto"),jquery(l).css("height","auto"),jquery(l).parents(".fusion-slider-container").css("max-height","none"),jquery(l).find(".mobile_video_image").each(function(){var a,b,d=jquery(".mobile_video_image").css("background-image").replace("url(","").replace(")","");d&&(a=new image,a.name=d,a.src=d,a.onload=function(){var a=this.height/this.width,d=jquery(l).parent().parent().parent().width();1<=jquery(l).parents(".post-content").length&&(d=jquery(l).width()),(b=a*d)b&&(b="100%",d=0),jquery(this).width(b),jquery(this).css("left",d)})):(e=jquery(l).data("slider_width"),-1!==e.indexof("%")?(e=jquery(m).find(".background-image").data("imgwidth"),e||cssua.ua.mobile||(e=jquery(m).find("video").width()),e||(e=940),jquery(l).data("first_slide_width",e),ed&&(d=.5),h=jquery(l).parent().parent().parent().width(),1<=jquery(l).parents(".post-content").length&&(h=jquery(l).width(),jquery(l).parents(".tab-content").length&&(h=jquery(l).parents(".tab-content").width()-60)),c=d*h,c>parseint(jquery(l).data("slider_height"),10)&&(c=parseint(jquery(l).data("slider_height"),10)),200>c&&(c=200),cg&&!0===f&&1!=jquery(l).data("full_screen")&&(g="100%",a=0),jquery(this).width(g),jquery(this).css("left",a)})),jquery(l).parents(".fusion-slider-container").css("max-height",c),jquery(l).parents(".fusion-slider-container").css("height",c),jquery(l).css("height",c),jquery(l).find(".background, .mobile_video_image").css("height",c),1!==jquery(l).data("parallax")||modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)")?1==jquery(l).data("parallax")&&modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)")&&(jquery(l).css("position","relative"),jquery(l).css("left","0"),jquery(l).css("margin-left","0"),"absolute"!==jquery(".fusion-header-wrapper").css("position")&&jquery(".fusion-header-wrapper").css("position","relative"),jquery("#main, .fusion-footer-widget-area, .fusion-footer-copyright-area, .fusion-page-title-bar").css("position","relative"),jquery("#main, .fusion-footer-widget-area, .fusion-footer-copyright-area, .fusion-page-title-bar").css("z-index","3"),jquery(".fusion-header-wrapper").css("z-index","5"),jquery(".fusion-header-wrapper").css("height","auto"),jquery(l).parents(".fusion-slider-container").css("margin-top",""),jquery(l).find(".flex-direction-nav li a").css("margin-top",""),jquery(l).find(".flex-control-nav").css("bottom",0),0!==avadafusionslidervars.header_transparency&&"0"!==avadafusionslidervars.header_transparency&&!1!==avadafusionslidervars.header_transparency||"below"!==avadafusionslidervars.slider_position||(g=jquery(l).find(".slide-content-container"),jquery(g).each(function(){jquery(this).css("padding-top","")}))):(jquery(l).css("position","fixed"),"absolute"!==jquery(".fusion-header-wrapper").css("position")?(jquery(".fusion-header-wrapper").css("position","relative"),k=headerheight/2+"px","below"===avadafusionslidervars.slider_position&&jquery(l).parents(".fusion-slider-container").css("margin-top","-"+headerheight+"px")):k="0",jquery(l).find(".flex-direction-nav li a").css("margin-top",k),jquery("#main, .fusion-footer-widget-area, .fusion-footer-copyright-area, .fusion-page-title-bar").css("position","relative"),jquery("#main, .fusion-footer-widget-area, .fusion-footer-copyright-area, .fusion-page-title-bar").css("z-index","3"),jquery(".fusion-header-wrapper").css("z-index","5"),jquery(".fusion-header-wrapper").css("height",headerheight),1==jquery(l).data("full_screen")?jquery(a).find(".flex-control-nav").css("bottom",headerheight/2):jquery(a).find(".flex-control-nav").css("bottom",0),jquery(l).hasclass("fixed-width-slider")&&("left"===avadafusionslidervars.header_position||"right"===avadafusionslidervars.header_position?(i=jquery(l).parents("#sliders-container").length?jquery("#sliders-container"):jquery("#main"),i.width()jquery(l).width()&&(j=-1*jquery(l).width())):j="-"+jquery(l).width()/2+"px",jquery(l).css("left","50%"),jquery(l).css("margin-left",j)),0!==avadafusionslidervars.header_transparency&&"0"!==avadafusionslidervars.header_transparency&&!1!==avadafusionslidervars.header_transparency||"below"!==avadafusionslidervars.slider_position||(g=jquery(l).find(".slide-content-container"),jquery(g).each(function(){jquery(this).css("padding-top",headerheight+"px")}))),g=jquery(l).find(".slide-content-container"),jquery(a.slides.eq(a.currentslide)).find("video").each(function(){"yes"===jquery(this).parents("li").attr("data-autoplay")&&"function"==typeof jquery(this)[0].play&&jquery(this)[0].play()}),"left"!==avadafusionslidervars.header_position&&"right"!==avadafusionslidervars.header_position||1<=jquery(l).parents("#sliders-container").length&&(g=jquery(l).parents("#sliders-container").find(".slide-content-container"),jquery(g).each(function(){modernizr.mq("only screen and (max-width: "+avadafusionslidervars.side_header_break_point+"px)")||(jquery(this).hasclass("slide-content-right")?jquery(this).find(".slide-content").css("margin-right","100px"):jquery(this).hasclass("slide-content-left")&&jquery(this).find(".slide-content").css("margin-left","100px"))})),fusionreanimateslider(g),void 0!==a.slides&&0!==a.slides.eq(a.currentslide).find("iframe").length&&playvideoandpauseothers(a),jquery(l).find(".overlay-link").hide(),jquery(a.slides.eq(a.currentslide)).find(".overlay-link").show(),jquery(l).find("[data-youtube-video-id], [data-vimeo-video-id]").each(function(){var a=jquery(this);settimeout(function(){resizevideo(a)},500)}),jquery.waypoints("viewportheight"),jquery.waypoints("refresh")},before:function(){jquery(l).find(".slide-content-container").hide(),jquery(l).find(".tfs-scroll-down-indicator").hide()},after:function(a){jquery(a.slides.eq(a.currentslide)).find(".slide-content-container").show(),jquery(a.slides.eq(a.currentslide)).find(".tfs-scroll-down-indicator").show(),"function"==typeof jquery.fn.fusion_responsive_title_shortcode&&jquery(a.slides.eq(a.currentslide)).find(".fusion-title").fusion_responsive_title_shortcode(),g=jquery(l).find(".slide-content-container"),fusionreanimateslider(g),jquery(l).find(".overlay-link").hide(),jquery(a.slides.eq(a.currentslide)).find(".overlay-link").show(),jquery(a.slides.eq(a.currentslide)).find("[data-youtube-video-id], [data-vimeo-video-id]").each(function(){resizevideo(jquery(this))}),playvideoandpauseothers(a),jquery('[data-spy="scroll"]').each(function(){jquery(this).scrollspy("refresh")})}})})});