CLI_ACCEPT_COOKIE_NAME = (typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy'); CLI_PREFERNCE_COOKIE = (typeof CLI_PREFERNCE_COOKIE !== 'undefined' ? CLI_PREFERNCE_COOKIE : 'CookieLawInfoConsent'); CLI_ACCEPT_COOKIE_EXPIRE = (typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365); CLI_COOKIEBAR_AS_POPUP = (typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_AS_POPUP : false); var CLI_Cookie = { set: function (name, value, days) { var secure = ""; if (true === Boolean(Cli_Data.secure_cookies)) { secure = ";secure"; } if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); } else { var expires = ""; } document.cookie = name + "=" + value + secure + expires + "; path=/"; if (days < 1) { host_name = window.location.hostname; document.cookie = name + "=" + value + expires + "; path=/; domain=." + host_name + ";"; if (host_name.indexOf("www") != 1) { var host_name_withoutwww = host_name.replace('www', ''); document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name_withoutwww + ";"; } host_name = host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".") - 1)); document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name + ";"; } }, read: function (name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1, c.length); } if (c.indexOf(nameEQ) === 0) { return c.substring(nameEQ.length, c.length); } } return null; }, erase: function (name) { this.set(name, "", -10); }, exists: function (name) { return (this.read(name) !== null); }, getallcookies: function () { var pairs = document.cookie.split(";"); var cookieslist = {}; for (var i = 0; i < pairs.length; i++) { var pair = pairs[i].split("="); cookieslist[(pair[0] + '').trim()] = unescape(pair[1]); } return cookieslist; } } var CLI = { bar_config: {}, showagain_config: {}, allowedCategories: [], js_blocking_enabled: false, set: function (args) { if (typeof JSON.parse !== "function") { console.log("CookieLawInfo requires JSON.parse but your browser doesn't support it"); return; } if (typeof args.settings !== 'object') { this.settings = JSON.parse(args.settings); } else { this.settings = args.settings; } this.js_blocking_enabled = Boolean(Cli_Data.js_blocking); this.settings = args.settings; this.bar_elm = jQuery(this.settings.notify_div_id); this.showagain_elm = jQuery(this.settings.showagain_div_id); this.settingsModal = jQuery('#cliSettingsPopup'); /* buttons */ this.main_button = jQuery('.cli-plugin-main-button'); this.main_link = jQuery('.cli-plugin-main-link'); this.reject_link = jQuery('.cookie_action_close_header_reject'); this.delete_link = jQuery(".cookielawinfo-cookie-delete"); this.settings_button = jQuery('.cli_settings_button'); this.accept_all_button = jQuery('.wt-cli-accept-all-btn'); if (this.settings.cookie_bar_as == 'popup') { CLI_COOKIEBAR_AS_POPUP = true; } this.mayBeSetPreferenceCookie(); this.addStyleAttribute(); this.configBar(); this.toggleBar(); this.attachDelete(); this.attachEvents(); this.configButtons(); this.reviewConsent(); var cli_hidebar_on_readmore = this.hideBarInReadMoreLink(); if (Boolean(this.settings.scroll_close) === true && cli_hidebar_on_readmore === false) { window.addEventListener("scroll", CLI.closeOnScroll, false); } }, hideBarInReadMoreLink: function () { if (Boolean(CLI.settings.button_2_hidebar) === true && this.main_link.length > 0 && this.main_link.hasClass('cli-minimize-bar')) { this.hideHeader(); cliBlocker.cookieBar(false); this.showagain_elm.slideDown(this.settings.animate_speed_show); return true; } return false; }, attachEvents: function () { jQuery(document).on( 'click', '.wt-cli-privacy-btn', function (e) { e.preventDefault(); CLI.accept_close(); CLI.settingsPopUpClose(); } ); jQuery('.wt-cli-accept-btn').on( "click", function (e) { e.preventDefault(); CLI.acceptRejectCookies(jQuery(this)); }); jQuery('.wt-cli-accept-all-btn').on( "click", function (e) { e.preventDefault(); CLI.acceptRejectCookies(jQuery(this), 'accept'); }); jQuery('.wt-cli-reject-btn').on( "click", function (e) { e.preventDefault(); CLI.acceptRejectCookies(jQuery(this), 'reject'); }); this.settingsPopUp(); this.settingsTabbedAccordion(); this.toggleUserPreferenceCheckBox(); this.hideCookieBarOnClose(); this.cookieLawInfoRunCallBacks(); }, acceptRejectCookies(element, action = 'custom') { var open_link = element[0].hasAttribute("href") && element.attr("href") != '#' ? true : false; var new_window = false; if (action == 'accept') { this.enableAllCookies(); this.accept_close(); new_window = CLI.settings.button_7_new_win ? true : false; } else if (action == 'reject') { this.disableAllCookies(); this.reject_close(); new_window = Boolean(this.settings.button_3_new_win) ? true : false; } else { this.accept_close(); new_window = Boolean(this.settings.button_1_new_win) ? true : false; } if (open_link) { if (new_window) { window.open(element.attr("href"), '_blank'); } else { window.location.href = element.attr("href"); } } }, toggleUserPreferenceCheckBox: function () { jQuery('.cli-user-preference-checkbox').each( function () { categoryCookie = 'cookielawinfo-' + jQuery(this).attr('data-id'); categoryCookieValue = CLI_Cookie.read(categoryCookie); if (categoryCookieValue == null) { if (jQuery(this).is(':checked')) { CLI_Cookie.set(categoryCookie, 'yes', CLI_ACCEPT_COOKIE_EXPIRE); } else { CLI_Cookie.set(categoryCookie, 'no', CLI_ACCEPT_COOKIE_EXPIRE); } } else { if (categoryCookieValue == "yes") { jQuery(this).prop("checked", true); } else { jQuery(this).prop("checked", false); } } } ); jQuery('.cli-user-preference-checkbox').on( "click", function (e) { var dataID = jQuery(this).attr('data-id'); var currentToggleElm = jQuery('.cli-user-preference-checkbox[data-id=' + dataID + ']'); if (jQuery(this).is(':checked')) { CLI_Cookie.set('cookielawinfo-' + dataID, 'yes', CLI_ACCEPT_COOKIE_EXPIRE); currentToggleElm.prop('checked', true); } else { CLI_Cookie.set('cookielawinfo-' + dataID, 'no', CLI_ACCEPT_COOKIE_EXPIRE); currentToggleElm.prop('checked', false); } CLI.checkCategories(); CLI.generateConsent(); } ); }, settingsPopUp: function () { jQuery(document).on( 'click', '.cli_settings_button', function (e) { e.preventDefault(); CLI.settingsModal.addClass("cli-show").css({ 'opacity': 0 }).animate({ 'opacity': 1 }); CLI.settingsModal.removeClass('cli-blowup cli-out').addClass("cli-blowup"); jQuery('body').addClass("cli-modal-open"); jQuery(".cli-settings-overlay").addClass("cli-show"); jQuery("#cookie-law-info-bar").css({ 'opacity': .1 }); if (!jQuery('.cli-settings-mobile').is(':visible')) { CLI.settingsModal.find('.cli-nav-link:eq(0)').trigger("click"); } } ); jQuery('#cliModalClose').on( "click", function (e) { CLI.settingsPopUpClose(); } ); CLI.settingsModal.on( "click", function (e) { if (!(document.getElementsByClassName('cli-modal-dialog')[0].contains(e.target))) { CLI.settingsPopUpClose(); } } ); jQuery('.cli_enable_all_btn').on( "click", function (e) { var cli_toggle_btn = jQuery(this); var enable_text = cli_toggle_btn.attr('data-enable-text'); var disable_text = cli_toggle_btn.attr('data-disable-text'); if (cli_toggle_btn.hasClass('cli-enabled')) { CLI.disableAllCookies(); cli_toggle_btn.html(enable_text); } else { CLI.enableAllCookies(); cli_toggle_btn.html(disable_text); } jQuery(this).toggleClass('cli-enabled'); } ); this.privacyReadmore(); }, settingsTabbedAccordion: function () { jQuery(".cli-tab-header").on( "click", function (e) { if (!(jQuery(e.target).hasClass('cli-slider') || jQuery(e.target).hasClass('cli-user-preference-checkbox'))) { if (jQuery(this).hasClass("cli-tab-active")) { jQuery(this).removeClass("cli-tab-active"); jQuery(this) .siblings(".cli-tab-content") .slideUp(200); } else { jQuery(".cli-tab-header").removeClass("cli-tab-active"); jQuery(this).addClass("cli-tab-active"); jQuery(".cli-tab-content").slideUp(200); jQuery(this) .siblings(".cli-tab-content") .slideDown(200); } } } ); }, settingsPopUpClose: function () { this.settingsModal.removeClass('cli-show'); this.settingsModal.addClass('cli-out'); jQuery('body').removeClass("cli-modal-open"); jQuery(".cli-settings-overlay").removeClass("cli-show"); jQuery("#cookie-law-info-bar").css({ 'opacity': 1 }); }, privacyReadmore: function () { var el = jQuery('.cli-privacy-content .cli-privacy-content-text'); if (el.length > 0) { var clone = el.clone(), originalHtml = clone.html(), originalHeight = el.outerHeight(), Trunc = { addReadmore: function (textBlock) { if (textBlock.html().length > 250) { jQuery('.cli-privacy-readmore').show(); } else { jQuery('.cli-privacy-readmore').hide(); } }, truncateText: function (textBlock) { var strippedText = jQuery('
').html(textBlock.html()); strippedText.find('table').remove(); textBlock.html(strippedText.html()); currentText = textBlock.text(); if (currentText.trim().length > 250) { var newStr = currentText.substring(0, 250); textBlock.empty().html(newStr).append('...'); } }, replaceText: function (textBlock, original) { return textBlock.html(original); } }; Trunc.addReadmore(el); Trunc.truncateText(el); jQuery('a.cli-privacy-readmore').on( "click", function (e) { e.preventDefault(); if (jQuery('.cli-privacy-overview').hasClass('cli-collapsed')) { Trunc.truncateText(el); jQuery('.cli-privacy-overview').removeClass('cli-collapsed'); el.css('height', '100%'); } else { jQuery('.cli-privacy-overview').addClass('cli-collapsed'); Trunc.replaceText(el, originalHtml); } } ); } }, attachDelete: function () { this.delete_link.on( "click", function (e) { CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME); for (var k in Cli_Data.nn_cookie_ids) { CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]); } CLI.generateConsent(); return false; } ); }, configButtons: function () { /*[cookie_button] */ this.main_button.css('color', this.settings.button_1_link_colour); if (Boolean(this.settings.button_1_as_button)) { this.main_button.css('background-color', this.settings.button_1_button_colour); this.main_button.on( 'mouseenter', function () { jQuery(this).css('background-color', CLI.settings.button_1_button_hover); } ) .on( 'mouseleave', function () { jQuery(this).css('background-color', CLI.settings.button_1_button_colour); } ); } /* [cookie_link] */ this.main_link.css('color', this.settings.button_2_link_colour); if (Boolean(this.settings.button_2_as_button)) { this.main_link.css('background-color', this.settings.button_2_button_colour); this.main_link.on( 'mouseenter', function () { jQuery(this).css('background-color', CLI.settings.button_2_button_hover); } ) .on( 'mouseleave', function () { jQuery(this).css('background-color', CLI.settings.button_2_button_colour); } ); } /* [cookie_reject] */ this.reject_link.css('color', this.settings.button_3_link_colour); if (Boolean(this.settings.button_3_as_button)) { this.reject_link.css('background-color', this.settings.button_3_button_colour); this.reject_link.on( 'mouseenter', function () { jQuery(this).css('background-color', CLI.settings.button_3_button_hover); } ) .on( 'mouseleave', function () { jQuery(this).css('background-color', CLI.settings.button_3_button_colour); } ); } /* [cookie_settings] */ this.settings_button.css('color', this.settings.button_4_link_colour); if (Boolean(this.settings.button_4_as_button)) { this.settings_button.css('background-color', this.settings.button_4_button_colour); this.settings_button.on( 'mouseenter', function () { jQuery(this).css('background-color', CLI.settings.button_4_button_hover); } ) .on( 'mouseleave', function () { jQuery(this).css('background-color', CLI.settings.button_4_button_colour); } ); } /* [cookie_accept_all] */ this.accept_all_button.css('color', this.settings.button_7_link_colour); if (this.settings.button_7_as_button) { this.accept_all_button.css('background-color', this.settings.button_7_button_colour); this.accept_all_button.on( 'mouseenter', function () { jQuery(this).css('background-color', CLI.settings.button_7_button_hover); } ) .on( 'mouseleave', function () { jQuery(this).css('background-color', CLI.settings.button_7_button_colour); } ); } }, toggleBar: function () { if (CLI_COOKIEBAR_AS_POPUP) { this.barAsPopUp(1); } if (CLI.settings.cookie_bar_as == 'widget') { this.barAsWidget(1); } if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) { this.displayHeader(); } else { this.hideHeader(); } if (Boolean(this.settings.show_once_yn)) { setTimeout( function () { CLI.close_header(); }, CLI.settings.show_once ); } if (CLI.js_blocking_enabled === false) { if (Boolean(Cli_Data.ccpaEnabled) === true) { if (Cli_Data.ccpaType === 'ccpa' && Boolean(Cli_Data.ccpaBarEnabled) === false) { cliBlocker.cookieBar(false); } } else { jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove(); } } this.showagain_elm.on( "click", function (e) { e.preventDefault(); CLI.showagain_elm.slideUp( CLI.settings.animate_speed_hide, function () { CLI.bar_elm.slideDown(CLI.settings.animate_speed_show); if (CLI_COOKIEBAR_AS_POPUP) { CLI.showPopupOverlay(); } } ); } ); }, configShowAgain: function () { this.showagain_config = { 'background-color': this.settings.background, 'color': this.l1hs(this.settings.text), 'position': 'fixed', 'font-family': this.settings.font_family }; if (Boolean(this.settings.border_on)) { var border_to_hide = 'border-' + this.settings.notify_position_vertical; this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border); this.showagain_config[border_to_hide] = 'none'; } var cli_win = jQuery(window); var cli_winw = cli_win.width(); var showagain_x_pos = this.settings.showagain_x_position; if (cli_winw < 300) { showagain_x_pos = 10; this.showagain_config.width = cli_winw - 20; } else { this.showagain_config.width = 'auto'; } var cli_defw = cli_winw > 400 ? 500 : cli_winw - 20; if (CLI_COOKIEBAR_AS_POPUP) { /* cookie bar as popup */ var sa_pos = this.settings.popup_showagain_position; var sa_pos_arr = sa_pos.split('-'); if (sa_pos_arr[1] == 'left') { this.showagain_config.left = showagain_x_pos; } else if (sa_pos_arr[1] == 'right') { this.showagain_config.right = showagain_x_pos; } if (sa_pos_arr[0] == 'top') { this.showagain_config.top = 0; } else if (sa_pos_arr[0] == 'bottom') { this.showagain_config.bottom = 0; } this.bar_config['position'] = 'fixed'; } else if (this.settings.cookie_bar_as == 'widget') { this.showagain_config.bottom = 0; if (this.settings.widget_position == 'left') { this.showagain_config.left = showagain_x_pos; } else if (this.settings.widget_position == 'right') { this.showagain_config.right = showagain_x_pos; } } else { if (this.settings.notify_position_vertical == "top") { this.showagain_config.top = '0'; } else if (this.settings.notify_position_vertical == "bottom") { this.bar_config['position'] = 'fixed'; this.bar_config['bottom'] = '0'; this.showagain_config.bottom = '0'; } if (this.settings.notify_position_horizontal == "left") { this.showagain_config.left = showagain_x_pos; } else if (this.settings.notify_position_horizontal == "right") { this.showagain_config.right = showagain_x_pos; } } this.showagain_elm.css(this.showagain_config); }, configBar: function () { this.bar_config = { 'background-color': this.settings.background, 'color': this.settings.text, 'font-family': this.settings.font_family }; if (this.settings.notify_position_vertical == "top") { this.bar_config['top'] = '0'; if (Boolean(this.settings.header_fix) === true) { this.bar_config['position'] = 'fixed'; } } else { this.bar_config['bottom'] = '0'; } this.configShowAgain(); this.bar_elm.css(this.bar_config).hide(); }, l1hs: function (str) { if (str.charAt(0) == "#") { str = str.substring(1, str.length); } else { return "#" + str; } return this.l1hs(str); }, close_header: function () { CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE); this.hideHeader(); }, accept_close: function () { this.hidePopupOverlay(); this.generateConsent(); this.cookieLawInfoRunCallBacks(); CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE); if (Boolean(this.settings.notify_animate_hide)) { if (CLI.js_blocking_enabled === true) { this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts); } else { this.bar_elm.slideUp(this.settings.animate_speed_hide); } } else { if (CLI.js_blocking_enabled === true) { this.bar_elm.hide(0, cliBlocker.runScripts); } else { this.bar_elm.hide(); } } if (Boolean(this.settings.showagain_tab)) { this.showagain_elm.slideDown(this.settings.animate_speed_show); } if (Boolean(this.settings.accept_close_reload) === true) { this.reload_current_page(); } return false; }, reject_close: function () { this.hidePopupOverlay(); this.generateConsent(); this.cookieLawInfoRunCallBacks(); for (var k in Cli_Data.nn_cookie_ids) { CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]); } CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'no', CLI_ACCEPT_COOKIE_EXPIRE); if (Boolean(this.settings.notify_animate_hide)) { if (CLI.js_blocking_enabled === true) { this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts); } else { this.bar_elm.slideUp(this.settings.animate_speed_hide); } } else { if (CLI.js_blocking_enabled === true) { this.bar_elm.hide(cliBlocker.runScripts); } else { this.bar_elm.hide(); } } if (Boolean(this.settings.showagain_tab)) { this.showagain_elm.slideDown(this.settings.animate_speed_show); } if (Boolean(this.settings.reject_close_reload) === true) { this.reload_current_page(); } return false; }, reload_current_page: function () { window.location.reload(true); }, closeOnScroll: function () { if (window.pageYOffset > 100 && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) { CLI.accept_close(); if (Boolean(CLI.settings.scroll_close_reload) === true) { window.location.reload(); } window.removeEventListener("scroll", CLI.closeOnScroll, false); } }, displayHeader: function () { if (Boolean(this.settings.notify_animate_show)) { this.bar_elm.slideDown(this.settings.animate_speed_show); } else { this.bar_elm.show(); } this.showagain_elm.hide(); if (CLI_COOKIEBAR_AS_POPUP) { this.showPopupOverlay(); } }, hideHeader: function () { if (Boolean(this.settings.showagain_tab)) { if (Boolean(this.settings.notify_animate_show)) { this.showagain_elm.slideDown(this.settings.animate_speed_show); } else { this.showagain_elm.show(); } } else { this.showagain_elm.hide(); } this.bar_elm.slideUp(this.settings.animate_speed_show); this.hidePopupOverlay(); }, hidePopupOverlay: function () { jQuery('body').removeClass("cli-barmodal-open"); jQuery(".cli-popupbar-overlay").removeClass("cli-show"); }, showPopupOverlay: function () { if (this.bar_elm.length) { if (Boolean(this.settings.popup_overlay)) { jQuery('body').addClass("cli-barmodal-open"); jQuery(".cli-popupbar-overlay").addClass("cli-show"); } } }, barAsWidget: function (a) { var cli_elm = this.bar_elm; cli_elm.attr('data-cli-type', 'widget'); var cli_win = jQuery(window); var cli_winh = cli_win.height() - 40; var cli_winw = cli_win.width(); var cli_defw = cli_winw > 400 ? 300 : cli_winw - 30; cli_elm.css( { 'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'overflow': 'auto', 'position': 'fixed', 'box-sizing': 'border-box' } ); if (this.checkifStyleAttributeExist() === false) { cli_elm.css({ 'padding': '25px 15px' }); } if (this.settings.widget_position == 'left') { cli_elm.css( { 'left': '15px', 'right': 'auto', 'bottom': '15px', 'top': 'auto' } ); } else { cli_elm.css( { 'left': 'auto', 'right': '15px', 'bottom': '15px', 'top': 'auto' } ); } if (a) { this.setResize(); } }, barAsPopUp: function (a) { if (typeof cookie_law_info_bar_as_popup === 'function') { return false; } var cli_elm = this.bar_elm; cli_elm.attr('data-cli-type', 'popup'); var cli_win = jQuery(window); var cli_winh = cli_win.height() - 40; var cli_winw = cli_win.width(); var cli_defw = cli_winw > 700 ? 500 : cli_winw - 20; cli_elm.css( { 'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'bottom': '', 'top': '50%', 'left': '50%', 'margin-left': (cli_defw / 2) * -1, 'margin-top': '-100px', 'overflow': 'auto' } ).addClass('cli-bar-popup cli-modal-content'); if (this.checkifStyleAttributeExist() === false) { cli_elm.css({ 'padding': '25px 15px' }); } cli_h = cli_elm.height(); li_h = cli_h < 200 ? 200 : cli_h; cli_elm.css({ 'top': '50%', 'margin-top': ((cli_h / 2) + 30) * -1 }); setTimeout( function () { cli_elm.css( { 'bottom': '' } ); }, 100 ); if (a) { this.setResize(); } }, setResize: function () { var resizeTmr = null; jQuery(window).resize( function () { clearTimeout(resizeTmr); resizeTmr = setTimeout( function () { if (CLI_COOKIEBAR_AS_POPUP) { CLI.barAsPopUp(); } if (CLI.settings.cookie_bar_as == 'widget') { CLI.barAsWidget(); } CLI.configShowAgain(); }, 500 ); } ); }, enableAllCookies: function () { jQuery('.cli-user-preference-checkbox').each( function () { var cli_chkbox_elm = jQuery(this); var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id'); if (cli_chkbox_data_id != 'checkbox-necessary') { cli_chkbox_elm.prop('checked', true); CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'yes', CLI_ACCEPT_COOKIE_EXPIRE); } } ); }, disableAllCookies: function () { jQuery('.cli-user-preference-checkbox').each( function () { var cli_chkbox_elm = jQuery(this); var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id'); cliCategorySlug = cli_chkbox_data_id.replace('checkbox-', ''); if (Cli_Data.strictlyEnabled.indexOf(cliCategorySlug) === -1) { cli_chkbox_elm.prop('checked', false); CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'no', CLI_ACCEPT_COOKIE_EXPIRE); } } ); }, hideCookieBarOnClose: function () { jQuery(document).on( 'click', '.cli_cookie_close_button', function (e) { e.preventDefault(); var elm = jQuery(this); if (Cli_Data.ccpaType === 'ccpa') { CLI.enableAllCookies(); } CLI.accept_close(); } ); }, checkCategories: function () { var cliAllowedCategories = []; var cli_categories = {}; jQuery('.cli-user-preference-checkbox').each( function () { var status = false; cli_chkbox_elm = jQuery(this); cli_chkbox_data_id = cli_chkbox_elm.attr('data-id'); cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', ''); cli_chkbox_data_id_trimmed = cli_chkbox_data_id.replace('-', '_') if (jQuery(cli_chkbox_elm).is(':checked')) { status = true; cliAllowedCategories.push(cli_chkbox_data_id); } cli_categories[cli_chkbox_data_id_trimmed] = status; } ); CLI.allowedCategories = cliAllowedCategories; }, cookieLawInfoRunCallBacks: function () { this.checkCategories(); if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes') { if ("function" == typeof CookieLawInfo_Accept_Callback) { CookieLawInfo_Accept_Callback(); } } }, generateConsent: function () { var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE); cliConsent = {}; if (preferenceCookie !== null) { cliConsent = window.atob(preferenceCookie); cliConsent = JSON.parse(cliConsent); } cliConsent.ver = Cli_Data.consentVersion; categories = []; jQuery('.cli-user-preference-checkbox').each( function () { categoryVal = ''; cli_chkbox_data_id = jQuery(this).attr('data-id'); cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', ''); if (jQuery(this).is(':checked')) { categoryVal = true; } else { categoryVal = false; } cliConsent[cli_chkbox_data_id] = categoryVal; } ); cliConsent = JSON.stringify(cliConsent); cliConsent = window.btoa(cliConsent); CLI_Cookie.set(CLI_PREFERNCE_COOKIE, cliConsent, CLI_ACCEPT_COOKIE_EXPIRE); }, addStyleAttribute: function () { var bar = this.bar_elm; var styleClass = ''; if (jQuery(bar).find('.cli-bar-container').length > 0) { styleClass = jQuery('.cli-bar-container').attr('class'); styleClass = styleClass.replace('cli-bar-container', ''); styleClass = styleClass.trim(); jQuery(bar).attr('data-cli-style', styleClass); } }, getParameterByName: function (name, url) { if (!url) { url = window.location.href; } name = name.replace(/[\[\]]/g, '\\$&'); var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url); if (!results) { return null; } if (!results[2]) { return ''; } return decodeURIComponent(results[2].replace(/\+/g, ' ')); }, CookieLawInfo_Callback: function (enableBar, enableBlocking) { enableBar = typeof enableBar !== 'undefined' ? enableBar : true; enableBlocking = typeof enableBlocking !== 'undefined' ? enableBlocking : true; if (CLI.js_blocking_enabled === true && Boolean(Cli_Data.custom_integration) === true) { cliBlocker.cookieBar(enableBar); cliBlocker.runScripts(enableBlocking); } }, checkifStyleAttributeExist: function () { var exist = false; var attr = this.bar_elm.attr('data-cli-style'); if (typeof attr !== typeof undefined && attr !== false) { exist = true; } return exist; }, reviewConsent: function () { jQuery(document).on( 'click', '.cli_manage_current_consent,.wt-cli-manage-consent-link', function () { CLI.displayHeader(); } ); }, mayBeSetPreferenceCookie: function () { if (CLI.getParameterByName('cli_bypass') === "1") { CLI.generateConsent(); } } } var cliBlocker = { blockingStatus: true, scriptsLoaded: false, ccpaEnabled: false, ccpaRegionBased: false, ccpaApplicable: false, ccpaBarEnabled: false, cliShowBar: true, isBypassEnabled: CLI.getParameterByName('cli_bypass'), checkPluginStatus: function (callbackA, callbackB) { this.ccpaEnabled = Boolean(Cli_Data.ccpaEnabled); this.ccpaRegionBased = Boolean(Cli_Data.ccpaRegionBased); this.ccpaBarEnabled = Boolean(Cli_Data.ccpaBarEnabled); if (Boolean(Cli_Data.custom_integration) === true) { callbackA(false); } else { if (this.ccpaEnabled === true) { this.ccpaApplicable = true; if (Cli_Data.ccpaType === 'ccpa') { if (this.ccpaBarEnabled !== true) { this.cliShowBar = false; this.blockingStatus = false; } } } else { jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove(); } if (cliBlocker.isBypassEnabled === "1") { cliBlocker.blockingStatus = false; } callbackA(this.cliShowBar); callbackB(this.blockingStatus); } }, cookieBar: function (showbar) { showbar = typeof showbar !== 'undefined' ? showbar : true; cliBlocker.cliShowBar = showbar; if (cliBlocker.cliShowBar === false) { CLI.bar_elm.hide(); CLI.showagain_elm.hide(); CLI.settingsModal.removeClass('cli-blowup cli-out'); CLI.hidePopupOverlay(); jQuery(".cli-settings-overlay").removeClass("cli-show"); } else { if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) { CLI.displayHeader(); } else { CLI.hideHeader(); } } }, removeCookieByCategory: function () { if (cliBlocker.blockingStatus === true) { if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) !== null) { var non_necessary_cookies = Cli_Data.non_necessary_cookies; for (var key in non_necessary_cookies) { currentCategory = key; if (CLI.allowedCategories.indexOf(currentCategory) === -1) { var nonNecessaryCookies = non_necessary_cookies[currentCategory]; for (var i = 0; i < nonNecessaryCookies.length; i++) { if (CLI_Cookie.read(nonNecessaryCookies[i]) !== null) { CLI_Cookie.erase(nonNecessaryCookies[i]); } } } } } } }, runScripts: function (blocking) { blocking = typeof blocking !== 'undefined' ? blocking : true; cliBlocker.blockingStatus = blocking; srcReplaceableElms = ['iframe', 'IFRAME', 'EMBED', 'embed', 'OBJECT', 'object', 'IMG', 'img']; var genericFuncs = { renderByElement: function (callback) { cliScriptFuncs.renderScripts(); callback(); cliBlocker.scriptsLoaded = true; }, }; var cliScriptFuncs = { // trigger DOMContentLoaded scriptsDone: function () { if (typeof Cli_Data.triggerDomRefresh !== 'undefined') { if (Boolean(Cli_Data.triggerDomRefresh) === true) { var DOMContentLoadedEvent = document.createEvent('Event') DOMContentLoadedEvent.initEvent('DOMContentLoaded', true, true) window.document.dispatchEvent(DOMContentLoadedEvent); } } }, seq: function (arr, callback, index) { // first call, without an index if (typeof index === 'undefined') { index = 0 } arr[index]( function () { index++ if (index === arr.length) { callback() } else { cliScriptFuncs.seq(arr, callback, index) } } ) }, /* script runner */ insertScript: function ($script, callback) { var s = ''; var scriptType = $script.getAttribute('data-cli-script-type'); var elementPosition = $script.getAttribute('data-cli-element-position'); var isBlock = $script.getAttribute('data-cli-block'); var s = document.createElement('script'); var ccpaOptedOut = cliBlocker.ccpaOptedOut(); s.type = 'text/plain'; if ($script.async) { s.async = $script.async; } if ($script.defer) { s.defer = $script.defer; } if ($script.src) { s.onload = callback s.onerror = callback s.src = $script.src } else { s.textContent = $script.innerText } var attrs = jQuery($script).prop("attributes"); for (var ii = 0; ii < attrs.length; ++ii) { if (attrs[ii].nodeName !== 'id') { s.setAttribute(attrs[ii].nodeName, attrs[ii].value); } } if (cliBlocker.blockingStatus === true) { if ((CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes' && CLI.allowedCategories.indexOf(scriptType) !== -1)) { s.setAttribute('data-cli-consent', 'accepted'); s.type = 'text/javascript'; } if (cliBlocker.ccpaApplicable === true) { if (ccpaOptedOut === true || CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null) { s.type = 'text/plain'; } } } else { s.type = 'text/javascript'; } if ($script.type != s.type) { if (elementPosition === 'head') { document.head.appendChild(s); } else { document.body.appendChild(s); } if (!$script.src) { callback() } $script.parentNode.removeChild($script); } else { callback(); } }, renderScripts: function () { var $scripts = document.querySelectorAll('script[data-cli-class="cli-blocker-script"]'); if ($scripts.length > 0) { var runList = [] var typeAttr Array.prototype.forEach.call( $scripts, function ($script) { // only run script tags without the type attribute // or with a javascript mime attribute value typeAttr = $script.getAttribute('type') runList.push( function (callback) { cliScriptFuncs.insertScript($script, callback) } ) } ) cliScriptFuncs.seq(runList, cliScriptFuncs.scriptsDone); } } }; genericFuncs.renderByElement(cliBlocker.removeCookieByCategory); }, ccpaOptedOut: function () { var ccpaOptedOut = false; var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE); if (preferenceCookie !== null) { cliConsent = window.atob(preferenceCookie); cliConsent = JSON.parse(cliConsent); if (typeof cliConsent.ccpaOptout !== 'undefined') { ccpaOptedOut = cliConsent.ccpaOptout; } } return ccpaOptedOut; } } jQuery(document).ready( function () { if (typeof cli_cookiebar_settings != 'undefined') { CLI.set( { settings: cli_cookiebar_settings } ); if (CLI.js_blocking_enabled === true) { cliBlocker.checkPluginStatus(cliBlocker.cookieBar, cliBlocker.runScripts); } } } ); ; (function( $ ) { 'use strict'; var CCPA = { ccpaOptedOut: false, ccpaOptOutConfirmationOpen: false, set: function() { this.setCheckboxState(); jQuery( document ).on( 'click', '.wt-cli-ccpa-opt-out-checkbox', function() { CCPA.ccpaOptedOut = false; if (this.checked === true ) { CCPA.ccpaOptedOut = true; } CCPA.optOutCcpa(); } ); jQuery( document ).on( 'click', '.wt-cli-ccpa-opt-out:not(.wt-cli-ccpa-opt-out-checkbox)', function(){ CCPA.showCcpaOptOutConfirmBox(); } ) }, setCheckboxState : function() { var cliConsent = {}; var preferenceCookie = CLI_Cookie.read( CLI_PREFERNCE_COOKIE ); if ( preferenceCookie !== null ) { cliConsent = CCPA.parseCookie( preferenceCookie ); if ( typeof( cliConsent.ccpaOptout ) !== 'undefined') { if ( cliConsent.ccpaOptout === true ) { jQuery( '.wt-cli-ccpa-opt-out-checkbox' ).prop( 'checked',true ); } else { jQuery( '.wt-cli-ccpa-opt-out-checkbox' ).prop( 'checked',false ); } } } }, optOutCcpa: function() { var preferenceCookie = CLI_Cookie.read( CLI_PREFERNCE_COOKIE ); var cliConsent = {}; if ( preferenceCookie !== null ) { cliConsent = CCPA.parseCookie( preferenceCookie ); } cliConsent.ccpaOptout = this.ccpaOptedOut; cliConsent = JSON.stringify( cliConsent ); cliConsent = window.btoa( cliConsent ); CLI_Cookie.set( CLI_PREFERNCE_COOKIE,cliConsent,CLI_ACCEPT_COOKIE_EXPIRE ); this.setCheckboxState(); }, parseCookie: function( preferenceCookie ) { var cliConsent = {}; cliConsent = window.atob( preferenceCookie ); cliConsent = JSON.parse( cliConsent ); return cliConsent; }, toggleCCPA: function() { }, checkAuthentication: function() { }, showCcpaOptOutConfirmBox: function() { var css = '.cli-alert-dialog-buttons button {\ -webkit-box-flex: 1!important;\ -ms-flex: 1!important;\ flex: 1!important;\ -webkit-appearance: none!important;\ -moz-appearance: none!important;\ appearance: none!important;\ margin: 4px!important;\ padding: 8px 16px!important;\ border-radius: 64px!important;\ cursor: pointer!important;\ font-weight: 700!important;\ font-size: 12px !important;\ color: #fff;\ text-align: center!important;\ text-transform: capitalize;\ border: 2px solid #61a229;\ } #cLiCcpaOptoutPrompt .cli-modal-dialog{\ max-width: 320px;\ }\ #cLiCcpaOptoutPrompt .cli-modal-content {\ box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\ -webkit-box-shadow:0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\ -moz-box-shadow0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\ }\ .cli-alert-dialog-content {\ font-size: 14px;\ }\ .cli-alert-dialog-buttons {\ padding-top:5px;\ }\ button.cli-ccpa-button-cancel {\ background: transparent !important;\ color: #61a229;\ }\ button.cli-ccpa-button-confirm {\ background-color:#61a229;\ color:#ffffff;\ }'; var head = document.head || document.getElementsByTagName( 'head' )[0]; var style = document.createElement( 'style' ); var primaryColor = CLI.settings.button_1_button_colour; var primaryLinkColor = CLI.settings.button_1_link_colour; var backgroundColor = CLI.settings.background; var textColor = CLI.settings.text; CCPA.ccpaOptOutConfirmationOpen = false; var ccpaPrompt, $this = this; (ccpaPrompt = document.createElement( "div" )).classList.add( "cli-modal", "cli-show", "cli-blowup" ); ccpaPrompt.id = "cLiCcpaOptoutPrompt"; var t = document.createElement( "div" ); t.className = "cli-modal-dialog"; var n = document.createElement( "div" ); n.classList.add( "cli-modal-content","cli-bar-popup" ); var o = document.createElement( "div" ); o.className = "cli-modal-body"; var p = document.createElement( "div" ); p.classList.add( "wt-cli-element", "cli-container-fluid", "cli-tab-container" ); var q = document.createElement( "div" ); q.className = "cli-row"; var r = document.createElement( "div" ); r.classList.add( "cli-col-12" ); var x = document.createElement( "div" ); x.classList.add( "cli-modal-backdrop", "cli-fade", "cli-settings-overlay", "cli-show" ); var a = document.createElement( "button" ); var b = document.createElement( "button" ); var c = document.createElement( "div" ); var d = document.createElement( "div" ); d.className = "cli-alert-dialog-content", d.innerText = ccpa_data.opt_out_prompt, c.className = "cli-alert-dialog-buttons"; a.className = "cli-ccpa-button-confirm", a.innerText = ccpa_data.opt_out_confirm, a.addEventListener( "click", function() { CCPA.ccpaOptedOut = true, CCPA.optOutCcpa(), document.body.removeChild( ccpaPrompt ), document.body.removeChild( x ), document.body.classList.remove( "cli-modal-open" ); head.removeChild( style ); if ( Cli_Data.ccpaType === 'ccpa' ) { CLI.enableAllCookies(); CLI.accept_close(); } } ), b.className = "cli-ccpa-button-cancel", b.innerText = ccpa_data.opt_out_cancel, b.addEventListener( "click", function() { CCPA.ccpaOptedOut = false, CCPA.optOutCcpa(), document.body.removeChild( ccpaPrompt ), document.body.removeChild( x ), document.body.classList.remove( "cli-modal-open" ); head.removeChild( style ); if ( Cli_Data.ccpaType === 'ccpa' ) { CLI.enableAllCookies(); CLI.accept_close(); } } ), ccpaPrompt.addEventListener( "click", function( event ) { event.stopPropagation(); if ( ccpaPrompt !== event.target) { return; } document.body.removeChild( ccpaPrompt ), document.body.removeChild( x ), document.body.classList.remove( "cli-modal-open" ); head.removeChild( style ); } ), ccpaPrompt.appendChild( t ), t.appendChild( n ), n.appendChild( o ), o.appendChild( p ), p.appendChild( q ), q.appendChild( r ), r.appendChild( d ), r.appendChild( c ), c.appendChild( b ), c.appendChild( a ), head.appendChild( style ); style.type = 'text/css'; if (style.styleSheet) { // This is required for IE8 and below. style.styleSheet.cssText = css; } else { style.appendChild( document.createTextNode( css ) ); } document.body.appendChild( ccpaPrompt ); document.body.appendChild( x ); document.body.classList.add( "cli-modal-open" ); }, } jQuery( document ).ready( function() { CCPA.set(); } ); })( jQuery ); ; /* Modernizr 2.8.3 (Custom Build) | Build: http://modernizr.com/download/#-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load */ ;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.8.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e});for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f
'),""!==o.brand){var r=e('
'+o.brand+"
");e(a).append(r)}i.btn=e(["<"+o.parentTag+' aria-haspopup="true" tabindex="0" class="'+l+"_btn "+l+'_collapsed">',''+o.label+"",'','','','',"",""].join("")),e(a).append(i.btn),e(o.prependTo).prepend(a),a.append(i.mobileNav);var d=i.mobileNav.find("li");e(d).each(function(){var n=e(this),t={};if(t.children=n.children("ul").attr("role","menu"),n.data("menu",t),t.children.length>0){var a=n.contents(),s=!1,r=[];e(a).each(function(){return e(this).is("ul")?!1:(r.push(this),void(e(this).is("a")&&(s=!0)))});var d=e("<"+o.parentTag+' role="menuitem" aria-haspopup="true" tabindex="-1" class="'+l+'_item"/>');if(o.allowParentLinks&&!o.nestedParentLinks&&s)e(r).wrapAll('').parent();else{var c=e(r).wrapAll(d).parent();c.addClass(l+"_row")}n.addClass(o.showChildren?l+"_open":l+"_collapsed"),n.addClass(l+"_parent");var p=e(''+(o.showChildren?o.openedSymbol:o.closedSymbol)+"");o.allowParentLinks&&!o.nestedParentLinks&&s&&(p=p.wrap(d).parent()),e(r).last().after(p)}else 0===n.children().length&&n.addClass(l+"_txtnode");n.children("a").attr("role","menuitem").click(function(n){o.closeOnClick&&!e(n.target).parent().closest("li").hasClass(l+"_parent")&&e(i.btn).click()}),o.closeOnClick&&o.allowParentLinks&&(n.children("a").children("a").click(function(n){e(i.btn).click()}),n.find("."+l+"_parent-link a:not(."+l+"_item)").click(function(n){e(i.btn).click()}))}),e(d).each(function(){var n=e(this).data("menu");o.showChildren||i._visibilityToggle(n.children,null,!1,null,!0)}),i._visibilityToggle(i.mobileNav,null,!1,"init",!0),i.mobileNav.attr("role","menu"),e(n).mousedown(function(){i._outlines(!1)}),e(n).keyup(function(){i._outlines(!0)}),e(i.btn).click(function(e){e.preventDefault(),i._menuToggle()}),i.mobileNav.on("click","."+l+"_item",function(n){n.preventDefault(),i._itemClick(e(this))}),e(i.btn).keydown(function(e){var n=e||event;13==n.keyCode&&(e.preventDefault(),i._menuToggle())}),i.mobileNav.on("keydown","."+l+"_item",function(n){var t=n||event;13==t.keyCode&&(n.preventDefault(),i._itemClick(e(n.target)))}),o.allowParentLinks&&o.nestedParentLinks&&e("."+l+"_item a").click(function(e){e.stopImmediatePropagation()})},a.prototype._menuToggle=function(e){var n=this,t=n.btn,a=n.mobileNav;t.hasClass(l+"_collapsed")?(t.removeClass(l+"_collapsed"),t.addClass(l+"_open")):(t.removeClass(l+"_open"),t.addClass(l+"_collapsed")),t.addClass(l+"_animating"),n._visibilityToggle(a,t.parent(),!0,t)},a.prototype._itemClick=function(e){var n=this,t=n.settings,a=e.data("menu");a||(a={},a.arrow=e.children("."+l+"_arrow"),a.ul=e.next("ul"),a.parent=e.parent(),a.parent.hasClass(l+"_parent-link")&&(a.parent=e.parent().parent(),a.ul=e.parent().next("ul")),e.data("menu",a)),a.parent.hasClass(l+"_collapsed")?(a.arrow.html(t.openedSymbol),a.parent.removeClass(l+"_collapsed"),a.parent.addClass(l+"_open"),a.parent.addClass(l+"_animating"),n._visibilityToggle(a.ul,a.parent,!0,e)):(a.arrow.html(t.closedSymbol),a.parent.addClass(l+"_collapsed"),a.parent.removeClass(l+"_open"),a.parent.addClass(l+"_animating"),n._visibilityToggle(a.ul,a.parent,!0,e))},a.prototype._visibilityToggle=function(n,t,a,i,s){var o=this,r=o.settings,d=o._getActionItems(n),c=0;a&&(c=r.duration),n.hasClass(l+"_hidden")?(n.removeClass(l+"_hidden"),s||r.beforeOpen(i),n.slideDown(c,r.easingOpen,function(){e(i).removeClass(l+"_animating"),e(t).removeClass(l+"_animating"),s||r.afterOpen(i)}),n.attr("aria-hidden","false"),d.attr("tabindex","0"),o._setVisAttr(n,!1)):(n.addClass(l+"_hidden"),s?"init"==i&&r.init():r.beforeClose(i),n.slideUp(c,this.settings.easingClose,function(){n.attr("aria-hidden","true"),d.attr("tabindex","-1"),o._setVisAttr(n,!0),n.hide(),e(i).removeClass(l+"_animating"),e(t).removeClass(l+"_animating"),s?"init"==i&&r.init():r.afterClose(i)}))},a.prototype._setVisAttr=function(n,t){var a=this,i=n.children("li").children("ul").not("."+l+"_hidden");i.each(t?function(){var n=e(this);n.attr("aria-hidden","true");var i=a._getActionItems(n);i.attr("tabindex","-1"),a._setVisAttr(n,t)}:function(){var n=e(this);n.attr("aria-hidden","false");var i=a._getActionItems(n);i.attr("tabindex","0"),a._setVisAttr(n,t)})},a.prototype._getActionItems=function(e){var n=e.data("menu");if(!n){n={};var t=e.children("li"),a=t.find("a");n.links=a.add(t.find("."+l+"_item")),e.data("menu",n)}return n.links},a.prototype._outlines=function(n){n?e("."+l+"_item, ."+l+"_btn").css("outline",""):e("."+l+"_item, ."+l+"_btn").css("outline","none")},a.prototype.toggle=function(){var e=this;e._menuToggle()},a.prototype.open=function(){var e=this;e.btn.hasClass(l+"_collapsed")&&e._menuToggle()},a.prototype.close=function(){var e=this;e.btn.hasClass(l+"_open")&&e._menuToggle()},e.fn[s]=function(n){var t=arguments;if(void 0===n||"object"==typeof n)return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new a(this,n))});if("string"==typeof n&&"_"!==n[0]&&"init"!==n){var i;return this.each(function(){var l=e.data(this,"plugin_"+s);l instanceof a&&"function"==typeof l[n]&&(i=l[n].apply(l,Array.prototype.slice.call(t,1)))}),void 0!==i?i:this}}}(jQuery,document,window); jQuery(document).ready(function($){ $(function(){ $('.mh-main-nav').slicknav({ prependTo:'.mh-header-mobile-nav', duration: 500, allowParentLinks: true }); $('.mh-footer-nav').slicknav({ prependTo:'.mh-footer-mobile-nav', duration: 500, allowParentLinks: true }); }); }); /* jQuery FlexSlider v2.5.0 */ !function($){$.flexslider=function(e,t){var a=$(e);a.vars=$.extend({},$.flexslider.defaults,t);var n=a.vars.namespace,i=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,s=("ontouchstart"in window||i||window.DocumentTouch&&document instanceof DocumentTouch)&&a.vars.touch,r="click touchend MSPointerUp keyup",o="",l,c="vertical"===a.vars.direction,d=a.vars.reverse,u=a.vars.itemWidth>0,v="fade"===a.vars.animation,p=""!==a.vars.asNavFor,m={},f=!0;$.data(e,"flexslider",a),m={init:function(){a.animating=!1,a.currentSlide=parseInt(a.vars.startAt?a.vars.startAt:0,10),isNaN(a.currentSlide)&&(a.currentSlide=0),a.animatingTo=a.currentSlide,a.atEnd=0===a.currentSlide||a.currentSlide===a.last,a.containerSelector=a.vars.selector.substr(0,a.vars.selector.search(" ")),a.slides=$(a.vars.selector,a),a.container=$(a.containerSelector,a),a.count=a.slides.length,a.syncExists=$(a.vars.sync).length>0,"slide"===a.vars.animation&&(a.vars.animation="swing"),a.prop=c?"top":"marginLeft",a.args={},a.manualPause=!1,a.stopped=!1,a.started=!1,a.startTimeout=null,a.transitions=!a.vars.video&&!v&&a.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(void 0!==e.style[t[n]])return a.pfx=t[n].replace("Perspective","").toLowerCase(),a.prop="-"+a.pfx+"-transform",!0;return!1}(),a.ensureAnimationEnd="",""!==a.vars.controlsContainer&&(a.controlsContainer=$(a.vars.controlsContainer).length>0&&$(a.vars.controlsContainer)),""!==a.vars.manualControls&&(a.manualControls=$(a.vars.manualControls).length>0&&$(a.vars.manualControls)),""!==a.vars.customDirectionNav&&(a.customDirectionNav=2===$(a.vars.customDirectionNav).length&&$(a.vars.customDirectionNav)),a.vars.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-.5}),a.container.empty().append(a.slides)),a.doMath(),a.setup("init"),a.vars.controlNav&&m.controlNav.setup(),a.vars.directionNav&&m.directionNav.setup(),a.vars.keyboard&&(1===$(a.containerSelector).length||a.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!a.animating&&(39===t||37===t)){var n=39===t?a.getTarget("next"):37===t?a.getTarget("prev"):!1;a.flexAnimate(n,a.vars.pauseOnAction)}}),a.vars.mousewheel&&a.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=a.getTarget(0>t?"next":"prev");a.flexAnimate(s,a.vars.pauseOnAction)}),a.vars.pausePlay&&m.pausePlay.setup(),a.vars.slideshow&&a.vars.pauseInvisible&&m.pauseInvisible.init(),a.vars.slideshow&&(a.vars.pauseOnHover&&a.hover(function(){a.manualPlay||a.manualPause||a.pause()},function(){a.manualPause||a.manualPlay||a.stopped||a.play()}),a.vars.pauseInvisible&&m.pauseInvisible.isHidden()||(a.vars.initDelay>0?a.startTimeout=setTimeout(a.play,a.vars.initDelay):a.play())),p&&m.asNav.setup(),s&&a.vars.touch&&m.touch(),(!v||v&&a.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",m.resize),a.find("img").attr("draggable","false"),setTimeout(function(){a.vars.start(a)},200)},asNav:{setup:function(){a.asNav=!0,a.animatingTo=Math.floor(a.currentSlide/a.move),a.currentItem=a.currentSlide,a.slides.removeClass(n+"active-slide").eq(a.currentItem).addClass(n+"active-slide"),i?(e._slider=a,a.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),n=t.index();$(a.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(a.direction=a.currentItem=s&&t.hasClass(n+"active-slide")?a.flexAnimate(a.getTarget("prev"),!0):$(a.vars.asNavFor).data("flexslider").animating||t.hasClass(n+"active-slide")||(a.direction=a.currentItem'),a.pagingCount>1)for(var l=0;l':""+t+"","thumbnails"===a.vars.controlNav&&!0===a.vars.thumbCaptions){var c=s.attr("data-thumbcaption");""!==c&&void 0!==c&&(i+=''+c+"")}a.controlNavScaffold.append("
  • "+i+"
  • "),t++}a.controlsContainer?$(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold),m.controlNav.set(),m.controlNav.active(),a.controlNavScaffold.delegate("a, img",r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},setupManual:function(){a.controlNav=a.manualControls,m.controlNav.active(),a.controlNav.bind(r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===a.vars.controlNav?"img":"a";a.controlNav=$("."+n+"control-nav li "+e,a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(n+"active").eq(a.animatingTo).addClass(n+"active")},update:function(e,t){a.pagingCount>1&&"add"===e?a.controlNavScaffold.append($("
  • "+a.count+"
  • ")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(t).closest("li").remove(),m.controlNav.set(),a.pagingCount>1&&a.pagingCount!==a.controlNav.length?a.update(t,e):m.controlNav.active()}},directionNav:{setup:function(){var e=$('");a.customDirectionNav?a.directionNav=a.customDirectionNav:a.controlsContainer?($(a.controlsContainer).append(e),a.directionNav=$("."+n+"direction-nav li a",a.controlsContainer)):(a.append(e),a.directionNav=$("."+n+"direction-nav li a",a)),m.directionNav.update(),a.directionNav.bind(r,function(e){e.preventDefault();var t;(""===o||o===e.type)&&(t=a.getTarget($(this).hasClass(n+"next")?"next":"prev"),a.flexAnimate(t,a.vars.pauseOnAction)),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(){var e=n+"disabled";1===a.pagingCount?a.directionNav.addClass(e).attr("tabindex","-1"):a.vars.animationLoop?a.directionNav.removeClass(e).removeAttr("tabindex"):0===a.animatingTo?a.directionNav.removeClass(e).filter("."+n+"prev").addClass(e).attr("tabindex","-1"):a.animatingTo===a.last?a.directionNav.removeClass(e).filter("."+n+"next").addClass(e).attr("tabindex","-1"):a.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('
    ');a.controlsContainer?(a.controlsContainer.append(e),a.pausePlay=$("."+n+"pauseplay a",a.controlsContainer)):(a.append(e),a.pausePlay=$("."+n+"pauseplay a",a)),m.pausePlay.update(a.vars.slideshow?n+"pause":n+"play"),a.pausePlay.bind(r,function(e){e.preventDefault(),(""===o||o===e.type)&&($(this).hasClass(n+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(e){"play"===e?a.pausePlay.removeClass(n+"pause").addClass(n+"play").html(a.vars.playText):a.pausePlay.removeClass(n+"play").addClass(n+"pause").html(a.vars.pauseText)}},touch:function(){function t(t){t.stopPropagation(),a.animating?t.preventDefault():(a.pause(),e._gesture.addPointer(t.pointerId),w=0,p=c?a.h:a.w,f=Number(new Date),l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p)}function n(t){t.stopPropagation();var a=t.target._slider;if(a){var n=-t.translationX,i=-t.translationY;return w+=c?i:n,m=w,y=c?Math.abs(w)500)&&(t.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m=w/(0===a.currentSlide&&0>w||a.currentSlide===a.last&&w>0?Math.abs(w)/p+2:1)),a.setProps(l+m,"setTouch"))))}}function s(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==m){var a=d?-m:m,n=t.getTarget(a>0?"next":"prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>p/2)?t.flexAnimate(n,t.vars.pauseOnAction):v||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}r=null,o=null,m=null,l=null,w=0}}var r,o,l,p,m,f,g,h,S,y=!1,x=0,b=0,w=0;i?(e.style.msTouchAction="none",e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",t,!1),e._slider=a,e.addEventListener("MSGestureChange",n,!1),e.addEventListener("MSGestureEnd",s,!1)):(g=function(t){a.animating?t.preventDefault():(window.navigator.msPointerEnabled||1===t.touches.length)&&(a.pause(),p=c?a.h:a.w,f=Number(new Date),x=t.touches[0].pageX,b=t.touches[0].pageY,l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p,r=c?b:x,o=c?x:b,e.addEventListener("touchmove",h,!1),e.addEventListener("touchend",S,!1))},h=function(e){x=e.touches[0].pageX,b=e.touches[0].pageY,m=c?r-b:r-x,y=c?Math.abs(m)t)&&(e.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m/=0===a.currentSlide&&0>m||a.currentSlide===a.last&&m>0?Math.abs(m)/p+2:1),a.setProps(l+m,"setTouch")))},S=function(t){if(e.removeEventListener("touchmove",h,!1),a.animatingTo===a.currentSlide&&!y&&null!==m){var n=d?-m:m,i=a.getTarget(n>0?"next":"prev");a.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(n)>50||Math.abs(n)>p/2)?a.flexAnimate(i,a.vars.pauseOnAction):v||a.flexAnimate(a.currentSlide,a.vars.pauseOnAction,!0)}e.removeEventListener("touchend",S,!1),r=null,o=null,m=null,l=null},e.addEventListener("touchstart",g,!1))},resize:function(){!a.animating&&a.is(":visible")&&(u||a.doMath(),v?m.smoothHeight():u?(a.slides.width(a.computedW),a.update(a.pagingCount),a.setProps()):c?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(a.vars.smoothHeight&&m.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(e){if(!c||v){var t=v?a:a.viewport;e?t.animate({height:a.slides.eq(a.animatingTo).height()},e):t.height(a.slides.eq(a.animatingTo).height())}},sync:function(e){var t=$(a.vars.sync).data("flexslider"),n=a.animatingTo;switch(e){case"animate":t.flexAnimate(n,a.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=m.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){m.pauseInvisible.isHidden()?a.startTimeout?clearTimeout(a.startTimeout):a.pause():a.started?a.play():a.vars.initDelay>0?setTimeout(a.play,a.vars.initDelay):a.play()})}},isHidden:function(){var e=m.pauseInvisible.getHiddenProp();return e?document[e]:!1},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;ta.currentSlide?"next":"prev"),p&&1===a.pagingCount&&(a.direction=a.currentItema.limit&&1!==a.visible?a.limit:S):h=0===a.currentSlide&&e===a.count-1&&a.vars.animationLoop&&"next"!==a.direction?d?(a.count+a.cloneOffset)*f:0:a.currentSlide===a.last&&0===e&&a.vars.animationLoop&&"prev"!==a.direction?d?0:(a.count+1)*f:d?(a.count-1-e+a.cloneOffset)*f:(e+a.cloneOffset)*f,a.setProps(h,"",a.vars.animationSpeed),a.transitions?(a.vars.animationLoop&&a.atEnd||(a.animating=!1,a.currentSlide=a.animatingTo),a.container.unbind("webkitTransitionEnd transitionend"),a.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(a.ensureAnimationEnd),a.wrapup(f)}),clearTimeout(a.ensureAnimationEnd),a.ensureAnimationEnd=setTimeout(function(){a.wrapup(f)},a.vars.animationSpeed+100)):a.container.animate(a.args,a.vars.animationSpeed,a.vars.easing,function(){a.wrapup(f)})}a.vars.smoothHeight&&m.smoothHeight(a.vars.animationSpeed)}},a.wrapup=function(e){v||u||(0===a.currentSlide&&a.animatingTo===a.last&&a.vars.animationLoop?a.setProps(e,"jumpEnd"):a.currentSlide===a.last&&0===a.animatingTo&&a.vars.animationLoop&&a.setProps(e,"jumpStart")),a.animating=!1,a.currentSlide=a.animatingTo,a.vars.after(a)},a.animateSlides=function(){!a.animating&&f&&a.flexAnimate(a.getTarget("next"))},a.pause=function(){clearInterval(a.animatedSlides),a.animatedSlides=null,a.playing=!1,a.vars.pausePlay&&m.pausePlay.update("play"),a.syncExists&&m.sync("pause")},a.play=function(){a.playing&&clearInterval(a.animatedSlides),a.animatedSlides=a.animatedSlides||setInterval(a.animateSlides,a.vars.slideshowSpeed),a.started=a.playing=!0,a.vars.pausePlay&&m.pausePlay.update("pause"),a.syncExists&&m.sync("play")},a.stop=function(){a.pause(),a.stopped=!0},a.canAdvance=function(e,t){var n=p?a.pagingCount-1:a.last;return t?!0:p&&a.currentItem===a.count-1&&0===e&&"prev"===a.direction?!0:p&&0===a.currentItem&&e===a.pagingCount-1&&"next"!==a.direction?!1:e!==a.currentSlide||p?a.vars.animationLoop?!0:a.atEnd&&0===a.currentSlide&&e===n&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===n&&0===e&&"next"===a.direction?!1:!0:!1},a.getTarget=function(e){return a.direction=e,"next"===e?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1},a.setProps=function(e,t,n){var i=function(){var n=e?e:(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo,i=function(){if(u)return"setTouch"===t?e:d&&a.animatingTo===a.last?0:d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:n;switch(t){case"setTotal":return d?(a.count-1-a.currentSlide+a.cloneOffset)*e:(a.currentSlide+a.cloneOffset)*e;case"setTouch":return d?e:e;case"jumpEnd":return d?e:a.count*e;case"jumpStart":return d?a.count*e:e;default:return e}}();return-1*i+"px"}();a.transitions&&(i=c?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",n=void 0!==n?n/1e3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",n),a.container.css("transition-duration",n)),a.args[a.prop]=i,(a.transitions||void 0===n)&&a.container.css(a.args),a.container.css("transform",i)},a.setup=function(e){if(v)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(s?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+a.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):0==a.vars.fadeFirstSlide?a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).css({opacity:1}):a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).animate({opacity:1},a.vars.animationSpeed,a.vars.easing)),a.vars.smoothHeight&&m.smoothHeight();else{var t,i;"init"===e&&(a.viewport=$('
    ').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,d&&(i=$.makeArray(a.slides).reverse(),a.slides=$(i),a.container.empty().append(a.slides))),a.vars.animationLoop&&!u&&(a.cloneCount=2,a.cloneOffset=1,"init"!==e&&a.container.find(".clone").remove(),a.container.append(m.uniqueID(a.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(m.uniqueID(a.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),a.newSlides=$(a.vars.selector,a),t=d?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset,c&&!u?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"}),a.doMath(),a.viewport.height(a.h),a.setProps(t*a.h,"init")},"init"===e?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(t*a.computedW,"init"),setTimeout(function(){a.doMath(),a.newSlides.css({width:a.computedW,"float":"left",display:"block"}),a.vars.smoothHeight&&m.smoothHeight()},"init"===e?100:0))}u||a.slides.removeClass(n+"active-slide").eq(a.currentSlide).addClass(n+"active-slide"),a.vars.init(a)},a.doMath=function(){var e=a.slides.first(),t=a.vars.itemMargin,n=a.vars.minItems,i=a.vars.maxItems;a.w=void 0===a.viewport?a.width():a.viewport.width(),a.h=e.height(),a.boxPadding=e.outerWidth()-e.width(),u?(a.itemT=a.vars.itemWidth+t,a.minW=n?n*a.itemT:a.w,a.maxW=i?i*a.itemT-t:a.w,a.itemW=a.minW>a.w?(a.w-t*(n-1))/n:a.maxWa.w?a.w:a.vars.itemWidth,a.visible=Math.floor(a.w/a.itemW),a.move=a.vars.move>0&&a.vars.movea.w?a.itemW*(a.count-1)+t*(a.count-1):(a.itemW+t)*a.count-a.w-t):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1),a.computedW=a.itemW-a.boxPadding},a.update=function(e,t){a.doMath(),u||(ea.controlNav.length?m.controlNav.update("add"):("remove"===t&&!u||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1),m.controlNav.update("remove",a.last))),a.vars.directionNav&&m.directionNav.update()},a.addSlide=function(e,t){var n=$(e);a.count+=1,a.last=a.count-1,c&&d?void 0!==t?a.slides.eq(a.count-t).after(n):a.container.prepend(n):void 0!==t?a.slides.eq(t).before(n):a.container.append(n),a.update(t,"add"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.added(a)},a.removeSlide=function(e){var t=isNaN(e)?a.slides.index($(e)):e;a.count-=1,a.last=a.count-1,isNaN(e)?$(e,a.slides).remove():c&&d?a.slides.eq(a.last).remove():a.slides.eq(e).remove(),a.doMath(),a.update(t,"remove"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.removed(a)},m.init()},$(window).blur(function(e){focused=!1}).focus(function(e){focused=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&e.allowOneSlide===!0||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery); jQuery(window).load(function(){ jQuery(".mh-slider-widget").flexslider({ animation: "slide", controlNav: true, directionNav: false, animationLoop: true, slideshow: true, slideshowSpeed: 7000, smoothHeight: true }); jQuery(".mh-carousel-widget").flexslider({ animation: "slide", controlNav: false, directionNav: true, animationLoop: true, slideshow: true, slideshowSpeed: 7000, itemWidth: 188, itemMargin: 15 }); jQuery("[id*='testimonials-']").flexslider({ animation: "fade", controlNav: false, directionNav: false, randomize: true }); jQuery("[id*='images-']").flexslider({ animation: "fade", controlNav: false, directionNav: true, randomize: true }); }); /* Other Scripts */ jQuery(document).ready(function($){ /* News Ticker */ function ticker_top(){ $('#mh-ticker-loop-top li:first').slideUp(function(){ $(this).appendTo($('#mh-ticker-loop-top')).slideDown(); }); } setInterval(function(){ticker_top()}, 4000); function ticker_bottom(){ $('#mh-ticker-loop-bottom li:first').slideUp(function(){ $(this).appendTo($('#mh-ticker-loop-bottom')).slideDown(); }); } setInterval(function(){ticker_bottom()}, 4000); /* Hide Boxes */ $('.mh-hide-box').click(function(){ $(this).closest('.mh-box').fadeToggle(); }); /* Comments Smooth Scroll */ jQuery('a.mh-comment-scroll').click(function(){ jQuery('body,html').animate({ scrollTop: jQuery("#mh-comments").offset().top }, 400); return false; }); /* Back to Top Button */ $(window).scroll(function(){ if ($(this).scrollTop() > 400) { $('.mh-back-to-top').fadeIn(); } else { $('.mh-back-to-top').fadeOut(); } }); $('.mh-back-to-top').click(function(){ $('html, body').animate({scrollTop : 0}, 400); return false; }); /* MH Tabbed Widget */ $('div.mh-tab-buttons').each(function(){ var $active, $content, $links = $(this).find('a'); $active = $links.first().addClass('active'); $content = $($active.attr('href')); $links.not($active).each(function () { $($(this).attr('href')).hide(); }); $(this).on('click', 'a', function(e){ $active.removeClass('active'); $content.hide(); $active = $(this); $content = $($(this).attr('href')); $active.addClass('active'); $content.fadeIn('slow'); e.preventDefault(); }); }); });;