1jQuery( document ).ready( function() { 2 "use strict"; 3 4 /* menu v5 START */ 5 var menuSelector = ".ftlg-menu"; 6 if (jQuery(menuSelector).length > 0){ 7 jQuery(window).resize(function(){ 8 if (jQuery(window).width() > 800) { 9 mobileMenu(menuSelector); 10 } 11 }); 12 if (jQuery(window).width() > 800) { 13 mobileMenu(menuSelector); 14 } 15 } 16 function mobileMenu(menuSelector){ 17 jQuery(menuSelector).removeClass('ftlg-menu-mob'); 18 var windowWidth = jQuery(window).width(); 19 var menuWidth = jQuery(menuSelector).find(".dl-menu.dl-dropdown-menu").width(); 20 var logoWidth = jQuery(menuSelector).find(".ft_logo").width(); 21 var searchBtnWidth = jQuery(menuSelector).find(".ft_search_btn").width(); 22 if ( (menuWidth+logoWidth+searchBtnWidth+110) > windowWidth ){ 23 jQuery(menuSelector).find(".dl-menu.dl-dropdown-menu").addClass('ftlg-dnone'); 24 jQuery(menuSelector).find(".ft_logo").addClass('ftlg-msa'); 25 jQuery(menuSelector).parent().addClass('ftlg-wrap-p'); 26 jQuery(menuSelector).find(".ft_burger_btn_ver_2").addClass('ftlg-dflex'); 27 jQuery(menuSelector).find(".ft_burger_btn_ver_2 svg.not_active").addClass('ftlg-icon'); 28 jQuery(menuSelector).closest(".containerWrap .wrap").addClass('ftlg-mw100'); 29 jQuery(menuSelector).addClass('ftlg-menu-mob'); 30 } else { 31 jQuery(menuSelector).removeClass('ftlg-menu-mob'); 32 jQuery(menuSelector).find(".dl-menu.dl-dropdown-menu").removeClass('ftlg-dnone'); 33 jQuery(menuSelector).find(".ft_logo").removeClass('ftlg-msa'); 34 jQuery(menuSelector).parent().removeClass('ftlg-wrap-p'); 35 jQuery(menuSelector).find(".ft_burger_btn_ver_2").removeClass('ftlg-dflex'); 36 jQuery(menuSelector).find(".ft_burger_btn_ver_2 svg.not_active").removeClass('ftlg-icon'); 37 jQuery(menuSelector).closest(".containerWrap .wrap").removeClass('ftlg-mw100'); 38 } 39 } 40 /* menu v5 END */ 41 42 /* menu v2 */ 43 jQuery(".ft_header_wrap").on("click", ".ftv2-search-actions", function () { 44 jQuery(this).parent().find(".ftlg-search-wrap").toggleClass("ftlg-active"); 45 }); 46 47 jQuery(".ft_header_wrap").on("click", ".ft_burger_btn_ver_2", function () { 48 jQuery(".ftlg-search-wrap").removeClass("ftlg-active"); 49 }); 50 /* menu v2 END */ 51 52 /* Dropdown menu v3 */ 53 if (jQuery(".dl-menu.dl-dropdown-menu").length > 0){ 54 jQuery(".dl-menu.dl-dropdown-menu .dl-column").parent().each(function () { 55 for (let i = 0; i < 4; i++) { 56 let wrapContainer = '<div class="dl-dropdown-column dl-dropdown-column-'+(i+1)+'"></div>' 57 jQuery(this).find(".dl-column-"+(i+1)).wrapAll(wrapContainer); 58 } 59 }); 60 61 jQuery(".ft_header_wrap").on("click", ".ft_burger_btn_ver_2", function () { 62 jQuery(this).parent().find(".dl-menu.dl-dropdown-menu").toggleClass("dl-menu-active"); 63 }); 64 65 jQuery(".dropdown-menu.dropdown-first-level").each(function (){ 66 if (jQuery(this).find(".dl-dropdown-column").length > 3){ 67 jQuery(this).css("left", 0); 68 jQuery(this).parent().css("position", "static"); 69 } 70 }); 71 } 72 73 jQuery(".s-info-show").on("click", function (event) { 74 jQuery(this).toggleClass("s-info-display"); 75 if (jQuery(this).hasClass("s-info-display")){ 76 jQuery(this).text("Hide Article Statistics"); 77 } else { 78 jQuery(this).text("View Article Statistics"); 79 } 80 jQuery(this).parent().find("ul.s-info-items").toggleClass("s-dn"); 81 event.preventDefault(); 82 }) 83 84} ); 85 86function GetIEVersion() { 87 var sAgent = window.navigator.userAgent; 88 var Idx = sAgent.indexOf("MSIE"); 89 90 // If IE, return version number. 91 if (Idx > 0) 92 return parseInt(sAgent.substring(Idx + 5, sAgent.indexOf(".", Idx))); 93 94 // If IE 11 then look for Updated user agent string. 95 else if (!!navigator.userAgent.match(/Trident\/7\./)) 96 return 11; 97 98 else 99 return 0; //It is not IE 100} 101 102function set_level_height(class_tree) { 103 var max_h = 0; 104 jQuery(class_tree).each(function (index) { 105 if (jQuery(this).height() > max_h) { 106 max_h = jQuery(this).height(); 107 } 108 }); 109 jQuery(class_tree).css('height', max_h); 110} 111 112jQuery(document).ready(function ($) { 113 114 /* toggle */ 115 $("h3.wpsm-toggle-trigger").click(function(){ 116 $(this).toggleClass("active").next().slideToggle("fast");return false;
117 }); 118 119 if ($('.wpsm-tooltip-sw').length > 0) { 120 $(".wpsm-tooltip-sw").tipsy({gravity: "sw", fade: true, html: true }); 121 } 122 123 124 if ($('.product_cart_block').length > 0) { 125 } else { 126 $("a[href*='#']:not([href='#'])").click(function () { 127 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') 128 || location.hostname == this.hostname) { 129 130 var target = $(this.hash), 131 headerHeight = ($('#main_header').height() + 40); 132 133 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 134 135 if (target.length) { 136 /*$('html,body').animate({ 137 scrollTop: target.offset().top - headerHeight 138 }, 500);*/ 139 return false; 140 } 141 } 142 }); 143 } 144 145 set_level_height('.vab_list_of_posts_horizontal .vab_list_of_posts_item .vab_list_of_posts_text'); 146 if ($('.advanced_block_one.design_two').length > 0) { 147 var max_h = 0; 148 $(".advanced_block_one.design_two").each(function (index) { 149 var h = $(this).children('.subterms').outerHeight() + $(this).children('.posts').outerHeight(); 150 if (h > max_h) { 151 max_h = h; 152 } 153 }); 154 $(".advanced_block_one.design_two").each(function (index) { 155 $(this).children('.posts').css('height', (max_h - $(this).children('.subterms').outerHeight())); 156 }); 157 } 158 159 160 $('.ft_search_btn').click(function () { 161 $(this).toggleClass('active'); 162 $('.ft_search').toggleClass('active'); 163 164 $('.ft_submenu_box_mask').hide(); 165 $('.submenu_box').removeClass('active'); 166 $('.ft_menu .menu_list_item.has_submenu').removeClass('active'); 167 168 $('.ft_menu_mobile_ver_2').removeClass('active'); 169 $('.ft_burger_btn_ver_2').removeClass('active'); 170 171 $('.ftlg-menu .ftlg-search-wrap').toggleClass('ftlg-active'); 172 $("body").css("overflow", "auto"); 173 }); 174 175 176 177 $(".ft_menu .menu_list_item.has_submenu").hover( 178 function () { 179 if ($(window).width() > 768) { 180 $('.ft_submenu_box_mask').show(); 181 } 182 $('.ft_menu_wrap').css('max-height', ($(window).height() - $('.ft_header_wrap').height() + 2)); 183 }, function () { 184 $('.ft_submenu_box_mask').hide(); 185 } 186 ); 187 188 $('.ft_menu .menu_list_item.has_submenu').click(function () { 189 $('.ft_search_btn').removeClass('active'); 190 $('.ft_search').removeClass('active'); 191 $(this).toggleClass('active'); 192 if ($(this).hasClass('active')) { 193 $(this).children('.submenu_box').addClass('active'); 194 $('.ft_submenu_box_mask').show(); 195 } else { 196 $(this).children('.submenu_box').removeClass('active'); 197 $('.ft_submenu_box_mask').hide(); 198 } 199 200 }); 201 202 $('.ft_menu .avb_submenu_item > a, .ft_menu .ft_submenu_item > .a').click(function (e) { 203 if ($(window).width() < 640) { 204 if ($(this).parent().hasClass('active')) { 205 206 } else { 207 e.preventDefault(); 208 $(this).parent().addClass('active'); 209 return false; 210 } 211 } 212 }); 213 214 $('.ft_burger_btn_ver_2').click(function (event) { 215 if ($(this).hasClass('active')) { 216 $('.ft_menu_mobile_ver_2').removeClass('active'); 217 $('.ft_burger_btn_ver_2').removeClass('active'); 218 $("body").css("overflow", "auto"); 219 } else { 220 $('.ft_menu_mobile_ver_2').addClass('active'); 221 $('.ft_burger_btn_ver_2').addClass('active'); 222 $("body").css("overflow", "hidden"); 223 } 224 $('.ft_search').removeClass('active'); 225 $('.ft_search_btn').removeClass('active'); 226 }); 227 $('.ft_menu_mobile_ver_2 .close').click(function (event) { 228 $('.ft_menu_mobile_ver_2').removeClass('active'); 229 $('.ft_burger_btn_ver_2').removeClass('active'); 230 $("body").css("overflow", "auto"); 231 }); 232 233 if (GetIEVersion() > 0) { 234 jQuery(".img-object-fit-contain").removeClass('active'); 235 jQuery(".img-object-fit-contain").each(function () { 236 var img_obj = jQuery(this).children('img'); 237 var src = img_obj.attr('src'); 238 jQuery(this).css('left', img_obj.css('left')); 239 jQuery(this).css('top', img_obj.css('top')); 240 jQuery(this).css('width', img_obj.css('width')); 241 jQuery(this).css('height', img_obj.css('height')); 242 jQuery(this).css('background-image', 'url("' + src + '")'); 243 jQuery(this).addClass('active'); 244 }); 245 jQuery(".img-object-fit-cover").removeClass('active'); 246 jQuery(".img-object-fit-cover").each(function () { 247 var img_obj = jQuery(this).children('img'); 248 var src = img_obj.attr('src'); 249 jQuery(this).css('left', img_obj.css('left')); 250 jQuery(this).css('top', img_obj.css('top')); 251 jQuery(this).css('width', img_obj.css('width')); 252 jQuery(this).css('height', img_obj.css('height')); 253 jQuery(this).css('background-image', 'url("' + src + '")'); 254 jQuery(this).addClass('active'); 255 }); 256 } 257 258 jQuery('.rating-hint-btn').on('click', function (event) { 259 let currHint = jQuery(this).parent().find('.rating-hint'); 260 if (currHint.hasClass('sr-dblock')){ 261 currHint.removeClass('sr-dblock'); 262 } else { 263 currHint.addClass('sr-dblock'); 264 } 265 event.preventDefault(); 266 event.stopPropagation(); 267 }) 268 jQuery(window).on('click', function () { 269 if (jQuery('.rating-hint').hasClass('sr-dblock')){ 270 jQuery('.rating-hint').removeClass('sr-dblock'); 271 } 272 }); 273 274 /*** TFS Table ***/ 275 if (jQuery('.ftv-header-sidebar').length > 0) { 276 var widgetArea = jQuery('.ftv-header-sidebar'); 277 if (jQuery('.widget.ins-widget').length > 0) { 278 var infoWidget = jQuery('.widget.ins-widget').clone(); 279 jQuery('.widget.ins-widget').remove(); 280 widgetArea.append(infoWidget); 281 } 282 } 283 /*** ***/ 284 285 /* Buying Guide */ 286 if (jQuery(".vc_row.wpb_row .fa.fa-book").length > 0){ 287 let buyingGuideTitle = "Buying Guide"; 288 if (jQuery(".vc_row.wpb_row .fa.fa-book").parent().text().trim().toLowerCase() == buyingGuideTitle.trim().toLowerCase()){ 289 jQuery(".vc_row.wpb_row .fa.fa-book").closest(".vc_row.wpb_row").addClass("dl-buying-guide"); 290 } 291 } 292 293 /*** Cards equal height ***/ 294 if (jQuery(".product_table_design_2").length > 0){ 295 let productCardSelector = ".product_table_design_2 .tr"; 296 jQuery(window).resize(function(){ 297 if (jQuery(window).width() > 640 && jQuery(window).width() < 801) { 298 equalCardHeight(productCardSelector); 299 } 300 }); 301 if (jQuery(window).width() > 625 && jQuery(window).width() < 801) { 302 equalCardHeight(productCardSelector); 303 } 304 } 305 306 function equalCardHeight(itemSelector){ 307 //console.log("equalCardHeight") 308 let highest = 0; 309 let highestTitle = 0; 310 311 jQuery(itemSelector).each(function(){ 312 let currHeight = jQuery(this).height(); 313 314 if(currHeight > highest) {
315 highest = currHeight; 316 } 317 if(jQuery(this).find(".heading").height() > highestTitle) { 318 highestTitle = jQuery(this).find(".heading").height(); 319 } 320 }); 321 322 jQuery(itemSelector).each(function(){ 323 let currItemHeight = jQuery(this).height(); 324 325 if(currItemHeight < highest) { 326 let currTitleHeight = jQuery(this).find(".heading").height(); 327 let titlePadding = 0; 328 if (currTitleHeight < highestTitle){ 329 titlePadding = Math.trunc((highestTitle - currTitleHeight)/2); 330 } 331 332 let currHeight = highest - currItemHeight; 333 jQuery(this).find(".product-image-wrap") 334 .css("padding-top", Math.trunc(currHeight/2)+titlePadding+14); 335 jQuery(this).find(".product-image-wrap") 336 .css("padding-bottom", Math.trunc(currHeight/2)+titlePadding+14); 337 338 } else { console.log("currHeight else"); 339 let currTitleHeight = jQuery(this).find(".heading").height(); 340 if (currTitleHeight < highestTitle){ 341 let titlePadding = Math.trunc((highestTitle - currTitleHeight)/2); 342 jQuery(this).find(".product-image-wrap") 343 .css("padding-top", titlePadding+14); 344 jQuery(this).find(".product-image-wrap") 345 .css("padding-bottom", titlePadding+14); 346 } 347 } 348 }); 349 } 350 351 /*** Card label padding ***/ 352 function processProductLabelPadding() { 353 jQuery(".product_table_design_2 .tr").each(function () { 354 let titleHeight = jQuery(this).find(".td-2 .heading").outerHeight(); 355 jQuery(this).css('padding-top', titleHeight); 356 jQuery(this).find(".td-3 .progresbarWrap").css('top', titleHeight+6); 357 jQuery(this).find(".td-3 .rating-hint-wrap").css('top', titleHeight+72+4); 358 }); 359 } 360 361 if (jQuery(".product_table_design_2").length > 0){ 362 jQuery(window).resize(function(){ 363 if (jQuery(window).width() < 801) { 364 processProductLabelPadding(); 365 } 366 }); 367 if (jQuery(window).width() < 801) { 368 processProductLabelPadding(); 369 } 370 } 371 372 373 /*** Vertical table ***/ 374 if (jQuery('.tfs-table-wrap').length > 0){ 375 jQuery(window).resize(function(){ 376 if (jQuery(window).width() < 992) { 377 mobImageResize(); 378 } 379 }); 380 if (jQuery(window).width() < 992) { 381 mobImageResize(); 382 } 383 384 } 385 386 function mobImageResize(){ 387 if (jQuery('.tfs-head').length > 0){ 388 jQuery('.tfs-head').each(function(){ 389 var titleHeight = jQuery(this).find('.tfs-title').height(); 390 var buttonsHeight = jQuery(this).find('.tfs-links-wrap').height(); 391 var marginBottom = 12+28; 392 jQuery(this).find('.tfs-image').css('max-height', titleHeight + buttonsHeight + marginBottom + 'px'); 393 }); 394 } 395 } 396 /*** Vertical table END ***/ 397 398 /** 399 * Product detail card fix 400 */ 401 if (jQuery('.product_cart_block').length > 0 && jQuery('.wpsm_arrowlist.wpsm_pretty_list.small_gap_list').length > 0) { 402 jQuery(".wpsm_arrowlist.wpsm_pretty_list.small_gap_list li a").each(function (index) { 403 var p = jQuery(this); 404 var name = p.html(); 405 name = name.replace("â", ""); 406 name = name.replace("'", ""); 407 jQuery(".product_cart_block h2").each(function (index2) { 408 var c = jQuery(this); 409 var product_name = c.children('a').html(); 410 if (c.children('.product_label').length > 0) { 411 var product_nomination = c.children('.product_label').html(); 412 product_nomination = product_nomination.replace("â", ""); 413 product_nomination = product_nomination.replace("'", ""); 414 if (product_nomination.length > 0) { 415 if (name == product_nomination) {
416 p.append('<span class="dl-menu-subtitle" style="display: block;">' + product_name + '</span>'); 417 } 418 } 419 } 420 }); 421 }); 422 } 423 424 /** 425 * Comparation post type tables 426 */ 427 /*задаÑÑ ÑавнÑÑ ÑиÑÐ¸Ð½Ñ ÑаблиÑе, еÑли Ñ Ð½ÐµÐµ 4 колонки*/ 428 jQuery('.table-kpa').each(function(){ 429 var mytd = jQuery(this).find('table tr:first td'); 430 var oldtd = jQuery(this).find('table tr td'); 431 var colCount = mytd.length; 432 if (colCount == 4) { 433 mytd.addClass('td_width'); 434 oldtd.addClass('td_width'); 435 436 } 437 }); 438 439 /** 440 * Visual composer accordion fix 441 */ 442 jQuery('.vc_tta.vc_general .vc_tta-panel').addClass('vc_active'); 443 jQuery('.wpb-js-composer .vc_tta.vc_general .vc_tta-panel-title>a').click(function (e) { 444 e.preventDefault(); 445 return false; 446 }); 447}); 448jQuery(window).resize(function () { 449 if (GetIEVersion() > 0) { 450 jQuery(".img-object-fit-contain").removeClass('active'); 451 jQuery(".img-object-fit-contain").each(function () { 452 var img_obj = jQuery(this).children('img'); 453 var src = img_obj.attr('src'); 454 jQuery(this).css('left', img_obj.css('left')); 455 jQuery(this).css('top', img_obj.css('top')); 456 jQuery(this).css('width', img_obj.css('width')); 457 jQuery(this).css('height', img_obj.css('height')); 458 jQuery(this).css('background-image', 'url("' + src + '")'); 459 jQuery(this).addClass('active'); 460 }); 461 jQuery(".img-object-fit-cover").removeClass('active'); 462 jQuery(".img-object-fit-cover").each(function () { 463 var img_obj = jQuery(this).children('img'); 464 var src = img_obj.attr('src'); 465 jQuery(this).css('left', img_obj.css('left')); 466 jQuery(this).css('top', img_obj.css('top')); 467 jQuery(this).css('width', img_obj.css('width')); 468 jQuery(this).css('height', img_obj.css('height')); 469 jQuery(this).css('background-image', 'url("' + src + '")'); 470 jQuery(this).addClass('active'); 471 }); 472 } 473}); 474 475//Scroll To top 476var pretimer; 477jQuery(window).scroll(function(){ 478 'use strict'; 479 480 var postheight = jQuery('.post-inner').height() + jQuery('#main_header').height() - 100; 481 if (jQuery(this).scrollTop() > 500) { 482 clearTimeout(pretimer); 483 jQuery('#topcontrol, #float-posts-nav, #rh_social_panel_footer').addClass('scrollvisible'); 484 var refresh=function(){jQuery('#topcontrol, #float-posts-nav').removeClass('scrollvisible');} 485 pretimer=setTimeout(refresh,15000); 486 487 } else { 488 jQuery('#topcontrol').removeClass('scrollvisible'); 489 jQuery('#float-posts-nav').removeClass('scrollvisible'); 490 } 491 if (jQuery(this).scrollTop() > postheight) { 492 jQuery('#float-posts-nav').addClass('openedprevnext'); 493 } else { 494 jQuery('#float-posts-nav').removeClass('openedprevnext'); 495 } 496 497 if (jQuery('.footer-bottom').length > 0) { 498 if (jQuery('#re-compare-panel').length > 0) { 499 if(isVisibleOnScroll(jQuery('.footer-bottom'))) { 500 jQuery('#re-compare-panel').addClass('collapsed-onscroll'); 501 } 502 else { 503 jQuery('#re-compare-panel').removeClass('collapsed-onscroll'); 504 } 505 } 506 } 507 508}); 509 510jQuery( document ).ready( function() { 511 "use strict"; 512 513 /*** bottom rating bar ***/ 514 function addBottomRatingBar(label, title, total){ 515 if (jQuery(".rate_bar_wrap").length > 0){ 516 } else { 517 var totalTmpl = ''; 518 if (typeof total != 'undefined' && total){ 519 totalTmpl = '<span class="overall r_score_9">'+total+'</span> <span class="overall-text">Total Score</span>'; 520 } 521 var review = `<div class="rate_bar_wrap"> 522 <div class="review-top"> 523 <div class="overall-score"> 524 `+totalTmpl+` 525 </div> 526 <div class="review-text">
527 <span class="review-header">`+title+' - '+label+`</span> 528 </div> 529 </div> 530 </div>`; 531 if (jQuery(".formatBlock").length > 0) { 532 jQuery('.formatBlock').append(review); 533 } else { 534 jQuery('article.post').append(review); 535 } 536 537 } 538 } 539 540 function verticalTableBottomReview(){ 541 if (jQuery(".product_cart_block_heading").length > 0){ 542 var label = jQuery(".product_cart_block_heading").first().find("h2 span.product_label").text(); 543 var title = jQuery(".product_cart_block_heading").first().find("h2 a").text(); 544 if (title.length == 0) { 545 title = jQuery(".product_cart_block_heading").first().find("h2 span:first-child").text(); 546 } 547 var total = jQuery(".product_cart_block_info").first().find(".rating").text(); 548 549 addBottomRatingBar(label, title, total); 550 } 551 } 552 553 function euTableBottomReview(){ 554 if (jQuery(".tss-table").length > 0){ 555 var label = jQuery(".tss-table.tss-table-carousel .tss-item-carousel.nom-ec .tss-nomination-wrap .nom-label").text(); 556 var title = jQuery(".tss-table.tss-table-carousel .tss-item-carousel.nom-ec .tss-content .tss-title a.tss-title-link").text(); 557 var total = jQuery(".tss-table.tss-table-carousel .tss-item-carousel.nom-ec .tss-rating .tss-rating-value").text(); 558 559 addBottomRatingBar(label, title, total); 560 } 561 } 562 563 function tfsTableBottomReview(){ 564 if (jQuery(".tfs-table").length > 0){ 565 var label = jQuery(".tfs-table .tfs-head .nom-label").eq(0).text(); 566 var title = jQuery(".tfs-table .tfs-content .tfs-title-link").eq(0).text(); 567 var total = jQuery(".tfs-table .tfs-rating .progress_bar .text_value").eq(0).text(); 568 569 addBottomRatingBar(label, title, total); 570 } 571 } 572 573 function fshTableBottomReview(){ 574 if (jQuery(".fsh-table").length > 0){ 575 var label = jQuery(".fsh-items .fsh-item:first-child .fsh-lb").text(); 576 var title = jQuery(".fsh-items .fsh-item:first-child .fsh-link").text(); 577 578 label = label.replace(':', ''); 579 580 addBottomRatingBar(label, title, false); 581 } 582 } 583 584 if (jQuery(".product_cart_block_heading").length > 0){ 585 verticalTableBottomReview(); 586 } else if (jQuery(".tss-table-wrap").length > 0) { 587 euTableBottomReview(); 588 } else if (jQuery(".tfs-table").length > 0) { 589 tfsTableBottomReview(); 590 } else if (jQuery(".fsh-table").length > 0) { 591 //fshTableBottomReview(); 592 } 593 /*** bottom rating bar end ***/ 594 595 /*** Load product js ***/ 596 const POST_TYPE_REGULAR = 2; 597 const MENU_POSITION_STICKY = 1; 598 const MENU_POSITION_STATIC = 2; 599 600 var loadJS = function(url, implementationCode, location, isAsync){ 601 602 var scriptTag = document.createElement('script'); 603 scriptTag.src = url; 604 scriptTag.async = isAsync; 605 606 scriptTag.onload = implementationCode; 607 scriptTag.onreadystatechange = implementationCode; 608 609 location.appendChild(scriptTag); 610 }; 611 var loadCSS = function(cssId, stylePath, isPreloaded){ 612 613 if (!document.getElementById(cssId)) 614 { 615 var head = document.getElementsByTagName('head')[0]; 616 var link = document.createElement('link'); 617 618 if (isPreloaded){ 619 var prloadLink = document.createElement('link'); 620 prloadLink.rel = 'preload'; 621 prloadLink.as = 'style'; 622 prloadLink.type = 'text/css'; 623 prloadLink.crossorigin = 'anonymous'; 624 prloadLink.href = stylePath; 625 prloadLink.media = 'all'; 626 head.appendChild(prloadLink); 627 } 628 629 link.id = cssId; 630 link.rel = 'stylesheet'; 631 link.type = 'text/css'; 632 link.href = stylePath; 633 link.media = 'all'; 634 head.appendChild(link); 635 } 636 }; 637 var moduloboxCallback = function(){}; 638 function setupSlider(count_sliders){ 639 for (var i = 1; i <= count_sliders; i++) { 640 jQuery('.product_slickSlider_' + i + ' .image_items').slick({ 641 arrows: true, 642 dots: false, 643 autoplay: false, 644 autoplaySpeed: 8000, 645 fade: true, 646 asNavFor: '.product_thumbnails_slickSlider_' + i + ' .image_items', 647 responsive: [ 648 { 649 breakpoint: 640, 650 settings: { 651 dots: true, 652 arrows: true, 653 } 654 } 655 ] 656 }); 657 jQuery('.product_thumbnails_slickSlider_' + i + ' .image_items').slick({
658 arrows: false, 659 dots: false, 660 autoplay: false, 661 autoplaySpeed: 8000, 662 asNavFor: '.product_slickSlider_' + i + ' .image_items', 663 slidesToShow: 4, 664 slidesToScroll: 1, 665 focusOnSelect: true, 666 }); 667 668 } 669 } 670 var slickCallback = function(){ 671 if (jQuery('.product_cart_block').length > 0) { 672 673 var count_sliders = jQuery('.product_cart_block').length; 674 675 var isSliderEnabled = false; 676 677 if (jQuery(window).scrollTop() > 10){ 678 setupSlider(count_sliders); 679 } else { 680 jQuery(window).scroll(function(){ 681 if (!isSliderEnabled){ 682 setupSlider(count_sliders); 683 isSliderEnabled = true; 684 } 685 }); 686 } 687 688 jQuery('.thumbnails_slider_prev').click(function () { 689 var i = jQuery(this).data('n') 690 if (i > 0) { 691 jQuery('.product_slickSlider_' + i + ' .image_items').slick('slickPrev'); 692 } 693 }); 694 jQuery('.thumbnails_slider_next').click(function () { 695 var i = jQuery(this).data('n'); 696 if (i > 0) { 697 jQuery('.product_slickSlider_' + i + ' .image_items').slick('slickNext'); 698 } 699 }); 700 } 701 702 if (jQuery('.ft_step_slider').length > 0) { 703 function coloring_number(n) { 704 jQuery('.ft_step_slider_control_item').removeClass('active'); 705 for (var i = 1; i <= n; i++) { 706 jQuery('.ft_step_slider_control_item_' + i).addClass('active'); 707 } 708 } 709 710 jQuery('.ft_step_slider_control_item').css('width', (100 / jQuery('.ft_step_slider_control_item').length) + '%'); 711 coloring_number(1); 712 jQuery('.ft_step_slider .ft_step_slider_items').slick({ 713 arrows: false, 714 dots: false, 715 autoplay: true, 716 autoplaySpeed: 8000, 717 }); 718 jQuery('.ft_step_slider .ft_step_slider_items').on('init', function (event, slick) { 719 coloring_number(1); 720 }); 721 jQuery('.ft_step_slider .ft_step_slider_items').on('beforeChange', function (event, slick, currentSlide, nextSlide) { 722 coloring_number(nextSlide + 1); 723 }); 724 jQuery('.ft_step_slider_control_item').click(function () { 725 var n = jQuery(this).data('n'); 726 coloring_number(n); 727 jQuery('.ft_step_slider .ft_step_slider_items').slick('slickGoTo', (n - 1)); 728 }); 729 jQuery('.ft_step_slider_control_next').click(function () { 730 jQuery('.ft_step_slider .ft_step_slider_items').slick('slickNext'); 731 }); 732 jQuery('.ft_step_slider_control_prev').click(function () { 733 jQuery('.ft_step_slider .ft_step_slider_items').slick('slickPrev'); 734 }); 735 } 736 } 737 var progressbarCallback = function(){ 738 /** 739 * Product Table progress bar 740 */ 741 if (jQuery('.product_table_design_2 .progresbarWrap .progress_bar').length > 0) { 742 jQuery('.product_table_design_2 .progresbarWrap .progress_bar').each(function () { 743 var o = jQuery(this); 744 var id = o.attr('id'); 745 var value = o.data('value'); 746 var color = o.data('color'); 747 var bar = new ProgressBar.Circle('#' + id, { 748 strokeWidth: 6, 749 easing: 'easeInOut', 750 duration: 1400, 751 color: color, 752 trailColor: '#ffffff', 753 trailWidth: 6, 754 value: 20, 755 svgStyle: null 756 }); 757 var gradient = '<linearGradient id="gradient1">'+ 758 '<stop id="stop1" offset="0%" ></stop>'+ 759 '<stop id="stop2" offset="100%" ></stop>'+ 760 '</linearGradient>'; 761 bar.svg.insertAdjacentHTML('afterbegin', gradient); 762 bar.animate(value); 763 }); 764 } 765 766 if (jQuery('.tfs-table-wrap .progresbarWrap .progress_bar').length > 0) { 767 jQuery('.tfs-table-wrap .progresbarWrap .progress_bar').each(function () { 768 var o = jQuery(this); 769 var id = o.attr('id'); 770 var value = o.data('value'); 771 var color = o.data('color'); 772 var bar = new ProgressBar.Circle('#' + id, { 773 strokeWidth: 6, 774 easing: 'easeInOut', 775 duration: 1400, 776 color: color, 777 trailColor: '#ffffff', 778 trailWidth: 6, 779 value: 20, 780 svgStyle: null 781 }); 782 var gradient = '<linearGradient id="gradient1">'+ 783 '<stop id="stop1" offset="0%" ></stop>'+ 784 '<stop id="stop2" offset="100%" ></stop>'+ 785 '</linearGradient>'; 786 bar.svg.insertAdjacentHTML('afterbegin', gradient); 787 bar.animate(value); 788 }); 789 } 790 791 if (jQuery('.tss-table-cards .progresbarWrap .progress_bar').length > 0) { 792 jQuery('.tss-table-cards .progresbarWrap .progress_bar').each(function () { 793 var o = jQuery(this); 794 var id = o.attr('id'); 795 var value = o.data('value'); 796 var color = o.data('color'); 797 var bar = new ProgressBar.Circle('#' + id, { 798 strokeWidth: 6, 799 easing: 'easeInOut', 800 duration: 1400, 801 color: color, 802 trailColor: '#ffffff', 803 trailWidth: 6, 804 value: 20, 805 svgStyle: null 806 }); 807 var gradient = '<linearGradient id="gradient1">'+ 808 '<stop id="stop1" offset="0%" ></stop>'+ 809 '<stop id="stop2" offset="100%" ></stop>'+ 810 '</linearGradient>'; 811 bar.svg.insertAdjacentHTML('afterbegin', gradient); 812 bar.animate(value); 813 }); 814 } 815 } 816 var pageScrollCallback = function(){ 817 /** 818 * Product detail, comparation table widget scroll 819 */ 820 var pageScrollOffset = 20; 821 if (dl_menu_position == MENU_POSITION_STICKY){ 822 pageScrollOffset = jQuery('.ft_header').height() + 20; 823 } 824 /*jQuery("a[href*='#']").mPageScroll2id({ 825 'scrollSpeed': 300, 826 'offset': (pageScrollOffset), 827 'autoScrollSpeed': true, 828 'scrollEasing': 'linear', 829 'scrollingEasing': 'linear' 830 831 });*/ 832 } 833 /*loadCSS('modulobox_style', dl_theme_common+'assets/vendor/modulobox/css/modulobox.min.css', true); 834 loadCSS('slick_style', dl_theme_common+'assets/vendor/slick/css/slick.min.css', true); 835 loadCSS('common_style', dl_theme_common+'css/common/themes/'+dl_theme_style+'.min.css', true); 836 if (dl_post_type == POST_TYPE_REGULAR){ 837 loadJS(dl_theme_common+'assets/vendor/progressbar.min.js', progressbarCallback, document.body, true); 838 loadJS(dl_theme_common+'assets/vendor/modulobox/js/modulobox.min.js', moduloboxCallback, document.body, true); 839 loadJS(dl_theme_common+'assets/vendor/jquery.malihu.PageScroll2id.min.js', pageScrollCallback, document.body, true); 840 } 841 loadJS(dl_theme_common+'assets/vendor/slick/js/slick.min.js', slickCallback, document.body, true);*/ 842 progressbarCallback(); 843 slickCallback(); 844 //pageScrollCallback(); 845 /*** ***/ 846} );
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.