1/** 2* 2007-2022 ETS-Soft 3* 4* NOTICE OF LICENSE 5* 6* This file is not open source! Each license that you purchased is only available for 1 wesite only. 7* If you want to use this file on more websites (or projects), you need to purchase additional licenses. 8* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party. 9* 10* DISCLAIMER 11* 12* Do not edit or add to this file if you wish to upgrade PrestaShop to newer 13* versions in the future. If you wish to customize PrestaShop for your 14* needs please contact us for extra customization service at an affordable price 15* 16* @author ETS-Soft <[email protected]> 17* @copyright 2007-2022 ETS-Soft 18* @license Valid for 1 website (or project) for each purchase of license 19* International Registered Trademark & Property of ETS-Soft 20*/ 21$(function() { 22 $(document).mouseup(function (e) 23 { 24 var container_block_search = $('.mm_extra_item.active'); 25 if (!container_block_search.is(e.target)&& container_block_search.has(e.target).length === 0) 26 { 27 $('.mm_extra_item').removeClass('active'); 28 } 29 }); 30 31 if($('.mm_extra_item button[type="submit"]').length) 32 { 33 $(document).on('click','.mm_extra_item button[type="submit"]',function(){ 34 if(!$(this).closest('.mm_extra_item').hasClass('mm_display_search_default') ) 35 { 36 if ( !$(this).closest('.mm_extra_item').hasClass('active') ){ 37 $(this).closest('.mm_extra_item').addClass('active'); 38 return false; 39 } else { 40 if ($(this).prev('input').val() == 0){ 41 $('.mm_extra_item').removeClass('active'); 42 return false; 43 } 44 } 45 } 46 }); 47 } 48 displayHeightTab(); 49 if ($('.ets_mm_megamenu.sticky_enabled').length > 0) 50 { 51 var sticky_navigation_offset_top = $('.ets_mm_megamenu.sticky_enabled').offset().top; 52 var headerFloatingHeight = $('.ets_mm_megamenu.sticky_enabled').height()+($('#header').length > 0 ? parseInt($('.ets_mm_megamenu.sticky_enabled').css('marginTop').replace('px',''))+parseInt($('.ets_mm_megamenu.sticky_enabled').css('marginBottom').replace('px','')) : 0); 53 var oldHeaderMarginBottom = $('#header').length > 0 ? parseInt($('#header').css('marginBottom').replace('px','')) : 0; 54 var sticky_navigation = function(){ 55 if(!$('.ets_mm_megamenu').hasClass('sticky_enabled')) 56 return false; 57 var scroll_top = $(window).scrollTop(); 58 if (scroll_top > sticky_navigation_offset_top) { 59 $('.ets_mm_megamenu.sticky_enabled').addClass('scroll_heading'); 60 if($('#header').length > 0) 61 $('#header').css({'marginBottom':headerFloatingHeight+'px'}); 62 } else { 63 $('.ets_mm_megamenu.sticky_enabled').removeClass('scroll_heading'); 64 if($('#header').length > 0) 65 $('#header').css({'marginBottom':oldHeaderMarginBottom+'px'}); 66 } 67 }; 68 sticky_navigation(); 69 $(window).scroll(function() { 70 sticky_navigation(); 71 }); 72 if($(window).width() < 768 && !$('body').hasClass('disable-sticky')) 73 $('body').addClass('disable-sticky'); 74 $(window).on('resize',function(e){ 75 if($(window).width() < 768 && !$('body').hasClass('disable-sticky')) 76 $('body').addClass('disable-sticky'); 77 else 78 if($(window).width() >= 768 && $('body').hasClass('disable-sticky')) 79 $('body').removeClass('disable-sticky'); 80 }); 81 } 82 83 $(window).load(function(){ 84 if ($('.ets_mn_submenu_full_height').length > 0 ){ 85 var ver_sub_height = $('.ets_mn_submenu_full_height').height(); 86 $('.ets_mn_submenu_full_height').find('.mm_columns_ul').css("min-height",ver_sub_height); 87 } 88 }); 89 90 if ( $('.mm_columns_ul_tab_content').length > 0 && $('body#index').length >0 ){
91 $('.mm_columns_ul_tab_content').addClass('active').prev('.arrow').removeClass('closed').addClass('opened'); 92 93 } 94 95 96 $(window).resize(function(){ 97 $('.mm_menus_ul:not(.ets_mm_all_show_resize)').removeClass('ets_mn_active'); 98 }); 99 $(document).on('click','.mm_has_sub > .arrow',function(){ 100 var wrapper = $(this).next('.mm_columns_ul'); 101 if($(this).hasClass('closed')) 102 { 103 $('.mm_columns_ul').removeClass('active'); 104 $('.mm_has_sub > .arrow').removeClass('opened'); 105 $('.mm_has_sub > .arrow').addClass('closed'); 106 var btnObj = $(this); 107 btnObj.removeClass('closed'); 108 btnObj.addClass('opened'); 109 wrapper.stop(true,true).addClass('active'); 110 } 111 else 112 { 113 var btnObj = $(this); 114 btnObj.removeClass('opened'); 115 btnObj.addClass('closed'); 116 wrapper.stop(true,true).removeClass('active'); 117 } 118 119 }); 120 $('.transition_slide:not(.changestatus):not(.click_open_submenu) li.mm_menus_li').hover(function(){ 121 if($(window).width() >= 768){ 122 $(this).find('.mm_columns_ul').stop(true,true).slideDown(200); 123 } 124 }, function(){ 125 if($(window).width() >= 768){ 126 $(this).find('.mm_columns_ul').stop(true,true).slideUp(0); 127 } 128 }); 129 $('.transition_slide.click_open_submenu:not(.changestatus) li.mm_menus_li').on('click',function(e){ 130 if($(window).width() >= 768){ 131 $(this).find('.mm_columns_ul').stop(true,true).slideDown(200); 132 } 133 }); 134 135 136 $('.ybc-menu-toggle, .ybc-menu-vertical-button').on('click',function(){ 137 var wrapper = $(this).next('.mm_menus_ul'); 138 if($(this).hasClass('closed')) 139 { 140 var btnObj = $(this); 141 $('body').addClass('noscroll'); 142 btnObj.removeClass('closed'); 143 btnObj.addClass('opened'); 144 wrapper.stop(true,true).addClass('active'); 145 if ( $('.transition_slide.transition_default').length != '' ){ 146 wrapper.stop(true,true).slideDown(0); 147 } 148 } 149 else 150 { 151 $('body').removeClass('noscroll'); 152 var btnObj = $(this); 153 btnObj.removeClass('opened'); 154 btnObj.addClass('closed'); 155 wrapper.stop(true,true).removeClass('active'); 156 if ( $('.transition_slide.transition_default').length != '' ){ 157 wrapper.stop(true,true).slideUp(0); 158 } 159 } 160 }); 161 $('.close_menu').on('click',function(){ 162 $('body').removeClass('noscroll'); 163 $(this).parent().prev().removeClass('opened'); 164 $(this).parent().prev().addClass('closed'); 165 $(this).parent().stop(true,true).removeClass('active'); 166 }); 167 //Active menu 168 if($('.ets_mm_megamenu').hasClass('enable_active_menu') && $('.mm_menus_ul > li').length > 0) 169 { 170 var currentUrl = window.location.href; 171 $('.mm_menus_ul > li').each(function(){ 172 if($(this).find('a[href="'+currentUrl+'"]').length > 0) 173 { 174 $(this).addClass('active'); 175 return false; 176 } 177 }); 178 } 179 if($('.mm_breaker').length > 0 && $('.mm_breaker').prev('li').length > 0) 180 { 181 $('.mm_breaker').prev('li').addClass('mm_before_breaker'); 182 } 183 184 $('.mm_menus_li .mm_tab_li_content').hover(function(){ 185 if(!$(this).closest('.mm_tabs_li').hasClass('open')) 186 { 187 $(this).closest('.mm_columns_ul_tab').find('.mm_tabs_li').removeClass('open'); 188 $(this).closest('.mm_tabs_li').addClass('open'); 189 $(this).closest('.mm_columns_ul').removeClass('mm_tab_no_content'); 190 if ( !$(this).next('.mm_columns_contents_ul').length ){ 191 $(this).closest('.mm_columns_ul').addClass('mm_tab_no_content'); 192 } 193 displayHeightTab(); 194 } 195 }, function() { 196 if(!$(this).closest('.mm_tabs_li').hasClass('ver_alway_hide')) 197 { 198 $(this).closest('.mm_tabs_li').removeClass('open'); 199 } 200 });
201 202 $('.mm_menus_li:not(.menu_ver_alway_show_sub )').hover(function(){ 203 $('.menu_ver_alway_show_sub .mm_columns_ul_tab_content').removeClass('active'); 204 }, function() { 205 $('.menu_ver_alway_show_sub .mm_columns_ul_tab_content').addClass('active'); 206 }); 207 208 if ($('.clicktext_show_submenu').length <= 0) 209 { 210 $(document).on('click touchstar', '.mm_tab_li_content', function (evt) { 211 var btnObj = $(this), wrapper = $(this).next(); 212 if (!btnObj.find('.mm_tab_toggle_title a').is(evt.target)) 213 { 214 if(btnObj.hasClass('closed')) 215 { 216 $('.mm_tab_li_content').removeClass('opened'); 217 $('.mm_tab_li_content').addClass('closed'); 218 $('.mm_columns_contents_ul').removeClass('active'); 219 btnObj.removeClass('closed'); 220 btnObj.addClass('opened'); 221 wrapper.stop(true,true).addClass('active'); 222 } 223 else 224 { 225 btnObj.removeClass('opened'); 226 btnObj.addClass('closed'); 227 wrapper.stop(true,true).removeClass('active'); 228 } 229 } 230 }); 231 } 232 233}); 234function autoChangeStatus() 235{ 236 var width_ul_menu = $('ul.mm_menus_ul').width(); 237 var width_li_menu=0; 238 $('ul.mm_menus_ul li.mm_menus_li').each(function(){ 239 width_li_menu += parseFloat($(this).width()); 240 }); 241 242 if(width_li_menu > width_ul_menu+5) 243 { 244 $('.ets_mm_megamenu').addClass('changestatus'); 245 $('.menu_ver_alway_show_sub .mm_columns_ul_tab_content').removeClass('active'); 246 $('#index .menu_ver_alway_show_sub .arrow').removeClass('opened').addClass('closed'); 247 } 248 else 249 { 250 $('.ets_mm_megamenu').removeClass('changestatus'); 251 if ( $(window).width() > 767 ){ 252 $('#index .menu_ver_alway_show_sub .arrow').addClass('opened').removeClass('closed'); 253 $('#index .menu_ver_alway_show_sub .mm_columns_ul_tab_content').addClass('active'); 254 } 255 } 256 if ( $(window).width() < 768 ){ 257 $('.menu_ver_alway_show_sub .mm_columns_ul_tab_content').removeClass('active'); 258 $('.menu_ver_alway_show_sub .arrow').removeClass('opened').addClass('closed'); 259 } 260} 261 262function itemClickMenu($this){ 263 var btnObj = $($this).next('.arrow'); 264 var wrapper = btnObj.next(); 265 if ( ! btnObj.length ){ 266 var btn_temp = $($this).closest('.mm_tab_li_content').first(); 267 var wrapper = btn_temp.next(); 268 if( btn_temp.hasClass('closed')){ 269 $('.mm_tab_li_content').removeClass('opened'); 270 $('.mm_tab_li_content').addClass('closed'); 271 $('.mm_tab_li_content + .mm_columns_contents_ul').removeClass('active'); 272 btn_temp.removeClass('closed'); 273 btn_temp.addClass('opened'); 274 wrapper.stop(true,true).addClass('active'); 275 276 277 }else{ 278 btn_temp.removeClass('opened'); 279 btn_temp.addClass('closed'); 280 wrapper.stop(true,true).removeClass('active'); 281 } 282 }else{ 283 if(btnObj.hasClass('closed')) 284 { 285 $('.mm_has_sub > .arrow').removeClass('opened'); 286 $('.mm_has_sub > .arrow').addClass('closed'); 287 $('.mm_columns_ul').removeClass('active'); 288 289 btnObj.removeClass('closed'); 290 btnObj.addClass('opened'); 291 wrapper.stop(true,true).addClass('active'); 292 } 293 else 294 { 295 btnObj.removeClass('opened'); 296 btnObj.addClass('closed'); 297 wrapper.stop(true,true).removeClass('active'); 298 } 299 } 300} 301function clickTextShowMenu(){ 302 if ( $('.clicktext_show_submenu').length > 0 ){ 303 $('.clicktext_show_submenu li.has-sub').each(function() { 304 $(this).find('a').first().on('click', function(e){ 305 if ($(window).width() <= 767 ){ 306 e.preventDefault(); 307 var btnObj = $(this).next('.arrow'); 308 var wrapper = btnObj.next(); 309 if(btnObj.hasClass('closed')) 310 { 311 btnObj.removeClass('closed'); 312 btnObj.addClass('opened'); 313 wrapper.stop(true,true).addClass('active'); 314 } 315 else 316 { 317 btnObj.removeClass('opened'); 318 btnObj.addClass('closed'); 319 wrapper.stop(true,true).removeClass('active'); 320 } 321 } 322 }); 323 324 }); 325 326 } 327 if ( $('.clicktext_show_submenu').length > 0 ){ 328 $('.clicktext_show_submenu li.has-sub').each(function() { 329 $(this).find('a').first().on('click', function(e){
330 331 if ( $('.ets_mm_megamenu').hasClass('changestatus') && $(window).width() > 767 ){ 332 e.preventDefault(); 333 var btnObj = $(this).next('.arrow'); 334 var wrapper = btnObj.next(); 335 if(btnObj.hasClass('closed')) 336 { 337 btnObj.removeClass('closed'); 338 btnObj.addClass('opened'); 339 wrapper.stop(true,true).addClass('active'); 340 } 341 else 342 { 343 btnObj.removeClass('opened'); 344 btnObj.addClass('closed'); 345 wrapper.stop(true,true).removeClass('active'); 346 } 347 } 348 }); 349 }); 350 } 351 352 if ( $('.clicktext_show_submenu').length > 0 ){ 353 $('.clicktext_show_submenu li.mm_tabs_has_content > div').each(function() { 354 $(this).find('a').first().on('click', function(e){ 355 if ($(window).width() <= 767 ){ 356 e.preventDefault(); 357 itemClickMenu(this); 358 } 359 }); 360 361 }); 362 } 363 if ( $('.clicktext_show_submenu').length > 0 ){ 364 $('.clicktext_show_submenu li.mm_tabs_has_content > div').each(function() { 365 $(this).find('a').first().on('click', function(e){ 366 if ( $('.ets_mm_megamenu').hasClass('changestatus') && $(window).width() > 767 ){ 367 e.preventDefault(); 368 itemClickMenu(this); 369 } 370 }); 371 }); 372 } 373 if ( $('.clicktext_show_submenu').length > 0 ){ 374 $('.clicktext_show_submenu li.mm_has_sub > a').each(function() { 375 $(this).on('click', function(e){ 376 if ($(window).width() <= 767 ){ 377 e.preventDefault(); 378 itemClickMenu(this); 379 } 380 }); 381 382 }); 383 384 } 385 if ( $('.clicktext_show_submenu').length > 0 ){ 386 $('.clicktext_show_submenu li.mm_has_sub > a').each(function() { 387 $(this).on('click', function(e){ 388 if ( $('.ets_mm_megamenu').hasClass('changestatus') && $(window).width() > 767 ){ 389 e.preventDefault(); 390 itemClickMenu(this); 391 } 392 }); 393 }); 394 } 395 if ( $('.clicktext_show_submenu').length > 0 ){ 396 $('.mm_tab_has_child > .mm_tab_toggle_title').on('click', function(e){ 397 if ( $(this).find('a').length <= 0 ){ 398 if ( $('.ets_mm_megamenu').hasClass('changestatus') || $(window).width() > 767 ){ 399 var btnObj = $(this).parents('.mm_tab_li_content'), wrapper = $(this).parents('.mm_tab_li_content').next(); 400 401 if(btnObj.hasClass('closed')) 402 { 403 $('.mm_tab_li_content').removeClass('opened'); 404 $('.mm_tab_li_content').addClass('closed'); 405 $('.mm_tab_li_content + .mm_columns_contents_ul').removeClass('active'); 406 407 btnObj.removeClass('closed'); 408 btnObj.addClass('opened'); 409 wrapper.stop(true,true).addClass('active'); 410 } 411 else 412 { 413 btnObj.removeClass('opened'); 414 btnObj.addClass('closed'); 415 wrapper.stop(true,true).removeClass('active'); 416 } 417 } 418 } 419 }); 420 } 421} 422 423 424$(document).on('click','.ets_mm_categories .has-sub .arrow',function(e){ 425 e.stopPropagation(); 426 var wrapper = $(this).next('.ets_mm_categories'); 427 if($(this).hasClass('closed')) 428 { 429 var btnObj = $(this); 430 btnObj.removeClass('closed'); 431 btnObj.addClass('opened'); 432 wrapper.stop(true,true).addClass('active'); 433 } 434 else 435 { 436 var btnObj = $(this); 437 btnObj.removeClass('opened'); 438 btnObj.addClass('closed'); 439 wrapper.stop(true,true).removeClass('active'); 440 } 441 442}); 443 444function displayHeightTab() 445{ 446 if($('.mm_tabs_li.open .mm_columns_contents_ul').length) 447 { 448 $('.mm_tabs_li.open .mm_columns_contents_ul').each(function(){ 449 $(this).closest('.mm_columns_ul_tab').css('height', $(this).height('px')); 450 }); 451 } 452} 453$(document).ready(function(){ 454 455 var ETS_MM_ACTIVE_BG_GRAY = $('.ets_mm_megamenu').attr('data-bggray'); 456 $('.ets_mm_megamenu').removeClass('bg_submenu'); 457 if (typeof ETS_MM_ACTIVE_BG_GRAY !== "undefined" && ETS_MM_ACTIVE_BG_GRAY ) { 458 $('.ets_mm_megamenu .mm_menus_ul > li.mm_has_sub.hover').mouseenter(function() { 459 $('.ets_mm_megamenu').addClass('bg_submenu'); 460 }) 461 .mouseleave(function() { 462 $('.ets_mm_megamenu').removeClass('bg_submenu'); 463 }); 464 } 465 $(".mm_menus_li.click_open_submenu").click(function(){ 466 // Hide other dropdown menus in case of multiple dropdowns 467 if(!$(this).find('>a:first').attr('href') || $(this).find('>a:first').attr('href')=='#') 468 { 469 $(".mm_columns_ul").not($(this).find()).removeClass("open"); 470 $(".mm_menus_li").removeClass("open_li"); 471 // Toggle the current dropdown menu 472 $(this).find(".mm_columns_ul").toggleClass("open"); 473 $(this).toggleClass("open_li"); 474 } 475 });
476 $(document).on("click", function(event){ 477 if(!$(event.target).closest(".mm_menus_li").length){ 478 $('.transition_slide.click_open_submenu').find(".mm_columns_ul.open").slideUp(100); 479 $(".mm_columns_ul").removeClass("open"); 480 $(".mm_menus_li").removeClass("open_li"); 481 } 482 }); 483 $(document).on('click','.mm_tab_li_content',function(){ 484 $('.mm_tabs_li').not($(this).parent()).removeClass('open'); 485 $(this).parent('.mm_tabs_li').toggleClass('open'); 486 }); 487 $(document).on("click", function(event){ 488 if(!$(event.target).closest(".mm_tabs_li").length){ 489 $(".mm_tabs_li").removeClass("open"); 490 $(".mm_tabs_li.menu_ver_alway_open_first").addClass("open"); 491 } 492 }); 493 $(document).on('click','.ets_mm_megamenu a',function(){ 494 if($(this).attr('href')=='' || $(this).attr('href')=='#') 495 { 496 return false; 497 } 498 }); 499}); 500$(document).ready(function(){ 501 autoChangeStatus(); 502 clickTextShowMenu(); 503 504 $(window).resize(function(){ 505 autoChangeStatus(); 506 }); 507 508 $('.mm_menus_li iframe').hover(function () { 509 $(this).parents('.mm_menus_li').addClass('menu_hover'); 510 }, function () { 511 $(this).parents('.mm_menus_li').removeClass('menu_hover'); 512 }); 513});
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.