1/*function clickIE(){return document.all?!1:void 0}function clickNS(e){return(document.layers||document.getElementById&&!document.all)&&2==e.which?!1:void 0}*/ 2function maxLengthCheck(object) { 3 if (object.value.length > object.maxLength) 4 object.value = object.value.slice(0, object.maxLength) 5} 6 7function isNumeric (evt) { 8 var theEvent = evt || window.event; 9 var key = theEvent.keyCode || theEvent.which; 10 key = String.fromCharCode (key); 11 var regex = /[1-9]|\./; 12 if ( !regex.test(key) ) { 13 theEvent.returnValue = false; 14 if(theEvent.preventDefault) theEvent.preventDefault(); 15 } 16} 17 18function Auto1() { 19 $.ajax({ 20 url: "index.php?dn=user", 21 type: "POST", 22 data: { 23 js: "yes" 24 }, 25 dataType: "html", 26 success: function(e) { 27 $("#jLoader1").html(e).dialog(); 28 $("#jLoader1").html(e).dialog("open") 29 } 30 }) 31} 32 33function Reg() { 34 $.ajax({ 35 url: "index.php?dn=user&re=register", 36 type: "POST", 37 data: { 38 js: "yes" 39 }, 40 dataType: "html", 41 success: function(e) { 42 $("#jLoader2").html(e).dialog(); 43 $("#jLoader2").html(e).dialog("open") 44 } 45 }) 46} 47 48function RegBut(e) { 49 function t(e) { 50 var t = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i); 51 return t.test(e) 52 } 53 $(".error").hide(); 54 var a = $("input[name=reglogin]").attr("minname"), 55 n = $("input[name=reglogin]").attr("maxlength"), 56 o = $("form div.form-area").find("input[name=reglogin]").val(); 57 if (o.length <= a || o.length >= n) return $("span#error_name").show(), !1; 58 var i = $("input[name=regpassw]").attr("minname"), 59 r = $("input[name=regpassw]").attr("maxlength"), 60 s = $("form div.form-area").find("input[name=regpassw]").val(), 61 d = $("form div.form-area").find("input[name=regpasswconfir]").val(); 62 if (s.length <= i || s.length >= r) return $("span#error_pass").show(), !1; 63 if (s != d) return $("span#error_pass_ravno").show(), !1; 64 var l = $("form div.form-area").find("input[name=regmail]").val(), 65 p = $("form div.form-area").find("input[name=regmailconfir]").val(); 66 if (0 == l) return $("span#error_mail1").show(), !1; 67 if (!t(l)) return $("span#error_mail").show(), !1; 68 if (l != p) return $("span#error_mail_ravno").show(), !1; 69 var c = $("form div.form-area").find("input[name=captcha]").val(); 70 if (0 == c) return $("span#error_captcha").show(), !1; 71 var m = $(e).parents("form[data-event=register]").serializeArray(), 72 u = { 73 name: "js", 74 value: "yes" 75 }; 76 m.push(u), $.ajax({ 77 url: "/index.php?dn=user&to=check&re=register", 78 type: "POST", 79 data: m, 80 dataType: "json", 81 success: function(e) { 82 0 == e.status ? $("p#mes_err").html(e.message) : $("#jLoader2").html(e.message) 83 }, 84 error: function() { 85 alert("Îøèáêà") 86 } 87 }) 88} 89 90function Auto1ajax(e) { 91 var t = $(e).parents("form[data-event=autori]").serializeArray(), 92 a = { 93 name: "js", 94 value: "yes" 95 }; 96 t.push(a), $.ajax({ 97 url: "index.php?dn=user&to=check&re=login", 98 type: "POST", 99 data: t, 100 dataType: "json", 101 success: function(e) { 102 0 == e.status ? $("p#mes_err").html(e.message) : $("#jLoader1").html(e.message) 103 }, 104 error: function() { 105 alert("Îøèáêà") 106 } 107 }) 108} 109 110function Lostajax(e) { 111 if ($("span.error").hide(), "" == $("input[name=lostmail]").val()) return $("span.error").show(), !1; 112 var t = $(e).parents("form[data-event=lost]").serializeArray(), 113 a = { 114 name: "js", 115 value: "yes" 116 }; 117 t.push(a), $.ajax({ 118 url: "/index.php?dn=user", 119 type: "POST", 120 data: t, 121 dataType: "json", 122 success: function(e) { 123 0 == e.status ? $("p#mes_err").html(e.message) : $("#jLoader3").html(e.message) 124 }, 125 error: function() { 126 alert("Îøèáêà") 127 } 128 }) 129} 130 131function orderconf() { 132 $.ajax({ 133 url: "index.php?dn=shop&to=orderconf", 134 type: "POST", 135 data: { 136 js: "yes" 137 }, 138 dataType: "html", 139 success: function(e) { 140 sendYaStatistic("e_order_conf"); 141 $("#jLoader").html(e).dialog(); 142 $("#jLoader").html(e).dialog("open"); 143 $(".error").hide(), $(".rbutton4").click(function() { 144 $(".error").hide(); 145 var e = $("input#name").val(); 146 if ("" == e) return $("label#name_error").show(), 147 $("input#name").focus(), !1; 148 if (1 == $("select.sselect option:selected").val()) { 149 var t = $("textarea#adres").val(); 150 if ("" == t) return $("label#adres_error").show(), $("textarea#adres").focus(), !1 151 } 152 var a = $("input#phone").val(); 153 return "" == a ? ($("label#phone_error").show(), $("input#phone").focus(), !1) : void 0 154 }) 155 } 156 }) 157} 158 159function orderschet(e) { 160 data = $(e).parents("tr").find("form").eq(0).serializeArray(), 161 kolvo = data[0].value, id = data[1].value, to = data[2].value, 162 $.ajax({ 163 url: "index.php?dn=shop", 164 type: "POST", 165 data: { 166 js: "yes", 167 kolvo: kolvo, 168 id: id, 169 to: to 170 }, 171 dataType: "json", 172 success: function(t) { 173 "delete" == t.status && $(e).parents("tr").remove(), "clear" == t.status && $("#jLoader").dialog("close"), $(".bask_text").find("span").find(".kol").html("Òîâàðîâ - " + t.count), $(".bask_text").find("span").find(".sum").html(t.summa), $("#jLoader").find(".ch_a").html(t.summa) 174 } 175 }) 176} 177 178function orderdelete(e) { 179 data = $(e).parents("tr").find("form").eq(1).serializeArray(), id = data[0].value, to = data[1].value, $.ajax({ 180 url: "index.php?dn=shop", 181 type: "POST", 182 data: { 183 js: "yes", 184 id: id, 185 to: to 186 }, 187 dataType: "json", 188 success: function(t) { 189 $(e).parents("tr").remove(), "clear" == t.status && $("#jLoader").dialog("close"), $(".bask_text").find("span").find(".kol").html("Òîâàðîâ - " + t.count), $(".bask_text").find("span").find(".sum").html(t.summa), $("#jLoader").find(".ch_a").html(t.summa); 190 $('.cart-sum .sm').html(t.summa + 'ð'); 191 $('.cart-sum .kol').html('Òîâàðîâ: ' + t.count); 192 } 193 }) 194} 195 196function knopka(e) { 197 kn = $(e).parents("form").find(".kolvo"), val = $(kn).val(), val = parseInt(val) + 1, $(kn).val(val) 198} 199 200function knopka1(e) { 201 kn = $(e).parents("form").find(".kolvo"), val = $(kn).val(), val = parseInt(val) - 1, val < 0 && (val = 0), $(kn).val(val) 202} 203 204function addToBasket(obj) { 205 kolvo = $(obj).parents('form').find('input[name=kolvo]').val(); 206 id = $(obj).parents('form').find('input[name=shopid]').val(); 207 to = $(obj).parents('form').find('input[name=to]').val(); 208 $.ajax({ 209 url: "index.php?dn=shop", 210 type: "POST", 211 data: { 212 js: "yes", 213 kolvo: kolvo, 214 shopid: id, 215 to: to, 216 type: "once", 217 modify: '' 218 }, 219 dataType: "json", 220 success: function(data) { 221 if (data['status'] == 'yes') { 222 $('.bask_text').find('span').find('.kol').html(data['count'] + 'òîâàðîâ'); 223 $('.bask_text').find('span').find('.sum').html(data['summa']); 224 w = $('#temp_cart_animate').width(); 225 h = $('#temp_cart_animate').height(); 226 newW = parseInt(w * 0.2); 227 newH = parseInt(h * 0.2); 228 var src = $(obj).attr('data-src'); 229 $('<img src="' + src + '" id="temp_cart_animate" style="z-index: 2000; position: absolute; top:' + Math.ceil($(obj).offset().top) + 'px;left:' + Math.ceil($(obj).offset().left) + 'px;width:' + w + 'px;height:' + h + 'px;">').prependTo('body'); 230 if ($(window).scrollTop() == 0) { 231 $('#temp_cart_animate').animate({ 232 top: $('.cart-img').offset().top,//150 + $(window).scrollTop(), 233 left: $('.cart-img').offset().left,//$('body').width() - 300, 234 width: newW + 'px', 235 height: newH + 'px', 236 opacity: 0.2 237 }, 700, function() { 238 $('#temp_cart_animate').remove(); 239 }); 240 } else { 241 $('#temp_cart_animate').animate({ 242 top: $('.cart-img').offset().top,//$(window).scrollTop() - 150, 243 left: $('.cart-img').offset().left,//$('body').width() - 390, 244 width: newW + 'px', 245 height: newH + 'px', 246 opacity: 0.2 247 }, 700, function() { 248 $('#temp_cart_animate').remove(); 249 }); 250 } 251 var item_word = ''; 252 var count_item = String(data['count']).slice(-1); 253 if (count_item == 1) { 254 item_word = ' òîâàð'; 255 } else if (count_item == 2 || count_item == 3 || count_item == 4) { 256 item_word = ' òîâàðà'; 257 } else { 258 item_word = ' òîâàðîâ'; 259 } 260 $('.cart-sum .crt').html('Â êîðçèíå <span class="kol"><b>' + data['count'] + '</b>' + item_word + '</span><br>\níà ñóììó: <span class="sm">' + String(data['summa']).replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 ') + ' ð</span>'); 261 } 262 sendYaStatistic('e_add_basket'); 263 } 264 }); 265} 266 267function addToBasket7(e) { 268 sendYaStatistic("e_add_basket"), kolvo = $(e).parents("form").find("input[name=kolvo]").val(), id = $(e).parents("form").find("input[name=shopid]").val(), to = $(e).parents("form").find("input[name=to]").val(), $.ajax({ 269 url: "index.php?dn=shop", 270 type: "POST", 271 data: { 272 js: "yes", 273 kolvo: kolvo, 274 shopid: id, 275 to: to, 276 type: "once", 277 modify: "" 278 }, 279 dataType: "json", 280 success: function(t) { 281 if ("yes" == t.status) { 282 283 w = $("#temp_cart_animate").width(), h = $("#temp_cart_animate").height(), newW = parseInt(.2 * w), newH = parseInt(.2 * h); 284 var a = $(e).attr("src"); 285 $('<img src="' + a + '" id="temp_cart_animate" style="z-index: 2000; position: absolute; top:' + Math.ceil($(e).offset().top) + "px;left:" + Math.ceil($(e).offset().left) + "px;
285width:" + w + "px;height:" + h + 'px;">').prependTo("body"), 0 == $(window).scrollTop() ? $("#temp_cart_animate").animate({ 286 top: $('.cart-img').offset().top,//150 + $(window).scrollTop(), 287 left: $('.cart-img').offset().left,//$("body").width() - 300, 288 width: newW + "px", 289 height: newH + "px", 290 opacity: .2 291 }, 700, function() { 292 $("#temp_cart_animate").remove() 293 }) : $("#temp_cart_animate").animate({ 294 top: $('.cart-img').offset().top,//$(window).scrollTop() - 150, 295 left: $('.cart-img').offset().left,//$("body").width() - 390, 296 width: newW + "px", 297 height: newH + "px", 298 opacity: .2 299 }, 700, function() { 300 $("#temp_cart_animate").remove() 301 }), $(this).remove(), $(".bask_text").find("span").find(".kol").html(t.count + " òîâàðîâ"), $(".bask_text").find("span").find(".sum").html(t.summa + " ð"); 302 } 303 } 304 }) 305} 306 307function str_replace(e, t, a) { 308 return a.split(e).join(t) 309} 310 311function addToBasket5(form) { 312 sendYaStatistic("e_add_basket"); 313 kolvo = $(form).find("input[name=kolvo]").val(); 314 id = $(form).find("input[name=shopid]").val(); 315 to = $(form).find("input[name=to]").val(); 316 $.ajax({ 317 url: "index.php?dn=shop", 318 type: "POST", 319 data: { 320 js: "yes", 321 kolvo: kolvo, 322 shopid: id, 323 to: to, 324 type: "once", 325 modify: "" 326 }, 327 dataType: "json", 328 success: function(t) { 329 if ("yes" == t.status) { 330 w = $("#temp_cart_animate").width(), h = $("#temp_cart_animate").height(), newW = parseInt(.2 * w), newH = parseInt(.2 * h); 331 var a = $(form).attr("data-src"); 332 $('<img src="' + a + '" id="temp_cart_animate" style="z-index: 2000; position: absolute; top:' + Math.ceil($(form).find('input[type="submit"]').offset().top) + "px;left:" + Math.ceil($(form).find('input[type="submit"]').offset().left) + "px;width:" + w + "px;height:" + h + 'px;">').prependTo("body"); 333 if (0 == $(window).scrollTop()) { 334 $("#temp_cart_animate").animate({ 335 top: $('.cart-img').offset().top,//150 + $(window).scrollTop(), 336 left: $('.cart-img').offset().left,//$("body").width() - 300, 337 width: newW + "px", 338 height: newH + "px", 339 opacity: .2 340 }, 700, function() { 341 $("#temp_cart_animate").remove() 342 }); 343 } else { 344 $("#temp_cart_animate").animate({ 345 top: $('.cart-img').offset().top,//$(window).scrollTop() - 150, 346 left: $('.cart-img').offset().left,//$("body").width() - 390, 347 width: newW + "px", 348 height: newH + "px", 349 opacity: .2 350 }, 700, function() { 351 $("#temp_cart_animate").remove() 352 }); 353 } 354 $(this).remove(); 355 $(".bask_text").find("span").find(".kol").html("Òîâàðîâ:" + t.count); 356 $(".bask_text").find("span").find(".sum").html(t.summa); 357 var item_word = ''; 358 var count_item = String(t.count).slice(-1); 359 if (count_item == 1) { 360 item_word = ' òîâàð'; 361 } else if (count_item == 2 || count_item == 3 || count_item == 4) { 362 item_word = ' òîâàðà'; 363 } else { 364 item_word = ' òîâàðîâ'; 365 } 366 $('.cart-sum .crt').html('Â êîðçèíå <span class="kol"><b>' + t.count + '</b>' + item_word + '</span><br>\níà ñóììó: <span class="sm">' + String(t.summa).replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 ') + ' ð</span>'); 367 } 368 } 369 }); 370} 371 372function getCallphone() { 373 var e = $("#dialog-form"); 374 e.length > 0 && $(e).remove(); 375 var t = document.createElement("div"); 376 t.id = "dialog-form", t.setAttribute("title", "Îáðàòíûé çâîíîê"); 377 var a = document.createElement("form"), 378 n = document.createElement("p"); 379 n.className = "validateTips", a.appendChild(n); 380 var o = document.createElement("fieldset"), 381 i = document.createElement("label"); 382 i.setAttribute("for", "name"), i.innerText = "Âàøå èìÿ", o.appendChild(i); 383 var r = document.createElement("input"); 384 r.setAttribute("type", "text"), r.setAttribute("name", "name"), r.id = "name", r.className = "text ui-widget-content ui-corner-all", o.appendChild(r); 385 var i = document.createElement("label"); 386 i.setAttribute("for", "phone"), i.innerText = "Âàø òåëåôîí", o.appendChild(i); 387 var r = document.createElement("input"); 388 r.setAttribute("type", "text"), r.setAttribute("name", "phone"), r.id = "phone", r.className = "text ui-widget-content ui-corner-all", r.setAttribute("placeholder", "89111234567"), r.onkeydown = function(e) { 389 return 8 == e.keyCode || e.keyCode > 47 && e.keyCode < 58 || 46 == e.keyCode 390 }, o.appendChild(r); 391 var r = document.createElement("input"); 392 r.setAttribute("type", "hidden"), r.setAttribute("name", "ajax"), r.value = "yes", o.appendChild(r), a.appendChild(o), t.appendChild(a), document.body.appendChild(t), $(t).dialog({ 393 modal: !0, 394 width: 400, 395 close: function(e, t) { 396 $(t).dialog("close").dialog("destroy") 397 }, 398 buttons: [{ 399 text: "Îòïðàâèòü", 400 click: function() { 401 callbackPhone(this) 402 } 403 }] 404 }) 405} 406 407function callbackPhone(e) { 408 var t = $(e).children("form:first"); 409 $(t).find(":text").removeClass("ui-state-error");
410 var a = $(t).serializeArray(), 411 n = 0; 412 "" == $.trim(a[0].value) ? (n = 1, $(t).find("p.validateTips").html("Ââåäèòå Âàøå èìÿ"), $(t).find(":text[name=name]").addClass("ui-state-error").focus()) : "" == $.trim(a[1].value) ? (n = 1, $(t).find("p.validateTips").html("Ââåäèòå Âàø òåëåôîí"), $(t).find(":text[name=phone]").addClass("ui-state-error").focus()) : /^[0-9]+$/.test(a[1].value) ? $.ajax({ 413 url: "/shop/callphone/", 414 type: "POST", 415 dataType: "json", 416 data: a, 417 success: function(a) { 418 console.log(a); 419 a && (a.status ? $(t).html(a.text) : $(t).find("p.validateTips").html(a.error), $(e).dialog({ 420 buttons: [{ 421 text: "Çàêðûòü", 422 click: function() { 423 $(this).dialog("close") 424 } 425 }] 426 })) 427 } 428 }) : (n = 1, $(t).find("p.validateTips").html("Â òåëåôîíå ìîãóò áûòü òîëüêî öèôðû"), $(t).find(":text[name=phone]").addClass("ui-state-error").focus()) 429} 430// TODO 431function sendYaStatistic(e) { 432 if ('undefined' !== typeof Ya && 'undefined' !== typeof Ya._metrika) { 433 yaCounter41304674.reachGoal(e); 434 console.log(e); 435 return; 436 var t = window.location.hostname; 437 switch (t) { 438 case "fortis-ufa.ru": 439 yaCounter18808630.reachGoal(e, yaParams || {}); 440 break; 441 case "www.fortis-ufa.ru": 442 yaCounter18808630.reachGoal(e, yaParams || {}); 443 break; 444 case "fortis-izhevsk.ru": 445 yaCounter18808654.reachGoal(e, yaParams || {}); 446 break; 447 case "www.fortis-izhevsk.ru": 448 yaCounter18808654.reachGoal(e, yaParams || {}); 449 break; 450 case "fortis-perm.ru": 451 yaCounter18808678.reachGoal(e, yaParams || {}); 452 break; 453 case "www.fortis-perm.ru": 454 yaCounter18808678.reachGoal(e, yaParams || {}); 455 break; 456 case "fortis-kazan.ru": 457 yaCounter34329705.reachGoal(e, yaParams || {}); 458 break; 459 case "www.fortis-kazan.ru": 460 yaCounter34329705.reachGoal(e, yaParams || {}); 461 break; 462 case "fortis-ekb.ru": 463 yaCounter34329570.reachGoal(e, yaParams || {}); 464 break; 465 case "www.fortis-ekb.ru": 466 yaCounter34329570.reachGoal(e, yaParams || {}); 467 break; 468 } 469 } 470} 471var message = ""; 472//document.oncontextmenu = new Function("return false"); 473$(document).ready(function() { 474 var host = window.location.hostname; 475 switch (host) { 476 case "fortis-ufa.ru": 477 $('#sales_department').load('/sd_ufa.html'); 478 break; 479 case "www.fortis-ufa.ru": 480 $('#sales_department').load('/sd_ufa.html'); 481 break; 482 case "fortis-izhevsk.ru": 483 $('#sales_department').load('/sd_izhevsk.html'); 484 break; 485 case "www.fortis-izhevsk.ru": 486 $('#sales_department').load('/sd_izhevsk.html'); 487 break; 488 case "fortis-kazan.ru": 489 $('#sales_department').load('/sd_kazan.html'); 490 break; 491 case "www.fortis-kazan.ru": 492 $('#sales_department').load('/sd_kazan.html'); 493 break; 494 case "fortis-ekb.ru": 495 $('#sales_department').load('/sd_ekb.html'); 496 break; 497 case "www.fortis-ekb.ru": 498 $('#sales_department').load('/sd_ekb.html'); 499 break; 500 } 501 $('#requisites').load('/requisites.html'); 502 503 504 $(".check_cat").find("a").css({ 505 paddingLeft: "0", 506 paddingRight: "0" 507 }); 508 $("a.a_menu0").click(function() { 509 return elementClick = $(this).attr("href"); 510 destination = $(elementClick).offset().top; 511 $.browser.safari ? $("body").animate({ 512 scrollTop: destination 513 }, 1100) : $("html").animate({ 514 scrollTop: destination 515 }, 1100), !1 516 }) 517 if ($("table.tables").length) { 518 var e = $("table.tables tbody:first").children("tr"); 519 if (e.length > 0) 520 for (i = 0; i < e.length; i++) 521 if (2 == $(e[i]).children("td").length) { 522 var t = $(e[i]).children("td").eq(0).height(), 523 a = $(e[i]).children("td").eq(1).height(), 524 n = 0; 525 n = t > a ? t : a; 526 n += 37; 527 $(e[i]).children("td").children("div.product_container").css({ 528 height: n + "px" 529 }) 530 } 531 } 532 $('.btn-filter').click(function(e) { 533 e.preventDefault(); 534 $.ajax({ 535 url: "index.php?dn=shop", 536 method: "post", 537 data: $('.form-filter').serialize(), 538 success: function(response) { 539 location.reload(); 540 }, 541 error: function(response) { 542 console.log(response); 543 } 544 }); 545 }); 546 if ($('.form-filter select').length) { 547 $('.form-filter select').selectric(); 548 } 549}); 550// catalog page 551function alignProductBlocks() { 552 var cnt = $('.product-item').length; 553 for (var i = 0; i < cnt; i += 3) { 554 var maxHeight = 0; 555 var heights = []; 556 for (var j = 0; j < 3; j++) { 557 if (i + j < cnt) { 558 var block = $('.product-item').eq(i + j); 559 if (block.find('.table-display .product-img').length) { 560 img = block.find('.table-display'); 561 } else { 562 img = block.find('.product-img'); 563 }
564 heights[j] = img.height() + block.find('.product-title').height() + block.find('.product-text').height() + Math.max(block.find('.product-price').height(), block.find('.product-view').height()); 565 maxHeight = Math.max(maxHeight, heights[j]); 566 } 567 }; 568 for (var j = 0; j < 3; j++) { 569 if (i + j < cnt) { 570 var block = $('.product-item').eq(i + j); 571 if (block.find('.product-text').length) { 572 block.find('.product-text').css({ 573 'margin-bottom': (maxHeight - heights[j]) + 'px' 574 }); 575 } else { 576 block.find('.product-title').css({ 577 'margin-bottom': (maxHeight - heights[j]) + 'px' 578 }); 579 } 580 } 581 }; 582 } 583} 584$(window).load(function() { 585 alignProductBlocks(); 586 $.ajax({ 587 type: "POST", 588 url: '/index.php?dn=domain&to=index', 589 data: { uri: window.location.href }, 590 dataType: 'json', 591 success: function(response) { 592 if (response['cityChange'] != undefined && !$('.change_city').length) { 593 $('.search').before(response['cityChange']); 594 } 595 if (response['cityPopup'] != undefined && !$('.city-popup').length && $('.referer-yes').length) { 596 $('.search').after(response['cityPopup']); 597 } 598 }, 599 error: function(response) {
600 console.log('city-change-error'); 601 } 602 }); 603 $('body').on('click', '.city-popup .btn-close', function() { 604 $('.city-popup').hide(); 605 }); 606 607 $('body').on('click', '#city-yes', function(e) { 608 e.preventDefault(); 609 var date = new Date(new Date().getTime() + 60 * 60 * 60 * 24 * 1000); 610 document.cookie = "city=" + $(this).attr("data-city") + "; domain=.fortis-" + $(this).attr("data-city") + ".ru; expires=" + date.toUTCString(); 611 //document.location.reload(true); 612 $.ajax({ 613 url: "index.php?dn=user&to=city", 614 type: "POST", 615 data: {'city':$(this).attr("data-city")}, 616 dataType: "json", 617 complete: function(response) { 618 $('.city-popup').hide(); 619 } 620 }); 621 }); 622 623 $('body').on('click', '.change_city a', function(e) { 624 var date = new Date(new Date().getTime() + 60 * 60 * 60 * 24 * 1000); 625 document.cookie = "city=" + $(this).attr("data-city") + "; domain=.fortis-ufa.ru; expires=" + date.toUTCString(); 626 document.cookie = "city=" + $(this).attr("data-city") + "; domain=.fortis-"+$(this).attr("data-city")+".ru; expires=" + date.toUTCString(); 627 }); 628 629 $('body').on('click', '#city-no', function(e) { 630 e.preventDefault(); 631 $('.city-popup').hide(); 632 $('.change_city_open').show(); 633 }); 634}); 635// product page 636(function($) { 637 $('.tabbable .tab-nav li').click(function() { 638 $('.tabbable .tab-nav li').removeClass('active'); 639 $('.tabbable .tab-content .tab-pane').removeClass('active'); 640 $(this).addClass('active'); 641 $('.tabbable .tab-content #' + $(this).attr('data-id')).addClass('active'); 642 }); 643 $('.product-info .product-count-down').click(function() { 644 value = Math.max(1, parseInt($(this).closest('form').find('input[name="kolvo"]').val(), 10)); 645 $(this).closest('form').find('input[name="kolvo"]').val(Math.max(1, value - 1)); 646 }); 647 $('.product-info .product-count-up').click(function() { 648 value = Math.max(1, parseInt($(this).closest('form').find('input[name="kolvo"]').val(), 10)); 649 $(this).closest('form').find('input[name="kolvo"]').val(Math.max(1, value + 1)); 650 }); 651 $('.product-info form').submit(function(e) { 652 e.preventDefault(); 653 addToBasket5(this); 654 }); 655 $('.spoiler-header a').click(function(e) { 656 e.preventDefault(); 657 $(this).closest('.spoiler-header').hide(); 658 $(this).closest('.spoiler').find('.spoiler-content').animate({height: 'show'}, 1000); 659 }); 660 $('.text-more a').click(function(e) { 661 e.preventDefault(); 662 $(this).closest('.text-more').hide(); 663 $('.descr_cat').toggleClass('active'); 664 }); 665})(window.jQuery); 666 667$(function() { 668 if ($('.category-banner .glyph-info span.glyph-info-icon').length == 0 && $('.category-banner .glyph-info').length > 0) { 669 $('<span class="glyph-info-icon"></span>').insertBefore('.category-banner .glyph-arrow-up'); 670 } 671});
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.