1function toggleMobClassToBody() { 2 if ($(window).width() < 768) { 3 $('body').addClass('_mob'); 4 } else { 5 $('body').removeClass('_mob'); 6 } 7} 8$(function() { 9 toggleMobClassToBody(); 10 $('.nav.navbar-nav > li > a .caret').on('click', function(e) { 11 if ($('body').hasClass('_mob')) { 12 $(this).parent('a').siblings('ul.dropdown-menu').slideToggle(); 13 $(this).toggleClass("_on") 14 } else { 15 $(this).parent('a').parent('li').toggleClass("_on"); 16 } 17 e.preventDefault(); 18 }); 19 $('.navbar-toggle').on('click',function(){$('.navbar-collapse').toggleClass('collapse')}); 20}); 21$(window).resize(function() { 22 toggleMobClassToBody(); 23 $('.nav.navbar-nav > li._on').removeClass('_on'); 24 $('.nav.navbar-nav > li ul').each(function() { 25 $(this).removeAttr("style"); 26 }); 27}); 28 29 30$(function() { 31 var button = $('#loginButton'); 32 var box = $('#loginBox'); 33 var form = $('#filterFormPopup'); 34 button.removeAttr('href'); 35 button.mouseup(function(login) { 36 box.toggle(); 37 button.toggleClass('active'); 38 }); 39 form.mouseup(function() { 40 return false; 41 }); 42 $(this).mouseup(function(login) { 43 if (!($(login.target).parent('#loginButton').length > 0)) { 44 button.removeClass('active'); 45 box.hide(); 46 } 47 }); 48}); 49 50$(document).ready(function() { 51 $('.responsive').slick({ 52 dots: false, 53 infinite: false, 54 speed: 300, 55 slidesToShow: 4, 56 customPadding: '80px', 57 autoplay: false, 58 autoplaySpeed: 3000, 59 responsive: [ 60 { 61 breakpoint: 1024, 62 settings: { 63 slidesToShow: 3, 64 infinite: false, 65 } 66 }, 67 { 68 breakpoint: 600, 69 settings: { 70 slidesToShow: 2, 71 } 72 }, 73 { 74 breakpoint: 435, 75 settings: { 76 arrows: false, 77 slidesToShow: 1, 78 slidesToScroll: 1, 79 } 80 } 81 ] 82 }); 83 84 $('.responsive').on('afterChange', function(slick, currentSlide) { 85 var t = 0; 86 $(this).find('.slick-active').each(function() { 87 t++; 88 if (t == 1 || t == 2) 89 { 90 var dv = $(this).find('.overtext'); 91 dv.removeClass('last-div'); 92 dv.addClass('popup_content'); 93 } 94 else 95 { 96 var dv = $(this).find('.overtext'); 97 dv.removeClass('popup_content'); 98 dv.addClass('last-div'); 99 } 100 }); 101 }); 102}); 103 104var delay = 500, setTimeoutConst, setTimeoutConst1; 105$(document).ready(function() { 106 $('.overtext').hide(); 107 $('.thumbnail').hover( 108 function() { 109 var obj = this; 110 setTimeoutConst = setTimeout(function() { 111 $(obj).find('.caption').fadeIn('slow'); 112 }, delay); 113 setTimeoutConst1 = setTimeout(function() { 114 $(obj).children('div .popup_content,div .last-div').fadeIn('slow'); 115 }, delay); 116 }, 117 function() { 118 clearTimeout(setTimeoutConst); 119 clearTimeout(setTimeoutConst1); 120 $(this).find('.caption').fadeOut('slow'); 121 $(this).children('div .popup_content,div .last-div').fadeOut('slow'); 122 } 123 ); 124 125 $('.parent_sec').each(function(i) { 126 $(this).find('.thumbnail').each(function(j) { 127 if (j > 1) { 128 if ((j % 2) == 0 || (j % 3) == 0) { 129 var dv = $(this).find('.overtext'); 130 dv.removeClass('popup_content'); 131 dv.addClass('last-div'); 132 } 133 } 134 }); 135 136 137 });
138 $('.thumblist').each(function(i) { 139 i = i + 1; 140 if (i > 1) { 141 if ((i % 4) == 0 || i == 3 || i == 7 || i == 11 || i == 15 || i == 19 || i == 23) { 142 var dv = $(this).find('.overtext'); 143 dv.removeClass('popup_content'); 144 dv.addClass('last-div'); 145 } 146 } 147 }); 148 $('a.playbtn').html(''); 149 //jQuery("img.lazy").Lazy(); 150 videoHeight(); 151}); 152 153 154function cancelitem(order_item_id, ordernumber) { 155 $('.loader_cart').show(); 156 var url = HTTP_ROOT + '/shop/CancelItem'; 157 $.post(url, {'ordernumber': ordernumber, 'order_item_id': order_item_id}, function(res) { 158 if (res.isSuccess) { 159 $('.loader_cart').hide(); 160 $("#successPopup").modal('show'); 161 setTimeout(function() { 162 window.location.href = HTTP_ROOT + '/user/purchaseHistory'; 163 return false; 164 }, 5000); 165 } else { 166 $('.loader_cart').hide(); 167 $("#successPopupn").modal('show'); 168 setTimeout(function() { 169 window.location.href = HTTP_ROOT + '/user/purchaseHistory'; 170 return false; 171 }, 5000); 172 } 173 174 }, 'json'); 175} 176function printDiv(divName) { 177 var printContents = document.getElementById(divName).innerHTML; 178 var originalContents = document.body.innerHTML; 179 180 document.body.innerHTML = printContents; 181 182 window.print(); 183 184 document.body.innerHTML = originalContents; 185} 186$(window).on('load', function() { 187 videoHeight(); 188}); 189$(window).on('resize', function() { 190 videoHeight(); 191}); 192function videoHeight() { 193 var desWidth = $(".carousel-inner").innerWidth(); 194 var isIE = false; 195 if (navigator.appVersion.toUpperCase().indexOf("MSIE") != -1 || 196 navigator.appVersion.toUpperCase().indexOf("TRIDENT") != -1 || 197 navigator.appVersion.toUpperCase().indexOf("EDGE") != -1) { 198 isIE = true; 199 } 200 var desHeight = desWidth / 2.697; 201 $(".item").each(function() { 202 if (isIE == false) { 203 $(this).find('#background').css({ 204 'width': desWidth, 205 'height': desHeight 206 }); 207 } else { 208 $(this).find('#background').css({ 209 'width': desWidth, 210 }); 211 } 212 $(this).find('.videocontainer').css({'height': desHeight}); 213 $(this).find(".banner-image").css({'height': desHeight}); 214 }); 215} 216 217function initSlickSlider(currentObj){ 218 $(currentObj).not('.slick-initialized').slick({ 219 dots: false, 220 infinite: false, 221 speed: 300, 222 slidesToShow: 4, 223 customPadding: '80px', 224 autoplay: false, 225 autoplaySpeed: 3000, 226 responsive: [ 227 { 228 breakpoint: 1024, 229 settings: { 230 slidesToShow: 3, 231 infinite: false, 232 } 233 }, 234 { 235 breakpoint: 600, 236 settings: { 237 slidesToShow: 2, 238 } 239 }, 240 { 241 breakpoint: 480, 242 settings: { 243 slidesToShow: 1 244 } 245 } 246 ] 247 }); 248} 249 250function blogViewVideo(domEle){ 251//@Mantis: 12046 start 252//added id="blog-item" 253 $(domEle).find('iframe').css({ 254 position:'absolute', 255 top:0, 256 left:0, 257 width:'100%', 258 height:'100%' 259 }); 260 var divEle = $('<div/>'); 261 divEle.css({ 262 position:'relative', 263 paddingTop:'56.25%', 264 clear:'both' 265 }); 266 $(domEle).find('iframe').wrap(divEle); 267//@Mantis: 12046 end 268} 269
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.