var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
(function($){$(document).ready(function(){var all_networks_opened=0;$('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('<span class="et_social_placeholder"></span>');},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('<span class="et_social_placeholder"></span>');},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('<span class="et_social_placeholder"></span>');},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('<span class="et_social_placeholder"></span>');},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='<div class="et_pb_row"><div class="et_pb_column et_pb_column_4_4"></div></div>';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'),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);});}}
$('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='<div class="et_social_pin_image"><a href="'+pin_link+'" rel="nofollow" class="et_social_icon et_social_share" data-social_name="pinterest" data-post_id="'+post_id+'" data-social_type="share"><img src="'+this_img+'" alt="'+this_alt+'"/><span class="et_social_pin_overlay et_social_icon"></span></a></div>';$('.et_social_pin_images').append(this_img_container);$i++;}}});if(0==$i){$('.et_social_pin_images').append(monarchSettings.no_img_message);}}});});})(jQuery);var addComment={moveForm:function(a,b,c,d){var e,f,g,h,i=this,j=i.I(a),k=i.I(c),l=i.I("cancel-comment-reply-link"),m=i.I("comment_parent"),n=i.I("comment_post_ID"),o=k.getElementsByTagName("form")[0];if(j&&k&&l&&m&&o){i.respondId=c,d=d||!1,i.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",k.parentNode.insertBefore(e,k)),j.parentNode.insertBefore(k,j.nextSibling),n&&d&&(n.value=d),m.value=b,l.style.display="",l.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{for(var p=0;p<o.elements.length;p++)if(f=o.elements[p],h=!1,"getComputedStyle"in window?g=window.getComputedStyle(f):document.documentElement.currentStyle&&(g=f.currentStyle),(f.offsetWidth<=0&&f.offsetHeight<=0||"hidden"===g.visibility)&&(h=!0),"hidden"!==f.type&&!f.disabled&&!h){f.focus();break}}catch(q){}return!1}},I:function(a){return document.getElementById(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;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||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;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>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_pb_post_fullwidth=$('.single.et_pb_pagebuilder_layout.et_full_width_page'),et_is_mobile_device=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/),et_is_ipad=navigator.userAgent.match(/iPad/),$et_container=$('.container'),et_container_width=$et_container.width(),et_is_fixed_nav=$('body').hasClass('et_fixed_nav'),et_is_vertical_fixed_nav=$('body').hasClass('et_vertical_fixed'),et_is_rtl=$('body').hasClass('rtl'),et_hide_nav=$('body').hasClass('et_hide_nav'),et_header_style_left=$('body').hasClass('et_header_style_left'),et_vertical_navigation=$('body').hasClass('et_vertical_nav'),$top_header=$('#top-header'),$main_header=$('#main-header'),$main_container_wrapper=$('#page-container'),$et_transparent_nav=$('.et_transparent_nav'),$et_main_content_first_row=$('#main-content .container:first-child'),$et_main_content_first_row_meta_wrapper=$et_main_content_first_row.find('.et_post_meta_wrapper:first'),$et_main_content_first_row_meta_wrapper_title=$et_main_content_first_row_meta_wrapper.find('h1.entry-title'),$et_main_content_first_row_content=$et_main_content_first_row.find('.entry-content:first'),$et_single_post=$('body.single-post'),$et_window=$(window),etRecalculateOffset=false,et_header_height,et_header_modifier,et_header_offset,et_primary_header_top,$et_vertical_nav=$('.et_vertical_nav'),$et_header_style_split=$('.et_header_style_split'),$et_top_navigation=$('#et-top-navigation'),$logo=$('#logo'),$et_pb_first_row=$('body.et_pb_pagebuilder_layout .et_pb_section:first-child');$(document).ready(function(){var $et_top_menu=$('ul.nav'),$et_search_icon=$('#et_search_icon'),et_parent_menu_longpress_limit=300,et_parent_menu_longpress_start,et_parent_menu_click=true;$et_top_menu.find('li').hover(function(){if(!$(this).closest('li.mega-menu').length||$(this).hasClass('mega-menu')){$(this).addClass('et-show-dropdown');$(this).removeClass('et-hover').addClass('et-hover');}},function(){var $this_el=$(this);$this_el.removeClass('et-show-dropdown');setTimeout(function(){if(!$this_el.hasClass('et-show-dropdown')){$this_el.removeClass('et-hover');}},200);});$et_top_menu.find('.menu-item-has-children > a').on('touchstart',function(){et_parent_menu_longpress_start=new Date().getTime();}).on('touchend',function(){var et_parent_menu_longpress_end=new Date().getTime()
if(et_parent_menu_longpress_end>=et_parent_menu_longpress_start+et_parent_menu_longpress_limit){et_parent_menu_click=true;}else{et_parent_menu_click=false;var $et_parent_menu=$(this).parent('li');if($et_parent_menu.hasClass('et-hover')){$et_parent_menu.trigger('mouseleave');}else{$et_parent_menu.trigger('mouseenter');}}
et_parent_menu_longpress_start=0;}).click(function(){if(et_parent_menu_click){return true;}
return false;});$et_top_menu.find('li.mega-menu').each(function(){var $li_mega_menu=$(this),$li_mega_menu_item=$li_mega_menu.children('ul').children('li'),li_mega_menu_item_count=$li_mega_menu_item.length;if(li_mega_menu_item_count<4){$li_mega_menu.addClass('mega-menu-parent mega-menu-parent-'+li_mega_menu_item_count);}});if($et_header_style_split.length&&$et_vertical_nav.length<1){function et_header_menu_split(){var $logo_container=$('#main-header > .container > .logo_container'),$logo_container_splitted=$('.centered-inline-logo-wrap > .logo_container'),et_top_navigation_li_size=$et_top_navigation.children('nav').children('ul').children('li').size(),et_top_navigation_li_break_index=Math.round(et_top_navigation_li_size/2)-1;if($et_window.width()>980&&$logo_container.length){$('<li class="centered-inline-logo-wrap"></li>').insertAfter($et_top_navigation.find('nav > ul >li:nth('+et_top_navigation_li_break_index+')'));$logo_container.appendTo($et_top_navigation.find('.centered-inline-logo-wrap'));}
if($et_window.width()<=980&&$logo_container_splitted.length){$logo_container_splitted.prependTo('#main-header > .container');$('#main-header .centered-inline-logo-wrap').remove();}}
et_header_menu_split();$(window).resize(function(){et_header_menu_split();});}
if($('ul.et_disable_top_tier').length){$("ul.et_disable_top_tier > li > ul").prev('a').attr('href','#');}
if($('.et_vertical_nav').length){if($('#main-header').height()<$('#et-top-navigation').height()){$('#main-header').height($('#et-top-navigation').height()+$('#logo').height()+100);}}
window.et_calculate_header_values=function(){var $top_header=$('#top-header'),secondary_nav_height=$top_header.length&&$top_header.is(':visible')?$top_header.innerHeight():0,admin_bar_height=$('#wpadminbar').length?$('#wpadminbar').innerHeight():0,$slide_menu_container=$('.et_header_style_slide .et_slide_in_menu_container');et_header_height=$('#main-header').innerHeight()+secondary_nav_height,et_header_modifier=et_header_height<=90?et_header_height-29:et_header_height-56,et_header_offset=et_header_modifier+admin_bar_height;et_primary_header_top=secondary_nav_height+admin_bar_height;if($slide_menu_container.length&&!$('body').hasClass('et_pb_slide_menu_active')){$slide_menu_container.css({right:'-'+$slide_menu_container.innerWidth()+'px','display':'none'});if($('body').hasClass('et_boxed_layout')){var page_container_margin=$main_container_wrapper.css('margin-left');$main_header.css({left:page_container_margin});}}}
var $comment_form=$('#commentform');et_pb_form_placeholders_init($comment_form);$comment_form.submit(function(){et_pb_remove_placeholder_text($comment_form);});et_duplicate_menu($('#et-top-navigation ul.nav'),$('#et-top-navigation .mobile_nav'),'mobile_menu','et_mobile_menu');et_duplicate_menu('',$('.et_pb_fullscreen_nav_container'),'mobile_menu_slide','et_mobile_menu','no_click_event');if($('#et-secondary-nav').length){$('#et-top-navigation #mobile_menu').append($('#et-secondary-nav').clone().html());}
if($('.et_slide_in_menu_container').length){var $item_with_sub=$('.et_slide_in_menu_container').find('.menu-item-has-children > a');if($item_with_sub.length){$item_with_sub.append('<span class="et_mobile_menu_arrow"></span>');}}
function et_change_primary_nav_position(delay){setTimeout(function(){var $body=$('body'),$wpadminbar=$('#wpadminbar'),$top_header=$('#top-header'),et_primary_header_top=0;if($wpadminbar.length){et_primary_header_top+=$wpadminbar.innerHeight();}
if($top_header.length&&$top_header.is(':visible')){et_primary_header_top+=$top_header.innerHeight();}
if(!$body.hasClass('et_vertical_nav')&&($body.hasClass('et_fixed_nav'))){$('#main-header').css('top',et_primary_header_top);}},delay);}
function et_hide_nav_transofrm(){var $body=$('body'),$body_height=$(document).height(),$viewport_height=$(window).height()+et_header_height+200;if($body.hasClass('et_hide_nav')||$body.hasClass('et_hide_nav_disabled')&&($body.hasClass('et_fixed_nav'))){if($body_height>$viewport_height){if($body.hasClass('et_hide_nav_disabled')){$body.addClass('et_hide_nav');$body.removeClass('et_hide_nav_disabled');}
$('#main-header').css('transform','translateY(-'+et_header_height+'px)');$('#top-header').css('transform','translateY(-'+et_header_height+'px)');}else{$('#main-header').css({'transform':'translateY(0)','opacity':'1'});$('#top-header').css({'transform':'translateY(0)','opacity':'1'});$body.removeClass('et_hide_nav');$body.addClass('et_hide_nav_disabled');}}}
function et_fix_page_container_position(){var et_window_width=$et_window.width(),$top_header=$('#top-header'),secondary_nav_height=$top_header.length&&$top_header.is(':visible')?$top_header.innerHeight():0;if(et_window_width>980&&!$main_header.attr('data-height-loaded')){$main_header.attr({'data-height-onload':$main_header.height(),'data-height-loaded':true});}
if(et_window_width<=980){var header_height=$main_header.innerHeight()+secondary_nav_height-1;if($et_transparent_nav.length&&!$et_pb_first_row.length){header_height+=58;}}else{var header_height=parseInt($main_header.attr('data-height-onload'))+secondary_nav_height;if($et_transparent_nav.length&&!$et_vertical_nav.length&&$et_main_content_first_row.length){header_height+=58;}}
if($et_transparent_nav.length&&!$et_vertical_nav.length){$et_pb_first_row.addClass('et_pb_section_first');var is_pb=$et_pb_first_row.length,is_post_pb=is_pb&&$et_single_post.length,is_post_pb_full_layout_has_title=$et_pb_post_fullwidth.length&&$et_main_content_first_row_meta_wrapper_title.length,is_post_pb_full_layout_no_title=$et_pb_post_fullwidth.length&&0===$et_main_content_first_row_meta_wrapper_title.length,is_pb_fullwidth_section_first=$et_pb_first_row.is('.et_pb_fullwidth_section'),is_no_pb_mobile=et_window_width<=980&&$et_main_content_first_row.length;if(is_post_pb&&!(is_post_pb_full_layout_no_title&&is_pb_fullwidth_section_first)){$et_main_content_first_row.css({'paddingTop':''});if(et_window_width<980){header_height+=40;}
if(is_pb_fullwidth_section_first){$et_pb_first_row.css({'paddingTop':'0',});}
if(is_post_pb_full_layout_has_title){$et_main_content_first_row_meta_wrapper.css({'paddingTop':header_height});}else if(is_post_pb_full_layout_no_title){$et_pb_first_row.css({'paddingTop':header_height});}else{$et_main_content_first_row.css({'paddingTop':header_height});}}else if(is_pb_fullwidth_section_first){var $et_pb_first_row_first_module=$et_pb_first_row.children('.et_pb_module:first');if(is_post_pb_full_layout_no_title&&is_pb_fullwidth_section_first&&et_window_width>980){header_height=header_height-58;}
if($et_pb_first_row_first_module.is('.et_pb_slider')){var $et_pb_first_row_first_module_slide_image=$et_pb_first_row_first_module.find('.et_pb_slide_image'),$et_pb_first_row_first_module_slide=$et_pb_first_row_first_module.find('.et_pb_slide'),$et_pb_first_row_first_module_slide_container=$et_pb_first_row_first_module.find('.et_pb_slide .et_pb_container'),et_pb_slide_image_margin_top=0-(parseInt($et_pb_first_row_first_module_slide_image.height())/2),et_pb_slide_container_height=0,$et_pb_first_row_first_module_slider_arrow=$et_pb_first_row_first_module.find('.et-pb-slider-arrows a'),et_pb_first_row_slider_arrow_height=$et_pb_first_row_first_module_slider_arrow.height();$et_pb_first_row_first_module_slide.css({'paddingTop':header_height,});$et_pb_first_row_first_module_slide_container.css({'min-height':''});$et_pb_first_row_first_module_slide_image.css({'marginTop':et_pb_slide_image_margin_top});$et_pb_first_row_first_module_slider_arrow.css({'marginTop':((header_height/2)-(et_pb_first_row_slider_arrow_height/2))});et_pb_first_row_slide_container_height_new=0
$et_pb_first_row_first_module.find('.et_pb_slide').each(function(){var $et_pb_first_row_first_module_slide_item=$(this),$et_pb_first_row_first_module_slide_container=$et_pb_first_row_first_module_slide_item.find('.et_pb_container');$et_pb_first_row_first_module_slide_item.show();$et_pb_first_row_first_module_slide_container.css({'min-height':''});var et_pb_first_row_slide_container_height=$et_pb_first_row_first_module_slide_container.innerHeight();if(et_pb_first_row_slide_container_height_new<et_pb_first_row_slide_container_height){et_pb_first_row_slide_container_height_new=et_pb_first_row_slide_container_height;}
if($et_pb_first_row_first_module_slide_item.is(':not(".et-pb-active-slide")')){$et_pb_first_row_first_module_slide_item.hide();}});$et_pb_first_row_first_module_slide_container.css({'min-height':et_pb_first_row_slide_container_height_new});}else if($et_pb_first_row_first_module.is('.et_pb_fullwidth_header')){$et_pb_first_row_first_module.removeAttr('style');var et_pb_first_row_first_module_fullwidth_header_padding_top=parseInt($et_pb_first_row_first_module.css('paddingTop'));$et_pb_first_row_first_module.css({'paddingTop':(header_height+et_pb_first_row_first_module_fullwidth_header_padding_top)});}else if($et_pb_first_row_first_module.is('.et_pb_fullwidth_portfolio')){$et_pb_first_row_first_module.css({'paddingTop':header_height});}else if($et_pb_first_row_first_module.is('.et_pb_map_container')){var $et_pb_first_row_map=$et_pb_first_row_first_module.find('.et_pb_map');$et_pb_first_row_map.css({'height':''});$et_pb_first_row_first_module.find('.et_pb_map').css({'height':header_height+parseInt($et_pb_first_row_map.css('height'))});$et_pb_first_row_first_module.addClass('et_beneath_transparent_nav');}else if($et_pb_first_row_first_module.is('.et_pb_fullwidth_menu')){$et_pb_first_row_first_module.css({'marginTop':header_height});}else if($et_pb_first_row_first_module.is('.et_pb_fullwidth_code')){var $et_pb_first_row_first_module_code=$et_pb_first_row_first_module;$et_pb_first_row_first_module_code.css({'paddingTop':''});var et_pb_first_row_first_module_code_padding_top=parseInt($et_pb_first_row_first_module_code.css('paddingTop'));$et_pb_first_row_first_module_code.css({'paddingTop':header_height+et_pb_first_row_first_module_code_padding_top});}else if($et_pb_first_row_first_module.is('.et_pb_post_title')){var $et_pb_first_row_first_module_title=$et_pb_first_row_first_module;$et_pb_first_row_first_module_title.css({'paddingTop':header_height+50});}}else if(is_pb){$et_pb_first_row.css({'paddingTop':''});et_pb_first_row_padding_top=header_height+parseInt($et_pb_first_row.css('paddingBottom'));$et_pb_first_row.css({'paddingTop':et_pb_first_row_padding_top});}else if(is_no_pb_mobile){$et_main_content_first_row.css({'paddingTop':header_height});}else{$('#main-content .container:first-child').css({'paddingTop':header_height});}
if(!$('#et_fix_page_container_position').length){$('<style />',{'id':'et_fix_page_container_position','text':'#page-container{ padding-top: 0 !important;}'}).appendTo('head');}}else if(et_is_fixed_nav){$main_container_wrapper.css('paddingTop',header_height);}
et_change_primary_nav_position(0);}
$et_container.data('previous-width',$et_container.width());$(window).resize(function(){var window_width=$et_window.width(),et_container_previous_width=$et_container.data('previous-width'),et_container_css_width=$et_container.css('width'),et_container_width_in_pixel=(typeof et_container_css_width!=='undefined')?et_container_css_width.substr(-1,1)!=='%':'',et_container_actual_width=(et_container_width_in_pixel)?$et_container.width():(($et_container.width()/100)*window_width),containerWidthChanged=et_container_previous_width!==et_container_actual_width,$slide_menu_container=$('.et_slide_in_menu_container');if(et_is_fixed_nav&&containerWidthChanged){if(typeof update_page_container_position!='undefined'){clearTimeout(update_page_container_position);}
var update_page_container_position=setTimeout(function(){et_fix_page_container_position();if(typeof et_fix_fullscreen_section==='function'){et_fix_fullscreen_section();}},200);$et_container.data('previous-width',et_container_actual_width);}
if(et_hide_nav){et_hide_nav_transofrm();}
if($('#wpadminbar').length&&et_is_fixed_nav&&window_width>=740&&window_width<=782){et_calculate_header_values();et_change_primary_nav_position(0);}
et_set_search_form_css();if($slide_menu_container.length&&!$('body').hasClass('et_pb_slide_menu_active')){$slide_menu_container.css({right:'-'+$slide_menu_container.innerWidth()+'px'});if($('body').hasClass('et_boxed_layout')&&et_is_fixed_nav){var page_container_margin=$main_container_wrapper.css('margin-left');$main_header.css({left:page_container_margin});}}
if($slide_menu_container.length&&$('body').hasClass('et_pb_slide_menu_active')){if($('body').hasClass('et_boxed_layout')){var page_container_margin=parseFloat($main_container_wrapper.css('margin-left')),left_position;$main_container_wrapper.css({left:'-'+($slide_menu_container.innerWidth()-page_container_margin)+'px'});if(et_is_fixed_nav){left_position=0>$slide_menu_container.innerWidth()-(page_container_margin*2)?Math.abs($slide_menu_container.innerWidth()-(page_container_margin*2)):'-'+($slide_menu_container.innerWidth()-(page_container_margin*2));if(left_position<$slide_menu_container.innerWidth()){$main_header.css({left:left_position+'px'});}}}else{$('#page-container, .et_fixed_nav #main-header').css({left:'-'+$slide_menu_container.innerWidth()+'px'});}}
if($slide_menu_container.length&&$('body').hasClass('et_header_style_fullscreen')){var top_bar_height=$slide_menu_container.find('.et_slide_menu_top').innerHeight();$slide_menu_container.css({'padding-top':top_bar_height+20});}});$(window).ready(function(){if($.fn.fitVids){$('#main-content').fitVids({customSelector:"iframe[src^='http://www.hulu.com'], iframe[src^='http://www.dailymotion.com'], iframe[src^='http://www.funnyordie.com'], iframe[src^='https://embed-ssl.ted.com'], iframe[src^='http://embed.revision3.com'], iframe[src^='https://flickr.com'], iframe[src^='http://blip.tv'], iframe[src^='http://www.collegehumor.com']"});}});$(window).load(function(){if(et_is_fixed_nav){et_calculate_header_values();}
et_fix_page_container_position();if(et_header_style_left&&!et_vertical_navigation){$logo_width=$('#logo').width();if(et_is_rtl){$et_top_navigation.css('padding-right',$logo_width+30);}else{$et_top_navigation.css('padding-left',$logo_width+30);}}
if($('p.demo_store').length){$('#footer-bottom').css('margin-bottom',$('p.demo_store').innerHeight());}
if($.fn.waypoint){if(et_is_vertical_fixed_nav){var $waypoint_selector=$('#main-content');$waypoint_selector.waypoint({handler:function(direction){et_fix_logo_transition();if(direction==='down'){$('#main-header').addClass('et-fixed-header');}else{$('#main-header').removeClass('et-fixed-header');}}});}
if(et_is_fixed_nav){if($et_transparent_nav.length&&!$et_vertical_nav.length&&$et_pb_first_row.length){if($et_pb_first_row.is('.et_pb_fullwidth_section')){var $waypoint_selector=$et_pb_first_row.children('.et_pb_module');}else{var $waypoint_selector=$et_pb_first_row.find('.et_pb_row');}}else if($et_transparent_nav.length&&!$et_vertical_nav.length&&$et_main_content_first_row.length){var $waypoint_selector=$('#content-area');}else{var $waypoint_selector=$('#main-content');}
$waypoint_selector.waypoint({offset:function(){if(etRecalculateOffset){setTimeout(function(){et_calculate_header_values();},200);etRecalculateOffset=false;}
if(et_hide_nav){return et_header_offset-et_header_height-200;}else{var waypoint_selector_offset=$waypoint_selector.offset();if(waypoint_selector_offset.top<et_header_offset){et_header_offset=0-(et_header_offset-waypoint_selector_offset.top);}
return et_header_offset;}},handler:function(direction){et_fix_logo_transition();if(direction==='down'){$main_header.addClass('et-fixed-header');$main_container_wrapper.addClass('et-animated-content');$top_header.addClass('et-fixed-header');if(!et_hide_nav&&!$et_transparent_nav.length&&!$('.mobile_menu_bar_toggle').is(':visible')){var secondary_nav_height=$top_header.height(),et_is_vertical_nav=$('body').hasClass('et_vertical_nav'),$clone_header,clone_header_height,fix_padding;$clone_header=$main_header.clone().addClass('et-fixed-header, et_header_clone').css({'transition':'none','display':'none'});clone_header_height=$clone_header.prependTo('body').height();if(!et_is_vertical_nav){fix_padding=parseInt($main_container_wrapper.css('padding-top'))-clone_header_height-secondary_nav_height+1;$main_container_wrapper.css('margin-top',-fix_padding);}
$('.et_header_clone').remove();}}else{$main_header.removeClass('et-fixed-header');$top_header.removeClass('et-fixed-header');$main_container_wrapper.css('margin-top','-1px');}
setTimeout(function(){et_set_search_form_css();},400);}});}
if(et_hide_nav){et_hide_nav_transofrm();}}});$('a[href*=#]:not([href=#])').click(function(){var $this_link=$(this),has_closest_smooth_scroll_disabled=$this_link.closest('.et_smooth_scroll_disabled').length,has_closest_woocommerce_tabs=($this_link.closest('.woocommerce-tabs').length&&$this_link.closest('.tabs').length),has_closest_eab_cal_link=$this_link.closest('.eab-shortcode_calendar-navigation-link').length,has_acomment_reply=$this_link.hasClass('acomment-reply'),disable_scroll=has_closest_smooth_scroll_disabled||has_closest_woocommerce_tabs||has_closest_eab_cal_link||has_acomment_reply;if((location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname)&&!disable_scroll){var target=$(this.hash);target=target.length?target:$('[name='+this.hash.slice(1)+']');if(target.length){et_pb_smooth_scroll(target,false,800);if(!$('#main-header').hasClass('et-fixed-header')&&$('body').hasClass('et_fixed_nav')&&$(window).width()>980){setTimeout(function(){et_pb_smooth_scroll(target,false,40,'linear');},780);}
return false;}}});if($('.et_pb_section').length>1&&$('.et_pb_side_nav_page').length){var $i=0;$('#main-content').append('<ul class="et_pb_side_nav"></ul>');$('.et_pb_section').each(function(){if($(this).height()>0){$active_class=$i==0?'active':'';$('.et_pb_side_nav').append('<li class="side_nav_item"><a href="#" id="side_nav_item_id_'+$i+'" class= "'+$active_class+'">'+$i+'</a></li>');$(this).addClass('et_pb_scroll_'+$i);$i++;}});$side_nav_offset=($i*20+40)/2;$('ul.et_pb_side_nav').css('marginTop','-'+parseInt($side_nav_offset)+'px');$('.et_pb_side_nav').addClass('et-visible');$('.et_pb_side_nav a').click(function(){$top_section=($(this).text()=="0")?true:false;$target=$('.et_pb_scroll_'+$(this).text());et_pb_smooth_scroll($target,$top_section,800);if(!$('#main-header').hasClass('et-fixed-header')&&$('body').hasClass('et_fixed_nav')&&$(window).width()>980){setTimeout(function(){et_pb_smooth_scroll($target,$top_section,200);},500);}
return false;});$(window).scroll(function(){$add_offset=($('body').hasClass('et_fixed_nav'))?20:-90;if($('#wpadminbar').length&&$(window).width()>600){$add_offset+=$('#wpadminbar').outerHeight();}
$side_offset=($('body').hasClass('et_vertical_nav'))?$('#top-header').height()+$add_offset+60:$('#top-header').height()+$('#main-header').height()+$add_offset;for(var $i=0;$i<=$('.side_nav_item a').length-1;$i++){if($(window).scrollTop()+$(window).height()==$(document).height()){$last=$('.side_nav_item a').length-1;$('.side_nav_item a').removeClass('active');$('a#side_nav_item_id_'+$last).addClass('active');}else{if($(this).scrollTop()>=$('.et_pb_scroll_'+$i).offset().top-$side_offset){$('.side_nav_item a').removeClass('active');$('a#side_nav_item_id_'+$i).addClass('active');}}}});}
if($('.et_pb_scroll_top').length){$(window).scroll(function(){if($(this).scrollTop()>800){$('.et_pb_scroll_top').show().removeClass('et-hidden').addClass('et-visible');}else{$('.et_pb_scroll_top').removeClass('et-visible').addClass('et-hidden');}});$('.et_pb_scroll_top').click(function(){$('html, body').animate({scrollTop:0},800);});}
if($('.comment-reply-link').length){$('.comment-reply-link').addClass('et_pb_button');}
$('#et_top_search').click(function(){var $search_container=$('.et_search_form_container');$('.et_menu_container').removeClass('et_pb_menu_visible').removeClass('et_pb_no_animation').addClass('et_pb_menu_hidden');$search_container.removeClass('et_pb_search_form_hidden').removeClass('et_pb_no_animation').addClass('et_pb_search_visible');setTimeout(function(){$('.et_menu_container').addClass('et_pb_no_animation');$search_container.addClass('et_pb_no_animation');},1000);$search_container.find('input').focus();et_set_search_form_css();});function et_hide_search(){$('.et_menu_container').removeClass('et_pb_menu_hidden').removeClass('et_pb_no_animation').addClass('et_pb_menu_visible');$('.et_search_form_container').removeClass('et_pb_search_visible').removeClass('et_pb_no_animation').addClass('et_pb_search_form_hidden');setTimeout(function(){$('.et_menu_container').addClass('et_pb_no_animation');$('.et_search_form_container').addClass('et_pb_no_animation');},1000);}
function et_set_search_form_css(){var $search_container=$('.et_search_form_container');var $body=$('body');if($search_container.hasClass('et_pb_search_visible')){var header_height=$('#main-header').innerHeight(),menu_width=$('#top-menu').width(),font_size=$('#top-menu li a').css('font-size');$search_container.css({'height':header_height+'px'});$search_container.find('input').css('font-size',font_size);if(!$body.hasClass('et_header_style_left')){$search_container.css('max-width',menu_width+60);}else{$search_container.find('form').css('max-width',menu_width+60);}}}
$('.et_close_search_field').click(function(){et_hide_search();});$(document).mouseup(function(e){var $header=$('#main-header');if($('.et_menu_container').hasClass('et_pb_menu_hidden')){if(!$header.is(e.target)&&$header.has(e.target).length===0){et_hide_search();}}});function et_define_logo_dimension(){var $logo=$('#logo'),logo_src=$logo.attr('src'),is_svg=logo_src.substr(-3,3)==='svg'?true:false,$logo_wrap,logo_width,logo_height;$('body').append($('<div />',{'id':'et-define-logo-wrap','style':'position: fixed; bottom: 0; opacity: 0;'}));$logo_wrap=$('#et-define-logo-wrap');if(is_svg){$logo_wrap.addClass('svg-logo');}
$logo_wrap.html($logo.clone().css({'display':'block'}).removeAttr('id'));logo_width=$logo_wrap.find('img').width();logo_height=$logo_wrap.find('img').height();$logo.attr({'data-actual-width':logo_width,'data-actual-height':logo_height});$logo_wrap.remove();et_fix_logo_transition(true);}
if($('#logo').length){et_define_logo_dimension();}
$('.footer-widget').each(function(){var $footer_widget=$(this),footer_widget_width=$footer_widget.width(),$adsense_ins=$footer_widget.find('.widget_adsensewidget ins');if($adsense_ins.length){$adsense_ins.width(footer_widget_width);}});});function et_fix_logo_transition(is_onload){var $body=$('body'),$logo=$('#logo'),logo_actual_width=parseInt($logo.attr('data-actual-width')),logo_actual_height=parseInt($logo.attr('data-actual-height')),logo_height_percentage=parseInt($logo.attr('data-height-percentage')),$top_nav=$('#et-top-navigation'),top_nav_height=parseInt($top_nav.attr('data-height')),top_nav_fixed_height=parseInt($top_nav.attr('data-fixed-height')),$main_header=$('#main-header'),is_header_split=$body.hasClass('et_header_style_split'),is_fixed_nav=$main_header.hasClass('et-fixed-header'),is_vertical_nav=$body.hasClass('et_vertical_nav'),is_hide_primary_logo=$body.hasClass('et_hide_primary_logo'),is_hide_fixed_logo=$body.hasClass('et_hide_fixed_logo'),is_onload=typeof is_onload==='undefined'?false:is_onload,logo_height_base=is_fixed_nav?top_nav_height:top_nav_fixed_height,logo_wrapper_width,logo_wrapper_height;if(is_header_split&&!is_vertical_nav){if(is_onload){logo_height_base=top_nav_height;}
logo_wrapper_height=(logo_height_base*(logo_height_percentage/100)+22);logo_wrapper_width=logo_actual_width*(logo_wrapper_height/logo_actual_height);if(is_hide_primary_logo&&(is_fixed_nav||is_onload)){logo_wrapper_width=0;}
if(is_hide_fixed_logo&&!is_fixed_nav&&!is_onload){logo_wrapper_width=0;}
$('.et_header_style_split .centered-inline-logo-wrap').css({'width':logo_wrapper_width});}}
function et_toggle_slide_menu(force_state){var $slide_menu_container=$('.et_header_style_slide .et_slide_in_menu_container'),$page_container=$('.et_header_style_slide #page-container, .et_header_style_slide.et_fixed_nav #main-header'),$header_container=$('.et_header_style_slide #main-header'),is_menu_opened=$slide_menu_container.hasClass('et_pb_slide_menu_opened'),set_to=typeof force_state!=='undefined'?force_state:'auto',is_boxed_layout=$('body').hasClass('et_boxed_layout'),page_container_margin=is_boxed_layout?parseFloat($('#page-container').css('margin-left')):0,slide_container_width=$slide_menu_container.innerWidth();if('auto'!==set_to&&((is_menu_opened&&'open'===set_to)||(!is_menu_opened&&'close'===set_to))){return;}
if(is_menu_opened){$slide_menu_container.css({right:'-'+slide_container_width+'px'});$page_container.css({left:'0'});if(is_boxed_layout&&et_is_fixed_nav){$header_container.css({left:page_container_margin+'px'});}
setTimeout(function(){$slide_menu_container.css({'display':'none'});},700);}else{$slide_menu_container.css({'display':'block'});setTimeout(function(){$slide_menu_container.css({right:'0'});$page_container.css({left:'-'+(slide_container_width-page_container_margin)+'px'});if(is_boxed_layout&&et_is_fixed_nav){var left_position=0>slide_container_width-(page_container_margin*2)?Math.abs(slide_container_width-(page_container_margin*2)):'-'+(slide_container_width-(page_container_margin*2));if(left_position<slide_container_width){$header_container.css({left:left_position+'px'});}}},50);}
$('body').toggleClass('et_pb_slide_menu_active');$slide_menu_container.toggleClass('et_pb_slide_menu_opened');}
$('#main-header').on('click','.et_toggle_slide_menu',function(){et_toggle_slide_menu();});$et_window.on('swipeleft',function(event){var window_width=parseInt($et_window.width()),swipe_start=parseInt(event.swipestart.coords[0]);if(30>=window_width-swipe_start){et_toggle_slide_menu('open');}});$et_window.on('swiperight',function(event){if($('body').hasClass('et_pb_slide_menu_active')){et_toggle_slide_menu('close');}});$('#page-container').on('click','.et_toggle_fullscreen_menu',function(){var $menu_container=$('.et_header_style_fullscreen .et_slide_in_menu_container'),top_bar_height=$menu_container.find('.et_slide_menu_top').innerHeight();$menu_container.toggleClass('et_pb_fullscreen_menu_opened');$('body').toggleClass('et_pb_fullscreen_menu_active');if($menu_container.hasClass('et_pb_fullscreen_menu_opened')){$menu_container.addClass('et_pb_fullscreen_menu_animated');$menu_container.css({'padding-top':top_bar_height+20});}else{setTimeout(function(){$menu_container.removeClass('et_pb_fullscreen_menu_animated');},1000);}});$('.et_pb_fullscreen_nav_container').on('click','li.menu-item-has-children > a',function(){var $this_parent=$(this).closest('li'),$this_arrow=$this_parent.find('>a .et_mobile_menu_arrow'),$closest_submenu=$this_parent.find('>ul'),is_opened_submenu=$this_arrow.hasClass('et_pb_submenu_opened'),sub_menu_max_height;$this_arrow.toggleClass('et_pb_submenu_opened');if(is_opened_submenu){$closest_submenu.removeClass('et_pb_slide_dropdown_opened');$closest_submenu.slideToggle(700,'easeInOutCubic');}else{$closest_submenu.slideToggle(700,'easeInOutCubic');$closest_submenu.addClass('et_pb_slide_dropdown_opened');}
return false;});if($('body').hasClass('et_header_style_fullscreen')){var $menu_container=$('.et_header_style_fullscreen .et_slide_in_menu_container');if($menu_container.length){var top_bar_height=$menu_container.find('.et_slide_menu_top').innerHeight();$menu_container.css({'padding-top':top_bar_height+20});}}})(jQuery)
}