(function($){ window.et_pb_smooth_scroll=function($target, $top_section, speed, easing){ var $window_width=$(window).width(); if($('body').hasClass('et_fixed_nav')&&$window_width > 980){ $menu_offset=$('#top-header').outerHeight() + $('#main-header').outerHeight() - 1; }else{ $menu_offset=-1; } if($ ('#wpadminbar').length&&$window_width > 600){ $menu_offset +=$('#wpadminbar').outerHeight(); } if($top_section){ $scroll_position=0; }else{ $scroll_position=$target.offset().top - $menu_offset; } if(typeof easing==='undefined'){ easing='swing'; } $('html, body').animate({ scrollTop:$scroll_position }, speed, easing); } window.et_fix_video_wmode=function(video_wrapper){ $(video_wrapper).each(function(){ if($(this).find('iframe').length){ var $this_el=$(this).find('iframe'), src_attr=$this_el.attr('src'), wmode_character=src_attr.indexOf('?')==-1 ? '?':'&', this_src=src_attr + wmode_character + 'wmode=opaque'; $this_el.attr('src', this_src); }}); } window.et_pb_form_placeholders_init=function($form){ $form.find('input:text, textarea').each(function(index,domEle){ var $et_current_input=jQuery(domEle), $et_comment_label=$et_current_input.siblings('label'), et_comment_label_value=$et_current_input.siblings('label').text(); if($et_comment_label.length){ $et_comment_label.hide(); if($et_current_input.siblings('span.required')){ et_comment_label_value +=$et_current_input.siblings('span.required').text(); $et_current_input.siblings('span.required').hide(); } $et_current_input.val(et_comment_label_value); }}).bind('focus',function(){ var et_label_text=jQuery(this).siblings('label').text(); if(jQuery(this).siblings('span.required').length) et_label_text +=jQuery(this).siblings('span.required').text(); if(jQuery(this).val()===et_label_text) jQuery(this).val(""); }).bind('blur',function(){ var et_label_text=jQuery(this).siblings('label').text(); if(jQuery(this).siblings('span.required').length) et_label_text +=jQuery(this).siblings('span.required').text(); if(jQuery(this).val()==="") jQuery(this).val(et_label_text); }); } window.et_duplicate_menu=function(menu, append_to, menu_id, menu_class){ append_to.each(function(){ var $this_menu=$(this), $cloned_nav; menu.clone().attr('id',menu_id).removeClass().attr('class',menu_class).appendTo($this_menu); $cloned_nav=$this_menu.find('> ul'); $cloned_nav.find('.menu_slide').remove(); $cloned_nav.find('li:first').addClass('et_first_mobile_item'); $cloned_nav.find('a').on('click', function(){ $this_menu.trigger('click'); }); $this_menu.on('click', function(){ if($(this).hasClass('closed')){ $(this).removeClass('closed').addClass('opened'); $cloned_nav.slideDown(500); }else{ $(this).removeClass('opened').addClass('closed'); $cloned_nav.slideUp(500); } return false; }); $this_menu.on('click', 'a', function(event){ event.stopPropagation(); }); }); $('#mobile_menu .centered-inline-logo-wrap').remove(); } window.et_pb_remove_placeholder_text=function($form){ $form.find('input:text, textarea').each(function(index,domEle){ var $et_current_input=jQuery(domEle), $et_label=$et_current_input.siblings('label'), et_label_value=$et_current_input.siblings('label').text(); if($et_label.length&&$et_label.is(':hidden')){ if($et_label.text()==$et_current_input.val()) $et_current_input.val(''); }}); } window.et_fix_fullscreen_section=function(){ var $et_window=$(window); $('section.et_pb_fullscreen').each(function(){ var $this_section=$(this); $.proxy(et_calc_fullscreen_section, $this_section)(); $et_window.on('resize', $.proxy(et_calc_fullscreen_section, $this_section)); }); }})(jQuery); var addComment={moveForm:function(a,b,c,d){var e,f,g,h,i=this,j=i.I(a),k=i.I(c),l=i.I("cancel-comment-reply-link"),m=i.I("comment_parent"),n=i.I("comment_post_ID"),o=k.getElementsByTagName("form")[0];if(j&&k&&l&&m&&o){i.respondId=c,d=d||!1,i.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",k.parentNode.insertBefore(e,k)),j.parentNode.insertBefore(k,j.nextSibling),n&&d&&(n.value=d),m.value=b,l.style.display="",l.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{for(var p=0;p a').on('touchstart', function(){ et_parent_menu_longpress_start=new Date().getTime(); }).on('touchend', function(){ var et_parent_menu_longpress_end=new Date().getTime() if(et_parent_menu_longpress_end >=et_parent_menu_longpress_start + et_parent_menu_longpress_limit){ et_parent_menu_click=true; }else{ et_parent_menu_click=false; var $et_parent_menu=$(this).parent('li'); if($et_parent_menu.hasClass('et-hover')){ $et_parent_menu.trigger('mouseleave'); }else{ $et_parent_menu.trigger('mouseenter'); }} et_parent_menu_longpress_start=0; }).click(function(){ if(et_parent_menu_click){ return true; } return false; }); $et_top_menu.find('li.mega-menu').each(function(){ var $li_mega_menu=$(this), $li_mega_menu_item=$li_mega_menu.children('ul').children('li'), li_mega_menu_item_count=$li_mega_menu_item.length; if(li_mega_menu_item_count < 4){ $li_mega_menu.addClass('mega-menu-parent mega-menu-parent-' + li_mega_menu_item_count); }}); if($et_header_style_split.length&&$et_vertical_nav.length < 1){ function et_header_menu_split(){ var $logo_container=$('#main-header > .container > .logo_container'), $logo_container_splitted=$('.centered-inline-logo-wrap > .logo_container'), et_top_navigation_li_size=$et_top_navigation.children('nav').children('ul').children('li').size(), et_top_navigation_li_break_index=Math.round(et_top_navigation_li_size / 2) - 1; if($et_window.width() > 980&&$logo_container.length){ $('
  • ').insertAfter($et_top_navigation.find('nav > ul >li:nth('+et_top_navigation_li_break_index+')')); $logo_container.appendTo($et_top_navigation.find('.centered-inline-logo-wrap')); } if($et_window.width() <=980&&$logo_container_splitted.length){ $logo_container_splitted.prependTo('#main-header > .container'); $('#main-header .centered-inline-logo-wrap').remove(); }} et_header_menu_split(); $(window).resize(function(){ et_header_menu_split(); }); } if($('ul.et_disable_top_tier').length){ $("ul.et_disable_top_tier > li > ul").prev('a').attr('href','#'); } if($('.et_vertical_nav').length){ if($('#main-header').height() < $('#et-top-navigation').height()){ $('#main-header').height($('#et-top-navigation').height() + $('#logo').height() + 100); }} window.et_calculate_header_values=function(){ var $top_header=$('#top-header'), secondary_nav_height=$top_header.length&&$top_header.is(':visible') ? $top_header.innerHeight():0, admin_bar_height=$('#wpadminbar').length ? $('#wpadminbar').innerHeight():0; et_header_height=$('#main-header').innerHeight() + secondary_nav_height, et_header_modifier=et_header_height <=90 ? et_header_height - 29:et_header_height - 56, et_header_offset=et_header_modifier + admin_bar_height; et_primary_header_top=secondary_nav_height + admin_bar_height; } var $comment_form=$('#commentform'); et_pb_form_placeholders_init($comment_form); $comment_form.submit(function(){ et_pb_remove_placeholder_text($comment_form); }); et_duplicate_menu($('#et-top-navigation ul.nav'), $('#et-top-navigation .mobile_nav'), 'mobile_menu', 'et_mobile_menu'); if($('#et-secondary-nav').length){ $('#et-top-navigation #mobile_menu').append($('#et-secondary-nav').clone().html()); } function et_change_primary_nav_position(delay){ setTimeout(function(){ var $body=$('body'), $wpadminbar=$('#wpadminbar'), $top_header=$('#top-header'), et_primary_header_top=0; if($wpadminbar.length){ et_primary_header_top +=$wpadminbar.innerHeight(); } if($top_header.length){ et_primary_header_top +=$top_header.innerHeight(); } if(! $body.hasClass('et_vertical_nav')&&($body.hasClass('et_fixed_nav'))){ $('#main-header').css('top', et_primary_header_top); }}, delay); } function et_hide_nav_transofrm(){ var $body=$('body'), $body_height=$(document).height(), $viewport_height=$(window).height() + et_header_height + 200; if($body.hasClass('et_hide_nav')||$body.hasClass('et_hide_nav_disabled')&&($body.hasClass('et_fixed_nav'))){ if($body_height > $viewport_height){ if($body.hasClass('et_hide_nav_disabled')){ $body.addClass('et_hide_nav'); $body.removeClass('et_hide_nav_disabled'); } $('#main-header').css('transform', 'translateY(-' + et_header_height +'px)'); $('#top-header').css('transform', 'translateY(-' + et_header_height +'px)'); }else{ $('#main-header').css({ 'transform': 'translateY(0)', 'opacity': '1' }); $('#top-header').css({ 'transform': 'translateY(0)', 'opacity': '1' }); $body.removeClass('et_hide_nav'); $body.addClass('et_hide_nav_disabled'); }} } function et_fix_page_container_position(){ var et_window_width=$et_window.width(), $top_header=$('#top-header'), secondary_nav_height=$top_header.length&&$top_header.is(':visible') ? $top_header.innerHeight():0; if(et_window_width > 980&&! $main_header.attr('data-height-loaded')){ $main_header.attr({ 'data-height-onload':$main_header.height(), 'data-height-loaded':true }); } if(et_window_width <=980){ var header_height=$main_header.innerHeight() + secondary_nav_height - 1; if($et_transparent_nav.length&&! $et_pb_first_row.length){ header_height +=58; }}else{ var header_height=parseInt($main_header.attr('data-height-onload')) + secondary_nav_height; if($et_transparent_nav.length&&! $et_vertical_nav.length&&$et_main_content_first_row.length){ header_height +=58; }} if($et_transparent_nav.length&&! $et_vertical_nav.length){ $et_pb_first_row.addClass('et_pb_section_first'); var is_pb=$et_pb_first_row.length, is_post_pb=is_pb&&$et_single_post.length, is_post_pb_full_layout_has_title=$et_pb_post_fullwidth.length&&$et_main_content_first_row_meta_wrapper_title.length, is_post_pb_full_layout_no_title=$et_pb_post_fullwidth.length&&0===$et_main_content_first_row_meta_wrapper_title.length, is_pb_fullwidth_section_first=$et_pb_first_row.is('.et_pb_fullwidth_section'), is_no_pb_mobile=et_window_width <=980&&$et_main_content_first_row.length; if(is_post_pb&&!(is_post_pb_full_layout_no_title&&is_pb_fullwidth_section_first)){ $et_main_content_first_row.css({ 'paddingTop':'' }); if(et_window_width < 980){ header_height +=40; } if(is_pb_fullwidth_section_first){ $et_pb_first_row.css({ 'paddingTop':'0', }); } if(is_post_pb_full_layout_has_title){ $et_main_content_first_row_meta_wrapper.css({ 'paddingTop':header_height }); }else if(is_post_pb_full_layout_no_title){ $et_pb_first_row.css({ 'paddingTop':header_height }); }else{ $et_main_content_first_row.css({ 'paddingTop':header_height }); }}else if(is_pb_fullwidth_section_first){ var $et_pb_first_row_first_module=$et_pb_first_row.children('.et_pb_module:first'); if(is_post_pb_full_layout_no_title&&is_pb_fullwidth_section_first&&et_window_width > 980){ header_height=header_height - 58; } if($et_pb_first_row_first_module.is('.et_pb_slider')){ var $et_pb_first_row_first_module_slide_image=$et_pb_first_row_first_module.find('.et_pb_slide_image'), $et_pb_first_row_first_module_slide=$et_pb_first_row_first_module.find('.et_pb_slide'), $et_pb_first_row_first_module_slide_container=$et_pb_first_row_first_module.find('.et_pb_slide .et_pb_container'), et_pb_slide_image_margin_top=0 -(parseInt($et_pb_first_row_first_module_slide_image.height()) / 2), et_pb_slide_container_height=0, $et_pb_first_row_first_module_slider_arrow=$et_pb_first_row_first_module.find('.et-pb-slider-arrows a'), et_pb_first_row_slider_arrow_height=$et_pb_first_row_first_module_slider_arrow.height(); $et_pb_first_row_first_module_slide.css({ 'paddingTop':header_height, }); $et_pb_first_row_first_module_slide_container.css({ 'min-height':'' }); $et_pb_first_row_first_module_slide_image.css({ 'marginTop':et_pb_slide_image_margin_top }); $et_pb_first_row_first_module_slider_arrow.css({ 'marginTop':(( header_height / 2) -(et_pb_first_row_slider_arrow_height / 2)) }); et_pb_first_row_slide_container_height_new=0 $et_pb_first_row_first_module.find('.et_pb_slide').each(function(){ var $et_pb_first_row_first_module_slide_item=$(this), $et_pb_first_row_first_module_slide_container=$et_pb_first_row_first_module_slide_item.find('.et_pb_container'); $et_pb_first_row_first_module_slide_item.show(); $et_pb_first_row_first_module_slide_container.css({ 'min-height':'' }); var et_pb_first_row_slide_container_height=$et_pb_first_row_first_module_slide_container.innerHeight(); if(et_pb_first_row_slide_container_height_new < et_pb_first_row_slide_container_height){ et_pb_first_row_slide_container_height_new=et_pb_first_row_slide_container_height; } if($et_pb_first_row_first_module_slide_item.is(':not(".et-pb-active-slide")')){ $et_pb_first_row_first_module_slide_item.hide(); }}); $et_pb_first_row_first_module_slide_container.css({ 'min-height':et_pb_first_row_slide_container_height_new }); }else if($et_pb_first_row_first_module.is('.et_pb_fullwidth_header')){ $et_pb_first_row_first_module.removeAttr('style'); var et_pb_first_row_first_module_fullwidth_header_padding_top=parseInt($et_pb_first_row_first_module.css('paddingTop')); $et_pb_first_row_first_module.css({ 'paddingTop':(header_height + et_pb_first_row_first_module_fullwidth_header_padding_top) }); }else if($et_pb_first_row_first_module.is('.et_pb_fullwidth_portfolio')){ $et_pb_first_row_first_module.css({ 'paddingTop':header_height }); }else if($et_pb_first_row_first_module.is('.et_pb_map_container')){ var $et_pb_first_row_map=$et_pb_first_row_first_module.find('.et_pb_map'); $et_pb_first_row_map.css({ 'height':'' }); $et_pb_first_row_first_module.find('.et_pb_map').css({ 'height':header_height + parseInt($et_pb_first_row_map.css('height')) }); $et_pb_first_row_first_module.addClass('et_beneath_transparent_nav'); }else if($et_pb_first_row_first_module.is('.et_pb_fullwidth_menu')){ $et_pb_first_row_first_module.css({ 'marginTop':header_height }); }else if($et_pb_first_row_first_module.is('.et_pb_fullwidth_code')){ var $et_pb_first_row_first_module_code=$et_pb_first_row_first_module; $et_pb_first_row_first_module_code.css({ 'paddingTop':'' }); var et_pb_first_row_first_module_code_padding_top=parseInt($et_pb_first_row_first_module_code.css('paddingTop')); $et_pb_first_row_first_module_code.css({ 'paddingTop':header_height + et_pb_first_row_first_module_code_padding_top }); }else if($et_pb_first_row_first_module.is('.et_pb_post_title')){ var $et_pb_first_row_first_module_title=$et_pb_first_row_first_module; $et_pb_first_row_first_module_title.css({ 'paddingTop':header_height + 50 }); }}else if(is_pb){ $et_pb_first_row.css({ 'paddingTop':'' }); et_pb_first_row_padding_top=header_height + parseInt($et_pb_first_row.css('paddingBottom')); $et_pb_first_row.css({ 'paddingTop':et_pb_first_row_padding_top }); }else if(is_no_pb_mobile){ $et_main_content_first_row.css({ 'paddingTop':header_height }); }else{ $('#main-content .container:first-child').css({ 'paddingTop':header_height }); } if(! $('#et_fix_page_container_position').length){ $(''; ref.parentNode.insertBefore(div,ref); } if(options){ $.extend(settings, options); } return this.each(function(){ var selectors=[ "iframe[src*='player.vimeo.com']", "iframe[src*='youtube.com']", "iframe[src*='youtube-nocookie.com']", "iframe[src*='kickstarter.com'][src*='video.html']", "object", "embed" ]; if(settings.customSelector){ selectors.push(settings.customSelector); } var $allVideos=$(this).find(selectors.join(',')); $allVideos=$allVideos.not("object object"); $allVideos.each(function(){ var $this=$(this); if(this.tagName.toLowerCase()==='embed'&&$this.parent('object').length||$this.parent('.fluid-width-video-wrapper').length){ return; } var height=(this.tagName.toLowerCase()==='object'||($this.attr('height')&&!isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10):$this.height(), width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10):$this.width(), aspectRatio=height / width; if(!$this.attr('id')){ var videoID='fitvid' + Math.floor(Math.random()*999999); $this.attr('id', videoID); } $this.wrap('
    ').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); $this.removeAttr('height').removeAttr('width'); }); }); };})(jQuery); (function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this); (function(a){typeof define=="function"&&define.amd?define(["jquery"],a):typeof exports=="object"?a(require("jquery")):a(window.jQuery||window.Zepto)})(function(a){var b="Close",c="BeforeClose",d="AfterClose",e="BeforeAppend",f="MarkupParse",g="Open",h="Change",i="mfp",j="."+i,k="mfp-ready",l="mfp-removing",m="mfp-prevent-close",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w=function(a,b){n.ev.on(i+a+j,b)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},z=function(b){if(b!==v||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.closeMarkup.replace("%title%",n.st.tClose)),v=b;return n.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(n=new o,n.init(),a.magnificPopup.instance=n)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(a.transition!==undefined)return!0;while(b.length)if(b.pop()+"Transition"in a)return!0;return!1};o.prototype={constructor:o,init:function(){var b=navigator.appVersion;n.isIE7=b.indexOf("MSIE 7.")!==-1,n.isIE8=b.indexOf("MSIE 8.")!==-1,n.isLowIE=n.isIE7||n.isIE8,n.isAndroid=/android/gi.test(b),n.isIOS=/iphone|ipad|ipod/gi.test(b),n.supportsTransition=B(),n.probablyMobile=n.isAndroid||n.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),s=a(document),n.popupsCache={}},open:function(b){var c;if(b.isObj===!1){n.items=b.items.toArray(),n.index=0;var d=b.items,e;for(c=0;c(a||r.height())},_setFocus:function(){(n.st.focus?n.content.find(n.st.focus).eq(0):n.wrap).focus()},_onFocusIn:function(b){if(b.target!==n.wrap[0]&&!a.contains(n.wrap[0],b.target))return n._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(f,[b,c,d]),a.each(c,function(a,c){if(c===undefined||c===!1)return!0;e=a.split("_");if(e.length>1){var d=b.find(j+"-"+e[0]);if(d.length>0){var f=e[1];f==="replaceWith"?d[0]!==c[0]&&d.replaceWith(c):f==="img"?d.is("img")?d.attr("src",c):d.replaceWith(''):d.attr(e[1],c)}}else b.find(j+"-"+a).html(c)})},_getScrollbarSize:function(){if(n.scrollbarSize===undefined){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),n.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return n.scrollbarSize}},a.magnificPopup={instance:null,proto:o.prototype,modules:[],open:function(b,c){return A(),b?b=a.extend(!0,{},b):b={},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(b){A();var c=a(this);if(typeof b=="string")if(b==="open"){var d,e=p?c.data("magnificPopup"):c[0].magnificPopup,f=parseInt(arguments[1],10)||0;e.items?d=e.items[f]:(d=c,e.delegate&&(d=d.find(e.delegate)),d=d.eq(f)),n._openClick({mfpEl:d},c,e)}else n.isOpen&&n[b].apply(n,Array.prototype.slice.call(arguments,1));else b=a.extend(!0,{},b),p?c.data("magnificPopup",b):c[0].magnificPopup=b,n.addGroup(c,b);return c};var C="inline",D,E,F,G=function(){F&&(E.after(F.addClass(D)).detach(),F=null)};a.magnificPopup.registerModule(C,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){n.types.push(C),w(b+"."+C,function(){G()})},getInline:function(b,c){G();if(b.src){var d=n.st.inline,e=a(b.src);if(e.length){var f=e[0].parentNode;f&&f.tagName&&(E||(D=d.hiddenClass,E=x(D),D="mfp-"+D),F=e.after(E).detach().removeClass(D)),n.updateStatus("ready")}else n.updateStatus("error",d.tNotFound),e=a("
    ");return b.inlineElement=e,e}return n.updateStatus("ready"),n._parseMarkup(c,{},b),c}}});var H="ajax",I,J=function(){I&&a(document.body).removeClass(I)},K=function(){J(),n.req&&n.req.abort()};a.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){n.types.push(H),I=n.st.ajax.cursor,w(b+"."+H,K),w("BeforeChange."+H,K)},getAjax:function(b){I&&a(document.body).addClass(I),n.updateStatus("loading");var c=a.extend({url:b.src,success:function(c,d,e){var f={data:c,xhr:e};y("ParseAjax",f),n.appendContent(a(f.data),H),b.finished=!0,J(),n._setFocus(),setTimeout(function(){n.wrap.addClass(k)},16),n.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),b.finished=b.loadError=!0,n.updateStatus("error",n.st.ajax.tError.replace("%url%",b.src))}},n.st.ajax.settings);return n.req=a.ajax(c),""}}});var L,M=function(b){if(b.data&&b.data.title!==undefined)return b.data.title;var c=n.st.image.titleSrc;if(c){if(a.isFunction(c))return c.call(n,b);if(b.el)return b.el.attr(c)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
    ',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var c=n.st.image,d=".image";n.types.push("image"),w(g+d,function(){n.currItem.type==="image"&&c.cursor&&a(document.body).addClass(c.cursor)}),w(b+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),r.off("resize"+j)}),w("Resize"+d,n.resizeImage),n.isLowIE&&w("AfterChange",n.resizeImage)},resizeImage:function(){var a=n.currItem;if(!a||!a.img)return;if(n.st.image.verticalFit){var b=0;n.isLowIE&&(b=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",n.wH-b)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(n.content&&n.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var b=0,c=a.img[0],d=function(e){L&&clearInterval(L),L=setInterval(function(){if(c.naturalWidth>0){n._onImageHasSize(a);return}b>200&&clearInterval(L),b++,b===3?d(10):b===40?d(50):b===100&&d(500)},e)};d(1)},getImage:function(b,c){var d=0,e=function(){b&&(b.img[0].complete?(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("ready")),b.hasSize=!0,b.loaded=!0,y("ImageLoadComplete")):(d++,d<200?setTimeout(e,100):f()))},f=function(){b&&(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("error",g.tError.replace("%url%",b.src))),b.hasSize=!0,b.loaded=!0,b.loadError=!0)},g=n.st.image,h=c.find(".mfp-img");if(h.length){var i=document.createElement("img");i.className="mfp-img",b.el&&b.el.find("img").length&&(i.alt=b.el.find("img").attr("alt")),b.img=a(i).on("load.mfploader",e).on("error.mfploader",f),i.src=b.src,h.is("img")&&(b.img=b.img.clone()),i=b.img[0],i.naturalWidth>0?b.hasSize=!0:i.width||(b.hasSize=!1)}return n._parseMarkup(c,{title:M(b),img_replaceWith:b.img},b),n.resizeImage(),b.hasSize?(L&&clearInterval(L),b.loadError?(c.addClass("mfp-loading"),n.updateStatus("error",g.tError.replace("%url%",b.src))):(c.removeClass("mfp-loading"),n.updateStatus("ready")),c):(n.updateStatus("loading"),b.loading=!0,b.hasSize||(b.imgHidden=!0,c.addClass("mfp-loading"),n.findImageSize(b)),c)}}});var N,O=function(){return N===undefined&&(N=document.createElement("p").style.MozTransform!==undefined),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a=n.st.zoom,d=".zoom",e;if(!a.enabled||!n.supportsTransition)return;var f=a.duration,g=function(b){var c=b.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+a.duration/1e3+"s "+a.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,c.css(e),c},h=function(){n.content.css("visibility","visible")},i,j;w("BuildControls"+d,function(){if(n._allowZoom()){clearTimeout(i),n.content.css("visibility","hidden"),e=n._getItemToZoom();if(!e){h();return}j=g(e),j.css(n._getOffset()),n.wrap.append(j),i=setTimeout(function(){j.css(n._getOffset(!0)),i=setTimeout(function(){h(),setTimeout(function(){j.remove(),e=j=null,y("ZoomAnimationEnded")},16)},f)},16)}}),w(c+d,function(){if(n._allowZoom()){clearTimeout(i),n.st.removalDelay=f;if(!e){e=n._getItemToZoom();if(!e)return;j=g(e)}j.css(n._getOffset(!0)),n.wrap.append(j),n.content.css("visibility","hidden"),setTimeout(function(){j.css(n._getOffset())},16)}}),w(b+d,function(){n._allowZoom()&&(h(),j&&j.remove(),e=null)})},_allowZoom:function(){return n.currItem.type==="image"},_getItemToZoom:function(){return n.currItem.hasSize?n.currItem.img:!1},_getOffset:function(b){var c;b?c=n.currItem.img:c=n.st.zoom.opener(n.currItem.el||n.currItem);var d=c.offset(),e=parseInt(c.css("padding-top"),10),f=parseInt(c.css("padding-bottom"),10);d.top-=a(window).scrollTop()-e;var g={width:c.width(),height:(p?c.innerHeight():c[0].offsetHeight)-f-e};return O()?g["-moz-transform"]=g.transform="translate("+d.left+"px,"+d.top+"px)":(g.left=d.left,g.top=d.top),g}}});var P="iframe",Q="//about:blank",R=function(a){if(n.currTemplate[P]){var b=n.currTemplate[P].find("iframe");b.length&&(a||(b[0].src=Q),n.isIE8&&b.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
    ',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){n.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(b+"."+P,function(){R()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}});var S=function(a){var b=n.items.length;return a>b-1?a-b:a<0?b+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=n.st.gallery,d=".mfp-gallery",e=Boolean(a.fn.mfpFastClick);n.direction=!0;if(!c||!c.enabled)return!1;u+=" mfp-gallery",w(g+d,function(){c.navigateByImgClick&&n.wrap.on("click"+d,".mfp-img",function(){if(n.items.length>1)return n.next(),!1}),s.on("keydown"+d,function(a){a.keyCode===37?n.prev():a.keyCode===39&&n.next()})}),w("UpdateStatus"+d,function(a,b){b.text&&(b.text=T(b.text,n.currItem.index,n.items.length))}),w(f+d,function(a,b,d,e){var f=n.items.length;d.counter=f>1?T(c.tCounter,e.index,f):""}),w("BuildControls"+d,function(){if(n.items.length>1&&c.arrows&&!n.arrowLeft){var b=c.arrowMarkup,d=n.arrowLeft=a(b.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(m),f=n.arrowRight=a(b.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(m),g=e?"mfpFastClick":"click";d[g](function(){n.prev()}),f[g](function(){n.next()}),n.isIE7&&(x("b",d[0],!1,!0),x("a",d[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),n.container.append(d.add(f))}}),w(h+d,function(){n._preloadTimeout&&clearTimeout(n._preloadTimeout),n._preloadTimeout=setTimeout(function(){n.preloadNearbyImages(),n._preloadTimeout=null},16)}),w(b+d,function(){s.off(d),n.wrap.off("click"+d),n.arrowLeft&&e&&n.arrowLeft.add(n.arrowRight).destroyMfpFastClick(),n.arrowRight=n.arrowLeft=null})},next:function(){n.direction=!0,n.index=S(n.index+1),n.updateItemHTML()},prev:function(){n.direction=!1,n.index=S(n.index-1),n.updateItemHTML()},goTo:function(a){n.direction=a>=n.index,n.index=a,n.updateItemHTML()},preloadNearbyImages:function(){var a=n.st.gallery.preload,b=Math.min(a[0],n.items.length),c=Math.min(a[1],n.items.length),d;for(d=1;d<=(n.direction?c:b);d++)n._preloadItem(n.index+d);for(d=1;d<=(n.direction?b:c);d++)n._preloadItem(n.index-d)},_preloadItem:function(b){b=S(b);if(n.items[b].preloaded)return;var c=n.items[b];c.parsed||(c=n.parseEl(b)),y("LazyLoad",c),c.type==="image"&&(c.img=a('').on("load.mfploader",function(){c.hasSize=!0}).on("error.mfploader",function(){c.hasSize=!0,c.loadError=!0,y("LazyLoadError",c)}).attr("src",c.src)),c.preloaded=!0}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=n.st.retina,b=a.ratio;b=isNaN(b)?b():b,b>1&&(w("ImageHasSize."+U,function(a,c){c.img.css({"max-width":c.img[0].naturalWidth/b,width:"100%"})}),w("ElementParse."+U,function(c,d){d.src=a.replaceSrc(d,b)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){r.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g=a(this),h;if(c){var i,j,k,l,m,n;g.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,r.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0];if(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)l=!0,d()}).on("touchend"+f,function(a){d();if(l||n>1)return;h=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){h=!1},b),e()})})}g.on("click"+f,function(){h||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&r.off("touchmove"+f+" touchend"+f)}}(),A()}); (function($){ jQuery.fn.reverse=[].reverse; $.et_pb_simple_slider=function(el, options){ var settings=$.extend({ slide:'.et-slide', arrows:'.et-pb-slider-arrows', prev_arrow:'.et-pb-arrow-prev', next_arrow:'.et-pb-arrow-next', controls:'.et-pb-controllers a', carousel_controls:'.et_pb_carousel_item', control_active_class:'et-pb-active-control', previous_text:et_pb_custom.previous, next_text:et_pb_custom.next, fade_speed:500, use_arrows:true, use_controls:true, manual_arrows:'', append_controls_to:'', controls_below:false, controls_class:'et-pb-controllers', slideshow:false, slideshow_speed:7000, show_progress_bar:false, tabs_animation:false, use_carousel:false }, options); var $et_slider=$(el), $et_slide=$et_slider.find(settings.slide), et_slides_number=$et_slide.length, et_fade_speed=settings.fade_speed, et_active_slide=0, $et_slider_arrows, $et_slider_prev, $et_slider_next, $et_slider_controls, $et_slider_carousel_controls, et_slider_timer, controls_html='', carousel_html='', $progress_bar=null, progress_timer_count=0, $et_pb_container=$et_slider.find('.et_pb_container'), et_pb_container_width=$et_pb_container.width(); $et_slider.et_animation_running=false; $.data(el, "et_pb_simple_slider", $et_slider); $et_slide.eq(0).addClass('et-pb-active-slide'); if(! settings.tabs_animation){ if(!$et_slider.hasClass('et_pb_bg_layout_dark')&&!$et_slider.hasClass('et_pb_bg_layout_light')){ $et_slider.addClass(et_get_bg_layout_color($et_slide.eq(0))); }} if(settings.use_arrows&&et_slides_number > 1){ if(settings.manual_arrows=='') $et_slider.append(''); else $et_slider.append(settings.manual_arrows); $et_slider_arrows=$et_slider.find(settings.arrows); $et_slider_prev=$et_slider.find(settings.prev_arrow); $et_slider_next=$et_slider.find(settings.next_arrow); $et_slider_next.click(function(){ if($et_slider.et_animation_running) return false; $et_slider.et_slider_move_to('next'); return false; }); $et_slider_prev.click(function(){ if($et_slider.et_animation_running) return false; $et_slider.et_slider_move_to('previous'); return false; }); } if(settings.use_controls&&et_slides_number > 1){ for(var i=1; i <=et_slides_number; i++){ controls_html +='' + i + ''; } controls_html = '
    ' + controls_html + '
    '; if(settings.append_controls_to=='') $et_slider.append(controls_html); else $(settings.append_controls_to).append(controls_html); if(settings.controls_below) $et_slider_controls=$et_slider.parent().find(settings.controls); else $et_slider_controls=$et_slider.find(settings.controls); et_maybe_set_controls_color($et_slide.eq(0)); $et_slider_controls.click(function(){ if($et_slider.et_animation_running) return false; $et_slider.et_slider_move_to($(this).index()); return false; }); } if(settings.use_carousel&&et_slides_number > 1){ for(var i=1; i <=et_slides_number; i++){ slide_id=i - 1; image_src=($et_slide.eq(slide_id).data('image')!==undefined) ? 'url(' + $et_slide.eq(slide_id).data('image') + ')':'none'; carousel_html +=''; } carousel_html = ''; $et_slider.after(carousel_html); $et_slider_carousel_controls=$et_slider.siblings('.et_pb_carousel').find(settings.carousel_controls); $et_slider_carousel_controls.click(function(){ if($et_slider.et_animation_running) return false; var $this=$(this); $et_slide.eq($this.data('slide-id')).find('.et_pb_video_overlay').css('display', 'none'); $et_slider.et_slider_move_to($this.data('slide-id')); return false; }); } if(settings.slideshow&&et_slides_number > 1){ $et_slider.hover(function(){ if($et_slider.hasClass('et_slider_auto_ignore_hover')){ return; } $et_slider.addClass('et_slider_hovered'); if(typeof et_slider_timer!='undefined'){ clearInterval(et_slider_timer); }}, function(){ if($et_slider.hasClass('et_slider_auto_ignore_hover')){ return; } $et_slider.removeClass('et_slider_hovered'); et_slider_auto_rotate(); }); } et_slider_auto_rotate(); function et_slider_auto_rotate(){ if(settings.slideshow&&et_slides_number > 1&&! $et_slider.hasClass('et_slider_hovered')){ et_slider_timer=setTimeout(function(){ $et_slider.et_slider_move_to('next'); }, settings.slideshow_speed); }} function et_stop_video(active_slide){ var $et_video, et_video_src; if(active_slide.has('iframe').length){ $et_video=active_slide.find('iframe'); et_video_src=$et_video.attr('src'); $et_video.attr('src', ''); $et_video.attr('src', et_video_src); }else if(active_slide.has('video').length){ if(!active_slide.find('.et_pb_section_video_bg').length){ $et_video=active_slide.find('video'); $et_video[0].pause(); }} } function et_fix_slider_content_images(){ var $this_slider=$et_slider, $slide_image_container=$this_slider.find('.et-pb-active-slide .et_pb_slide_image'); $slide_video_container=$this_slider.find('.et-pb-active-slide .et_pb_slide_video'); $slide=$slide_image_container.closest('.et_pb_slide'), $slider=$slide.closest('.et_pb_slider'), slide_height=$slider.innerHeight(), image_height=parseInt(slide_height * 0.8), $top_header=$('#top-header'), $main_header=$('#main-header'), $et_transparent_nav=$('.et_transparent_nav'), $et_vertical_nav=$('.et_vertical_nav'); $slide_image_container.find('img').css('maxHeight', image_height + 'px'); if($slide.hasClass('et_pb_media_alignment_center')){ $slide_image_container.css('marginTop', '-' + parseInt($slide_image_container.height() / 2) + 'px'); } $slide_video_container.css('marginTop', '-' + parseInt($slide_video_container.height() / 2) + 'px'); $slide_image_container.find('img').addClass('active'); } function et_get_bg_layout_color($slide){ if($slide.hasClass('et_pb_bg_layout_dark')){ return 'et_pb_bg_layout_dark'; } return 'et_pb_bg_layout_light'; } function et_maybe_set_controls_color($slide){ var next_slide_dot_color, $arrows, arrows_color; if(typeof $et_slider_controls!=='undefined'&&$et_slider_controls.length){ next_slide_dot_color=$slide.data('dots_color')||''; if(next_slide_dot_color!==''){ $et_slider_controls.attr('style', 'background-color: ' + hex_to_rgba(next_slide_dot_color, '0.3') + ';') $et_slider_controls.filter('.et-pb-active-control').attr('style', 'background-color: ' + hex_to_rgba(next_slide_dot_color) + '!important;'); }else{ $et_slider_controls.removeAttr('style'); }} if(typeof $et_slider_arrows!=='undefined'&&$et_slider_arrows.length){ $arrows=$et_slider_arrows.find('a'); arrows_color=$slide.data('arrows_color')||''; if(arrows_color!==''){ $arrows.css('color', arrows_color); }else{ $arrows.css('color', 'inherit'); }} } function hex_to_rgba(color, alpha){ var color_16=parseInt(color.replace('#', ''), 16), red=(color_16 >> 16) & 255, green=(color_16 >> 8) & 255, blue=color_16 & 255, alpha=alpha||1, rgba; rgba=red + ',' + green + ',' + blue + ',' + alpha; rgba='rgba(' + rgba + ')'; return rgba; } $et_window.load(function(){ et_fix_slider_content_images(); }); $et_window.resize(function(){ et_fix_slider_content_images(); }); $et_slider.et_slider_move_to=function(direction){ var $active_slide=$et_slide.eq(et_active_slide), $next_slide; $et_slider.et_animation_running=true; if(direction=='next'||direction=='previous'){ if(direction=='next') et_active_slide=(et_active_slide + 1) < et_slides_number ? et_active_slide + 1:0; else et_active_slide=(et_active_slide - 1) >=0 ? et_active_slide - 1:et_slides_number - 1; }else{ if(et_active_slide==direction){ $et_slider.et_animation_running=false; return; } et_active_slide=direction; } if(typeof et_slider_timer!='undefined') clearInterval(et_slider_timer); $next_slide=$et_slide.eq(et_active_slide); $et_slide.each(function(){ $(this).css('zIndex', 1); }); $active_slide.css('zIndex', 2).removeClass('et-pb-active-slide'); $next_slide.css({ 'display':'block', opacity:0 }).addClass('et-pb-active-slide'); et_fix_slider_content_images(); if(settings.use_controls) $et_slider_controls.removeClass(settings.control_active_class).eq(et_active_slide).addClass(settings.control_active_class); if(settings.use_carousel) $et_slider_carousel_controls.removeClass(settings.control_active_class).eq(et_active_slide).addClass(settings.control_active_class); if(! settings.tabs_animation){ et_maybe_set_controls_color($next_slide); $next_slide.animate({ opacity:1 }, et_fade_speed); $active_slide.addClass('et_slide_transition').css({ 'display':'list-item', 'opacity':1 }).animate({ opacity:0 }, et_fade_speed, function(){ var active_slide_layout_bg_color=et_get_bg_layout_color($active_slide), next_slide_layout_bg_color=et_get_bg_layout_color($next_slide); $(this).css('display', 'none').removeClass('et_slide_transition'); et_stop_video($active_slide); $et_slider .removeClass(active_slide_layout_bg_color) .addClass(next_slide_layout_bg_color); $et_slider.et_animation_running=false; }); }else{ $next_slide.css({ 'display':'none', opacity:0 }); $active_slide.addClass('et_slide_transition').css({ 'display':'block', 'opacity':1 }).animate({ opacity:0 }, et_fade_speed, function(){ $(this).css('display', 'none').removeClass('et_slide_transition'); $next_slide.css({ 'display':'block', 'opacity':0 }).animate({ opacity:1 }, et_fade_speed, function(){ $et_slider.et_animation_running=false; }); }); } et_slider_auto_rotate(); }} $.fn.et_pb_simple_slider=function(options){ return this.each(function(){ new $.et_pb_simple_slider(this, options); }); } var et_hash_module_seperator='||', et_hash_module_param_seperator='|'; function process_et_hashchange(hash){ if(( hash.indexOf(et_hash_module_seperator, 0))!==-1){ modules=hash.split(et_hash_module_seperator); for(var i=0; i < modules.length; i++){ var module_params=modules[i].split(et_hash_module_param_seperator); var element=module_params[0]; module_params.shift(); if($('#' + element).length){ $('#' + element).trigger({ type: "et_hashchange", params: module_params }); }} }else{ module_params=hash.split(et_hash_module_param_seperator); var element=module_params[0]; module_params.shift(); if($('#' + element).length){ $('#' + element).trigger({ type: "et_hashchange", params: module_params }); }} } function et_set_hash(module_state_hash){ module_id=module_state_hash.split(et_hash_module_param_seperator)[0]; if(!$('#' + module_id).length){ return; } if(window.location.hash){ var hash=window.location.hash.substring(1), new_hash=[]; if(( hash.indexOf(et_hash_module_seperator, 0))!==-1){ modules=hash.split(et_hash_module_seperator); var in_hash=false; for(var i=0; i < modules.length; i++){ var element=modules[i].split(et_hash_module_param_seperator)[0]; if(element===module_id){ new_hash.push(module_state_hash); in_hash=true; }else{ new_hash.push(modules[i]); }} if(!in_hash){ new_hash.push(module_state_hash); }}else{ module_params=hash.split(et_hash_module_param_seperator); var element=module_params[0]; if(element!==module_id){ new_hash.push(hash); } new_hash.push(module_state_hash); } hash=new_hash.join(et_hash_module_seperator); }else{ hash=module_state_hash; } var yScroll=document.body.scrollTop; window.location.hash=hash; document.body.scrollTop=yScroll; } $.et_pb_simple_carousel=function(el, options){ var settings=$.extend({ slide_duration:500, }, options); var $et_carousel=$(el), $carousel_items=$et_carousel.find('.et_pb_carousel_items'), $the_carousel_items=$carousel_items.find('.et_pb_carousel_item'); $et_carousel.et_animation_running=false; $et_carousel.addClass('container-width-change-notify').on('containerWidthChanged', function(event){ set_carousel_columns($et_carousel); set_carousel_height($et_carousel); }); $carousel_items.data('items', $the_carousel_items.toArray()); $et_carousel.data('columns_setting_up', false); $carousel_items.prepend(''); set_carousel_columns($et_carousel); set_carousel_height($et_carousel); $et_carousel_next=$et_carousel.find('.et-pb-arrow-next'); $et_carousel_prev=$et_carousel.find('.et-pb-arrow-prev'); $et_carousel_next.click(function(){ if($et_carousel.et_animation_running) return false; $et_carousel.et_carousel_move_to('next'); return false; }); $et_carousel_prev.click(function(){ if($et_carousel.et_animation_running) return false; $et_carousel.et_carousel_move_to('previous'); return false; }); function set_carousel_height($the_carousel){ var carousel_items_width=$the_carousel_items.width(), carousel_items_height=$the_carousel_items.height(); $carousel_items.css('height', carousel_items_height + 'px'); } function set_carousel_columns($the_carousel){ var columns, $carousel_parent=$the_carousel.parents('.et_pb_column'), carousel_items_width=$carousel_items.width(), carousel_item_count=$the_carousel_items.length; if($carousel_parent.hasClass('et_pb_column_4_4')||$carousel_parent.hasClass('et_pb_column_3_4')||$carousel_parent.hasClass('et_pb_column_2_3')){ if($et_window.width() < 768){ columns=3; }else{ columns=4; }}else if($carousel_parent.hasClass('et_pb_column_1_2')||$carousel_parent.hasClass('et_pb_column_3_8')||$carousel_parent.hasClass('et_pb_column_1_3')){ columns=3; }else if($carousel_parent.hasClass('et_pb_column_1_4')){ if($et_window.width() > 480&&$et_window.width() < 980){ columns=3; }else{ columns=2; }} if(columns===$carousel_items.data('portfolio-columns')){ return; } if($the_carousel.data('columns_setting_up')){ return; } $the_carousel.data('columns_setting_up', true); $carousel_items.removeClass('columns-' + $carousel_items.data('portfolio-columns')); $carousel_items.addClass('columns-' + columns); $carousel_items.data('portfolio-columns', columns); if($carousel_items.find('.et-carousel-group').length){ $the_carousel_items.appendTo($carousel_items); $carousel_items.find('.et-carousel-group').remove(); } var the_carousel_items=$carousel_items.data('items'), $carousel_group=$('