(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_pb_form_placeholders_init=function($form){ $form.find('input:text, input[type="email"], input[type="url"], 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, menu_click_event){ append_to.each(function(){ var $this_menu=$(this), $cloned_nav; if(''!==menu){ 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).parents('.et_mobile_menu').siblings('.mobile_menu_bar').trigger('click'); }); if('no_click_event'!==menu_click_event){ $this_menu.on('click', '.mobile_menu_bar', function(){ if($this_menu.hasClass('closed')){ $this_menu.removeClass('closed').addClass('opened'); $cloned_nav.stop().slideDown(500); }else{ $this_menu.removeClass('opened').addClass('closed'); $cloned_nav.stop().slideUp(500); } return false; }); }}); $('#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)); }); } window.et_bar_counters_init=function($bar_item){ if(! $bar_item.length){ return; } var $bar_container=$bar_item.closest('.et_pb_counter_container'), bar_item_width=$bar_item.attr('data-width'), bar_item_padding=Math.ceil(parseFloat($bar_item.css('paddingLeft'))) + Math.ceil(parseFloat($bar_item.css('paddingRight'))), $bar_item_text=$bar_item.children('.et_pb_counter_amount_number'), calculated_width=($bar_container.width() - $bar_item_text.innerWidth()) / 100 * parseFloat(bar_item_width), bar_item_text_width=calculated_width + $bar_item_text.innerWidth(); $bar_item.css({ 'width':bar_item_text_width }); } window.et_fix_pricing_currency_position=function($pricing_table){ var $all_pricing_tables=typeof $pricing_table!=='undefined' ? $pricing_table:$('.et_pb_pricing_table'); if(! $all_pricing_tables.length){ return; } $all_pricing_tables.each(function(){ var $this_table=$(this), $price_container=$this_table.find('.et_pb_et_price'), $currency=$price_container.length ? $price_container.find('.et_pb_dollar_sign'):false, $price=$price_container.length ? $price_container.find('.et_pb_sum'):false; if(! $currency||! $price){ return; } $currency.css({ 'marginLeft':- $currency.width() + 'px' }); }); } window.et_pb_set_responsive_grid=function($grid_items_container, single_item_selector){ setTimeout(function(){ var container_width=$grid_items_container.innerWidth(), $grid_items=$grid_items_container.find(single_item_selector), item_width=$grid_items.outerWidth(true), last_item_margin=item_width - $grid_items.outerWidth(), columns_count=Math.round(( container_width + last_item_margin) / item_width), counter=1, first_in_row=1; $grid_items.removeClass('last_in_row first_in_row'); $grid_items.filter(':visible').each(function(){ var $this_el=$(this); if(! $this_el.hasClass('inactive')){ if(first_in_row===counter){ $this_el.addClass('first_in_row'); } if(0===counter % columns_count){ $this_el.addClass('last_in_row'); first_in_row=counter + 1; } counter++; }}); }, 1); }; window.et_pb_set_tabs_height=function($tabs_module){ if(typeof $tabs_module==='undefined'){ $tabs_module=$('.et_pb_tabs'); } if(! $tabs_module.length){ return; } $tabs_module.each(function(){ var $tab_controls=$(this).find('.et_pb_tabs_controls'); var $all_tabs=$tab_controls.find('li'); var max_height=0; var small_columns='.et_pb_column_1_3, .et_pb_column_1_4, .et_pb_column_3_8'; var in_small_column=$(this).parents(small_columns).length > 0; var on_small_screen=parseFloat($(window).width()) < 768; var vertically_stacked=in_small_column||on_small_screen; if(vertically_stacked){ $(this).addClass('et_pb_tabs_vertically_stacked'); } if($all_tabs.length){ $tab_controls.removeAttr('style'); $all_tabs.each(function(){ var tab_height=$(this).outerHeight(); if(vertically_stacked){ return; } if(tab_height > max_height){ max_height=tab_height; }}); } if(0!==max_height){ $tab_controls.css('min-height', max_height); }}); } window.et_pb_box_shadow_apply_overlay=function (el){ var pointerEventsSupport=document.body.style.pointerEvents!==undefined && (document.documentMode===undefined||document.documentMode >=11); if(pointerEventsSupport){ $(el).each(function (){ if(! $(this).children('.box-shadow-overlay').length){ $(this) .addClass('has-box-shadow-overlay') .prepend('
'); }}); }else{ $(el).addClass('.et-box-shadow-no-overlay'); }} window.et_pb_init_nav_menu=function($et_menus){ $et_menus.each(function(){ var $et_menu=$(this); if($et_menu.data('et-is-menu-ready')){ return; } $et_menu.find('li').hover(function(){ window.et_pb_toggle_nav_menu($(this), 'open'); }, function(){ window.et_pb_toggle_nav_menu($(this), 'close'); }); $('body').on('touchend', function(event){ if($(event.target).closest('ul.nav, ul.menu').length < 1&&$('.et-hover').length > 0){ window.et_pb_toggle_nav_menu($('.et-hover'), 'close'); }}); $et_menu.find('li.menu-item-has-children').on('touchend', function(event){ var $closest_li=$(event.target).closest('.menu-item'); if(! $closest_li.hasClass('menu-item-has-children')){ return; } var $this_el=$(this); var is_mega_menu_opened=$closest_li.closest('.mega-menu-parent.et-touch-hover').length > 0; if($this_el.hasClass('et-touch-hover')||is_mega_menu_opened){ var href=$this_el.find('>a').attr('href'); if(typeof href!=='undefined'){ window.location=$this_el.find('>a').attr('href'); }}else{ var $opened_menu=$(event.target); var $already_opened_menus=$opened_menu.closest('.menu-item').siblings('.et-touch-hover'); if($opened_menu.closest('.et-touch-hover').length < 1){ window.et_pb_toggle_nav_menu($('.et-hover'), 'close', 0); } $this_el.addClass('et-touch-hover'); if($already_opened_menus.length > 0){ var $submenus_in_already_opened=$already_opened_menus.find('.et-touch-hover'); window.et_pb_toggle_nav_menu($already_opened_menus, 'close'); window.et_pb_toggle_nav_menu($submenus_in_already_opened, 'close'); } window.et_pb_toggle_nav_menu($this_el, 'open'); } event.preventDefault(); event.stopPropagation(); }); $et_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); }}); $et_menu.data('et-is-menu-ready', 'ready'); }); } window.et_pb_toggle_nav_menu=function($element, state, delay){ if('open'===state){ if(! $element.closest('li.mega-menu').length||$element.hasClass('mega-menu')){ $element.addClass('et-show-dropdown'); $element.removeClass('et-hover').addClass('et-hover'); }}else{ var closeDelay=typeof delay!=='undefined' ? delay:200; $element.removeClass('et-show-dropdown'); $element.removeClass('et-touch-hover'); setTimeout(function(){ if(! $element.hasClass('et-show-dropdown')){ $element.removeClass('et-hover'); }}, closeDelay); }} window.et_pb_apply_sticky_image_effect=function($sticky_image_el){ var $row=$sticky_image_el.closest('.et_pb_row'); var $section=$row.closest('.et_pb_section'); var $column=$sticky_image_el.closest('.et_pb_column'); var sticky_class='et_pb_section_sticky'; var sticky_mobile_class='et_pb_section_sticky_mobile'; var $lastRowInSection=$section.children('.et_pb_row').last(); var $lastColumnInRow=$row.children('.et_pb_column').last(); var $lastModuleInColumn=$column.children('.et_pb_module').last(); if(! $row.is($lastRowInSection)){ return true; } $lastRowInSection.addClass('et-last-child'); if(! $sticky_image_el.is($lastModuleInColumn)){ return true; } if(! $section.hasClass(sticky_class)){ $section.addClass(sticky_class); } $column.addClass('et_pb_row_sticky'); if(! $section.hasClass(sticky_mobile_class)&&$column.is($lastColumnInRow)){ $section.addClass(sticky_mobile_class); }} })(jQuery); !function(a){a.idleTimer=function(b,c){var d;"object"==typeof b?(d=b,b=null):"number"==typeof b&&(d={timeout:b},b=null),c=c||document,d=a.extend({idle:!1,timeout:3e4,events:"mousemove keydown wheel DOMMouseScroll mousewheel mousedown touchstart touchmove MSPointerDown MSPointerMove"},d);var e=a(c),f=e.data("idleTimerObj")||{},g=function(b){var d=a.data(c,"idleTimerObj")||{};d.idle=!d.idle,d.olddate=+new Date;var e=a.Event((d.idle?"idle":"active")+".idleTimer");a(c).trigger(e,[c,a.extend({},d),b])},h=function(b){var d=a.data(c,"idleTimerObj")||{};if(null==d.remaining){if("mousemove"===b.type){if(b.pageX===d.pageX&&b.pageY===d.pageY)return;if("undefined"==typeof b.pageX&&"undefined"==typeof b.pageY)return;var e=+new Date-d.olddate;if(200>e)return}clearTimeout(d.tId),d.idle&&g(b),d.lastActive=+new Date,d.pageX=b.pageX,d.pageY=b.pageY,d.tId=setTimeout(g,d.timeout)}},i=function(){var b=a.data(c,"idleTimerObj")||{};b.idle=b.idleBackup,b.olddate=+new Date,b.lastActive=b.olddate,b.remaining=null,clearTimeout(b.tId),b.idle||(b.tId=setTimeout(g,b.timeout))},j=function(){var b=a.data(c,"idleTimerObj")||{};null==b.remaining&&(b.remaining=b.timeout-(+new Date-b.olddate),clearTimeout(b.tId))},k=function(){var b=a.data(c,"idleTimerObj")||{};null!=b.remaining&&(b.idle||(b.tId=setTimeout(g,b.remaining)),b.remaining=null)},l=function(){var b=a.data(c,"idleTimerObj")||{};clearTimeout(b.tId),e.removeData("idleTimerObj"),e.off("._idleTimer")},m=function(){var b=a.data(c,"idleTimerObj")||{};if(b.idle)return 0;if(null!=b.remaining)return b.remaining;var d=b.timeout-(+new Date-b.lastActive);return 0>d&&(d=0),d};if(null===b&&"undefined"!=typeof f.idle)return i(),e;if(null===b);else{if(null!==b&&"undefined"==typeof f.idle)return!1;if("destroy"===b)return l(),e;if("pause"===b)return j(),e;if("resume"===b)return k(),e;if("reset"===b)return i(),e;if("getRemainingTime"===b)return m();if("getElapsedTime"===b)return+new Date-f.olddate;if("getLastActiveTime"===b)return f.lastActive;if("isIdle"===b)return f.idle}return e.on(a.trim((d.events+" ").split(" ").join("._idleTimer ")),function(a){h(a)}),f=a.extend({},{olddate:+new Date,lastActive:+new Date,idle:d.idle,idleBackup:d.idle,timeout:d.timeout,remaining:null,tId:null,pageX:null,pageY:null}),f.idle||(f.tId=setTimeout(g,f.timeout)),a.data(c,"idleTimerObj",f),e},a.fn.idleTimer=function(b){return this[0]?a.idleTimer(b,this[0]):this}}(jQuery); (function($){ $(document).ready(function(){ var all_networks_opened=0; et_pb_fix_gallery_wrapper(); $('body').on('click', '.et_social_share', function(){ var $this_el=$(this), social_type=$this_el.data('social_type'), social_network=$this_el.data('social_name'), share_link='media'==social_type ? $this_el.data('social_link'):$this_el.prop('href'); update_stats_table(social_network, $this_el); if('like'===social_network){ return false; } var left=($(window).width()/2) -(550/2); var top=($(window).height()/2) -(450/2); var new_window=window.open(share_link, '', 'scrollbars=1, height=450, width=550, left=' + left + ', top=' + top); if(window.focus){ new_window.focus(); } return false; }); $('.et_social_follow').click(function(){ var $this_el=$(this), social_network=$this_el.data('social_name'); update_stats_table(social_network, $this_el); if('like'===social_network){ return false; }}); $('body').on('click', '.et_social_share_pinterest', function(){ if($(this).hasClass('et_social_pin_all')){ var left=($(window).width()/2) -(550/2), top=($(window).height()/2) -(450/2), share_link=$(this).attr('href'), new_window=window.open(share_link, '', 'scrollbars=1, height=450, width=550, left=' + left + ', top=' + top); if(window.focus){ new_window.focus(); }}else{ $('.et_social_pin_images_outer').fadeToggle(400); } return false; }); function get_url_parameter(param_name){ var page_url=window.location.search.substring(1); var url_variables=page_url.split('&'); for(var i=0; i < url_variables.length; i++){ var curr_param_name=url_variables[i].split('='); if(curr_param_name[0]==param_name){ return curr_param_name[1]; }} } function update_stats_table($social_network, $this_el){ var action=$this_el.data('social_type'), media_url='media'==action ? $this_el.closest('.et_social_media_wrapper').find('img').attr('src'):'', post_id=$this_el.data('post_id'), location=$this_el.data('location'), stats_data=''; stats_data=JSON.stringify({ 'action':action, 'network':$social_network, 'media_url':media_url, 'post_id':post_id, 'location':location }); $.ajax({ type: 'POST', url: monarchSettings.ajaxurl, data: { action:'add_stats_record_db', stats_data_array:stats_data, add_stats_nonce:monarchSettings.stats_nonce }, success: function(data){ if(true==data){ if('like'===action){ update_single_shares($this_el, '', post_id, $social_network, 'like'); } if('media'===action){ update_total_media_shares($this_el.closest('.et_social_media_wrapper')); update_single_shares($this_el, media_url, post_id, $social_network, 'media'); }} }}); } function append_share_counts($current_network){ var network=$current_network.data('social_name'), min_count=$current_network.data('min_count'), post_id=$current_network.data('post_id'), url=monarchSettings.pageurl!=='' ? monarchSettings.pageurl:window.location.href, label_div=$current_network.find('.et_social_network_label'), append_to=(0!=(label_div.length)) ? label_div:$current_network; $share_count_data=JSON.stringify({ 'network':network, 'min_count':min_count, 'post_id':post_id, 'url':url }); $.ajax({ type: 'POST', url: monarchSettings.ajaxurl, data: { action:'get_shares_count', share_count_array:$share_count_data, get_share_counts_nonce:monarchSettings.share_counts }, beforeSend: function(data){ append_to.append(''); }, success: function(data){ $current_network.find('span.et_social_placeholder').remove(); append_to.append(data); }}); } function append_total_shares($current_area){ var post_id=$current_area.data('post_id'), url=monarchSettings.pageurl!=='' ? monarchSettings.pageurl:window.location.href, append_to=$current_area; $share_total_count_data=JSON.stringify({ 'post_id':post_id, 'url':url }); $.ajax({ type: 'POST', url: monarchSettings.ajaxurl, data: { action:'get_total_shares', share_total_count_array:$share_total_count_data, get_total_counts_nonce:monarchSettings.total_counts }, beforeSend: function(data){ append_to.append(''); }, success: function(data){ append_to.find('span.et_social_placeholder').remove(); append_to.append(data); }}); } function append_follow_counts($current_area){ var network=$current_area.data('network'), min_count=$current_area.data('min_count'), index=$current_area.data('index'), append_to=$current_area; $follow_count_data=JSON.stringify({ 'network':network, 'min_count':min_count, 'index':index }); $.ajax({ type: 'POST', url: monarchSettings.ajaxurl, data: { action:'get_follow_counts', follow_count_array:$follow_count_data, get_follow_counts_nonce:monarchSettings.follow_counts }, beforeSend: function(data){ append_to.append(''); }, success: function(data){ $current_area.find('span.et_social_placeholder').remove(); append_to.append(data); }}); } function append_total_follows($current_area){ var append_to=$current_area; $.ajax({ type: 'POST', url: monarchSettings.ajaxurl, data: { action:'get_follow_total', get_total_counts_nonce:monarchSettings.total_counts }, beforeSend: function(data){ append_to.append(''); }, success: function(data){ append_to.find('span.et_social_placeholder').remove(); append_to.append(data); }}); } if($('.et_social_display_follow_counts').length){ $('.et_social_display_follow_counts').each(function(){ append_follow_counts($(this)); }); } if($('.et_social_follow_total').length){ $('.et_social_follow_total').each(function(){ append_total_follows($(this)); }); } if($('.et_social_total_share').length){ $('.et_social_total_share').each(function(){ append_total_shares($(this)); }); } if($('.et_social_display_count').length){ $('.et_social_display_count').each(function(){ append_share_counts($(this)); }); } if($('.et_social_media_wrapper').length&&$('.et_social_media_wrapper .et_social_totalcount').length){ $('.et_social_media_wrapper').each(function(){ update_total_media_shares($(this)); }); } if($('.et_social_media_wrapper').length&&$('.et_social_media_wrapper .et_social_withcounts').length){ $('.et_social_media_wrapper .et_social_share').each(function(){ var this_el=$(this), media_url=this_el.closest('.et_social_media_wrapper').find('img').attr('src'), post_id=this_el.data('post_id'), social_network=this_el.data('social_name'); update_single_shares(this_el, media_url, post_id, social_network, 'media'); }); } function update_total_media_shares($element){ if($('.et_social_totalcount').length){ var this_el=$element, media_url=this_el.find('img').attr('src'), post_id=this_el.find('.et_social_share').first().data('post_id'), media_data=JSON.stringify({ 'media_url':media_url, 'post_id':post_id }); $.ajax({ type: 'POST', url: monarchSettings.ajaxurl, data: { action:'get_media_shares_total', media_total:media_data, get_media_shares_total_nonce:monarchSettings.media_total }, success: function(data){ this_el.find('.et_social_totalcount_count').empty().append(data); }}); }} function update_single_shares($this_el, $media_url, $post_id, $network, $action){ if($('.et_social_withcounts').length){ var media_data=JSON.stringify({ 'media_url':$media_url, 'post_id':$post_id, 'network':$network, 'action':$action }); $.ajax({ type: 'POST', url: monarchSettings.ajaxurl, data: { action:'get_shares_single', media_single:media_data, get_media_shares_nonce:monarchSettings.media_single }, success: function(data){ $this_el.find('.et_social_count span').not('.et_social_count_label').empty().append(data); }}); }} function setCookieExpire(days){ var ms=days*24*60*60*1000; var date=new Date(); date.setTime(date.getTime() + ms); return "; expires=" + date.toUTCString(); } function checkCookieValue(cookieName, value){ return parseCookies()[cookieName]===value; } function parseCookies(){ var cookies=document.cookie.split('; '); var ret={}; for (var i=cookies.length - 1; i >=0; i--){ var el=cookies[i].split('='); ret[el[0]]=el[1]; } return ret; } function set_cookie($expire){ cookieExpire=setCookieExpire($expire); document.cookie='etSocialCookie=true' + cookieExpire; } function make_popup_visible($popup, $delay){ setTimeout(function(){ $popup.addClass('et_social_visible et_social_animated'); if($('.et_social_resize').length){ $('.et_social_resize').each(function(){ define_popup_position($(this)); }); }}, $delay); } function auto_popup(this_el, delay){ var $current_popup_auto=this_el; if(! $current_popup_auto.hasClass('et_social_animated')){ var $cookies_expire_auto=$current_popup_auto.data('cookie_duration') ? $current_popup_auto.data('cookie_duration'):false, $delay=delay; if(( false!==$cookies_expire_auto&&! checkCookieValue('etSocialCookie', 'true'))||false==$cookies_expire_auto){ make_popup_visible($current_popup_auto, $delay); if(false!==$cookies_expire_auto){ set_cookie($cookies_expire_auto); }} }} if('true'==get_url_parameter('et_monarch_popup')){ $('.et_social_after_comment').each(function(){ var $current_popup=$(this); auto_popup($current_popup, 0); }); } if($('.et_social_auto_popup').length){ $('.et_social_auto_popup').each(function(){ var $current_popup_auto=$(this); auto_popup($current_popup_auto, ''!==$current_popup_auto.data('delay') ? $current_popup_auto.data('delay') * 1000:0); }); } $('.et_social_pinterest_window .et_social_close').on('click', function(){ $('.et_social_pin_images_outer').fadeToggle(400); }); $('body').on('click', '.et_social_icon_cancel', function(){ var this_el=$(this); if(this_el.parent().hasClass('et_social_flyin')){ $popup=this_el.parent(); }else{ $popup=this_el.parent().parent(); if($popup.hasClass('et_social_all_networks_popup')){ all_networks_opened=0; }} $popup.addClass('et_social_fadeout'); setTimeout(function(){ $popup.remove(); }, 800); return false; }); if($('.et_monarch_after_order').length){ $('.et_social_after_purchase').each(function(){ var $current_popup=$(this); if(! $current_popup.hasClass('et_social_animated')){ var $cookies_expire=$current_popup.data('cookie_duration') ? $current_popup.data('cookie_duration'):false, $delay=0; if(( false!==$cookies_expire&&! checkCookieValue('etSocialCookie', 'true'))||false==$cookies_expire){ make_popup_visible($current_popup, $delay); if(false!==$cookies_expire){ set_cookie($cookies_expire); }} }}); } if($('.et_social_trigger_bottom').length){ $('.et_social_trigger_bottom').each(function(){ scroll_trigger($(this), true); }); } if($('.et_social_scroll').length){ $('.et_social_scroll').each(function(){ scroll_trigger($(this), false); }); } function scroll_trigger(this_el, is_bottom_trigger){ var current_popup_bottom=this_el; if(! current_popup_bottom.hasClass('et_social_animated')){ var cookies_expire_bottom=current_popup_bottom.data('cookie_duration') ? current_popup_bottom.data('cookie_duration'):false; if(true==is_bottom_trigger){ var scroll_trigger=$('.et_social_bottom_trigger').length ? $('.et_social_bottom_trigger').offset().top:$(document).height() - 500; }else{ var scroll_pos=this_el.data('scroll_pos') > 100 ? 100:this_el.data('scroll_pos'), scroll_trigger=100==scroll_pos ? $(document).height() - 10:$(document).height() * scroll_pos / 100; } $(window).scroll(function(){ if(( false!==cookies_expire_bottom&&! checkCookieValue('etSocialCookie', 'true'))||false==cookies_expire_bottom){ if($(window).scrollTop() + $(window).height() > scroll_trigger){ current_popup_bottom.addClass('et_social_visible et_social_animated'); if($('.et_social_resize').length){ $('.et_social_resize').each(function(){ define_popup_position($(this)); }); } if(false!==cookies_expire_bottom){ set_cookie(cookies_expire_bottom); }} }}); }} if($('.et_social_trigger_idle').length){ $('.et_social_trigger_idle').each(function(){ var this_el=$(this); if(! this_el.hasClass('et_social_animated')){ var $cookies_expire_idle=this_el.data('cookie_duration') ? this_el.data('cookie_duration'):false, $idle_timeout=''!==this_el.data('idle_timeout') ? this_el.data('idle_timeout') * 1000:30000; if(( false!==$cookies_expire_idle&&! checkCookieValue('etSocialCookie', 'true'))||false==$cookies_expire_idle){ $(document).idleTimer($idle_timeout); $(document).on("idle.idleTimer", function(){ make_popup_visible(this_el, 0); }); if(false!==$cookies_expire_idle){ set_cookie($cookies_expire_idle); }} }}); } $('.et_social_heading, .et_social_mobile_button').click(function(){ $this_mobile_div=$('.et_social_mobile'); $this_mobile_div.css({'display':'block' }); $('.et_social_mobile_button').removeClass('et_social_active_button'); if($this_mobile_div.hasClass('et_social_opened')){ $this_mobile_div.find('.et_social_networks').slideToggle(600); $this_mobile_div.removeClass('et_social_opened').addClass('et_social_closed'); $('.et_social_mobile_overlay').removeClass('et_social_visible_overlay'); $('.et_social_mobile_overlay').fadeToggle(600); }else{ $this_mobile_div.removeClass('et_social_closed').addClass('et_social_opened'); $this_mobile_div.find('.et_social_networks').slideToggle(600); $('.et_social_mobile_overlay').addClass('et_social_visible_overlay').css({ 'display':'block' }); }}); $('.et_social_mobile .et_social_close').click(function(){ $mobile_div=$('.et_social_mobile'); $mobile_div.fadeToggle(600); $('.et_social_mobile_button').addClass('et_social_active_button'); if($mobile_div.hasClass('et_social_opened')){ $('.et_social_mobile_overlay').fadeToggle(600); $mobile_div.removeClass('et_social_opened'); $mobile_div.find('.et_social_networks').fadeToggle(600); }}); if($('.et_social_inline').length){ if($('body').hasClass('et_pb_pagebuilder_layout')){ var top_inline=$('.et_social_inline_top'), bottom_inline=$('.et_social_inline_bottom'), divi_container='
'; if(top_inline.length){ $('.et_pb_section').not('.et_pb_fullwidth_section').first().prepend(divi_container).find('.et_pb_row').first().find('.et_pb_column').append(top_inline); } if(bottom_inline.length){ $('.et_pb_section').not('.et_pb_fullwidth_section').last().append(divi_container).find('.et_pb_row').last().find('.et_pb_column').append(bottom_inline); }} } function define_popup_position($this_popup){ setTimeout(function(){ var this_popup=$this_popup, networks_div=this_popup.find('.et_social_networks'), header_height=this_popup.find('.et_social_header').outerHeight(), total_count_height=this_popup.find('.et_social_totalcount').height(), extra_height=0 < total_count_height ? 20:0; this_popup.height(this_popup.find('.et_social_icons_container').innerHeight() + header_height + total_count_height + 20 + extra_height); var popup_max_height=this_popup.hasClass('et_social_popup_content') ? $(window).height():$(window).height() - 60; if(this_popup.hasClass('et_social_popup_content')&&768 < $(window).width()){ popup_max_height=popup_max_height - 50; } this_popup.css({ 'max-height':popup_max_height }); if(this_popup.hasClass('et_social_popup_content')){ var top_position=$(window).height() / 2 - this_popup.innerHeight() / 2; this_popup.css({ 'top':top_position + 'px' }); } var networks_div_height=this_popup.height() - header_height + total_count_height - extra_height; networks_div.height(networks_div_height); }, 400); } function set_mobile_sidebar_height(){ setTimeout(function(){ var mobile_div=$('.et_social_mobile'); if(!mobile_div.hasClass('et_social_opened')){ $('.et_social_mobile .et_social_networks').css({'display':'block'}); } if($('.et_social_active_button').length){ mobile_div.css({'display':'block'}); } var inner_contatiner_height=mobile_div.find('.et_social_icons_container').innerHeight() + 45; if(!mobile_div.hasClass('et_social_opened')){ $('.et_social_mobile .et_social_networks').css({'display':'none'}); } if($('.et_social_active_button').length){ mobile_div.css({'display':'none'}); } mobile_div.find('.et_social_networks').css({ 'max-height':inner_contatiner_height, 'height':inner_contatiner_height }); if($(window).height() < inner_contatiner_height){ var inner_height=$(window).height() - mobile_div.find('.et_social_heading').innerHeight() + 10; mobile_div.find('.et_social_networks').css({ 'height':inner_height }); }}, 400); } function set_sidebar_position(){ if($('.et_social_sidebar_networks').length){ var this_sidebar=$('.et_social_sidebar_networks'), top_position=$(window).height() / 2 - this_sidebar.innerHeight() / 2; top_position=0 > top_position ? 0:top_position; this_sidebar.css({ 'top':top_position + 'px' }); }} function set_media_wrapper_size(){ if($('.et_social_media_wrapper').length){ $('.et_social_media_wrapper').each(function(){ var this_wrapper=$(this), this_wrapper_media=this_wrapper.find('.et_social_media'), this_image=this_wrapper.find('img'), image_position=this_image.position(), image_left_offset=typeof image_position!=='undefined' ? image_position.left:0, this_image_height=this_image.height(), this_image_width=this_image.width(), this_wrapper_networks_height=this_wrapper.find('.et_social_networks').innerHeight(); this_wrapper.addClass(this_image.attr('class')); this_wrapper_media.css({ 'max-height':this_image_height }); this_wrapper_media.css({ 'height':this_wrapper_networks_height + 50 }); this_wrapper_media.width(this_image_width - 80); if(0!==image_left_offset){ this_wrapper_media.css({ 'left':image_left_offset + 20 }); }}); et_pb_fix_gallery_slider_icons_size(); }} function et_pb_fix_gallery_wrapper(){ var $media_wrappers_inside_gallery=$('.et_pb_gallery_grid .et_social_media_wrapper'); if(0 > $media_wrappers_inside_gallery.length){ return; } $media_wrappers_inside_gallery.each(function(){ var $this_wrapper=$(this); var $gallery_item=$this_wrapper.closest('.et_pb_gallery_image'); var $gallery_overlay=$gallery_item.find('.et_overlay'); if(0 < $gallery_overlay.length){ $this_wrapper.append($gallery_overlay); }}); } function et_pb_fix_gallery_slider_icons_size(){ var $gallery_slider_icons=$('.et_pb_gallery_fullwidth .et_social_media_wrapper'); if(0 > $gallery_slider_icons.length){ return; } var $all_galleries=$('.et_pb_gallery_fullwidth'); $all_galleries.each(function(){ var $this_gallery=$(this); var $this_gallery_media=$this_gallery.find('.et_social_media_wrapper .et_social_media'); if(0 > $this_gallery_media.length){ return; } var $first_icon_wrapper=$this_gallery_media.first(); var icons_width=$first_icon_wrapper.width(); var icons_height=$first_icon_wrapper.css('height'); var icons_max_height=$first_icon_wrapper.css('max-height'); $this_gallery_media.width(icons_width - 80); $this_gallery_media.height(icons_height); $this_gallery_media.css({ 'max-height':icons_max_height }); }); } $('body').on('click', '.et_social_open_all', function(){ all_networks_opened++; if(1==all_networks_opened){ var this_button=$(this), page_id=this_button.data('page_id'), permalink=this_button.data('permalink'), title=this_button.data('title'), media=typeof this_button.data('media')!=='undefined' ? this_button.data('media'):'', is_popup='popup'==this_button.data('location') ? 'true':'false'; $.ajax({ type: 'POST', url: monarchSettings.ajaxurl, data: { action:'generate_all_networks_popup', all_networks_page_id:page_id, all_networks_link:permalink, all_networks_title:title, all_networks_media:media, is_popup:is_popup, generate_all_window_nonce:monarchSettings.generate_all_window_nonce }, success: function(data){ if('false'==is_popup){ $('body').append(data); make_popup_visible($('.et_social_all_networks_popup'), 1); }else{ var popup_container=this_button.parent().closest('.et_social_popup_content'); this_button.parent().replaceWith(data); define_popup_position(popup_container); all_networks_opened=0; }} }); } return false; }); set_mobile_sidebar_height(); set_sidebar_position(); $(window).resize(function(){ if($('.et_social_resize').length){ $('.et_social_resize').each(function(){ define_popup_position($(this)); }); } if($('.et_social_mobile')){ set_mobile_sidebar_height(); } if($('.et_social_sidebar_networks').length){ set_sidebar_position(); } set_media_wrapper_size(); }); $('.et_social_hide_sidebar').click(function(){ $('.et_social_hide_sidebar').toggleClass('et_social_hidden_sidebar'); $('.et_social_sidebar_networks').toggleClass('et_social_hidden_sidebar et_social_visible_sidebar'); }); $(window).load(function(){ set_media_wrapper_size(); if($('.et_social_pin_images').length&&($('.et_social_all_button').length||$('.et_social_pinterest').length)){ var pin_container=$('.et_social_pin_images'), permalink=pin_container.data('permalink'), title=pin_container.data('title'), post_id=pin_container.data('post_id'), $i=0; $('img').each(function(){ if(! $(this).hasClass('avatar')){ var this_img=$(this).attr('src'), this_alt=$(this).attr('alt'); if(''!=this_img){ var pin_link='http://www.pinterest.com/pin/create/button/?url=' + permalink + '&media=' + this_img + '&description=' + title, this_img_container='
' + this_alt + '
'; $('.et_social_pin_images').append(this_img_container); $i++; }} }); if(0==$i){ $('.et_social_pin_images').append(monarchSettings.no_img_message); }} }); }); })(jQuery); (function(){"use strict";function e(){}function s(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function t(e){return function(){return this[e].apply(this,arguments)}}var n=e.prototype,i=this,r=i.EventEmitter;n.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e)for(n in t={},i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n]);else t=i[e]||(i[e]=[]);return t},n.flattenListeners=function(e){for(var t=[],n=0;nh;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}); (function ($){ var o=$({}); $.subscribe=function (){ o.on.apply(o, arguments); }; $.unsubscribe=function (){ o.off.apply(o, arguments); }; $.publish=function (){ o.trigger.apply(o, arguments); };}(jQuery)); window.ET_App=window.ET_App||{}; window.et_pb_extra_load_event_fired=false; (function (exports, $){ var Elements; Elements={ cacheElements: function (){ this.$window=$(window); this.$body=$('body'); this.$container=this.$body.find('#page-container'); this.$main_header=this.$container.find('> .header'); this.$main_nav=this.$container.find('#main-header'); this.main_nav_height=this.$main_nav.innerHeight(); this.$top_nav=this.$container.find('#top-header'); this.top_nav_height=this.$top_nav.innerHeight(); this.$content_area=this.$container.find('#main-content'); this.$wpadminbar=this.$body.find('#wpadminbar'); }, init: function (){ this.cacheElements(); $.subscribe('et-window.resized', $.proxy(this.hasMainNavHeightChanged, this)); $.subscribe('et-window.resized', $.proxy(this.hasTopNavHeightChanged, this)); }, hasMainNavHeightChanged: function (){ var current_nav_height=this.$main_nav.innerHeight(); if(current_nav_height===this.main_nav_height){ return; } this.main_nav_height=current_nav_height; $.publish('et-main_nav.changed_height'); }, hasTopNavHeightChanged: function (){ var current_nav_height=this.$top_nav.innerHeight(); if(current_nav_height===this.top_nav_height){ return; } this.top_nav_height=current_nav_height; $.publish('et-top_nav.changed_height'); }}; $(function (){ Elements.init(); }); $(window).resize(function (){ $.publish('et-window.resized'); }); exports.Elements=Elements; })(ET_App, jQuery); (function (exports, $){ var DynamicStyles; DynamicStyles={ addRule: function (selector, rules){ this.maybeAddStyleElement(); this.elements[selector]=rules; this.render(); }, addStyleElement: function (){ $('head').append(''; head.appendChild(div.childNodes[1]); } 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 ignoreList='.fitvidsignore'; if(settings.ignore){ ignoreList=ignoreList + ', ' + settings.ignore; } var $allVideos=$(this).find(selectors.join(',')); $allVideos=$allVideos.not('object object'); $allVideos=$allVideos.not(ignoreList); $allVideos.each(function(count){ var $this=$(this); if($this.parents(ignoreList).length > 0){ return; } if(this.tagName.toLowerCase()==='embed'&&$this.parent('object').length||$this.parent('.fluid-width-video-wrapper').length){ return; } if((!$this.css('height')&&!$this.css('width'))&&(isNaN($this.attr('height'))||isNaN($this.attr('width')))){ $this.attr('height', 9); $this.attr('width', 16); } 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' + count; $this.attr('id', videoID); } $this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%'); $this.removeAttr('height').removeAttr('width'); }); }); };})(window.jQuery||window.Zepto); !function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldScroll=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=y+l-f,h=w=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(); !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},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(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith(''):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},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...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("
");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}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=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),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,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.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,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.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(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+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=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.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=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.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,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}); (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;di||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;xMath.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(se.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)}); (function($){ var $et_window=$(window); window.et_load_event_fired=false; window.et_is_transparent_nav=$('body').hasClass('et_transparent_nav'); window.et_is_vertical_nav=$('body').hasClass('et_vertical_nav'); window.et_is_fixed_nav=$('body').hasClass('et_fixed_nav'); window.et_is_minified_js=$('body').hasClass('et_minified_js'); window.et_is_minified_css=$('body').hasClass('et_minified_css'); jQuery.fn.reverse=[].reverse; jQuery.fn.closest_descendent=function(selector){ var $found, $current_children=this.children(); while($current_children.length){ $found=$current_children.filter(selector); if($found.length){ break; } $current_children=$current_children.children(); } return $found; }; window.et_pb_init_modules=function(){ $.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.closest_descendent(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(), is_post_slider=$et_slider.hasClass('et_pb_post_slider'); $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.on('click.et_pb_simple_slider', settings.next_arrow, function(){ if($et_slider.et_animation_running) return false; $et_slider.et_slider_move_to('next'); return false; }); $et_slider.on('click.et_pb_simple_slider', settings.prev_arrow, function(){ if($et_slider.et_animation_running) return false; $et_slider.et_slider_move_to('previous'); return false; }); $et_slider.on('swipeleft.et_pb_simple_slider', settings.slide, function(event){ if($(event.target).closest('.et-fb-popover-tinymce').length||$(event.target).closest('.et-fb-editable-element').length){ return; } $et_slider.et_slider_move_to('next'); }); $et_slider.on('swiperight.et_pb_simple_slider', settings.slide, function(event){ if($(event.target).closest('.et-fb-popover-tinymce').length||$(event.target).closest('.et-fb-editable-element').length){ return; } $et_slider.et_slider_move_to('previous'); }); } if(settings.use_controls&&et_slides_number > 1){ for(var i=1; i <=et_slides_number; i++){ controls_html +='' + i + ''; } if($et_slider.find('video').length > 0){ settings.controls_class +=' et-pb-controllers-has-video-tag'; } 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_slider_controls.on('click.et_pb_simple_slider', function (){ if($et_slider.et_animation_running) return false; $et_slider.et_slider_move_to($(this).index()); return false; }); } et_maybe_set_controls_color($et_slide.eq(0)); 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.on('click.et_pb_simple_slider', function(){ if($et_slider.et_animation_running) return false; var $this=$(this); $et_slider.et_slider_move_to($this.data('slide-id')); return false; }); } if(settings.slideshow&&et_slides_number > 1){ $et_slider.on('mouseenter.et_pb_simple_slider', 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); }}).on('mouseleave.et_pb_simple_slider', 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); }} $et_slider.et_slider_destroy=function(){ if(typeof et_slider_timer!='undefined'){ clearInterval(et_slider_timer); } $et_slider.off('.et_pb_simple_slider'); $et_slider.find('.et_pb_slide').css({ 'z-index': '', 'display': '', 'opacity': '', }); $et_slider.find('.et-pb-active-slide').removeClass('et-pb-active-slide'); $et_slider.find('.et-pb-moved-slide').removeClass('et-pb-moved-slide'); $et_slider.find('.et-pb-slider-arrows, .et-pb-controllers').remove(); $et_slider.siblings('.et_pb_carousel').remove(); $et_slider.removeData('et_pb_simple_slider'); }; 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(); }} } $et_slider.et_fix_slider_content_images=et_fix_slider_content_images; 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=parseFloat($slider.innerHeight()), image_height=parseFloat(slide_height * 0.8), slide_image_container_height=parseFloat($slide_image_container.height()), slide_video_container_height=parseFloat($slide_video_container.height()); if(! isNaN(image_height)){ $slide_image_container.find('img').css('maxHeight', image_height + 'px'); slide_image_container_height=parseInt($slide_image_container.height()) } if(! isNaN(slide_image_container_height)&&$slide.hasClass('et_pb_media_alignment_center')){ $slide_image_container.css('marginTop', '-' +(slide_image_container_height / 2) + 'px'); } if(! isNaN(slide_video_container_height)){ $slide_video_container.css('marginTop', '-' +(slide_video_container_height / 2) + 'px'); }} function et_get_bg_layout_color($slide){ if($slide.hasClass('et_pb_bg_layout_light')){ return 'et_pb_bg_layout_light'; } return 'et_pb_bg_layout_dark'; } 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.attr('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.attr('data-arrows_color')||''; if(arrows_color!==''){ $arrows.attr('style', 'color: ' + arrows_color + '!important;'); }else{ $arrows.css('color', 'inherit'); }} } function et_fix_builder_content(){ if(is_post_slider){ setTimeout(function(){ var $et_pb_circle_counter=$('.et_pb_circle_counter'), $et_pb_number_counter=$('.et_pb_number_counter'); window.et_fix_testimonial_inner_width(); if($et_pb_circle_counter.length){ window.et_pb_reinit_circle_counters($et_pb_circle_counter); } if($et_pb_number_counter.length){ window.et_pb_reinit_number_counters($et_pb_number_counter); } window.et_reinit_waypoint_modules(); }, 1000); }} 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; } if(window.et_load_event_fired){ et_fix_slider_height($et_slider); }else{ $et_window.on('load', function(){ et_fix_slider_height($et_slider); }); } $et_window.on('resize.et_simple_slider', function(){ et_fix_slider_height($et_slider); }); $et_slider.et_slider_move_to=function(direction){ var $active_slide=$et_slide.eq(et_active_slide); $et_slider.et_animation_running=true; $et_slider.removeClass('et_slide_transition_to_next et_slide_transition_to_previous').addClass('et_slide_transition_to_' + direction); $et_slider.find('.et-pb-moved-slide').removeClass('et-pb-moved-slide'); 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); var $next_slide=$et_slide.eq(et_active_slide); $et_slider.trigger('slide', {current: $active_slide, next: $next_slide}); if(typeof $active_slide.find('video')[0]!=='undefined'&&typeof $active_slide.find('video')[0]['player']!=='undefined'){ $active_slide.find('video')[0].player.pause(); } if(typeof $next_slide.find('video')[0]!=='undefined'&&typeof $next_slide.find('video')[0]['player']!=='undefined'){ $next_slide.find('video')[0].player.play(); } var $active_slide_video=$active_slide.find('.et_pb_video_box iframe'); if($active_slide_video.length){ var active_slide_video_src=$active_slide_video.attr('src'); active_slide_video_src=active_slide_video_src.replace(/\?autoplay=1$/, ''); active_slide_video_src=active_slide_video_src.replace(/\?autoplay=1&(amp;)?/, '?'); active_slide_video_src=active_slide_video_src.replace(/&(amp;)?autoplay=1/, ''); setTimeout(function(){ $active_slide_video.attr({ 'src': active_slide_video_src }); }, settings.fade_speed); $active_slide_video.parents('.et_pb_video_box').next('.et_pb_video_overlay').css({ 'display':'block', 'opacity':1 }); } $et_slider.trigger('simple_slider_before_move_to', { direction:direction, next_slide:$next_slide }); $et_slide.each(function(){ $(this).css('zIndex', 1); }); $active_slide.css('zIndex', 2).removeClass('et-pb-active-slide').addClass('et-pb-moved-slide').data('slide-status', 'inactive'); $next_slide.css({ 'display':'block', opacity:0 }).addClass('et-pb-active-slide').data('slide-status', 'active'); et_fix_slider_content_images(); et_fix_builder_content(); 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) $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; $et_slider.trigger('simple_slider_after_move_to', { next_slide:$next_slide }); }); }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.trigger('simple_slider_after_move_to', { next_slide:$next_slide }); }); }); } if($next_slide.find('.et_parallax_bg').length){ window.et_pb_parallax_init($next_slide.find('.et_parallax_bg')); } et_slider_auto_rotate(); }}; $.fn.et_pb_simple_slider=function(options){ return this.each(function(){ var slider=$.data(this, 'et_pb_simple_slider'); return slider ? slider: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.on('click', '.et-pb-arrow-next', function(){ if($et_carousel.et_animation_running) return false; $et_carousel.et_carousel_move_to('next'); return false; }); $et_carousel.on('click', '.et-pb-arrow-prev', function(){ if($et_carousel.et_animation_running) return false; $et_carousel.et_carousel_move_to('previous'); return false; }); $et_carousel.on('swipeleft', function(){ $et_carousel.et_carousel_move_to('next'); }); $et_carousel.on('swiperight', function(){ $et_carousel.et_carousel_move_to('previous'); }); function set_carousel_height($the_carousel){ var carousel_items_width=$the_carousel_items.width(), carousel_items_height=$the_carousel_items.height(); if($the_carousel.parent().hasClass('et_pb_with_border')){ carousel_items_height=$the_carousel_items.outerHeight(); } $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=$('