1$( document ).ready(function() { 2 Titanium.carousel_init(0, 1 , 2 , 3, 4 , 5 ); 3 Titanium.carousel_init(3, 1 , 2 , 3, 4 , 5 ); 4 Titanium.load_spinner(); 5 Titanium.body_css(); 6 try { 7 BS.ui.inputSpinner.init(); 8 9 } catch (e) { 10 console.error(e); 11 } 12 13 $(function(){ 14 var paramOverlay = $('<div class="param-overlay"></div>').appendTo('body'); 15 paramOverlay.hide(); 16 17 $('body').on('click', '.p-close', function(){ 18 paramOverlay.removeClass('paramShow'); 19 }); 20 $('body').on('click', '.p-rolldown-button', function(){ 21 paramOverlay.addClass('paramShow'); 22 }); 23 }); 24}); 25 26 27Titanium = { 28 carousel_init: function ($box_number , $items0 , $items480 , $items1161, $items1301, $items1600){ 29 var $box_classes = '.box-carousel'+$box_number+'.owl-carousel'; 30 if($box_number == 0) 31 { 32 $box_classes = '.box-carousel.owl-carousel' 33 } 34 $($box_classes).owlCarousel({ 35 loop:false, 36 lazyLoad: false, 37 margin:16, 38 nav:true, 39 onLoadLazy: true, 40 responsive:{ 41 0:{ 42 items: $items0 43 }, 44 480:{ 45 items: $items480 46 }, 47 1161:{ 48 items: $items1161 49 }, 50 1301:{ 51 items: $items1301 52 }, 53 1600:{ 54 items: $items1600 55 } 56 } 57 }); 58 }, 59 load_spinner: function (){ 60 window.addEventListener('load', function(){ 61 const boxes = document.getElementsByClassName("action-box"); 62 for(var i=0; i < boxes.length; i++) { 63 boxes[i].className += " el-loaded"; 64 } 65 if(document.getElementById("related") !== null) 66 { 67 const related = document.getElementById("related"); 68 related.className += " el-loaded"; 69 } 70 71 }); 72 }, 73 body_css: function (){ 74 var login_button_text = $(".user-modify"); 75 if(login_button_text.length) 76 { 77 $("body").removeClass("page-e-login"); 78 $("body").addClass("page-e-logged"); 79 } 80 81 } 82} 83 84 85$(function(){ 86 /* wrappers */ 87 if (window.matchMedia('(max-width: 767px)').matches) { 88 $('html body #page .myheader #search, html body #page .myheader .navigate_bar #ebar').wrapAll('<div class="basket-wrapper"></div>'); 89 } 90 91 function reportWindowSize() { 92 if (window.innerWidth <= 767) { 93 94 if($(".basket-wrapper").length == 0) 95 { 96 $('html body #page .myheader #search, html body #page .myheader .navigate_bar #ebar').wrapAll('<div class="basket-wrapper"></div>'); 97 } 98 if($(".navigate_bar #left-box").length == 0) 99 { 100 $('#left-box').prependTo('.myheader .navigate_bar'); 101 } 102 } else { 103 if($(".basket-wrapper").length > 0) 104 { 105 $('.basket-wrapper').replaceWith(function () 106 { 107 return $('#search, #ebar', this); 108 }); 109 } 110 if($(".extra-menu-wrapper #left-box").length == 0) 111 { 112 $("#left-box").prependTo(".extra-menu-wrapper"); 113 } 114 } 115 } 116 window.onresize = reportWindowSize; 117 118 $('.page-product-detail #description, .page-product-detail #parameters').wrapAll('<div class="description-wrapper"></div>'); 119 120 $('.top-bar-content, .top-bar-login').wrapAll('<div class="topBar-wrapper"></div>'); 121 122 $('.page-e-finish #incenterpage2 > form').wrapAll('<div class="form-delivery-details"></div>'); 123 /* end of wrappers */ 124 125 $('.nav-dropdown-wrapper').on('mouseleave', function(){ 126 $('#menuWrapper, .nav-dropdown-toggle').removeClass('is-open'); 127 $('.nav-dropdown').removeClass('show'); 128 }); 129 130 $('.nav-dropdown-wrapper').on('mouseover', function(){ 131 $('#menuWrapper, .nav-dropdown-toggle').addClass('is-open'); 132 $('.nav-dropdown').addClass('show'); 133 }); 134 135 if (window.matchMedia('(min-width: 768px)').matches) { 136 $('.product-detail-container > h1, .product-detail-container > .second-product-name').prependTo('.box-spc'); 137 } 138 139 $('.page-product-detail .col-r > .stock_yes, .page-product-detail .col-r > .stock_no').prependTo('.product-status'); 140 141 if (window.matchMedia('(max-width: 767px)').matches) { 142 $('#left-box').prependTo('.myheader .navigate_bar'); 143 } 144 145 $('.page-product-detail .product-status > .ico_onsale').appendTo('.detail-box-product .col-l > .image'); 146 147 $('<div class="whole-description">
147' + WA.Translation._complete_specification +' <i class="fa fa-chevron-down" aria-hidden="true"></i></div>').insertAfter('.page-product-detail .product-detail-box.product-desc .product-desc.content').on('click', function(){ 148 $('html, body').animate({ 149 scrollTop: $('.page-product-detail #description').offset().top 150 }, 1000); 151 }); 152 153 $('#dropMenu').insertAfter('.navigate_bar'); 154 155 $('#page .shipping-and-payment table tbody tr table tbody tr').on('click', function(){ 156 if($(this).find('input').is(':checked')) { 157 $(this).addClass('checked-method'); 158 $(this).siblings().removeClass('checked-method'); 159 } 160 }); 161 162 $('#basket_shipping_list tbody tr').on('click', function(){ 163 $('#basket_payments_list tbody tr').removeClass('checked-method'); 164 }); 165 166 $('.page-e-basket form[name="voucher"]').insertAfter('.page-e-basket .cart.cart-items'); 167 $('.page-e-basket form[name="voucher"] input#voucher-code').attr('placeholder', WA.Translation._placeholder_voucher) 168 169 $('.steps-order.active').prevAll().addClass('prev-step'); 170 171 var loginLink = $('.user-login a').attr('href'); 172 var accountLink = $('.user-register a').attr('href'); 173 $('<p class="have-no-account">'+ WA.Translation._dont_have_acc +'<a href="' + accountLink + '" target="_blank">'+ WA.Translation._register_titanium +'</a>.</p>').insertBefore('.page-e-finish #incenterpage2 > .form-delivery-details ._login-form .login-btn.wa-button, .page-e-login #incenterpage2 #boxNorm fieldset'); 174 $('<p class="have-account">'+ WA.Translation._have_acc +'<a href="' + loginLink + '">'+ WA.Translation._login_titanium +'</a>.</p>').prependTo('.page-e-register #incenterpage2 #boxNorm'); 175 176 var backTop = $('<div id="backTop"><i class="fa fa-chevron-up"></i></div>').appendTo('body'); 177 backTop.hide(); 178 179 $(document).scroll(function(){ 180 if($(this).scrollTop() > 800) { 181 backTop.fadeIn(); 182 } else { 183 backTop.fadeOut(); 184 } 185 }); 186 187 $(document).scroll(function(){ 188 if($(this).scrollTop() > 950) { 189 $('body').addClass('fixedBasket'); 190 } else { 191 $('body').removeClass('fixedBasket'); 192 } 193 }); 194 195 $('#backTop').on('click', function(e){ 196 $("html, body").animate({scrollTop: $("body").offset().top}, 500); 197 return false; 198 }); 199 200 $('.cat-highlights-box .img-link').each(function(){ 201 if($(this).children().length == 0) { 202 $(this).remove(); 203 } 204 }); 205 206 207 $('.page-blog .blog-main .article:nth-child(2) > :not(.image)').wrapAll('<div class="article-content-wrap"></div>'); 208 $('.page-blog .blog-main.blog-main-col1 .article:not(:nth-child(2))').each(function(){ 209 $(this).find('> *:not(.image)').wrapAll('<div class="article-content-wrap"></div>'); 210 }); 211 $('.in-news-box.tags').insertAfter('.page-blog .blog-main .article:nth-child(2)'); 212}); 213 214$(function(){ 215 for (var i = 0; i < 20; i++) { 216 create(i); 217 } 218 219 function create(i) { 220 var width = Math.random() * 8; 221 var height = width * 0.4; 222 var colourIdx = Math.ceil(Math.random() * 3); 223 var colour = "red"; 224 switch(colourIdx) { 225 case 1: 226 colour = "yellow"; 227 break; 228 case 2: 229 colour = "blue"; 230 break; 231 default: 232 colour = "red"; 233 } 234 $('<div class="confetti-'+i+' '+colour+'"></div>').css({ 235 "width" : width+"px", 236 "height" : height+"px", 237 "top" : -Math.random()*20+"%", 238 "left" : Math.random()*100+"%", 239 "opacity" : Math.random()+0.5, 240 "transform" : "rotate("+Math.random()*360+"deg)" 241 }).appendTo('.free_shipping_info_full.free-delivery-active-box'); 242 243 drop(i); 244 } 245 246 function drop(x) { 247 $('.confetti-'+x).animate({ 248 top: "100%", 249 left: "+="+Math.random()*15+"%" 250 }, Math.random()*3000 + 3000, function() { 251 reset(x); 252 }); 253 } 254 255 function reset(x) { 256 $('.confetti-'+x).animate({ 257 "top" : -Math.random()*20+"%", 258 "left" : "-="+Math.random()*15+"%" 259 }, 0, function() { 260 drop(x); 261 }); 262 } 263});
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.