(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() { $(this).parents('.et_mobile_menu').siblings('.mobile_menu_bar').trigger('click'); }); if ('no_click_event' !== menu_click_event) { $this_menu.on('click', '.mobile_menu_bar', function() { if ($this_menu.hasClass('closed')) { $this_menu.removeClass('closed').addClass('opened'); $cloned_nav.stop().slideDown(500); } else { $this_menu.removeClass('opened').addClass('closed'); $cloned_nav.stop().slideUp(500); } return false; }); } }); $('#mobile_menu .centered-inline-logo-wrap').remove(); } window.et_pb_remove_placeholder_text = function($form) { $form.find('input:text, textarea').each(function(index, domEle) { var $et_current_input = jQuery(domEle) , $et_label = $et_current_input.siblings('label') , et_label_value = $et_current_input.siblings('label').text(); if ($et_label.length && $et_label.is(':hidden')) { if ($et_label.text() == $et_current_input.val()) $et_current_input.val(''); } }); } window.et_fix_fullscreen_section = function() { var $et_window = $(window); $('section.et_pb_fullscreen').each(function() { var $this_section = $(this); $.proxy(et_calc_fullscreen_section, $this_section)(); $et_window.on('resize', $.proxy(et_calc_fullscreen_section, $this_section)); }); } window.et_bar_counters_init = function($bar_item) { if (!$bar_item.length) { return; } var $bar_container = $bar_item.closest('.et_pb_counter_container') , bar_item_width = $bar_item.attr('data-width') , bar_item_padding = Math.ceil(parseFloat($bar_item.css('paddingLeft'))) + Math.ceil(parseFloat($bar_item.css('paddingRight'))) , $bar_item_text = $bar_item.children('.et_pb_counter_amount_number') , calculated_width = ($bar_container.width() - $bar_item_text.innerWidth()) / 100 * parseFloat(bar_item_width) , bar_item_text_width = calculated_width + $bar_item_text.innerWidth(); $bar_item.css({ 'width': bar_item_text_width }); } window.et_fix_pricing_currency_position = function($pricing_table) { var $all_pricing_tables = typeof $pricing_table !== 'undefined' ? $pricing_table : $('.et_pb_pricing_table'); if (!$all_pricing_tables.length) { return; } $all_pricing_tables.each(function() { var $this_table = $(this) , $price_container = $this_table.find('.et_pb_et_price') , $currency = $price_container.length ? $price_container.find('.et_pb_dollar_sign') : false , $price = $price_container.length ? $price_container.find('.et_pb_sum') : false; if (!$currency || !$price) { return; } $currency.css({ 'marginLeft': -$currency.width() + 'px' }); }); } window.et_pb_set_responsive_grid = function($grid_items, $single_item_selector) { setTimeout(function() { var container_width = $grid_items.innerWidth() , item_width = $grid_items.find($single_item_selector).outerWidth(true) , last_item_margin = item_width - $grid_items.find($single_item_selector).outerWidth() , columns_count = Math.round((container_width + last_item_margin) / item_width) , counter = 1 , first_in_row = 1; $grid_items.find($single_item_selector).removeClass('last_in_row first_in_row'); $grid_items.find($single_item_selector).each(function() { var $this_el = $(this); if (!$this_el.hasClass('inactive')) { if (first_in_row === counter) { $this_el.addClass('first_in_row'); } if (0 === counter % columns_count) { $this_el.addClass('last_in_row'); first_in_row = counter + 1; } counter++; } }); }, 1); } })(jQuery); /*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */ (function(e, t, n) { typeof define == "function" && define.amd ? define(["jquery"], function(r) { return n(r, e, t), r.mobile }) : n(e.jQuery, e, t) })(this, document, function(e, t, n, r) { (function(e, t, n, r) { function T(e) { while (e && typeof e.originalEvent != "undefined") e = e.originalEvent; return e } function N(t, n) { var i = t.type, s, o, a, l, c, h, p, d, v; t = e.Event(t), t.type = n, s = t.originalEvent, o = e.event.props, i.search(/^(mouse|click)/) > -1 && (o = f); if (s) for (p = o.length, l; p; ) l = o[--p], t[l] = s[l]; i.search(/mouse(down|up)|click/) > -1 && !t.which && (t.which = 1); if (i.search(/^touch/) !== -1) { a = T(s), i = a.touches, c = a.changedTouches, h = i && i.length ? i[0] : c && c.length ? c[0] : r; if (h) for (d = 0, v = u.length; d < v; d++) l = u[d], t[l] = h[l] } return t } function C(t) { var n = {}, r, s; while (t) { r = e.data(t, i); for (s in r) r[s] && (n[s] = n.hasVirtualBinding = !0); t = t.parentNode } return n } function k(t, n) { var r; while (t) { r = e.data(t, i); if (r && (!n || r[n])) return t; t = t.parentNode } return null } function L() { g = !1 } function A() { g = !0 } function O() { E = 0, v.length = 0, m = !1, A() } function M() { L() } function _() { D(), c = setTimeout(function() { c = 0, O() }, e.vmouse.resetTimerDuration) } function D() { c && (clearTimeout(c), c = 0) } function P(t, n, r) { var i; if (r && r[t] || !r && k(n.target, t)) i = N(n, t), e(n.target).trigger(i); return i } function H(t) { var n = e.data(t.target, s), r; !m && (!E || E !== n) && (r = P("v" + t.type, t), r && (r.isDefaultPrevented() && t.preventDefault(), r.isPropagationStopped() && t.stopPropagation(), r.isImmediatePropagationStopped() && t.stopImmediatePropagation())) } function B(t) { var n = T(t).touches, r, i, o; n && n.length === 1 && (r = t.target, i = C(r), i.hasVirtualBinding && (E = w++, e.data(r, s, E), D(), M(), d = !1, o = T(t).touches[0], h = o.pageX, p = o.pageY, P("vmouseover", t, i), P("vmousedown", t, i))) } function j(e) { if (g) return; d || P("vmousecancel", e, C(e.target)), d = !0, _() } function F(t) { if (g) return; var n = T(t).touches[0] , r = d , i = e.vmouse.moveDistanceThreshold , s = C(t.target); d = d || Math.abs(n.pageX - h) > i || Math.abs(n.pageY - p) > i, d && !r && P("vmousecancel", t, s), P("vmousemove", t, s), _() } function I(e) { if (g) return; A(); var t = C(e.target), n, r; P("vmouseup", e, t), d || (n = P("vclick", e, t), n && n.isDefaultPrevented() && (r = T(e).changedTouches[0], v.push({ touchID: E, x: r.clientX, y: r.clientY }), m = !0)), P("vmouseout", e, t), d = !1, _() } function q(t) { var n = e.data(t, i), r; if (n) for (r in n) if (n[r]) return !0; return !1 } function R() {} function U(t) { var n = t.substr(1); return { setup: function() { q(this) || e.data(this, i, {}); var r = e.data(this, i); r[t] = !0, l[t] = (l[t] || 0) + 1, l[t] === 1 && b.bind(n, H), e(this).bind(n, R), y && (l.touchstart = (l.touchstart || 0) + 1, l.touchstart === 1 && b.bind("touchstart", B).bind("touchend", I).bind("touchmove", F).bind("scroll", j)) }, teardown: function() { --l[t], l[t] || b.unbind(n, H), y && (--l.touchstart, l.touchstart || b.unbind("touchstart", B).unbind("touchmove", F).unbind("touchend", I).unbind("scroll", j)); var r = e(this) , s = e.data(this, i); s && (s[t] = !1), r.unbind(n, R), q(this) || r.removeData(i) } } } var i = "virtualMouseBindings", s = "virtualTouchID", o = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "), u = "clientX clientY pageX pageY screenX screenY".split(" "), a = e.event.mouseHooks ? e.event.mouseHooks.props : [], f = e.event.props.concat(a), l = {}, c = 0, h = 0, p = 0, d = !1, v = [], m = !1, g = !1, y = "addEventListener"in n, b = e(n), w = 1, E = 0, S, x; e.vmouse = { moveDistanceThreshold: 10, clickDistanceThreshold: 10, resetTimerDuration: 1500 }; for (x = 0; x < o.length; x++) e.event.special[o[x]] = U(o[x]); y && n.addEventListener("click", function(t) { var n = v.length, r = t.target, i, o, u, a, f, l; if (n) { i = t.clientX, o = t.clientY, S = e.vmouse.clickDistanceThreshold, u = r; while (u) { for (a = 0; a < n; a++) { f = v[a], l = 0; if (u === r && Math.abs(f.x - i) < S && Math.abs(f.y - o) < S || e.data(u, s) === f.touchID) { t.preventDefault(), t.stopPropagation(); return } } u = u.parentNode } } }, !0) })(e, t, n), function(e) { e.mobile = {} }(e), function(e, t) { var r = { touch: "ontouchend"in n }; e.mobile.support = e.mobile.support || {}, e.extend(e.support, r), e.extend(e.mobile.support, r) }(e), function(e, t, r) { function l(t, n, i, s) { var o = i.type; i.type = n, s ? e.event.trigger(i, r, t) : e.event.dispatch.call(t, i), i.type = o } var i = e(n) , s = e.mobile.support.touch , o = "touchmove scroll" , u = s ? "touchstart" : "mousedown" , a = s ? "touchend" : "mouseup" , f = s ? "touchmove" : "mousemove"; e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "), function(t, n) { e.fn[n] = function(e) { return e ? this.bind(n, e) : this.trigger(n) } , e.attrFn && (e.attrFn[n] = !0) }), e.event.special.scrollstart = { enabled: !0, setup: function() { function s(e, n) { r = n, l(t, r ? "scrollstart" : "scrollstop", e) } var t = this, n = e(t), r, i; n.bind(o, function(t) { if (!e.event.special.scrollstart.enabled) return; r || s(t, !0), clearTimeout(i), i = setTimeout(function() { s(t, !1) }, 50) }) }, teardown: function() { e(this).unbind(o) } }, e.event.special.tap = { tapholdThreshold: 750, emitTapOnTaphold: !0, setup: function() { var t = this , n = e(t) , r = !1; n.bind("vmousedown", function(s) { function a() { clearTimeout(u) } function f() { a(), n.unbind("vclick", c).unbind("vmouseup", a), i.unbind("vmousecancel", f) } function c(e) { f(), !r && o === e.target ? l(t, "tap", e) : r && e.preventDefault() } r = !1; if (s.which && s.which !== 1) return !1; var o = s.target, u; n.bind("vmouseup", a).bind("vclick", c), i.bind("vmousecancel", f), u = setTimeout(function() { e.event.special.tap.emitTapOnTaphold || (r = !0), l(t, "taphold", e.Event("taphold", { target: o })) }, e.event.special.tap.tapholdThreshold) }) }, teardown: function() { e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"), i.unbind("vmousecancel") } }, e.event.special.swipe = { scrollSupressionThreshold: 30, durationThreshold: 1e3, horizontalDistanceThreshold: 30, verticalDistanceThreshold: 30, getLocation: function(e) { var n = t.pageXOffset , r = t.pageYOffset , i = e.clientX , s = e.clientY; if (e.pageY === 0 && Math.floor(s) > Math.floor(e.pageY) || e.pageX === 0 && Math.floor(i) > Math.floor(e.pageX)) i -= n, s -= r; else if (s < e.pageY - r || i < e.pageX - n) i = e.pageX - n, s = e.pageY - r; return { x: i, y: s } }, start: function(t) { var n = t.originalEvent.touches ? t.originalEvent.touches[0] : t , r = e.event.special.swipe.getLocation(n); return { time: (new Date).getTime(), coords: [r.x, r.y], origin: e(t.target) } }, stop: function(t) { var n = t.originalEvent.touches ? t.originalEvent.touches[0] : t , r = e.event.special.swipe.getLocation(n); return { time: (new Date).getTime(), coords: [r.x, r.y] } }, handleSwipe: function(t, n, r, i) { if (n.time - t.time < e.event.special.swipe.durationThreshold && Math.abs(t.coords[0] - n.coords[0]) > e.event.special.swipe.horizontalDistanceThreshold && Math.abs(t.coords[1] - n.coords[1]) < e.event.special.swipe.verticalDistanceThreshold) { var s = t.coords[0] > n.coords[0] ? "swipeleft" : "swiperight"; return l(r, "swipe", e.Event("swipe", { target: i, swipestart: t, swipestop: n }), !0), l(r, s, e.Event(s, { target: i, swipestart: t, swipestop: n }), !0), !0 } return !1 }, eventInProgress: !1, setup: function() { var t, n = this, r = e(n), s = {}; t = e.data(this, "mobile-events"), t || (t = { length: 0 }, e.data(this, "mobile-events", t)), t.length++, t.swipe = s, s.start = function(t) { if (e.event.special.swipe.eventInProgress) return; e.event.special.swipe.eventInProgress = !0; var r, o = e.event.special.swipe.start(t), u = t.target, l = !1; s.move = function(t) { if (!o || t.isDefaultPrevented()) return; r = e.event.special.swipe.stop(t), l || (l = e.event.special.swipe.handleSwipe(o, r, n, u), l && (e.event.special.swipe.eventInProgress = !1)), Math.abs(o.coords[0] - r.coords[0]) > e.event.special.swipe.scrollSupressionThreshold && t.preventDefault() } , s.stop = function() { l = !0, e.event.special.swipe.eventInProgress = !1, i.off(f, s.move), s.move = null } , i.on(f, s.move).one(a, s.stop) } , r.on(u, s.start) }, teardown: function() { var t, n; t = e.data(this, "mobile-events"), t && (n = t.swipe, delete t.swipe, t.length--, t.length === 0 && e.removeData(this, "mobile-events")), n && (n.start && e(this).off(u, n.start), n.move && i.off(f, n.move), n.stop && i.off(a, n.stop)) } }, e.each({ scrollstop: "scrollstart", taphold: "tap", swipeleft: "swipe.left", swiperight: "swipe.right" }, function(t, n) { e.event.special[t] = { setup: function() { e(this).bind(n, e.noop) }, teardown: function() { e(this).unbind(n) } } }) }(e, this) }); ;(function($) { 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'), $top_header = $('#top-header'), $main_header = $('#main-header'), $main_container_wrapper = $('#page-container'), $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_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('touchend', function() { var $et_parent_menu = $(this).parent('li'); if ($et_parent_menu.hasClass('et-hover')) { window.location = $(this).attr('href'); } else { $et_parent_menu.trigger('mouseenter'); } }); $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 , window_width = $et_window.prop('outerWidth') || $et_window.width(); if (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 (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 && !window.et_is_vertical_nav) { 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 (window.et_is_vertical_nav) { 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 (!window.et_is_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, main_header_fixed_height = 0, 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 (window.et_is_transparent_nav && !$et_pb_first_row.length) { header_height += 58; } } else { header_height = parseInt($main_header.attr('data-height-onload')) + secondary_nav_height; if (window.et_is_transparent_nav && !window.et_is_vertical_nav && $et_main_content_first_row.length) { header_height += 58; } $main_header.clone().addClass('main-header-clone et-fixed-header').css({ opacity: 0, position: 'fixed', top: 'auto', right: 0, bottom: 0, left: 0 }).appendTo($('body')); main_header_fixed_height = $('.main-header-clone').height(); $('.main-header-clone').remove(); } $main_header.attr({ 'data-fixed-height-onload': main_header_fixed_height }); if (window.et_is_transparent_nav && !window.et_is_vertical_nav) { $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) { $('', { 'id': 'et_fix_page_container_position', 'text': '#page-container{ padding-top: 0 !important;}' }).appendTo('head'); } } else if (et_is_fixed_nav) { $main_container_wrapper.css('paddingTop', header_height); } et_change_primary_nav_position(0); } $et_container.data('previous-width', $et_container.width()); $(window).resize(function() { var window_width = parseInt($et_window.width()), et_container_previous_width = parseInt($et_container.data('previous-width')), et_container_css_width = $et_container.css('width'), et_container_width_in_pixel = (typeof et_container_css_width !== 'undefined') ? et_container_css_width.substr(-1, 1) !== '%' : '', et_container_actual_width = (et_container_width_in_pixel) ? parseInt($et_container.width()) : ((parseInt($et_container.width()) / 100) * window_width), containerWidthChanged = et_container_previous_width !== et_container_actual_width, $slide_menu_container = $('.et_slide_in_menu_container'), page_container_margin; if (et_is_fixed_nav && containerWidthChanged) { if (typeof update_page_container_position != 'undefined') { clearTimeout(update_page_container_position); } var update_page_container_position = setTimeout(function() { et_fix_page_container_position(); if (typeof et_fix_fullscreen_section === 'function') { et_fix_fullscreen_section(); } }, 200); $et_container.data('previous-width', et_container_actual_width); } if (et_hide_nav) { et_hide_nav_transofrm(); } if ($('#wpadminbar').length && et_is_fixed_nav && window_width >= 740 && window_width <= 782) { et_calculate_header_values(); et_change_primary_nav_position(0); } et_set_search_form_css(); if ($slide_menu_container.length && !$('body').hasClass('et_pb_slide_menu_active')) { $slide_menu_container.css({ right: '-' + parseInt($slide_menu_container.innerWidth()) + 'px' }); if ($('body').hasClass('et_boxed_layout') && et_is_fixed_nav) { page_container_margin = $main_container_wrapper.css('margin-left'); $main_header.css({ left: page_container_margin }); } } if ($slide_menu_container.length && $('body').hasClass('et_pb_slide_menu_active')) { if ($('body').hasClass('et_boxed_layout')) { var left_position; page_container_margin = parseFloat($main_container_wrapper.css('margin-left')); $main_container_wrapper.css({ left: '-' + (parseInt($slide_menu_container.innerWidth()) - page_container_margin) + 'px' }); if (et_is_fixed_nav) { left_position = 0 > parseInt($slide_menu_container.innerWidth()) - (page_container_margin * 2) ? Math.abs($slide_menu_container.innerWidth() - (page_container_margin * 2)) : '-' + ($slide_menu_container.innerWidth() - (page_container_margin * 2)); if (left_position < parseInt($slide_menu_container.innerWidth())) { $main_header.css({ left: left_position + 'px' }); } } } else { $('#page-container, .et_fixed_nav #main-header').css({ left: '-' + parseInt($slide_menu_container.innerWidth()) + 'px' }); } } if ($slide_menu_container.length && $('body').hasClass('et_header_style_fullscreen')) { var top_bar_height = parseInt($slide_menu_container.find('.et_slide_menu_top').innerHeight()); $slide_menu_container.css({ 'padding-top': top_bar_height + 20 }); } }); $(window).ready(function() { if ($.fn.fitVids) { $('#main-content').fitVids({ customSelector: "iframe[src^='http://www.hulu.com'], iframe[src^='http://www.dailymotion.com'], iframe[src^='http://www.funnyordie.com'], iframe[src^='https://embed-ssl.ted.com'], iframe[src^='http://embed.revision3.com'], iframe[src^='https://flickr.com'], iframe[src^='http://blip.tv'], iframe[src^='http://www.collegehumor.com']" }); } }); function et_all_elements_loaded() { if (et_is_fixed_nav) { et_calculate_header_values(); } et_fix_page_container_position(); if (window.hasOwnProperty('et_location_hash') && '' !== window.et_location_hash) { et_page_load_scroll_to_anchor(); } if (et_header_style_left && !window.et_is_vertical_nav) { $logo_width = parseInt($('#logo').width()); if (et_is_rtl) { $et_top_navigation.css('padding-right', $logo_width + 30); } else { $et_top_navigation.css('padding-left', $logo_width + 30); } } if ($('p.demo_store').length) { $('#footer-bottom').css('margin-bottom', $('p.demo_store').innerHeight()); } if ($.fn.waypoint) { var $waypoint_selector; if (et_is_vertical_fixed_nav) { $waypoint_selector = $('#main-content'); $waypoint_selector.waypoint({ handler: function(direction) { et_fix_logo_transition(); if (direction === 'down') { $('#main-header').addClass('et-fixed-header'); } else { $('#main-header').removeClass('et-fixed-header'); } } }); } if (et_is_fixed_nav) { if (window.et_is_transparent_nav && !window.et_is_vertical_nav && $et_pb_first_row.length) { if ($et_pb_first_row.is('.et_pb_fullwidth_section')) { $waypoint_selector = $et_pb_first_row.children('.et_pb_module'); } else { $waypoint_selector = $et_pb_first_row.find('.et_pb_row'); } } else if (window.et_is_transparent_nav && !window.et_is_vertical_nav && $et_main_content_first_row.length) { $waypoint_selector = $('#content-area'); } else { $waypoint_selector = $('#main-content'); } $waypoint_selector.waypoint({ offset: function() { if (etRecalculateOffset) { setTimeout(function() { et_calculate_header_values(); }, 200); etRecalculateOffset = false; } if (et_hide_nav) { return et_header_offset - et_header_height - 200; } else { var waypoint_selector_offset = $waypoint_selector.offset(); if (waypoint_selector_offset.top < et_header_offset) { et_header_offset = 0 - (et_header_offset - waypoint_selector_offset.top); } return et_header_offset; } }, handler: function(direction) { et_fix_logo_transition(); if (direction === 'down') { $main_header.addClass('et-fixed-header'); $main_container_wrapper.addClass('et-animated-content'); $top_header.addClass('et-fixed-header'); if (!et_hide_nav && !window.et_is_transparent_nav && !$('.mobile_menu_bar_toggle').is(':visible')) { var secondary_nav_height = $top_header.length ? parseInt($top_header.height()) : 0, $clone_header, clone_header_height, fix_padding; $clone_header = $main_header.clone().addClass('et-fixed-header, et_header_clone').css({ 'transition': 'none', 'display': 'none' }); clone_header_height = parseInt($clone_header.prependTo('body').height()); if (!window.et_is_vertical_nav) { fix_padding = parseInt($main_container_wrapper.css('padding-top')) - clone_header_height - secondary_nav_height + 1; $main_container_wrapper.css('margin-top', -fix_padding); } $('.et_header_clone').remove(); } } else { $main_header.removeClass('et-fixed-header'); $top_header.removeClass('et-fixed-header'); $main_container_wrapper.css('margin-top', '-1px'); } setTimeout(function() { et_set_search_form_css(); }, 400); } }); } if (et_hide_nav) { et_hide_nav_transofrm(); } } } $('a[href*="#"]:not([href="#"])').click(function() { var $this_link = $(this) , has_closest_smooth_scroll_disabled = $this_link.closest('.et_smooth_scroll_disabled').length , has_closest_woocommerce_tabs = ($this_link.closest('.woocommerce-tabs').length && $this_link.closest('.tabs').length) , has_closest_eab_cal_link = $this_link.closest('.eab-shortcode_calendar-navigation-link').length , has_acomment_reply = $this_link.hasClass('acomment-reply') , disable_scroll = has_closest_smooth_scroll_disabled || has_closest_woocommerce_tabs || has_closest_eab_cal_link || has_acomment_reply; if ((location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) && !disable_scroll) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { et_pb_smooth_scroll(target, false, 800); if (!$('#main-header').hasClass('et-fixed-header') && $('body').hasClass('et_fixed_nav') && $(window).width() > 980) { setTimeout(function() { et_pb_smooth_scroll(target, false, 40, 'linear'); }, 780); } return false; } } }); window.et_pb_window_side_nav_scroll_init = function() { if (true === window.et_calculating_scroll_position || false === window.et_side_nav_links_initialized) { return; } window.et_calculating_scroll_position = true; var add_offset = $('body').hasClass('et_fixed_nav') ? 20 : -90; var top_header_height = $('#top-header').length > 0 ? parseInt($('#top-header').height()) : 0; var main_header_height = $('#main-header').length > 0 ? parseInt($('#main-header').height()) : 0; var side_offset; if ($('#wpadminbar').length > 0 && parseInt($(window).width()) > 600) { add_offset += parseInt($('#wpadminbar').outerHeight()); } if (window.et_is_vertical_nav) { side_offset = top_header_height + add_offset + 60; } else { side_offset = top_header_height + main_header_height + add_offset; } var window_height = parseInt($(window).height()); var scroll_position = parseInt($(window).scrollTop()); var document_height = parseInt($(document).height()); var at_bottom_of_page = (window_height + scroll_position) === document_height; var total_links = $('.side_nav_item a').length - 1; for (var link = 0; link <= total_links; link++) { var $target_section = $('.et_pb_section:visible:not(.et_pb_section div)').eq(link); var at_top_of_page = 'undefined' === typeof $target_section.offset(); var current_active = $('.side_nav_item a.active').parent().index(); var next_active = null; var target_offset = (false === at_top_of_page) ? $target_section.offset().top - side_offset : 0; if (at_top_of_page) { next_active = 0; } else if (at_bottom_of_page) { next_active = total_links; } else if (scroll_position >= target_offset) { next_active = link; } if (null !== next_active && next_active !== current_active) { $('.side_nav_item a').removeClass('active'); $('a#side_nav_item_id_' + next_active).addClass('active'); } } window.et_calculating_scroll_position = false; } ; window.et_pb_side_nav_page_init = function() { var $sections = $('.et_pb_section:visible:not(.et_pb_section div)'); var total_sections = $sections.length; var side_nav_offset = parseInt((total_sections * 20 + 40) / 2); window.et_side_nav_links_initialized = false; window.et_calculating_scroll_position = false; if (total_sections > 1 && $('.et_pb_side_nav_page').length) { $('#main-content').append('x
'; 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); ;/*! Waypoints - 4.0.0 Copyright © 2011-2015 Caleb Troughton Licensed under the MIT license. https://github.com/imakewebthings/waypoints/blog/master/licenses.txt */ !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 , h = o.newScroll >= 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, p = d.triggerPoint >= 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 < d.length; c++) { e = d[c], e.parsed && (e = e.el[0]); if (e === b.el[0]) { n.index = c; break } } } else n.items = a.isArray(b.items) ? b.items : [b.items], n.index = b.index || 0; if (n.isOpen) { n.updateItemHTML(); return } n.types = [], u = "", b.mainEl && b.mainEl.length ? n.ev = b.mainEl.eq(0) : n.ev = s, b.key ? (n.popupsCache[b.key] || (n.popupsCache[b.key] = {}), n.currTemplate = n.popupsCache[b.key]) : n.currTemplate = {}, n.st = a.extend(!0, {}, a.magnificPopup.defaults, b), n.fixedContentPos = n.st.fixedContentPos === "auto" ? !n.probablyMobile : n.st.fixedContentPos, n.st.modal && (n.st.closeOnContentClick = !1, n.st.closeOnBgClick = !1, n.st.showCloseBtn = !1, n.st.enableEscapeKey = !1), n.bgOverlay || (n.bgOverlay = x("bg").on("click" + j, function() { n.close() }), n.wrap = x("wrap").attr("tabindex", -1).on("click" + j, function(a) { n._checkIfClose(a.target) && n.close() }), n.container = x("container", n.wrap)), n.contentContainer = x("content"), n.st.preloader && (n.preloader = x("preloader", n.container, n.st.tLoading)); var h = a.magnificPopup.modules; for (c = 0; c < h.length; c++) { var i = h[c]; i = i.charAt(0).toUpperCase() + i.slice(1), n["init" + i].call(n) } y("BeforeOpen"), n.st.showCloseBtn && (n.st.closeBtnInside ? (w(f, function(a, b, c, d) { c.close_replaceWith = z(d.type) }), u += " mfp-close-btn-in") : n.wrap.append(z())), n.st.alignTop && (u += " mfp-align-top"), n.fixedContentPos ? n.wrap.css({ overflow: n.st.overflowY, overflowX: "hidden", overflowY: n.st.overflowY }) : n.wrap.css({ top: r.scrollTop(), position: "absolute" }), (n.st.fixedBgPos === !1 || n.st.fixedBgPos === "auto" && !n.fixedContentPos) && n.bgOverlay.css({ height: s.height(), position: "absolute" }), n.st.enableEscapeKey && s.on("keyup" + j, function(a) { a.keyCode === 27 && n.close() }), r.on("resize" + j, function() { n.updateSize() }), n.st.closeOnContentClick || (u += " mfp-auto-cursor"), u && n.wrap.addClass(u); var l = n.wH = r.height() , m = {}; if (n.fixedContentPos && n._hasScrollBar(l)) { var o = n._getScrollbarSize(); o && (m.marginRight = o) } n.fixedContentPos && (n.isIE7 ? a("body, html").css("overflow", "hidden") : m.overflow = "hidden"); var p = n.st.mainClass; return n.isIE7 && (p += " mfp-ie7"), p && n._addClassToMFP(p), n.updateItemHTML(), y("BuildControls"), a("html").css(m), n.bgOverlay.add(n.wrap).prependTo(n.st.prependTo || a(document.body)), n._lastFocusedEl = document.activeElement, setTimeout(function() { n.content ? (n._addClassToMFP(k), n._setFocus()) : n.bgOverlay.addClass(k), s.on("focusin" + j, n._onFocusIn) }, 16), n.isOpen = !0, n.updateSize(l), y(g), b }, close: function() { if (!n.isOpen) return; y(c), n.isOpen = !1, n.st.removalDelay && !n.isLowIE && n.supportsTransition ? (n._addClassToMFP(l), setTimeout(function() { n._close() }, n.st.removalDelay)) : n._close() }, _close: function() { y(b); var c = l + " " + k + " "; n.bgOverlay.detach(), n.wrap.detach(), n.container.empty(), n.st.mainClass && (c += n.st.mainClass + " "), n._removeClassFromMFP(c); if (n.fixedContentPos) { var e = { marginRight: "" }; n.isIE7 ? a("body, html").css("overflow", "") : e.overflow = "", a("html").css(e) } s.off("keyup" + j + " focusin" + j), n.ev.off(j), n.wrap.attr("class", "mfp-wrap").removeAttr("style"), n.bgOverlay.attr("class", "mfp-bg"), n.container.attr("class", "mfp-container"), n.st.showCloseBtn && (!n.st.closeBtnInside || n.currTemplate[n.currItem.type] === !0) && n.currTemplate.closeBtn && n.currTemplate.closeBtn.detach(), n._lastFocusedEl && a(n._lastFocusedEl).focus(), n.currItem = null, n.content = null, n.currTemplate = null, n.prevHeight = 0, y(d) }, updateSize: function(a) { if (n.isIOS) { var b = document.documentElement.clientWidth / window.innerWidth , c = window.innerHeight * b; n.wrap.css("height", c), n.wH = c } else n.wH = a || r.height(); n.fixedContentPos || n.wrap.css("height", n.wH), y("Resize") }, updateItemHTML: function() { var b = n.items[n.index]; n.contentContainer.detach(), n.content && n.content.detach(), b.parsed || (b = n.parseEl(n.index)); var c = b.type; y("BeforeChange", [n.currItem ? n.currItem.type : "", c]), n.currItem = b; if (!n.currTemplate[c]) { var d = n.st[c] ? n.st[c].markup : !1; y("FirstMarkupParse", d), d ? n.currTemplate[c] = a(d) : n.currTemplate[c] = !0 } t && t !== b.type && n.container.removeClass("mfp-" + t + "-holder"); var e = n["get" + c.charAt(0).toUpperCase() + c.slice(1)](b, n.currTemplate[c]); n.appendContent(e, c), b.preloaded = !0, y(h, b), t = b.type, n.container.prepend(n.contentContainer), y("AfterChange") }, appendContent: function(a, b) { n.content = a, a ? n.st.showCloseBtn && n.st.closeBtnInside && n.currTemplate[b] === !0 ? n.content.find(".mfp-close").length || n.content.append(z()) : n.content = a : n.content = "", y(e), n.container.addClass("mfp-" + b + "-holder"), n.contentContainer.append(n.content) }, parseEl: function(b) { var c = n.items[b], d; c.tagName ? c = { el: a(c) } : (d = c.type, c = { data: c, src: c.src }); if (c.el) { var e = n.types; for (var f = 0; f < e.length; f++) if (c.el.hasClass("mfp-" + e[f])) { d = e[f]; break } c.src = c.el.attr("data-mfp-src"), c.src || (c.src = c.el.attr("href")) } return c.type = d || n.st.type || "inline", c.index = b, c.parsed = !0, n.items[b] = c, y("ElementParse", c), n.items[b] }, addGroup: function(a, b) { var c = function(c) { c.mfpEl = this, n._openClick(c, a, b) }; b || (b = {}); var d = "click.magnificPopup"; b.mainEl = a, b.items ? (b.isObj = !0, a.off(d).on(d, c)) : (b.isObj = !1, b.delegate ? a.off(d).on(d, b.delegate, c) : (b.items = a, a.off(d).on(d, c))) }, _openClick: function(b, c, d) { var e = d.midClick !== undefined ? d.midClick : a.magnificPopup.defaults.midClick; if (!e && (b.which === 2 || b.ctrlKey || b.metaKey || b.altKey || b.shiftKey)) return; var f = d.disableOn !== undefined ? d.disableOn : a.magnificPopup.defaults.disableOn; if (f) if (a.isFunction(f)) { if (!f.call(n)) return !0 } else if (r.width() < f) return !0; b.type && (b.preventDefault(), n.isOpen && b.stopPropagation()), d.el = a(b.mfpEl), d.delegate && (d.items = c.find(d.delegate)), n.open(d) }, updateStatus: function(a, b) { if (n.preloader) { q !== a && n.container.removeClass("mfp-s-" + q), !b && a === "loading" && (b = n.st.tLoading); var c = { status: a, text: b }; y("UpdateStatus", c), a = c.status, b = c.text, n.preloader.html(b), n.preloader.find("a").on("click", function(a) { a.stopImmediatePropagation() }), n.container.addClass("mfp-s-" + a), q = a } }, _checkIfClose: function(b) { if (a(b).hasClass(m)) return; var c = n.st.closeOnContentClick , d = n.st.closeOnBgClick; if (c && d) return !0; if (!n.content || a(b).hasClass("mfp-close") || n.preloader && b === n.preloader[0]) return !0; if (b !== n.content[0] && !a.contains(n.content[0], b)) { if (d && a.contains(document, b)) return !0 } else if (c) return !0; return !1 }, _addClassToMFP: function(a) { n.bgOverlay.addClass(a), n.wrap.addClass(a) }, _removeClassFromMFP: function(a) { this.bgOverlay.removeClass(a), n.wrap.removeClass(a) }, _hasScrollBar: function(a) { return (n.isIE7 ? s.height() : document.body.scrollHeight) > (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("