1 2var offsetdif = 0; 3var floatstickyoffset = 0; 4var xheadermenu_pos = 0; 5var xheadermenu_height = 0; 6var xpricecomparison_pos = 0; 7var dynamictop = 0 8var isadjustvideosticky = false; 9var alldata = '' 10var spaceright = 0 11var firstStickyAdded = false; 12var IsThisLastSticky = false; 13var stickyboxlen = 3; 14var other_webpart_class = "sticky-other-webpartner"; 15var deviceclass = "sticky-device-desktop"; 16 17var bool_GetStickyContentCalled = false; 18function GetStickyContent(stickyCounter, stickyUrl, stickyDisplayOrders, IsThisLastSticky) { 19 if ($(".ss_dept_details_txt[data-no-left-sticky!='1']").length > 0 || $(".ss_dept_txt[data-no-left-sticky!='1']").length > 0 || spaceright >= 230) 20 { 21 bool_GetStickyContentCalled = true; 22 $.ajax({ 23 url: stickyUrl, 24 type: "GET", 25 async: true, 26 success: function (data) { 27 var codeToProcess = "<div>" + data + "</div>"; 28 var $toProcess = $(codeToProcess); 29 30 //$toProcess.find("div:first").attr("data-displayorder", "" + stickyDisplayOrders + ""); 31 $toProcess.find('.vcontent').remove().html() 32 33 if ($(".ss_dept_txt[data-no-left-sticky!='1']").length > 0) { 34 var stickylen = $(".ss_dept_txt .ss-page-sticky-box").length 35 if (IsFabricUI) { 36 if (!$("body").hasClass('sticky-' + curr_WebPartnerName.replace(".com", ""))) { 37 $("body").addClass('sticky-' + curr_WebPartnerName.replace(".com", "")); 38 } 39 } 40 41 if ($(".ss_dept_txt .ss-page-sticky-box.blank").length > 0) { 42 var blankStickyDiv = $(".ss_dept_txt .ss-page-sticky-box.blank")[0]; 43 $(blankStickyDiv).append(alldata + $toProcess.html()).removeClass('blank'); 44 } 45 else if (stickylen >= stickyboxlen) { 46 //alldata = alldata + $toProcess.html(); 47 //has_alldata = true; 48 if (spaceright >= 230) { 49 $('#floatingSticky').find("#AdStickyManager" + stickyCounter).append($toProcess.html()); 50 51 } 52 } 53 else { 54 if ($(".ssQJbox").length == 0) { 55 stickylen = stickylen + 1 56 } 57 if (!$("body").hasClass('sticky-' + curr_WebPartnerName.replace(".com", ""))) { 58 $("body").addClass('sticky-' + curr_WebPartnerName.replace(".com", "")); 59 } 60 $(".ss_dept_txt").append('<div style="" class="ss-page-sticky-box stickyDiv ss_sticky_' + (stickylen) + '">' + alldata + $toProcess.html() + '</div>' + '</div>'); 61 62 } 63 } 64 else if ($(".ss_dept_details_txt[data-no-left-sticky!='1']").length > 0) { 65 var stickylen = $(".ss_dept_details_txt .ss-dept-inner-right-cont").length 66 if (IsFabricUI) { 67 if (!$("body").hasClass('sticky-' + curr_WebPartnerName.replace(".com", ""))) { 68 $("body").addClass('sticky-' + curr_WebPartnerName.replace(".com", "")); 69 } 70 } 71 72 if ($(".ss_dept_details_txt .ss-dept-inner-right-cont.blank").length > 0) { 73 var blankStickyDiv = $(".ss_dept_details_txt .ss-dept-inner-right-cont.blank")[0]; 74 $(blankStickyDiv).append(alldata + $toProcess.html()).removeClass('blank'); 75 } 76 else if (stickylen >= stickyboxlen) { 77 //alldata = alldata + $toProcess.html(); 78 //has_alldata = true; 79 if (spaceright >= 230) { 80 $('#floatingSticky').find("#AdStickyManager" + stickyCounter).append($toProcess.html()); 81 82 } 83 } 84 else { 85 if ($(".ssQJbox").length == 0) { 86 stickylen = stickylen + 1 87 } 88 if (!$("body").hasClass('sticky-' + curr_WebPartnerName.replace(".com", ""))) 89 { 90 $("body").addClass('sticky-' + curr_WebPartnerName.replace(".com", "")); 91 } 92 $(".ss_dept_details_txt").append('<div style="" class="ss-dept-inner-right-cont stickyDiv page_sticky' + (stickylen) + '">' + alldata + $toProcess.html() + '</div>' + '</div>'); 93 94 } 95 } else { 96 //alldata = alldata + $toProcess.html(); 97 //has_alldata = true; 98 if (spaceright >= 230) { 99 $('#floatingSticky').find("#AdStickyManager" + stickyCounter).append($toProcess.html()); 100 } 101 } 102 103 if (IsThisLastSticky && spaceright >= 230) { 104 if ($(".mainContainer").hasClass("ss_no_sticky")) { 105 $(".mainContainer").removeClass("ss_no_sticky"); 106 } 107 if (isadjustvideosticky) { 108 $("<style>.price_comparison_inner{width:215px !important;}.videoThumb .vimg{padding-left:35px !important;} .videor{float:none;margin-top:0px;}</style>").appendTo("head"); 109 } 110 if (devicetype == "mobile") { 111 } 112 else { 113 if ($("[data-id='div_stickymanager']").length) { 114 $("[data-id='div_stickymanager']").css("margin-top", "15px") 115 } 116 } 117 118 fn_steupsliding(sticky_mxdisplayorder); 119 } 120 121 if (IsThisLastSticky) { 122 if ((typeof js_IsFabricUI !== "undefined") && (js_IsFabricUI == "1")) { 123 fn_FabricUI_StickiesCount(); 124 } 125 } 126 else { 127 if (fn_FabricUI_StickiesCount_Called) { 128 fn_FabricUI_StickiesCount(); 129 } 130 } 131 } 132 }); 133 } 134} 135 136 137$(document).ready(function () { 138 139 if (user_country != "" && user_country != "us") { 140 var div_internatinal_ship = $("#div_internationl_ship"); 141 if (div_internatinal_ship.length) { 142 $("body").prepend("<div id='sticky_international_wrapper'>" + div_internatinal_ship.html() + "</div>"); 143 div_internatinal_ship.html(""); 144 } 145 $('.flap-close').on('mouseover', function () { $('.flap-stage').fadeOut() }) 146 } 147 if (window.location.pathname == "" || window.location.pathname == "/") { 148 stickyboxlen = 2 149 } else if ($(".ss_dept_main_heading").hasClass("ss_video_page")) { 150 stickyboxlen = 0 151 } 152 153 //no header content available 154 //if ($(".ss_dept_img_cont").text().length > 0 || $(".ss-dept-inner-details").text().length > 0) { 155 156 //} 157 //else { 158 // stickyboxlen = 0; 159 //} 160 161 Chk_Space_Sticky(); 162}); 163$(document).ready(function () { 164 //08162019 - there is no need to wait for 1000 sec. slowing down the page load time 165 //setTimeout(function () { 166 167 if (devicetype == "mobile") { 168 deviceclass = "sticky-device-mobile" 169 } 170 var arr_css_webpartner = ["mynamebadges", "myassettag", "smartsign", "mynameplates", "xpressmats"] 171 172 try { 173 if (arr_css_webpartner.indexOf(curr_WebPartnerName.replace(".com", "")) > -1) { 174 other_webpart_class = "" 175 } 176 } 177 catch (err) { 178 var arr_css_webpartner_tmp = arrayToString(arr_css_webpartner); 179 if (arr_css_webpartner_tmp.indexOf(curr_WebPartnerName.replace(".com", "")) > -1) { 180 other_webpart_class = "" 181 } 182 } 183 184 185 186 187 //alldata = alldata + '<div id="stickymanager_wrapper" data-id="div_stickymanager" class="' + "sticky-" + curr_WebPartnerName.replace(".com", "") + ' ' + other_webpart_class + ' ' + deviceclass + '"> ' 188 //need to remove after finish [hide sticky for other sites] 189 if (!$("#floatingSticky").parent().parent().hasClass("body-container") && devicetype != "mobile") { 190 $('#floatingSticky').hide(); 191 } 192 var arrcomp_dyntop = ["mynamebadges.com", "xpresstags.com", "mynameplates.com", "qclabels.com", "simplyexitsigns.com", "myhardhatstickers.com", "shippinglabels.com"] 193 try { 194 if (arrcomp_dyntop.indexOf(curr_WebPartnerName) > -1) { 195 //dynamictop = 30 196 dynamictop = 0 197 } else if ("myparkingsign.com".indexOf(curr_WebPartnerName) > -1) { 198 dynamictop = 30 199 } 200 } catch (err) { 201 var arrcomp_dyntop_tmp = arrayToString(arrcomp_dyntop); 202 if (arrcomp_dyntop_tmp.indexOf(curr_WebPartnerName) > -1) { 203 //dynamictop = 30 204 dynamictop = 0 205 } 206 } 207 var has_alldata = false 208 try { 209 if (typeof stickyLinks1 == 'undefined' || sticky_must_show) { 210 211 var varStickyURL = sticky_varStickyURL; 212 var displayorders = sticky_displayorders; 213 var properties = sticky_properties; 214 var mxdisplayorder = sticky_mxdisplayorder; 215 var varTemplateparas = sticky_varTemplateparas; 216 var delayvalue = 0 217 for (var i = 0; i < varStickyURL.length; i++) { 218 219 //for mutcd sticky 220 var mutcddiv = $(".mutcdRegulationDiv"); 221 if (mutcddiv.length) { 222 var mutcdhtml = "<div>" + mutcddiv.html() + "</div>"; 223 var $toProcess = $(mutcdhtml); 224 $toProcess.find("div:first").css("right", "0px").css("position", "relative").css("margin-bottom", "10px"); 225 mutcddiv.remove(); 226 alldata = alldata + "<div class='mutcdRegulationDiv'>" + $toProcess.html() + "</div>"; 227 228 } 229 //video sticky exists but not "mustshow" in property then skip 230 if (typeof stickyLinks1 != 'undefined' && properties[i].indexOf(",mustshow") < 0) { 231 continue; 232 } 233 //video sticky exists and also "mustshow" in property then 234 if (typeof stickyLinks1 != 'undefined' && properties[i].indexOf(",mustshow,") >= 0) { 235 if (!isadjustvideosticky) { 236 isadjustvideosticky = true; 237 } 238 } 239 if (typeof stickyLinks1 != 'undefined' && properties[i].indexOf(",mustshowafter,") >= 0) { 240 if (!isadjustvideosticky) { 241 isadjustvideosticky = true; 242 } 243 delayvalue = 1000 244 } 245 if (varStickyURL[i] == "") { 246 continue; 247 } else { 248 varStickyURL[i] += "?" + varTemplateparas[i] 249 } 250 251 if (i == varStickyURL.length - 1) { 252 IsThisLastSticky = true; 253 } 254 else { 255 var nextStickyCount = i + 1; 256 var upcomingStickyCount = 0; 257 while (nextStickyCount < varStickyURL.length) { 258 if ((typeof stickyLinks1 != 'undefined' && properties[nextStickyCount].indexOf(",mustshow") < 0) || varStickyURL[nextStickyCount] == "") { 259 260 } 261 else { 262 upcomingStickyCount++; 263 } 264 nextStickyCount++; 265 } 266 if (upcomingStickyCount == 0) { 267 IsThisLastSticky = true; 268 } 269 } 270 271 if (devicetype != "mobile") { 272 273 if (!firstStickyAdded) { 274 $('#floatingSticky').append('<div id="stickymanager_wrapper" data-id="div_stickymanager" class="' + "sticky-" + curr_WebPartnerName.replace(".com", "") + ' ' + other_webpart_class + ' ' + deviceclass + '"></div>'); 275 firstStickyAdded = true; 276 } 277 $('#floatingSticky').find("#stickymanager_wrapper").append('<div id="AdStickyManager' + i + '" data-displayorder="' + displayorders[i] + '"></div>'); 278 GetStickyContent(i, varStickyURL[i], displayorders[i], IsThisLastSticky); 279 } 280 else { 281 if (devicetype != "mobile" || varStickyURL[i].toLowerCase().indexOf("customerratings") > 0) { 282 if (!firstStickyAdded) { 283 $('#floatingSticky').append('<div id="stickymanager_wrapper" data-id="div_stickymanager" class="' + "sticky-" + curr_WebPartnerName.replace(".com", "") + ' ' + other_webpart_class + ' ' + deviceclass + '"></div>'); 284 firstStickyAdded = true; 285 } 286 $('#floatingSticky').find("#stickymanager_wrapper").append('<div id="AdStickyManager' + i + '" data-displayorder="' + displayorders[i] + '"></div>'); 287 GetStickyContent(i, varStickyURL[i], displayorders[i], IsThisLastSticky); 288 } 289 } 290 } 291 /* 292 if (isadjustvideosticky) { 293 //var price_comparison_inner=$(".price_comparison_inner"); 294 //var sticky_video_thumb= $(".videoThumb .vimg"); 295 //if (price_comparison_inner.length) { 296 // price_comparison_inner.width("215px"); 297 //} 298 //if (sticky_video_thumb.length) { 299 // sticky_video_thumb.css("padding-left","35px"); 300 //} 301 //$("<style>.price_comparison_inner{width:215px !important;}.videoThumb .vimg{padding-left:35px !important;} .videor{float:none;margin-top:0px;}#price_comparison{position:unset;}</style>").appendTo("head"); 302 $("<style>.price_comparison_inner{width:215px !important;}.videoThumb .vimg{padding-left:35px !important;} .videor{float:none;margin-top:0px;}</style>").appendTo("head"); 303 // $("<script>function resetStickyPos(){}<\/script>").appendTo("body"); 304 } 305 if (has_alldata) { $(".mainContainer").removeClass("ss_no_sticky"); Chk_Space_Sticky();} 306 if (has_alldata && spaceright >= 230) { 307 if (devicetype == "mobile") { 308 alldata = alldata + $("#divmobsticky").html(); 309 if ($("#divmobsticky").length) { 310 $("#divmobsticky").html("") 311 } 312 } 313 if (delayvalue != 0) { 314 //$('#floatingSticky').html(alldata + "</div>"); 315 316 //floatstickyoffset = $("#floatingSticky").offset().top; 317 if ($("[data-id='div_stickymanager']").length) { 318 $("[data-id='div_stickymanager']").remove(); 319 } 320 setTimeout(function () { 321 $('#floatingSticky').append(alldata + "</div>") 322 if ($("[data-id='div_stickymanager']").length) { 323 $("[data-id='div_stickymanager']").css("margin-top", "15px") 324 } 325 fn_steupsliding(mxdisplayorder) 326 }, 100); 327 } else { 328 $('#floatingSticky').prepe
328nd(alldata + "</div>") 329 fn_steupsliding(mxdisplayorder) 330 } 331 } else { 332 $(".mainContainer").addClass("ss_no_sticky") 333 } 334 */ 335 336 // setTimeout(function(){ if($(".price_comparison_inner").length== 0){ $("[data-id='div_stickymanager']").show(); } }, 1000); 337 338 $(".HEADvid .vimg").css("width", "120px").css("margin-left", "auto").css("margin-right", "auto") 339 $(".HEADvid .btnvideoView").attr("data-autoplay", "1"); 340 } 341 342 } 343 catch (ex) { 344 345 } 346 //08162019 - there is no need to wait for 1000 sec. slowing down the page load time 347 //}, 1000); 348 349 fn_Sticky_Next_Work(); 350 $(".LMlink").each(function () { 351 $(this).click(function () { 352 $(this).closest(".slidediv").addClass("slide-open"); 353 $(this).hide(); 354 var expand_array = [] 355 var value = getCookie_sticky("ckexpand") 356 if (value.length > 0) { 357 expand_array = JSON.parse(value); 358 } 359 var autoid = $(this).parents("[data-autoid]").attr("data-autoid") 360 try { 361 if (expand_array.indexOf(autoid) < 0) { 362 expand_array.push(autoid); 363 setCookie_sticky("ckexpand", JSON.stringify(expand_array)) 364 } 365 } catch (err) { 366 var expand_array_tmp = arrayToString(expand_array); 367 if (expand_array_tmp.indexOf(autoid) < 0) { 368 expand_array.push(autoid); 369 setCookie_sticky("ckexpand", JSON.stringify(expand_array)) 370 } 371 } 372 }) 373 }) 374 $(".LLlink").each(function () { 375 $(this).click(function () { 376 $(this).closest(".slidediv").removeClass("slide-open"); 377 var meobj = $(this) 378 setTimeout(function () { meobj.siblings(".sticky_title").find(".LMlink").show() }, 500); 379 var expand_array = [] 380 var value = getCookie_sticky("ckexpand") 381 if (value.length > 0) { 382 expand_array = JSON.parse(value); 383 var autoid = $(this).parents("[data-autoid]").attr("data-autoid") 384 var index = expand_array.indexOf(autoid); 385 if (index > -1) { 386 expand_array.splice(index, 1); 387 setCookie_sticky("ckexpand", JSON.stringify(expand_array)) 388 } 389 } 390 391 392 //setTimeout(function(){$(".LMlink").show()},500) ; 393 }); 394 }); 395 update_no_of_time_sticky(); 396 expandsticky(); 397 if (bool_GetStickyContentCalled == false) { 398 if ((typeof js_IsFabricUI !== "undefined") && (js_IsFabricUI == "1")) { 399 fn_FabricUI_StickiesCount(); 400 } 401 } 402}); 403 404function fn_steupsliding(mxdisplayorder) { 405 var arrsticky = $("[data-displayorder]").not("[data-displayorder=-1]"); 406 if (arrsticky.length > 1) { 407 arrsticky.hide(); 408 for (var i = 0; i <= mxdisplayorder; i++) { 409 var elem = $("[data-displayorder='" + i + "']"); 410 if (elem.length) { 411 elem.eq(0).addClass("sticky-mobile-active").show(); 412 if (elem.length > 1) { 413 doSetTimeoutsticky(i); 414 } 415 } 416 } 417 } 418} 419 420function fn_Sticky_Next_Work() { 421 if (devicetype == "mobile") { return; } 422 //$("#price_comparison").show(); 423 xheadermenu_pos = $('.body-container').offset().top; 424 xheadermenu_height = $('.header-menu').height(); 425 if ($("#floatingSticky").length > 0 && spaceright >= 230) { 426 if (floatstickyoffset == 0) { 427 floatstickyoffset = $("#floatingSticky").offset().top; 428 if ($("#floatingSticky").offset().top == 0) { //can be zero if flotingsticky is hidden 429 floatstickyoffset = $(".stickycontent").offset().top; 430 } 431 } 432 433 offsetdif = $("#floatingSticky").parent().position().top; 434 Chk_Space_Sticky(); 435 xresetStickyPos(); 436 $(window).on("scroll", function () { 437 xresetStickyPos(); 438 }); 439 } 440} 441 442function update_no_of_time_sticky() { 443 var nooftime_array = [] 444 var value = getCookie_sticky("ckstickynooftime") 445 446 if (value.length > 0) { 447 nooftime_array = JSON.parse(value); 448 } 449 450 $("[data-autoid]").each(function () { 451 var autoid = $(this).attr("data-autoid"); 452 var nooftime = $(this).attr("data-nooftime") 453 if (nooftime != "") { 454 var index = findArrayIndexByMatch(nooftime_array, "id" + autoid); 455 if (index > -1) { 456 var no = parseInt(nooftime_array[index].split("-")[1]); 457 if ((no + 1) == nooftime) { 458 459 update_removesticky_array(autoid) 460 } 461 if (no < nooftime) { 462 nooftime_array[index] = "id" + autoid + "-" + (no + 1); 463 } 464 465 } 466 else { 467 nooftime_array.push("id" + autoid + "-" + 1) 468 if (nooftime == 1) { 469 update_removesticky_array(autoid) 470 } 471 } 472 } 473 474 475 }) 476 if (nooftime_array.length > 0) { 477 var expiretime = new Date(); 478 var time = expiretime.getTime(); 479 time += 3600 * 1000; 480 expiretime.setTime(time);
481 setCookie_sticky("ckstickynooftime", JSON.stringify(nooftime_array), expiretime) 482 } 483 484} 485 486function findArrayIndexByMatch(arr, match) { 487 for (var i = 0; i < arr.length; i++) { 488 if (arr[i].indexOf(match) > -1) { 489 return i; 490 } 491 } 492 return -1; 493} 494function Chk_Space_Sticky() { 495 var $bodycontainer = $(".body-container"); 496 var $floatingsticky = $('#floatingSticky'); 497 var IsResponsivePage = $(window).width() == $bodycontainer.outerWidth(); 498 //var spaceright = 0; 499 var $skucontainer = $(".sku-main-container"); 500 if (devicetype == "mobile") { spaceright = 250; return; } 501 if (IsResponsivePage && $skucontainer.length) { 502 503 spaceright = ($(window).width() - ($skucontainer.offset().left + $skucontainer.outerWidth())); 504 } 505 else { 506 spaceright = ($(window).width() - ($bodycontainer.offset().left + $bodycontainer.outerWidth())); 507 } 508 509 510 //if (spaceright>=250) { 511 // $floatingsticky.show(); 512 //} 513 //else{ 514 // $floatingsticky.hide(); 515 //} 516} 517function expandsticky() { 518 var expand_array = [] 519 var value = getCookie_sticky("ckexpand") 520 if (value.length > 0) { 521 expand_array = JSON.parse(value); 522 for (var i = 0; i < expand_array.length; i++) { 523 var expndbtn = $('[data-autoid=' + expand_array[i] + ']').find(".LMlink") 524 if (expndbtn.length) { 525 expndbtn.trigger("click"); 526 } 527 } 528 } 529} 530 531function xresetStickyPos() { 532 var $bodycontainer = $(".body-container"); 533 var $floatingsticky = $('#floatingSticky'); 534 var $headermenu = $('.header-menu'); 535 536 537 //if($('#floatingSticky .price_comparison_inner').length > 0) 538 //{ 539 // return; 540 //} 541 var xx_headermenu_pos; 542 xx_headermenu_pos = $(window).scrollTop(); 543 544 var customTOP = 0; 545 //if (xx_headermenu_pos <= xheadermenu_pos) { 546 // customTOP = xheadermenu_pos - floatstickyoffset + xheadermenu_height/2 547 //} 548 //else { 549 // customTOP = parseInt($(window).scrollTop()) + (offsetdif - floatstickyoffset) + (xheadermenu_height + xheadermenu_height / 2); 550 //} 551 552 customTOP = (parseInt($(window).scrollTop()) + (xheadermenu_height + parseInt($(".body-container").css("padding-top")) + dynamictop)) - floatstickyoffset; 553 //if (floatstickyoffset < 0 && floatstickyoffset < (($(".header_cont").height() + 20) * -1)) { 554 if (floatstickyoffset < 0 && floatstickyoffset < (($(".body-container").offset().top * -1))) { 555 customTOP = (parseInt($(window).scrollTop()) + (xheadermenu_height + parseInt($(".body-container").css("padding-top")) + dynamictop)) - ($(".body-container").offset().top); 556 } 557 if (customTOP <= 0) { 558 customTOP = 0 559 } 560 561 if (Math.ceil($floatingsticky.height() + $floatingsticky.offset().top) >= $(document).height() && !($headermenu.offset().top + (xheadermenu_height + 30) < $floatingsticky.offset().top)) { 562 563 } else if ((screen.height - ($(".body-container").position().top + 20)) < $floatingsticky.height() && $('.header-menu').position().top == 0) { 564 $floatingsticky.css('top', customTOP - ($floatingsticky.height() - (screen.height - $(".body-container").position().top - 40)) + "px") 565 } else { 566 $floatingsticky.css('top', customTOP + "px"); 567 568 } 569 //console.log(customTOP + "px") 570 //var jj = -1 * ($('#floatingSticky').width()+20); 571 //$('#floatingSticky').css('right', jj + "px"); 572 //if (1 && $bodycontainer.width() > 1000 && $(window).width() < 1905 && !$("body").hasClass('cutom-wizard-desktop')) { 573 if (1 && $bodycontainer.width() > 1000 && $(window).width() < 1905 && !($("body").hasClass('cutom-wizard-desktop') || $("body").hasClass('ss_fullWidth_view'))) { 574 $floatingsticky.css('right', "15px"); 575 } 576 else { 577 var jj = -1 * ($floatingsticky.width() + 20); 578 if (jj == -20) { jj = -220 } 579 $floatingsticky.css('right', jj + "px"); 580 } 581 if (typeof stickyPoshandler != 'undefined') { 582 $(window).unbind('scroll', stickyPoshandler); 583 } 584 585} 586 587function doSetTimeoutsticky(disorder) { 588 setTimeout(function () { slidesticky(disorder); }, stickyslidetime); 589} 590function slidesticky(disorder) {
591 var arrsticky = $("[data-displayorder='" + disorder + "']"); 592 arrsticky.each(function (index) { 593 if ($(this).hasClass("sticky-mobile-active")) { 594 var indextoshow = 0; 595 if (index == arrsticky.length - 1) { 596 indextoshow = 0; 597 } 598 else { 599 indextoshow = index + 1; 600 } 601 $(this).removeClass("sticky-mobile-active").hide(); 602 arrsticky.eq(indextoshow).addClass("sticky-mobile-active").fadeIn(); 603 doSetTimeoutsticky(disorder); 604 return false; 605 } 606 607 608 }) 609} 610 611function update_removesticky_array(autoid) { 612 var remove_array = [] 613 var value = getCookie_sticky("ckdelsticky") 614 if (value.length > 0) { 615 remove_array = JSON.parse(value); 616 } 617 try { 618 if (remove_array.indexOf(autoid) < 0) { 619 remove_array.push(autoid); 620 var expiretime = new Date(); 621 var time = expiretime.getTime(); 622 time += 3600 * 1000; 623 expiretime.setTime(time); 624 setCookie_sticky("ckdelsticky", JSON.stringify(remove_array), expiretime) 625 } 626 } catch (err) { 627 var remove_array_tmp = arrayToString(remove_array); 628 if (remove_array_tmp.indexOf(autoid) < 0) { 629 remove_array.push(autoid); 630 var expiretime = new Date(); 631 var time = expiretime.getTime(); 632 time += 3600 * 1000; 633 expiretime.setTime(time); 634 setCookie_sticky("ckdelsticky", JSON.stringify(remove_array), expiretime) 635 } 636 } 637} 638 639function arrayToString(arr) { 640 var retval = "" 641 for (var i = 0; i < arr.length; i++) { 642 retval = retval + arr[i] + ";" 643 } 644 if (retval.length > 0) { 645 retval = retval.substring(0, retval.length - 1); 646 } 647 return retval 648} 649 650function Remove_Sticky(autoid) { 651 update_removesticky_array(autoid) 652 $("[data-autoid=" + autoid + "]").remove(); 653} 654 655function setCookie_sticky(name, value, expires, path, domain, secure) { 656 try { 657 var curCookie = name + "=" + escape(value) + 658 ((expires) ? "; expires=" + expires.toGMTString() : "") + 659 ((path) ? "; path=" + path : "") + 660 ((domain) ? "; domain=" + domain : "") + 661 ((secure) ? "; secure" : "") 662 if ((name + "=" + escape(value)).length <= 4000) { 663 document.cookie = curCookie 664 } 665 else { 666 document.cookie = curCookie 667 } 668 } 669 catch (err) { 670 ErrorHandle(err, "adstickymanager.js"); 671 } 672} 673function getCookie_sticky(name) { 674 try { 675 var prefix = name + "=" 676 var cookieStartIndex = document.cookie.indexOf(prefix) 677 if (cookieStartIndex < 0) { 678 return ''; 679 } 680 var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length) 681 if (cookieEndIndex < 0) { 682 cookieEndIndex = document.cookie.length 683 } 684 return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex)) 685 } 686 catch (err) { 687 ErrorHandle(err, "adstickymanager.js"); 688 } 689} 690 691function cycleImages() { 692 if (typeof ($) != "undefined") 693 { 694 var $active = $('#cycler .active'); 695 var $next = ($active.next().length > 0) ? $active.next() : $('#cycler img:first'); 696 $next.css('z-index', 2);//move the next image up the pile 697 $active.fadeOut(1500, function () {//fade out the top image 698 $active.css('z-index', 1).show().removeClass('active');//reset the z-index and unhide the image 699 $next.css('z-index', 3).addClass('active');//make the next image the top one 700 }); 701 } 702} 703 704if (typeof ($) != "undefined") 705{ 706 $(document).ready(function () { 707 // run every 7s 708 setInterval('cycleImages()', 8000); 709 }) 710} 711 712function getPopoverCustomTemplate(className) { 713 //return '<div class="popover ' + className + '" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'; 714 return '<div class="popover ' + className + '" role="tooltip"><div class="arrow popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'; 715} 716 717function resetStickiesPosition() { 718 /* 719 setTimeout(function () { 720 var st_ele = $(".ss-dept-inner-right-cont").filter(function () { 721 return $(this).text().length > 0; 722 }).sort(function (a, b) { 723 if ($(a).position().top < $(b).position().top) { 724 return -1; 725 } else { 726 return 1; 727 } 728 }) 729 if (st_ele.length == 2) { 730 if (st_ele.eq(1).position().top > 100) { 731 st_ele.eq(1).attr('style', function (i, s) { return (s || '') + 'width: 50% !important;' }); 732 } 733 } 734 else if (st_ele.length == 3) { 735 if (st_ele.eq(1).position().top > 100) { 736 st_ele.eq(1).attr('style', function (i, s) { return (s || '') + 'width: 50% !important;' }); 737 } 738 if (st_ele.eq(2).position().top > 100) { 739 st_ele.eq(2).attr('style', function (i, s) { return (s || '') + 'width: 50% !important;' }); 740 } 741 } 742 else if (st_ele.length == 4) { 743 if (st_ele.eq(1).position().top > 100) { 744 st_ele.eq(1).attr('style', function (i, s) { return (s || '') + 'width: 33.33% !important;' }); 745 } 746 if (st_ele.eq(2).position().top > 100) { 747 st_ele.eq(2).attr('style', function (i, s) { return (s || '') + 'width: 33.33% !important;' }); 748 } 749 if (st_ele.eq(3).position().top > 100) { 750 st_ele.eq(3).attr('style', function (i, s) { return (s || '') + 'width: 33.33% !important;' }); 751 } 752 } 753 }, 2500); 754 */ 755 if ($(".ss_dept_details_txt").length > 0) { 756 var st_ele = $(".ss-dept-inner-right-cont").filter(function () { 757 return $(this).text().length > 0; 758 }).sort(function (a, b) { 759 if ($(a).position().top < $(b).position().top) { 760 return -1; 761 } else { 762 return 1; 763 } 764 }) 765 st_ele.show(); 766 $(".ss_dept_details_txt").attr("data-total-stickies", st_ele.length); 767 } 768 else if ($('.ss_dept_txt').length > 0) { 769 var st_ele = $(".ss-page-sticky-box").filter(function () { 770 return $(this).text().length > 0; 771 }).sort(function (a, b) { 772 if ($(a).position().top < $(b).position().top) { 773 return -1; 774 } else { 775 return 1; 776 } 777 }) 778 st_ele.show(); 779 $(".ss_dept_txt").attr("data-total-stickies", st_ele.length); 780 if (typeof (ApplyReadMore) === "function") { 781 ApplyReadMore(); 782 } 783 } 784}; 785 786var fn_FabricUI_StickiesCount_Called = false;
787function fn_FabricUI_StickiesCount() 788{ 789 var st_ele; 790 fn_FabricUI_StickiesCount_Called = true; 791 if ($(".ss_dept_details_txt").length > 0) { 792 st_ele = $(".ss-dept-inner-right-cont").filter(function () { 793 return $(this).text().length > 0; 794 }).sort(function (a, b) { 795 if ($(a).position().top < $(b).position().top) { 796 return -1; 797 } else { 798 return 1; 799 } 800 }) 801 //st_ele.show(); 802 $(".ss_dept_details_txt").attr("data-total-stickies", st_ele.length); 803 } 804 else if ($('.ss_dept_txt').length > 0) { 805 st_ele = $(".ss-page-sticky-box").filter(function () { 806 return $(this).text().length > 0; 807 }).sort(function (a, b) { 808 if ($(a).position().top < $(b).position().top) { 809 return -1; 810 } else { 811 return 1; 812 } 813 }) 814 //st_ele.show(); 815 $(".ss_dept_txt").attr("data-total-stickies", st_ele.length); 816 if (typeof (ApplyReadMore) === "function") { 817 ApplyReadMore(); 818 } 819 } 820 821 if ($(".page_main_sticky").length == 0 && st_ele != undefined && st_ele.length > 0) { 822 $(st_ele[0]).addClass("page_main_sticky"); 823 } 824 825};
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.