!function(e,t,a,r,i,n,s,l,o,_){a(t).ready(function(){var d=a("body"),u=a('[class^="tribe-events-nav-"] a'),p=n.get_url_param("tribe-bar-date"),b=a(t.getElementById("tribe-events")),c=a(t.getElementById("tribe-bar-date")),m=!1;if(!(1>b.length||d.hasClass("single-tribe_events"))){var v="/";void 0!==o.events_base?v=a(t.getElementById("tribe-events-header")).data("baseurl"):u.length&&(v=u.first().attr("href").slice(0,-8)),r.default_permalinks&&(v=v.split("?")[0]),a(".tribe-events-calendar").length&&a(t.getElementById("tribe-events-bar")).length&&p&&p.length>7&&(a(t.getElementById("tribe-bar-date-day")).val(p.slice(-3)),c.val(p.substring(0,7)));var g="yyyy-mm";if("0"!==s.datepicker_format){var f=parseInt(s.datepicker_format),h="m"+s.datepicker_format.toString();g=r.datepicker_formats.month[f],p&&(p.length<=7&&(p+="-01"),c.val(tribeDateFormat(p,h)))}if(r.datepicker_opts={format:g,minViewMode:"months",autoclose:!0},tribe_ev.fn.ensure_datepicker_i18n(),c.bootstrapDatepicker(r.datepicker_opts).on("changeDate",function(e){s.mdate=e.date;var i=e.date.getFullYear(),o=("0"+(e.date.getMonth()+1)).slice(-2);if(m=!0,s.date=i+"-"+o,l.no_bar()||l.live_ajax()&&l.pushstate){if(s.ajax_running||s.updating_picker)return;s.filter_cats?r.cur_url=a(t.getElementById("tribe-events-header")).data("baseurl")+s.date+"/":r.default_permalinks?r.cur_url=v:r.cur_url=v+s.date+"/",s.popping=!1,n.pre_ajax(function(){w()})}}),k(!0),a(i).on("tribe_ev_resizeComplete",function(){k(!0)}),l.pushstate&&!l.map_view()){var y="action=tribe_calendar&eventDate="+a("#tribe-events-header").data("date");r.params.length&&(y=y+"&"+r.params),s.category&&(y=y+"&tribe_event_category="+s.category),n.is_featured()&&(y+="&featured=1"),history.replaceState({tribe_params:y},s.page_title,location.href),a(e).on("popstate",function(e){var t=e.originalEvent.state;t&&(s.do_string=!1,s.pushstate=!1,s.popping=!0,s.params=t.tribe_params,n.pre_ajax(function(){w()}),n.set_form(s.params))})}a(t.getElementById("tribe-events")).on("click",".tribe-events-nav-previous, .tribe-events-nav-next",function(e){if(e.preventDefault(),!s.ajax_running){var t,i=a(this).find("a");s.date=i.data("month"),s.mdate=s.date+"-01","0"!==s.datepicker_format?n.update_picker(tribeDateFormat(s.mdate,h)):n.update_picker(s.date),t=s.filter_cats?a("#tribe-events-header").data("baseurl"):i.attr("href"),r.default_permalinks&&(t=r.cur_url.split("?")[0]),b.is(".tribe-events-shortcode")&&r.default_permalinks&&(t=n.get_base_url()),n.update_base_url(t),s.popping=!1,n.pre_ajax(function(){w()})}}).on("click","td.tribe-events-thismonth a",function(e){e.stopPropagation()}).on("click",'[id*="tribe-events-daynum-"] a',function(e){d.is(".tribe-mobile")&&(e.preventDefault(),x(a(this).closest(".mobile-trigger")))}).on("click",".mobile-trigger",function(e){d.is(".tribe-mobile")&&(e.preventDefault(),e.stopPropagation(),x(a(this)))}),n.snap("#tribe-bar-form","body","#tribe-events-footer .tribe-events-nav-previous, #tribe-events-footer .tribe-events-nav-next"),a("form#tribe-bar-form").on("submit",function(e){!function(e){if("change_view"!=tribe_events_bar_action){if(e.preventDefault(),s.ajax_running)return;c.length?"0"!==s.datepicker_format?s.date=tribeDateFormat(c.bootstrapDatepicker("getDate"),"tribeMonthQuery"):s.date=c.val():m||(s.date=r.cur_date.slice(0,-3)),s.filter_cats?r.cur_url=a("#tribe-events-header").data("baseurl")+s.date+"/":r.default_permalinks?r.cur_url=v:r.cur_url=v+s.date+"/",s.popping=!1,n.pre_ajax(function(){w()})}}(e)}),a(i).on("tribe_ev_runAjax",function(){w()}),a(i).on("tribe_ev_updatingRecurrence",function(){s.date=a("#tribe-events-header").data("date"),s.filter_cats?r.cur_url=a("#tribe-events-header").data("baseurl")+s.date+"/":r.default_permalinks?r.cur_url=v:r.cur_url=v+s.date+"/",s.popping=!1}),_&&tec_debug.info("TEC Debug: tribe-events-ajax-calendar.js successfully loaded, Tribe Events Init finished"),_&&tec_debug.timeEnd("Tribe JS Init Timer")}function x(e){var r=e.data("tribejson");if(void 0!==e.attr("data-day")){r.date=e.attr("data-day");var i,n,s,l,o,_=e.parents(".tribe-events-calendar"),d=_.next(t.getElementById("tribe-mobile-container")),u=d.find(".tribe-mobile-day"),p=_.find(".mobile-trigger"),b='[data-day="'+r.date+'"]',c=u.filter(b);r.has_events=e.hasClass("tribe-events-has-events"),p.removeClass("mobile-active").filter(b).addClass("mobile-active"),u.hide(),c.length?c.show():(d.append(tribe_tmpl("tribe_tmpl_month_mobile_day_header",r)),i=r.date,n=a('.tribe-mobile-day[data-day="'+i+'"]'),s=a('.tribe-events-calendar td[data-day="'+i+'"]'),l=s.find(".tribe-events-viewmore"),(o=s.find(".type-tribe_events")).length&&(o.each(function(){var e=a(this);if(e.tribe_has_attr("data-tribejson")){var t=e.data("tribejson");if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t={}}t&&"eventId"in t&&n.append(tribe_tmpl("tribe_tmpl_month_mobile",t))}}),l.length&&n.append(l.clone())))}}function j(){b.find(".tribe-events-calendar th").each(function(){var e=a(this),t=e.attr("data-day-abbr"),r=e.attr("title");d.is(".tribe-mobile")?e.text(t):e.text(r)})}function k(e){d.is(".tribe-mobile")?(j(),function(){var e=b.find(".mobile-active"),r=b.find(".mobile-trigger"),i=b.find(t.getElementById("tribe-events-content")).find(".tribe-events-calendar");e.length||(e=b.find(".tribe-events-present"));a(t.getElementById("tribe-mobile-container")).length||a('
').insertAfter(i),e.length&&e.is(".tribe-events-thismonth")?x(e):x(r.filter(".tribe-events-thismonth").first())}()):e&&j()}function w(){n.invalid_date(s.date)||(a(".tribe-events-calendar").tribe_spin(),s.pushcount=0,s.ajax_running=!0,s.popping||(s.params={action:"tribe_calendar",eventDate:s.date,featured:n.is_featured()},s.url_params={},s.category&&(s.params.tribe_event_category=s.category,s.url_params.tribe_events_cat=s.category),r.default_permalinks&&(b.is(".tribe-events-shortcode")||(s.url_params.hasOwnProperty("post_type")||(s.url_params.post_type=o.events_post_type),s.url_params.hasOwnProperty("eventDisplay")||(s.url_params.eventDisplay=s.view))),a(i).trigger("tribe_ev_serializeBar"),s.params=a.param(s.params),s.url_params=a.param(s.url_params),a(i).trigger("tribe_ev_collectParams"),s.pushcount>0||s.filters||r.default_permalinks||s.category?(s.do_string=!0,s.pushstate=!1):(s.do_string=!1,s.pushstate=!0)),l.pushstate&&!s.filter_cats?(_&&tec_debug.time("Month View Ajax Timer"),a(i).trigger("tribe_ev_ajaxStart").trigger("tribe_ev_monthView_AjaxStart"),a.post(TribeCalendar.ajaxurl,s.params,function(e){if(s.initial_load=!1,n.enable_inputs("#tribe_events_filters_form","input, select"),e.success){s.ajax_running=!1,r.ajax_response={total_count:"",view:e.view,max_pages:"",tribe_paged:"",timestamp:(new Date).getTime()},_&&0===e.html&&tec_debug.warn("Month view ajax had an error in the query and returned 0.");var l="";l=a.isFunction(a.fn.parseHTML)?a.parseHTML(e.html):e.html,r.cur_url=n.get_base_url(),a("#tribe-events-content").replaceWith(l),k(!0),s.page_title=a("#tribe-events-header").data("title"),s.view_title=a("#tribe-events-header").data("viewtitle"),t.title=s.page_title,a(".tribe-events-page-title").html(s.view_title),(a("#tribe-events.tribe-events-shortcode").length||s.do_string)&&(r.default_permalinks?r.cur_url=r.cur_url+"&"+s.url_params:(-1!==r.cur_url.indexOf("?")&&(r.cur_url=r.cur_url.split("?")[0]),r.cur_url=r.cur_url+"?"+s.url_params)),s.do_string&&history.pushState({tribe_date:s.date,tribe_params:s.params},s.page_title,r.cur_url),s.pushstate&&history.pushState({tribe_date:s.date,tribe_params:s.params},s.page_title,r.cur_url),a(i).trigger("tribe_ev_ajaxSuccess").trigger("tribe_ev_monthView_ajaxSuccess"),a(i).trigger("ajax-success.tribe").trigger("tribe_ev_monthView_ajaxSuccess"),_&&tec_debug.timeEnd("Month View Ajax Timer")}})):s.url_params.length?e.location=r.cur_url+"?"+s.url_params:e.location=r.cur_url)}})}(window,document,jQuery,tribe_ev.data,tribe_ev.events,tribe_ev.fn,tribe_ev.state,tribe_ev.tests,tribe_js_config,tribe_debug); (function($){ window.et_pb_smooth_scroll=function($target, $top_section, speed, easing){ var $window_width=$(window).width(); if($('body').hasClass('et_fixed_nav')&&$window_width > 980){ $menu_offset=$('#top-header').outerHeight() + $('#main-header').outerHeight() - 1; }else{ $menu_offset=-1; } if($ ('#wpadminbar').length&&$window_width > 600){ $menu_offset +=$('#wpadminbar').outerHeight(); } if($top_section){ $scroll_position=0; }else{ $scroll_position=$target.offset().top - $menu_offset; } if(typeof easing==='undefined'){ easing='swing'; } $('html, body').animate({ scrollTop:$scroll_position }, speed, easing); } window.et_fix_video_wmode=function(video_wrapper){ $(video_wrapper).each(function(){ if($(this).find('iframe').length){ var $this_el=$(this).find('iframe'), src_attr=$this_el.attr('src'), wmode_character=src_attr.indexOf('?')==-1 ? '?':'&', this_src=src_attr + wmode_character + 'wmode=opaque'; $this_el.attr('src', this_src); }}); } window.et_pb_form_placeholders_init=function($form){ $form.find('input:text, 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(){ $('#et_mobile_nav_menu .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)); }); }})(jQuery); var sbi_js_exists=(typeof sbi_js_exists!=='undefined')?!0:!1;if(!sbi_js_exists){(function(){"use strict";var e=Array.prototype.slice;try{e.call(document.documentElement)}catch(t){Array.prototype.slice=function(t,n){n=typeof n!=="undefined"?n:this.length;if(Object.prototype.toString.call(this)==="[object Array]"){return e.call(this,t,n)}var r,i=[],s,o=this.length;var u=t||0;u=u>=0?u:o+u;var a=n?n:o;if(n<0){a=o+n}s=a-u;if(s>0){i=new Array(s);if(this.charAt){for(r=0;r
'} if($self.find('.sbi_header_link').length==0)$self.find('.sb_instagram_header').prepend($header);if($self.find('.sbi_follow_btn').length)$self.find('.sbi_follow_btn a').attr('href','https://www.instagram.com/'+data.data.username);if(feedOptions.headerstyle=='boxed'&&$self.find('.sbi_header_follow_btn').length)$self.find('.sbi_header_follow_btn span').text($self.find('.sb_instagram_header').attr('data-follow-text').replace(/\\/g,""));$self.find('.sb_instagram_header .sbi_header_link').hover(function(){$self.find('.sb_instagram_header .sbi_header_img_hover').addClass('sbi_fade_in')},function(){$self.find('.sb_instagram_header .sbi_header_img_hover').removeClass('sbi_fade_in')});sbSVGify($self.find('.sb_instagram_header'))} function sbiFetchData(next_url,transientName,sbiSettings,$self){apiURLs=next_url;var urlCount=apiURLs.length,getType=sbiSettings.getType;if(urlCount==0){if(imagesArrCount+parseInt(sbiSettings.num)>=imagesArr.data.length){jQuery('#sbi_load .sbi_load_btn').hide()}}else{var returnedImages=[],numberOfRequests=urlCount;jQuery.each(apiURLs,function(index,entry){jQuery.ajax({method:"GET",url:entry,dataType:"jsonp",success:function(data){var sbiErrorResponse=data.meta.error_message,sbiErrorMsg='',sbiErrorDir='';if(typeof sbiErrorResponse!=='undefined'){sbiErrorMsg+='

  Instagram Feed Error

';if(sbiErrorResponse.indexOf('access_token')>-1){sbiErrorMsg+='

Error: Access Token is not valid or has expired
This error message is only visible to WordPress admins

';sbiErrorDir="

There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.
If you continue to have an issue with your Access Token then please see
this FAQ for more information.

";jQuery('#sb_instagram').empty().append('

Unable to show Instagram photos

'+sbiErrorMsg+sbiErrorDir+'
');sbiAddTokenToExpiredList(sb_instagram_js_options.sb_instagram_at,transientName);var submittedData={action:'sbi_set_use_backup',transientName:transientName,context:'falsecache'};jQuery.ajax({url:sbiajaxurl,type:'post',data:submittedData,success:function(data){}});return}else if(sbiErrorResponse.indexOf('retired')>-1){sbiErrorMsg+='

No longer possible to display this feed
This error message is only visible to WordPress admins

';sbiErrorDir="

Due to changes in the Instagram API, it is no longer possible to display a feed from an Instagram account which is not your own. You can now only display your own Instagram account. Please see this post for more information.

";jQuery('#sb_instagram').empty().append('

Unable to show Instagram photos

'+sbiErrorMsg+sbiErrorDir+'
');return}else if(typeof data.code!=='undefined'&&data.code=='429'){window.sbiFeedMeta[$i].error={errorMsg:'

Error: Rate Limit Reached
This error is only visible to WordPress admins',errorDir:"

Backup cache will be used for 1 hour

"};if(!$self.find('#sbi_mod_error').length){$self.prepend('
'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'
')}else if($self.find('.sbiErrorIds').text().indexOf(window.sbiFeedMeta[$i].idsInFeed[index])==-1){$self.find('.sbiErrorIds').append(','+window.sbiFeedMeta[$i].idsInFeed[index])} var submittedData={action:'sbi_set_use_backup',transientName:transientName,context:'falsecache'};jQuery.ajax({url:sbiajaxurl,type:'post',data:submittedData,success:function(data){}});data='error'}else if(sbiErrorResponse.indexOf('user does not exist')>-1||sbiErrorResponse.indexOf('you cannot view this resource')>-1){window.sbiFeedMeta[$i].error={errorMsg:'

Error: User ID '+window.sbiFeedMeta[$i].idsInFeed[index]+' does not exist, is invalid, or is private
This error is only visible to WordPress admins',errorDir:"

Please double check that the Instagram User ID you are using is valid and not from a private account. To find your User ID simply enter your Instagram user name into this tool.

"};if(!$self.find('#sbi_mod_error').length){$self.prepend('
'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'
')}else if($self.find('.sbiErrorIds').text().indexOf(window.sbiFeedMeta[$i].idsInFeed[index])==-1){$self.find('.sbiErrorIds').append(','+window.sbiFeedMeta[$i].idsInFeed[index])} data='error'}else if(sbiErrorResponse.indexOf('invalid media id')>-1){window.sbiFeedMeta[$i].error={errorMsg:'

Error: Post Id '+window.sbiFeedMeta[$i].idsInFeed[index]+' does not exist or is invalid
This error is only visible to WordPress admins.',errorDir:"

Please double check the media (post) id is correct.

"};if(!$self.find('#sbi_mod_error').length){$self.prepend('
'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'
')}else if($self.find('.sbiErrorIds').text().indexOf(window.sbiFeedMeta[$i].idsInFeed[index])==-1){$self.find('.sbiErrorIds').append(','+window.sbiFeedMeta[$i].idsInFeed[index])} data='error'}} if(getType=='coordinates')data.pagination={'previous_url':entry};if(data!=='error')returnedImages.push(data);numberOfRequests--;if(numberOfRequests==0&&photosAvailable!=='finished')sbiImagesReady(getType)}})});function sbiImagesReady(getType){var paginationArr=[],returnedImagesArr=[];jQuery.each(returnedImages,function(index,object){if(getType=='single'){object.data=[object.data]} if(typeof object.data!=='undefined'){jQuery.each(object.data,function(index,image){if(jQuery.inArray(image.id,photoIds)>-1){}else{photoIds.push(image.id);returnedImagesArr.push(image)}});if(getType=='coordinates'){var lastCreatedTime=object.data[object.data.length-1].created_time,existing_url=object.pagination.previous_url,existing_url_parts=existing_url.split('max_timestamp='),new_url=existing_url_parts[0]+'max_timestamp='+lastCreatedTime;paginationArr.push(new_url)}else{if(typeof object.pagination==='object'&&!!object.pagination&&typeof object.pagination.next_url!=='undefined')paginationArr.push(object.pagination.next_url)}}});if(sortby!=='random'){returnedImagesArr.sort(function(x,y){return y.created_time-x.created_time})}else{returnedImagesArr.sort(function(a,b){return(Math.round(Math.random())-0.5)});transientName+='!'} if(typeof returnedImages!=='undefined')returnedImages[0].data=returnedImagesArr;if(typeof returnedImages[0].pagination!=='undefined'&&!!returnedImages[0].pagination){returnedImages[0].pagination.next_url=paginationArr}else{returnedImages[0].pagination={"next_url":""}} var allImages=returnedImages[0];if(photosAvailable!=='finished')sbiBuildFeed(allImages,transientName,sbiSettings,$self);apiRequests++}}} function sbiGetCache(transientName,sbiSettings,$self,cacheWhat,apiURLs){var transientData=transientName;window.sbiCommentCacheStatus=0;var thisIndex=$self[0].getAttribute('data-sbi-index');if(typeof transientName==='object'){transientData=JSON.stringify(transientName)} var getCacheOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'get_cache',transientName:transientData,useBackupHeader:window.sbiUseBackup[thisIndex].header,useBackupFeed:window.sbiUseBackup[thisIndex].feed},success:function(data){data=decodeURI(data);data=data.replace(/\\'/g,"'");data=data.replace(/\\'/g,"'");var jsonobj=JSON.parse(data);if(cacheWhat=='all'){if(typeof jsonobj.header.error==='undefined'){sbiBuildHeader(jsonobj.header,sbiSettings)} if(typeof jsonobj.feed.error==='undefined'){if(photosAvailable!=='finished')sbiBuildFeed(jsonobj.feed,transientName,sbiSettings,$self);if(typeof jsonobj.warning!=='undefined'){var sbiErrorMsg='

Cache Error: Looking for cache that doesn\'t exist. Now using a backup feed.
This error is only visible to WordPress admins.';var sbiErrorDir="

If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'

";jQuery('#sb_instagram').before('
'+sbiErrorMsg+sbiErrorDir+'
')}}else{feedOptions=JSON.parse($self[0].getAttribute('data-options'));var thisIndex=$self[0].getAttribute('data-sbi-index');feedOptions.feedIndex=thisIndex;if(window.sbiCacheStatuses[thisIndex].feed!==!1&&jsonobj.feed.error==='tryfetch'){window.sbiCacheStatuses[thisIndex].feed=!1;if(!$self.find('.sb_instagram_header .sbi_header_text').length){window.sbiCacheStatuses[thisIndex].header=!1} window.sbiCacheStatuses[thisIndex].comments='no';feedOptions.tryFetch=!0;if(typeof window.sbiCacheStatuses[feedOptions.feedIndex].tryFetch==='undefined')sbiCreateFeed($self[0],feedOptions)}else if(window.sbiCacheStatuses[thisIndex].feed===!0){var sbiErrorMsg='

Cache Error: Looking for cache that doesn\'t exist
This error is only visible to WordPress admins.';var sbiErrorDir="

If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'

";jQuery('#sb_instagram').empty().append('

Unable to show Instagram photos

'+sbiErrorMsg+sbiErrorDir+'
');var submittedData={action:'sbi_set_use_backup',transientName:transientName,context:'falsecache'};jQuery.ajax({url:sbiajaxurl,type:'post',data:submittedData,success:function(data){}})}} if(jsonobj.header.error==='tryfetch'){feedOptions=JSON.parse($self[0].getAttribute('data-options'));var thisIndex=$self[0].getAttribute('data-sbi-index');feedOptions.feedIndex=thisIndex;if(window.sbiCacheStatuses[thisIndex].header!==!1){if(!$self.find('.sb_instagram_header .sbi_header_text').length){window.sbiCacheStatuses[thisIndex].header=!1;feedOptions.tryFetch=!0;if(typeof window.sbiCacheStatuses[feedOptions.feedIndex].tryFetch==='undefined')sbiCreateFeed($self[0],feedOptions)}}} if(typeof jsonobj.comments.error==='undefined'){sb_instagram_js_options.sbiPageCommentCache=jsonobj.comments}}else{if(cacheWhat=='header'){sbiBuildHeader(jsonobj,sbiSettings)}else{if(photosAvailable!=='finished')sbiBuildFeed(jsonobj,transientName,sbiSettings,$self)}}},error:function(xhr,textStatus,e){console.log(e);return}};jQuery.ajax(getCacheOpts)}}})}} function sbiAddTokenToExpiredList(access_token,transientName){var accessTokenOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'sbi_set_expired_token',access_token:access_token,transientName:transientName},success:function(response){return},error:function(xhr,textStatus,e){console.log(e);return}};jQuery.ajax(accessTokenOpts)} function sbiCachePhotos(images,transientName){var jsonstring=JSON.stringify(images);jsonstring=encodeURI(jsonstring);if(jsonstring.indexOf('%7B%22')===0){var setCacheOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'cache_photos',photos:jsonstring,transientName:transientName,},success:function(response){if(response.indexOf('too much filtering')>-1){var useBackupOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'set_use_backup',transientName:transientName,},success:function(response){console.log(response)}};jQuery.ajax(useBackupOpts)} return},error:function(xhr,textStatus,e){console.log(e);return}};jQuery.ajax(setCacheOpts)}} function sbiGetColumnCount($self,cols,colsmobile){var sbi_num_cols=cols,sbiWindowWidth=window.innerWidth;if($self.hasClass('sbi_mob_col_auto')){if(sbiWindowWidth<640&&(parseInt(cols)>2&&parseInt(cols)<7))sbi_num_cols=2;if(sbiWindowWidth<640&&(parseInt(cols)>6&&parseInt(cols)<11))sbi_num_cols=4;if(sbiWindowWidth<=480&&parseInt(cols)>2)sbi_num_cols=1}else if(sbiWindowWidth<=480){sbi_num_cols=colsmobile} return sbi_num_cols} function sbiGetWidthForResType(type){switch(type){case 'thumbnail':return 150;case 'low_resolution':return 320;default:return 640}} function sbiGetBestResolutionForAuto(colWidth,imageWidth,imageHeight,isHighlight){var aspectRatio=Math.max(1,imageWidth/imageHeight),bestWidth=colWidth*aspectRatio,bestWidthRounded=Math.ceil(bestWidth/10)*10,customSizes=[150,320,640];if(isHighlight){bestWidthRounded=bestWidthRounded*2} if(customSizes.indexOf(parseInt(bestWidthRounded))===-1){var done=!1;jQuery.each(customSizes,function(index,item){if(item>parseInt(bestWidthRounded)&&!done){bestWidthRounded=item;done=!0}})} return bestWidthRounded} function sbiNeedToRaiseRes(width,oldRes){return(width>oldRes)} function sbiGetResolutionSettings($self,imgRes,cols,colsmobile,$i){var photoPadding=parseInt(($self.find('#sbi_images').outerWidth()-$self.find('#sbi_images').width()))/2,cols=sbiGetColumnCount($self,parseInt(cols),parseInt(colsmobile)),colWidth=($self.innerWidth()/cols)-photoPadding,imgResReturn={'type':'low_resolution','width':''};switch(imgRes){case 'auto':imgResReturn.type='auto';imgResReturn.width=colWidth;break;case 'thumb':imgResReturn.type='thumbnail';break;case 'medium':imgResReturn.type='low_resolution';break;default:imgResReturn.type='standard_resolution'} if(typeof window.sbiFeedMeta[$i].minRes==='undefined'){window.sbiFeedMeta[$i].minRes=imgResReturn.type==='auto'?sbiGetBestResolutionForAuto(colWidth,imgResReturn.width,imgResReturn.width,$self.hasClass('sbi_highlight')):sbiGetWidthForResType(imgResReturn.type)} return imgResReturn} function sbi_cache_all(imagesArr,transientName){if(transientName.indexOf('header')&&typeof imagesArr.data.pagination==='undefined'){sbiCachePhotos(imagesArr,transientName)}else if(!transientName.indexOf('header')&&typeof imagesArr.data.pagination!=='undefined'){sbiCachePhotos(imagesArr,transientName)}} jQuery(document).ready(function(){window.sbiCommentCacheStatus=0;sbi_init(function(imagesArr,transientName){sbi_cache_all(imagesArr,transientName)})})}; !function(){"use strict";function e(e){function t(t,n){var s,h,k=t==window,y=n&&n.message!==undefined?n.message:undefined;if(!(n=e.extend({},e.blockUI.defaults,n||{})).ignoreIfBlocked||!e(t).data("blockUI.isBlocked")){if(n.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,n.overlayCSS||{}),s=e.extend({},e.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor="pointer"),h=e.extend({},e.blockUI.defaults.themedCSS,n.themedCSS||{}),y=y===undefined?n.message:y,k&&p&&o(window,{fadeOut:0}),y&&"string"!=typeof y&&(y.parentNode||y.jquery)){var m=y.jquery?y[0]:y,g={};e(t).data("blockUI.history",g),g.el=m,g.parent=m.parentNode,g.display=m.style.display,g.position=m.style.position,g.parent&&g.parent.removeChild(m)}e(t).data("blockUI.onUnblock",n.onUnblock);var v,I,w,U,x=n.baseZ;v=e(r||n.forceIframe?'':''),I=e(n.theme?'':''),n.theme&&k?(U='"):n.theme?(U='"):U=k?'':'',w=e(U),y&&(n.theme?(w.css(h),w.addClass("ui-widget-content")):w.css(s)),n.theme||I.css(n.overlayCSS),I.css("position",k?"fixed":"absolute"),(r||n.forceIframe)&&v.css("opacity",0);var C=[v,I,w],S=e(k?"body":t);e.each(C,function(){this.appendTo(S)}),n.theme&&n.draggable&&e.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var O=f&&(!e.support.boxModel||e("object,embed",k?null:t).length>0);if(u||O){if(k&&n.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(u||!e.support.boxModel)&&!k)var E=a(t,"borderTopWidth"),T=a(t,"borderLeftWidth"),M=E?"(0 - "+E+")":0,B=T?"(0 - "+T+")":0;e.each(C,function(e,t){var o=t[0].style;if(o.position="absolute",e<2)k?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),k?o.setExpression("width",'jQuery.support.boxModel&&document.documentElement.clientWidth||document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),B&&o.setExpression("left",B),M&&o.setExpression("top",M);else if(n.centerY)k&&o.setExpression("top",'(document.documentElement.clientHeight||document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah=document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "px"'),o.marginTop=0;else if(!n.centerY&&k){var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "+(n.css&&n.css.top?parseInt(n.css.top,10):0)+') + "px"';o.setExpression("top",i)}})}if(y&&(n.theme?w.find(".ui-widget-content").append(y):w.append(y),(y.jquery||y.nodeType)&&e(y).show()),(r||n.forceIframe)&&n.showOverlay&&v.show(),n.fadeIn){var j=n.onBlock?n.onBlock:c,H=n.showOverlay&&!y?j:c,z=y?j:c;n.showOverlay&&I._fadeIn(n.fadeIn,H),y&&w._fadeIn(n.fadeIn,z)}else n.showOverlay&&I.show(),y&&w.show(),n.onBlock&&n.onBlock.bind(w)();if(i(1,t,n),k?(p=w[0],b=e(n.focusableElements,p),n.focusInput&&setTimeout(l,20)):d(w[0],n.centerX,n.centerY),n.timeout){var W=setTimeout(function(){k?e.unblockUI(n):e(t).unblock(n)},n.timeout);e(t).data("blockUI.timeout",W)}}}function o(t,o){var s,l=t==window,d=e(t),a=d.data("blockUI.history"),c=d.data("blockUI.timeout");c&&(clearTimeout(c),d.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),i(0,t,o),null===o.onUnblock&&(o.onUnblock=d.data("blockUI.onUnblock"),d.removeData("blockUI.onUnblock"));var r;r=l?e(document.body).children().filter(".blockUI").add("body > .blockUI"):d.find(">.blockUI"),o.cursorReset&&(r.length>1&&(r[1].style.cursor=o.cursorReset),r.length>2&&(r[2].style.cursor=o.cursorReset)),l&&(p=b=null),o.fadeOut?(s=r.length,r.stop().fadeOut(o.fadeOut,function(){0==--s&&n(r,a,o,t)})):n(r,a,o,t)}function n(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),d=l.width(),a=l[0].style.width;l.width(d-1).width(d),l[0].style.width=a}}function i(t,o,n){var i=o==window,l=e(o);if((t||(!i||p)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var d="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(d,n,s):e(document).unbind(d,s)}}function s(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&p&&t.data.constrainTabKey){var o=b,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){l(i)},10),!1}var s=t.data,d=e(t.target);return d.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick(t),d.parents("div."+s.blockMsgClass).length>0||0===d.parents().children().filter("div.blockUI").length}function l(e){if(b){var t=b[!0===e?b.length-1:0];t&&t.focus()}}function d(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-a(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-a(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0"),o&&(i.top=l>0?l+"px":"0")}function a(t,o){return parseInt(e.css(t,o),10)||0}e.fn._fadeIn=e.fn.fadeIn;var c=e.noop||function(){},r=/MSIE/.test(navigator.userAgent),u=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),f=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){t(window,e)},e.unblockUI=function(e){o(window,e)},e.growlUI=function(t,o,n,i){var s=e('
');t&&s.append("

"+t+"

"),o&&s.append("

"+o+"

"),n===undefined&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.mouseover(function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(o){if(this[0]===window)return e.blockUI(o),this;var n=e.extend({},e.blockUI.defaults,o||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,o)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){o(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"

Please wait...

",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var p=null,b=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(); jQuery(function(e){if("undefined"==typeof wc_add_to_cart_params)return!1;var t=function(){e(document.body).on("click",".add_to_cart_button",this.onAddToCart).on("click",".remove_from_cart_button",this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("added_to_cart",this.updateCartPage).on("added_to_cart removed_from_cart",this.updateFragments)};t.prototype.onAddToCart=function(t){var a=e(this);if(a.is(".ajax_add_to_cart")){if(!a.attr("data-product_id"))return!0;t.preventDefault(),a.removeClass("added"),a.addClass("loading");var o={};e.each(a.data(),function(t,a){o[t]=a}),e(document.body).trigger("adding_to_cart",[a,o]),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),o,function(t){t&&(t.error&&t.product_url?window.location=t.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?e(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,a]):window.location=wc_add_to_cart_params.cart_url)})}},t.prototype.onRemoveFromCart=function(t){var a=e(this),o=a.closest(".woocommerce-mini-cart-item");t.preventDefault(),o.block({message:null,overlayCSS:{opacity:.6}}),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),{cart_item_key:a.data("cart_item_key")},function(t){t&&t.fragments?e(document.body).trigger("removed_from_cart",[t.fragments,t.cart_hash,a]):window.location=a.attr("href")}).fail(function(){window.location=a.attr("href")})},t.prototype.updateButton=function(t,a,o,r){(r=void 0!==r&&r)&&(r.removeClass("loading"),r.addClass("added"),wc_add_to_cart_params.is_cart||0!==r.parent().find(".added_to_cart").length||r.after(' '+wc_add_to_cart_params.i18n_view_cart+""),e(document.body).trigger("wc_cart_button_updated",[r]))},t.prototype.updateCartPage=function(){var t=window.location.toString().replace("add-to-cart","added-to-cart");e(".shop_table.cart").load(t+" .shop_table.cart:eq(0) > *",function(){e(".shop_table.cart").stop(!0).css("opacity","1").unblock(),e(document.body).trigger("cart_page_refreshed")}),e(".cart_totals").load(t+" .cart_totals:eq(0) > *",function(){e(".cart_totals").stop(!0).css("opacity","1").unblock(),e(document.body).trigger("cart_totals_refreshed")})},t.prototype.updateFragments=function(t,a){a&&(e.each(a,function(t){e(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),e.each(a,function(t,a){e(t).replaceWith(a),e(t).stop(!0).css("opacity","1").unblock()}),e(document.body).trigger("wc_fragments_loaded"))},new t}); !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(m){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u-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($){ window.et_calculating_scroll_position=false; window.et_side_nav_links_initialized=false; 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'), et_is_touch_device='ontouchstart' in window||navigator.maxTouchPoints; $(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); }}); function et_header_menu_split(){ var $logo_container=$('#main-header > .container > .logo_container'), $logo_container_splitted=$('.centered-inline-logo-wrap > .logo_container'), et_top_navigation_li_size=$et_top_navigation.children('nav').children('ul').children('li').size(), et_top_navigation_li_break_index=Math.round(et_top_navigation_li_size / 2) - 1; if($et_window.width() > 980&&$logo_container.length){ $('
  • ').insertAfter($et_top_navigation.find('nav > ul >li:nth('+et_top_navigation_li_break_index+')')); $logo_container.appendTo($et_top_navigation.find('.centered-inline-logo-wrap')); } if($et_window.width() <=980&&$logo_container_splitted.length){ $logo_container_splitted.prependTo('#main-header > .container'); $('#main-header .centered-inline-logo-wrap').remove(); }} if($et_header_style_split.length&&$et_vertical_nav.length < 1){ 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') ? parseInt($top_header.innerHeight()):0, admin_bar_height=$('#wpadminbar').length ? parseInt($('#wpadminbar').innerHeight()):0, $slide_menu_container=$('.et_header_style_slide .et_slide_in_menu_container'); et_header_height=parseInt($('#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: '-' + parseInt($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(''); }} 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_page_load_scroll_to_anchor(){ var $map_container=$(window.et_location_hash + ' .et_pb_map_container'), $map=$map_container.children('.et_pb_map'), $target=$(window.et_location_hash); $target.css('display', window.et_location_hash_style); var distance=('undefined'!==typeof($target.offset().top)) ? $target.offset().top:0, speed=(distance > 4000) ? 1600:800; if($map_container.length){ google.maps.event.trigger($map[0], 'resize'); } setTimeout(function(){ et_pb_smooth_scroll($target, false, speed, 'swing'); setTimeout(function(){ et_pb_smooth_scroll($target, false, 150, 'linear'); }, speed + 25); }, 700); } function et_get_saved_padding_margin_value(saved_value, order){ if(typeof saved_value==='undefined'){ return false; } var values=saved_value.split('|'); return typeof values[order]!=='undefined' ? values[order]:false; } function et_fix_page_container_position(){ var et_window_width=parseInt($et_window.width()), $top_header=$('#top-header'), secondary_nav_height=$top_header.length&&$top_header.is(':visible') ? parseInt($top_header.innerHeight()):0; var header_height; if(et_window_width > 980&&! $main_header.attr('data-height-loaded')){ $main_header.attr({ 'data-height-onload':parseInt($main_header.height()), 'data-height-loaded':true }); } if(et_window_width <=980){ header_height=parseInt($main_header.innerHeight()) + secondary_nav_height - 1; if($et_transparent_nav.length&&! $et_pb_first_row.length){ header_height +=58; }}else{ 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)) }); var 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')){ $et_pb_first_row_first_module.css({ 'paddingTop':header_height + 50 }); }}else if(is_pb){ $et_pb_first_row.css({ 'paddingTop':'' }); var saved_custom_padding=$et_pb_first_row.attr('data-padding'), saved_custom_padding_top=et_get_saved_padding_margin_value(saved_custom_padding, 0), saved_custom_padding_tablet=$et_pb_first_row.attr('data-padding-tablet'), saved_custom_padding_tablet_top=et_get_saved_padding_margin_value(saved_custom_padding_tablet, 0), saved_custom_padding_phone=$et_pb_first_row.attr('data-padding-phone'), saved_custom_padding_phone_top=et_get_saved_padding_margin_value(saved_custom_padding_phone, 0), applied_saved_custom_padding; if(saved_custom_padding_top||saved_custom_padding_tablet_top||saved_custom_padding_phone_top){ if(et_window_width > 980&&saved_custom_padding_top){ $et_pb_first_row.css({ paddingTop: saved_custom_padding_top }); }else if(et_window_width > 767&&saved_custom_padding_tablet_top){ $et_pb_first_row.css({ paddingTop: saved_custom_padding_tablet_top }); }else if(saved_custom_padding_phone_top){ $et_pb_first_row.css({ paddingTop: saved_custom_padding_phone_top }); } applied_saved_custom_padding=parseInt($et_pb_first_row.css('paddingTop')); $et_pb_first_row.css({ paddingTop:(header_height + applied_saved_custom_padding) }); }else{ 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){ $(''; 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){typeof define=="function"&&define.amd?define(["jquery"],a):typeof exports=="object"?a(require("jquery")):a(window.jQuery||window.Zepto)})(function(a){var b="Close",c="BeforeClose",d="AfterClose",e="BeforeAppend",f="MarkupParse",g="Open",h="Change",i="mfp",j="."+i,k="mfp-ready",l="mfp-removing",m="mfp-prevent-close",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w=function(a,b){n.ev.on(i+a+j,b)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},z=function(b){if(b!==v||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.closeMarkup.replace("%title%",n.st.tClose)),v=b;return n.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(n=new o,n.init(),a.magnificPopup.instance=n)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(a.transition!==undefined)return!0;while(b.length)if(b.pop()+"Transition"in a)return!0;return!1};o.prototype={constructor:o,init:function(){var b=navigator.appVersion;n.isIE7=b.indexOf("MSIE 7.")!==-1,n.isIE8=b.indexOf("MSIE 8.")!==-1,n.isLowIE=n.isIE7||n.isIE8,n.isAndroid=/android/gi.test(b),n.isIOS=/iphone|ipad|ipod/gi.test(b),n.supportsTransition=B(),n.probablyMobile=n.isAndroid||n.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),s=a(document),n.popupsCache={}},open:function(b){var c;if(b.isObj===!1){n.items=b.items.toArray(),n.index=0;var d=b.items,e;for(c=0;c(a||r.height())},_setFocus:function(){(n.st.focus?n.content.find(n.st.focus).eq(0):n.wrap).focus()},_onFocusIn:function(b){if(b.target!==n.wrap[0]&&!a.contains(n.wrap[0],b.target))return n._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(f,[b,c,d]),a.each(c,function(a,c){if(c===undefined||c===!1)return!0;e=a.split("_");if(e.length>1){var d=b.find(j+"-"+e[0]);if(d.length>0){var f=e[1];f==="replaceWith"?d[0]!==c[0]&&d.replaceWith(c):f==="img"?d.is("img")?d.attr("src",c):d.replaceWith(''):d.attr(e[1],c)}}else b.find(j+"-"+a).html(c)})},_getScrollbarSize:function(){if(n.scrollbarSize===undefined){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),n.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return n.scrollbarSize}},a.magnificPopup={instance:null,proto:o.prototype,modules:[],open:function(b,c){return A(),b?b=a.extend(!0,{},b):b={},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(b){A();var c=a(this);if(typeof b=="string")if(b==="open"){var d,e=p?c.data("magnificPopup"):c[0].magnificPopup,f=parseInt(arguments[1],10)||0;e.items?d=e.items[f]:(d=c,e.delegate&&(d=d.find(e.delegate)),d=d.eq(f)),n._openClick({mfpEl:d},c,e)}else n.isOpen&&n[b].apply(n,Array.prototype.slice.call(arguments,1));else b=a.extend(!0,{},b),p?c.data("magnificPopup",b):c[0].magnificPopup=b,n.addGroup(c,b);return c};var C="inline",D,E,F,G=function(){F&&(E.after(F.addClass(D)).detach(),F=null)};a.magnificPopup.registerModule(C,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){n.types.push(C),w(b+"."+C,function(){G()})},getInline:function(b,c){G();if(b.src){var d=n.st.inline,e=a(b.src);if(e.length){var f=e[0].parentNode;f&&f.tagName&&(E||(D=d.hiddenClass,E=x(D),D="mfp-"+D),F=e.after(E).detach().removeClass(D)),n.updateStatus("ready")}else n.updateStatus("error",d.tNotFound),e=a("
    ");return b.inlineElement=e,e}return n.updateStatus("ready"),n._parseMarkup(c,{},b),c}}});var H="ajax",I,J=function(){I&&a(document.body).removeClass(I)},K=function(){J(),n.req&&n.req.abort()};a.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){n.types.push(H),I=n.st.ajax.cursor,w(b+"."+H,K),w("BeforeChange."+H,K)},getAjax:function(b){I&&a(document.body).addClass(I),n.updateStatus("loading");var c=a.extend({url:b.src,success:function(c,d,e){var f={data:c,xhr:e};y("ParseAjax",f),n.appendContent(a(f.data),H),b.finished=!0,J(),n._setFocus(),setTimeout(function(){n.wrap.addClass(k)},16),n.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),b.finished=b.loadError=!0,n.updateStatus("error",n.st.ajax.tError.replace("%url%",b.src))}},n.st.ajax.settings);return n.req=a.ajax(c),""}}});var L,M=function(b){if(b.data&&b.data.title!==undefined)return b.data.title;var c=n.st.image.titleSrc;if(c){if(a.isFunction(c))return c.call(n,b);if(b.el)return b.el.attr(c)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
    ',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var c=n.st.image,d=".image";n.types.push("image"),w(g+d,function(){n.currItem.type==="image"&&c.cursor&&a(document.body).addClass(c.cursor)}),w(b+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),r.off("resize"+j)}),w("Resize"+d,n.resizeImage),n.isLowIE&&w("AfterChange",n.resizeImage)},resizeImage:function(){var a=n.currItem;if(!a||!a.img)return;if(n.st.image.verticalFit){var b=0;n.isLowIE&&(b=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",n.wH-b)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(n.content&&n.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var b=0,c=a.img[0],d=function(e){L&&clearInterval(L),L=setInterval(function(){if(c.naturalWidth>0){n._onImageHasSize(a);return}b>200&&clearInterval(L),b++,b===3?d(10):b===40?d(50):b===100&&d(500)},e)};d(1)},getImage:function(b,c){var d=0,e=function(){b&&(b.img[0].complete?(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("ready")),b.hasSize=!0,b.loaded=!0,y("ImageLoadComplete")):(d++,d<200?setTimeout(e,100):f()))},f=function(){b&&(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("error",g.tError.replace("%url%",b.src))),b.hasSize=!0,b.loaded=!0,b.loadError=!0)},g=n.st.image,h=c.find(".mfp-img");if(h.length){var i=document.createElement("img");i.className="mfp-img",b.el&&b.el.find("img").length&&(i.alt=b.el.find("img").attr("alt")),b.img=a(i).on("load.mfploader",e).on("error.mfploader",f),i.src=b.src,h.is("img")&&(b.img=b.img.clone()),i=b.img[0],i.naturalWidth>0?b.hasSize=!0:i.width||(b.hasSize=!1)}return n._parseMarkup(c,{title:M(b),img_replaceWith:b.img},b),n.resizeImage(),b.hasSize?(L&&clearInterval(L),b.loadError?(c.addClass("mfp-loading"),n.updateStatus("error",g.tError.replace("%url%",b.src))):(c.removeClass("mfp-loading"),n.updateStatus("ready")),c):(n.updateStatus("loading"),b.loading=!0,b.hasSize||(b.imgHidden=!0,c.addClass("mfp-loading"),n.findImageSize(b)),c)}}});var N,O=function(){return N===undefined&&(N=document.createElement("p").style.MozTransform!==undefined),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a=n.st.zoom,d=".zoom",e;if(!a.enabled||!n.supportsTransition)return;var f=a.duration,g=function(b){var c=b.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+a.duration/1e3+"s "+a.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,c.css(e),c},h=function(){n.content.css("visibility","visible")},i,j;w("BuildControls"+d,function(){if(n._allowZoom()){clearTimeout(i),n.content.css("visibility","hidden"),e=n._getItemToZoom();if(!e){h();return}j=g(e),j.css(n._getOffset()),n.wrap.append(j),i=setTimeout(function(){j.css(n._getOffset(!0)),i=setTimeout(function(){h(),setTimeout(function(){j.remove(),e=j=null,y("ZoomAnimationEnded")},16)},f)},16)}}),w(c+d,function(){if(n._allowZoom()){clearTimeout(i),n.st.removalDelay=f;if(!e){e=n._getItemToZoom();if(!e)return;j=g(e)}j.css(n._getOffset(!0)),n.wrap.append(j),n.content.css("visibility","hidden"),setTimeout(function(){j.css(n._getOffset())},16)}}),w(b+d,function(){n._allowZoom()&&(h(),j&&j.remove(),e=null)})},_allowZoom:function(){return n.currItem.type==="image"},_getItemToZoom:function(){return n.currItem.hasSize?n.currItem.img:!1},_getOffset:function(b){var c;b?c=n.currItem.img:c=n.st.zoom.opener(n.currItem.el||n.currItem);var d=c.offset(),e=parseInt(c.css("padding-top"),10),f=parseInt(c.css("padding-bottom"),10);d.top-=a(window).scrollTop()-e;var g={width:c.width(),height:(p?c.innerHeight():c[0].offsetHeight)-f-e};return O()?g["-moz-transform"]=g.transform="translate("+d.left+"px,"+d.top+"px)":(g.left=d.left,g.top=d.top),g}}});var P="iframe",Q="//about:blank",R=function(a){if(n.currTemplate[P]){var b=n.currTemplate[P].find("iframe");b.length&&(a||(b[0].src=Q),n.isIE8&&b.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
    ',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){n.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(b+"."+P,function(){R()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}});var S=function(a){var b=n.items.length;return a>b-1?a-b:a<0?b+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=n.st.gallery,d=".mfp-gallery",e=Boolean(a.fn.mfpFastClick);n.direction=!0;if(!c||!c.enabled)return!1;u+=" mfp-gallery",w(g+d,function(){c.navigateByImgClick&&n.wrap.on("click"+d,".mfp-img",function(){if(n.items.length>1)return n.next(),!1}),s.on("keydown"+d,function(a){a.keyCode===37?n.prev():a.keyCode===39&&n.next()})}),w("UpdateStatus"+d,function(a,b){b.text&&(b.text=T(b.text,n.currItem.index,n.items.length))}),w(f+d,function(a,b,d,e){var f=n.items.length;d.counter=f>1?T(c.tCounter,e.index,f):""}),w("BuildControls"+d,function(){if(n.items.length>1&&c.arrows&&!n.arrowLeft){var b=c.arrowMarkup,d=n.arrowLeft=a(b.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(m),f=n.arrowRight=a(b.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(m),g=e?"mfpFastClick":"click";d[g](function(){n.prev()}),f[g](function(){n.next()}),n.isIE7&&(x("b",d[0],!1,!0),x("a",d[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),n.container.append(d.add(f))}}),w(h+d,function(){n._preloadTimeout&&clearTimeout(n._preloadTimeout),n._preloadTimeout=setTimeout(function(){n.preloadNearbyImages(),n._preloadTimeout=null},16)}),w(b+d,function(){s.off(d),n.wrap.off("click"+d),n.arrowLeft&&e&&n.arrowLeft.add(n.arrowRight).destroyMfpFastClick(),n.arrowRight=n.arrowLeft=null})},next:function(){n.direction=!0,n.index=S(n.index+1),n.updateItemHTML()},prev:function(){n.direction=!1,n.index=S(n.index-1),n.updateItemHTML()},goTo:function(a){n.direction=a>=n.index,n.index=a,n.updateItemHTML()},preloadNearbyImages:function(){var a=n.st.gallery.preload,b=Math.min(a[0],n.items.length),c=Math.min(a[1],n.items.length),d;for(d=1;d<=(n.direction?c:b);d++)n._preloadItem(n.index+d);for(d=1;d<=(n.direction?b:c);d++)n._preloadItem(n.index-d)},_preloadItem:function(b){b=S(b);if(n.items[b].preloaded)return;var c=n.items[b];c.parsed||(c=n.parseEl(b)),y("LazyLoad",c),c.type==="image"&&(c.img=a('').on("load.mfploader",function(){c.hasSize=!0}).on("error.mfploader",function(){c.hasSize=!0,c.loadError=!0,y("LazyLoadError",c)}).attr("src",c.src)),c.preloaded=!0}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=n.st.retina,b=a.ratio;b=isNaN(b)?b():b,b>1&&(w("ImageHasSize."+U,function(a,c){c.img.css({"max-width":c.img[0].naturalWidth/b,width:"100%"})}),w("ElementParse."+U,function(c,d){d.src=a.replaceSrc(d,b)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){r.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g=a(this),h;if(c){var i,j,k,l,m,n;g.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,r.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0];if(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)l=!0,d()}).on("touchend"+f,function(a){d();if(l||n>1)return;h=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){h=!1},b),e()})})}g.on("click"+f,function(){h||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&r.off("touchmove"+f+" touchend"+f)}}(),A()}); (function($){ var $et_window=$(window); window.et_load_event_fired=false; 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_next.click(function(){ if($et_slider.et_animation_running) return false; $et_slider.et_slider_move_to('next'); return false; }); $et_slider_prev.click(function(){ if($et_slider.et_animation_running) return false; $et_slider.et_slider_move_to('previous'); return false; }); $et_slider.find(settings.slide).on('swipeleft', 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.find(settings.slide).on('swiperight', 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_maybe_set_controls_color($et_slide.eq(0)); $et_slider_controls.click(function(){ if($et_slider.et_animation_running) return false; $et_slider.et_slider_move_to($(this).index()); return false; }); } if(settings.use_carousel&&et_slides_number > 1){ for(var i=1; i <=et_slides_number; i++){ slide_id=i - 1; image_src=($et_slide.eq(slide_id).data('image')!==undefined) ? 'url(' + $et_slide.eq(slide_id).data('image') + ')':'none'; carousel_html +=''; } carousel_html = ''; $et_slider.after(carousel_html); $et_slider_carousel_controls=$et_slider.siblings('.et_pb_carousel').find(settings.carousel_controls); $et_slider_carousel_controls.click(function(){ if($et_slider.et_animation_running) return false; var $this=$(this); $et_slider.et_slider_move_to($this.data('slide-id')); return false; }); } if(settings.slideshow&&et_slides_number > 1){ $et_slider.hover(function(){ if($et_slider.hasClass('et_slider_auto_ignore_hover')){ return; } $et_slider.addClass('et_slider_hovered'); if(typeof et_slider_timer!='undefined'){ clearInterval(et_slider_timer); }}, function(){ if($et_slider.hasClass('et_slider_auto_ignore_hover')){ return; } $et_slider.removeClass('et_slider_hovered'); et_slider_auto_rotate(); }); } et_slider_auto_rotate(); function et_slider_auto_rotate(){ if(settings.slideshow&&et_slides_number > 1&&! $et_slider.hasClass('et_slider_hovered')){ et_slider_timer=setTimeout(function(){ $et_slider.et_slider_move_to('next'); }, settings.slideshow_speed); }} $et_slider.et_slider_destroy=function(){ if(typeof et_slider_timer!='undefined'){ clearInterval(et_slider_timer); } $et_slider.unbind('mouseenter mouseleave'); $et_slider.find('.et-pb-slider-arrows a, .et-pb-controllers a').unbind('click'); $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(); } function et_stop_video(active_slide){ var $et_video, et_video_src; if(active_slide.has('iframe').length){ $et_video=active_slide.find('iframe'); et_video_src=$et_video.attr('src'); $et_video.attr('src', ''); $et_video.attr('src', et_video_src); }else if(active_slide.has('video').length){ if(!active_slide.find('.et_pb_section_video_bg').length){ $et_video=active_slide.find('video'); $et_video[0].pause(); }} } function et_fix_slider_content_images(){ var $this_slider=$et_slider, $slide_image_container=$this_slider.find('.et-pb-active-slide .et_pb_slide_image'); $slide_video_container=$this_slider.find('.et-pb-active-slide .et_pb_slide_video'); $slide=$slide_image_container.closest('.et_pb_slide'), $slider=$slide.closest('.et_pb_slider'), slide_height=$slider.innerHeight(), image_height=parseInt(slide_height * 0.8), $top_header=$('#top-header'), $main_header=$('#main-header'), $et_transparent_nav=$('.et_transparent_nav'), $et_vertical_nav=$('.et_vertical_nav'); $slide_image_container.find('img').css('maxHeight', image_height + 'px'); if($slide.hasClass('et_pb_media_alignment_center')){ $slide_image_container.css('marginTop', '-' + parseInt($slide_image_container.height() / 2) + 'px'); } $slide_video_container.css('marginTop', '-' + parseInt($slide_video_container.height() / 2) + 'px'); $slide_image_container.find('img').addClass('active'); } function et_get_bg_layout_color($slide){ if($slide.hasClass('et_pb_bg_layout_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.css('color', arrows_color); }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_content_images(); }else{ $et_window.load(function(){ et_fix_slider_content_images(); }); } $et_window.resize(function(){ et_fix_slider_content_images(); }); $et_slider.et_slider_move_to=function(direction){ var $active_slide=$et_slide.eq(et_active_slide), $next_slide; $et_slider.et_animation_running=true; $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); $next_slide=$et_slide.eq(et_active_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(); } $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'); $next_slide.css({ 'display':'block', opacity:0 }).addClass('et-pb-active-slide'); 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.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(){ 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(); $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=$('