1// === KREAM === 2$(document).ready(function () { 3 4 // FIXED HEADER 5 function fixNav(){ 6 if (!$('.cart-menu').length && !$('.-g-template-black-friday').length){ 7 var nav = $('.main-header'); 8 var pos = nav.height(); 9 var posDelay = nav.height()*2; 10 var prevScroll = 0; 11 12 nav.addClass('fix-nav'); 13 14 $(window).on('scroll', function () { 15 var fix = ($(this).scrollTop() > posDelay) ? true : false; 16 if(fix){ 17 nav.addClass('fade-menu', fix); 18 }else{ 19 nav.removeClass('fade-menu ', fix); 20 } 21 prevScroll = $(this).scrollTop(); 22 }); 23 } 24 } 25 $.Gomag.bind('Widget/Add/After', function(){ 26 fixNav(); 27 }) 28 29 // FASHION MENU ========== 30 function Menu(){ 31 $('.menu-dd').each(function() { 32 var $this = $(this); 33 var Nli = $this.find('li').length; 34 var Nlink = $this.find('a').length; 35 var Ncol = Math.ceil(Nlink / 15); 36 var Mbanner = $this.find('.cat-img').length; 37 38 Ncol = Ncol == 0 ? 1 : Ncol; 39 col = Nli > Ncol ? Ncol : Nli; 40 col = (col + (Mbanner ? 1 : 0) > 4) ? 4 : col; 41 $this.addClass('column' + col); 42 if (Mbanner){$this.addClass('banner');}; 43 if ($this.find('li span > a').length == 0){ 44 $this.addClass('no-sub'); 45 }; 46 if ($this.hasClass('column4')){ 47 $this.parent().addClass('initial-h'); 48 }; 49 }); 50 }; 51 Menu(); 52 53 $('.main-header .menu-drop').on('mouseenter', function() { 54 $('.main-header .menu-drop .menu-dd').removeClass('open'); 55 $(this).children('.menu-dd').stop().addClass('open'); 56 if ( $('.slide-item-menu').length ) { 57 $('.slide-item-menu').owlCarousel({items:1,navigation:!0,pagination:!1}); 58 var owl = $('.slide-item-menu'); 59 var owlInstance = owl.data('owlCarousel'); 60 if(owlInstance != null) 61 owlInstance.reinit(); 62 }; 63 }).on('mouseleave', function() { 64 $('.main-header .menu-drop .menu-dd').removeClass('open'); 65 }); 66 67 $('.search-m').on('click', function() { 68 $('.search-toggle').toggleClass('visible'); 69 }); 70 71 $('.search-form-box.search-toggle').prepend('<a class="search-modal -g-no-url" href="#"><i style="" class="fa fa-times search-close" aria-hidden="true"></i></a>'); 72 73 $(document).on('click', '.search-modal', function(event) { 74 event.preventDefault(); 75 $('.main-header .acount-section .search-m').trigger('click'); 76 $('#_autocompleteSearchMobileToggle').val(''); 77 }); 78 79 $.Gomag.bind('Widget/Add/After', function(){ 80 // BF SIDEBAR + MENU STICKY 81 if($('.-g-template-black-friday').length){ 82 $('.main-header').css({'top' : '-' + $('.discount-tape').height() + 'px'}); 83 } 84 if($( window ).width() > 991 && $('.-g-template-black-friday').length){ 85 $('.landing-h .side-menu.fixed').css({'top' : $('.main-header .top-head-bg').outerHeight() + 20 + 'px'}); 86 } 87 }); 88 89 $('#wrapper div.gomagComponent').eq(1).addClass('-g-drawed'); 90 91 $.Gomag.bind('Gomag/Product/Detail/Loaded', function(){ 92 93 if($( window ).width() > 768 && $('.product-page-holder').length){ 94 95 var header = $('.main-header'); 96 var stickySlider = $('.product-page-holder .detail-slider-holder'); 97 var stickyDetail = $('.product-page-holder .-g-product-details-holder'); 98 var prevScroll = $(window).scrollTop(); 99 100 function adjustSticky() { 101 var sliderOffsetTop = stickySlider.height(); 102 var stickyOffsetTop = stickyDetail.height(); 103 var windowHeight = $(window).height(); 104 var currentScroll = $(this).scrollTop(); 105 106 if (stickyOffsetTop >= windowHeight && stickyOffsetTop < sliderOffsetTop) { 107 var negativeOffset = stickyOffsetTop - windowHeight; 108 stickyDetail.css('top', '-' + negativeOffset + 'px'); 109 } else { 110 var headerHeight = header.height(); 111 stickySlider.css('top', headerHeight + 'px'); 112 stickyDetail.css('top', headerHeight + 'px'); 113 } 114 } 115 116 adjustSticky(); 117 118 $(window).on('scroll', function() { 119 adjustSticky(); 120 }); 121 122 $(window).on('resize', function() { 123 adjustSticky(); 124 }); 125 }; 126 127 }); 128}); 129 130if($( window ).width() > 992 ){ 131 $(window).on('scroll', function() { 132 $('.-g-pagetype-homepage .gomagComponent').each(function() { 133 if (isScrolledIntoView($(this))) { 134 $(this).addClass('-g-drawed'); 135 } 136 }); 137 }); 138} 139 140function isScrolledIntoView(elem) { 141 var docViewTop = $(window).scrollTop(); 142 var docViewBottom = docViewTop + $(window).height(); 143 144 var elemTop = $(elem).offset().top; 145 var elemBottom = elemTop + $(elem).height() / 2; 146 147 return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop)); 148}$(document).ready(function() {$("body").bind("cut copy", function(e) {e.preventDefault();});$("body").on("contextmenu",function(e) {return false;});});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.