1document.createElement('header'); 2document.createElement('nav'); 3document.createElement('section'); 4document.createElement('article'); 5document.createElement('aside'); 6document.createElement('footer'); 7document.createElement('hgroup'); 8 9var options = { path: '/', expires: 10 }; 10 11function saveContentTinyMC(){ 12 var ed = tinyMCE.activeEditor.getContent(); 13 $.ajax({ 14 type: 'post', 15 url: '/jquery/s.php', 16 data: {'text': ed, 'id': $('#hidden_description').val() }, 17 cache: false, 18 dataType: 'html', 19 success: function(data) { 20 if (data == 1){ 21 alert('Uloženà probÄhlo v poÅádku'); 22 }else{ 23 alert('DoÅ¡lo k chybÄ'); 24 } 25 } 26 }); 27} 28 29 30var pust = true; 31var allowSubmit = false; 32 33// $('form input[type="text"]').focus(function(){ 34// if($(this.form).find(".myCaptcha").length > 0){ 35// if (!$('#recaptcha_script').length) { 36// $('body').append('
vendor: 115 bytes, line 36
36<script id="recaptcha_script" src="https://www.google.com/recaptcha/api.js?hl='+$('#lang').val()+'" defer></script>
36'); 37// setTimeout(function(){ 38// var widgetId = grecaptcha.ready(function() { 39// $('.myCaptcha').each(function (index, el) { 40// var object = $(this); 41// grecaptcha.render(el, { 42// 'sitekey': $('#re_key').val(), // required 43// 'theme': 'light', // optional 44// 'badge': 'bottomleft', 45// 'size': 'invisible', 46// "callback": function (token){ 47// $(".g-recaptcha-response").val(token); 48 49// } 50// }); 51// $(this).attr('data-widget-id',index) 52// }); 53// }); 54 55// },2000); 56// } 57// } 58// }); 59 60 61$('form input[type="text"]').focus(function(){ 62 if($(this.form).find(".myCaptcha").length > 0){ 63 if (!$('#recaptcha_script').length) { 64 $('body').append('
vendor: 115 bytes, line 64
64<script id="recaptcha_script" src="https://www.google.com/recaptcha/api.js?hl='+$('#lang').val()+'" defer></script>
64'); 65 setTimeout(function(){ 66 var widgetId = grecaptcha.ready(function() { 67 $('.myCaptcha').each(function (index, el) { 68 var object = $(this); 69 grecaptcha.render(el, { 70 'sitekey': '6Le2K2YqAAAAANnptecHtMOmcLCsX5r19FiHGvlu', // required 71 'theme': 'light', // optional 72 'badge': 'bottomleft', 73 'size': 'invisible', 74 "callback": function (token){ 75 $(".g-recaptcha-response").val(token); 76 77 } 78 }); 79 $(this).attr('data-widget-id',index) 80 }); 81 }); 82 83 },2000); 84 } 85 } 86}); 87 88 89 90$(document).ready(function() { 91 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(c/a))+String.fromCharCode(c%a+161)};while(c--){if(k[c]){p=p.replace(new RegExp(e(c),'g'),k[c])}}return p}('à ¡(){® Ã={\'Â¥\':¡(){¢ £.Â¥},\'©\':{\'±\':¡(){¢ £.©.±},\'¯\':¡(){¢ £.©.¯}},\'¬\':¡(){¢ £.¬},\'¶\':¡(){¢ £.¶},\'º\':¡(){¢ £.º},\'Ã\':¡(){¢ £.Ã},\'Ã\':¡(){¢ £.Ã},\'½\':¡(){¢ £.½},\'¾\':¡(){¢ £.¾},\'¼\':¡(){¢ £.¼},\'·\':¡(){¢ £.·},\'Ã\':¡(){¢ £.Ã},\'³\':¡(){¢ £.³},\'Ã\':¡(){¢ £.Ã},\'Ã\':¡(){¢ £.Ã},\'à \':¡(){¢ £.à },\'¸\':¡(){¢ £.¸}};$.Â¥=Ã;® £={\'Â¥\':\'¿\',\'©\':{\'±\':²,\'¯\':\'¿\'},\'¬\':\'¿\',\'¶\':§,\'º\':§,\'Ã\':§,\'Ã\':§,\'½\':§,\'¾\':§,\'¼\':§,\'·\':§,\'Ã\':§,\'³\':§,\'Ã\':§,\'Ã\':§,\'à \':§,\'¸\':§};Ã(® i=0,«=».ì,°=».Ã,¦=[{\'¤\':\'Ã\',\'Â¥\':¡(){¢/Ã/.¨(°)}},{\'¤\':\'Ã\',\'Â¥\':¡(){¢ Ã.³!=²}},{\'¤\':\'Ã\',\'Â¥\':¡(){¢/Ã/.¨(°)}},{\'¤\':\'Ã\',\'Â¥\':¡(){¢/Ã/.¨(°)}},{\'ª\':\'¶\',\'¤\':\'à Ã\',\'Â¥\':¡(){¢/à á â/.¨(«)},\'©\':¡(){¢ «.¹(/ã(\\d+(?:\\.\\d+)+)/)}},{\'¤\':\'Ã\',\'Â¥\':¡(){¢/Ã/.¨(«)}},{\'¤\':\'Ã\',\'Â¥\':¡(){¢/Ã/.¨(°)}},{\'¤\':\'Ã\',\'Â¥\':¡(){¢/Ã/.¨(«)}},{\'¤\':\'Ã\',\'Â¥\':¡(){¢/Ã/.¨(«)}},{\'ª\':\'·\',\'¤\':\'Ã¥ Ã\',\'Â¥\':¡(){¢/Ã/.¨(«)},\'©\':¡(){¢ «.¹(/à (\\d+(?:\\.\\d+)+(?:b\\d*)?)/)}},{\'¤\':\'Ã\',\'Â¥\':¡(){¢/æ|Ã/.¨(«)},\'©\':¡(){¢ «.¹(/è:(\\d+(?:\\.\\d+)+)/)}}];i<¦.Ã;i++){µ(¦[i].Â¥()){® ª=¦[i].ª?¦[i].ª:¦[i].¤.Ã();£[ª]=Ã;£.Â¥=¦[i].¤;® Â;µ(¦[i].©!=²&&(Â=¦[i].©())){£.©.¯=Â[1];£.©.±=Ã(Â[1])}ê{® Ã=à ë(¦[i].¤+\'(?:\\\\s|\\\\/)(\\\\d+(?:\\\\.\\\\d+)+(?:(?:a|b)\\\\d*)?)\');Â=«.¹(Ã);µ(Â!=²){£.©.¯=Â[1];£.©.±=Ã(Â[1])}}Ã}};Ã(® i=0,´=».ä,¦=[{\'ª\':\'¸\',\'¤\':\'ç\',\'¬\':¡(){¢/é/.¨(´)}},{\'¤\':\'Ã\',\'¬\':¡(){¢/Ã/.¨(´)}},{\'¤\':\'Ã\',\'¬\':¡(){¢/Ã/.¨(´)}}];i<¦.Ã;i++){µ(¦[i].¬()){® ª=¦[i].ª?¦[i].ª:¦[i].¤.Ã();£[ª]=Ã;£.¬=¦[i].¤;Ã}}}();',77,77,'function|return|Private|name|browser|data|false|test|version|identifier|ua|OS|result|var|string|ve|number|undefined|opera|pl|if|aol|msie|win|match|camino|navigator|mozilla|icab|konqueror|Unknown|flock|firefox|netscape|linux|safari|mac|Linux|re|iCab|true|parseFloat|length|Flock|Camino|for|Firefox|Netscape|Explorer|MSIE|Mozilla|Mac|toLowerCase|new|break|Public|Apple|Opera|window|Konqueror|Safari|KDE|AOL|America|Online|Browser|rev|platform|Internet|Gecko|Windows|rv|Win|else|RegExp|userAgent|vendor'.split('|'))) 92 93/* ----------------------------------------------------------------- */ 94 95var aol = $.browser.aol(); // AOL Explorer 96var camino = $.browser.camino(); // Camino 97var firefox = $.browser.firefox(); // Firefox 98var flock = $.browser.flock(); // Flock 99var icab = $.browser.icab(); // iCab 100var konqueror = $.browser.konqueror(); // Konqueror 101var mozilla = $.browser.mozilla(); // Mozilla 102var msie = $.browser.msie(); // Internet Explorer Win / Mac 103var netscape = $.browser.netscape(); // Netscape 104var opera = $.browser.opera(); // Opera 105var safari = $.browser.safari(); // Safari 106 107var userbrowser = $.browser.browser(); //detected user browser 108 109//operating systems 110 111var linux = $.browser.linux(); // Linux 112var mac = $.browser.mac(); // Mac OS 113var win = $.browser.win(); // Microsoft Windows 114 115//version 116 117var userversion = $.browser.version.number(); 118 119/* ----------------------------------------------------------------- */ 120 121if (mac == true) { 122 123 $("html").addClass("mac"); 124 125 126} else if (linux == true) { 127 128 $("html").addClass("linux"); 129 130} else if (win == true) { 131 132 $("html").addClass("windows"); 133 134} 135 136/* ----------------------------------------------------------------- */ 137
138if (userbrowser == "Safari") { 139 140 $("html").addClass("safari"); 141 142} else if (userbrowser == "Firefox") { 143 144 $("html").addClass("firefox"); 145 146} else if (userbrowser == "Camino") { 147 148 $("html").addClass("camino"); 149 150} else if (userbrowser == "AOL Explorer") { 151 152 $("html").addClass("aol"); 153 154} else if (userbrowser == "Flock") { 155 156 $("html").addClass("flock"); 157 158} else if (userbrowser == "iCab") { 159 160 $("html").addClass("icab"); 161 162} else if (userbrowser == "Konqueror") { 163 164 $("html").addClass("konqueror"); 165 166} else if (userbrowser == "Mozilla") { 167 168 $("html").addClass("mozilla"); 169 170} else if (userbrowser == "Netscape") { 171 172 $("html").addClass("netscape"); 173 174} else if (userbrowser == "Opera") { 175 176 $("html").addClass("opera"); 177 178} else if (userbrowser == "Internet Explorer") { 179 180 $("html").addClass("ie"); 181 182} else {} 183 184$("html").addClass("" + userversion + ""); 185 186 187 188 189if (!("ontouchstart" in document.documentElement)) { 190 document.documentElement.className += " notouch"; 191} 192 193 194 195 $('.img_hide.bg').each(function(){ 196 var thisSrc = $(this).attr('src') 197 $(this).parent().attr('style','background-image: url('+thisSrc+')'); 198 }); 199 200 201 202 203 204 205 //$("select").selectbox(); 206 $("#ico,#psc,#telefon,#count,#basket table.product_souhrn td.three .basket_count").numeric() 207 208 $('.sbHolder').each(function(){ 209 if ($(this).attr('tabindex') > 0){ 210 $(this).css('z-index',1000 - parseInt($(this).attr('tabindex'))); 211 } 212 }); 213 214 $(document).on('focus', 'input[readonly]', function () { 215 this.blur(); 216 }); 217 218 219 $('.main_body_container .admin_settings').click(function(){ 220 if ( $(this).parents('.main_body_container').hasClass('active') ){ 221 $('.main_body_overlay').click(); 222 }else{ 223 $(this).parents('.main_body_container').addClass('active') 224 var scrollTop = ($('html').scrollTop()) ? $('html').scrollTop() : $('body').scrollTop(); 225 $('html').addClass('admin_settings_active').css('top',-scrollTop); 226 } 227 return false; 228 }); 229 230$('.refresh_page').click(function() { 231 location.reload(); 232 return false; 233}); 234 235 $('.uploadBtn').change(function(){ 236 $(this).parents('.file').find('.uploadFile').val($(this).val()); 237 }); 238 239 240 $(document).keyup(function(e) { 241 if ( e.keyCode == 27 ) { 242 if ( $('html').hasClass('admin_settings_active') ){ 243 $('.main_body_overlay').click(); 244 } 245 246 } 247 }); 248 249 $('#sorting_select').change(function() { 250 var value = $(this).val(); 251 if(value == 'n_price_without_dph_desc') { 252 $('#sortby').val('n_price_without_dph');$('#sortstyle').val('DESC');$('#sorting-form').submit();return false; 253 } else if(value == 'n_price_without_dph') { 254 $('#sortby').val('n_price_without_dph');$('#sortstyle').val('');$('#sorting-form').submit();return false; 255 } else if(value == 'n_discount_desc') { 256 $('#sortby').val('n_discount');$('#sortstyle').val('DESC');$('#sorting-form').submit();return false; 257 } else if(value == 'd_date_inserted_desc') { 258 $('#sortby').val('d_date_inserted');$('#sortstyle').val('DESC');$('#sorting-form').submit();return false; 259 } 260 }); 261 262 263 264 $('.main_body_overlay').click(function(e){ 265 var controlClass = $(e.target).attr('class'); 266 if( controlClass == 'main_body_overlay' ){ 267 var scrollTop = parseInt($('html').css('top')); 268 $('.main_body_container').removeClass('active') 269 $('html').removeClass('admin_settings_active'); 270 $('html,body').scrollTop(-scrollTop); 271 } 272 }); 273 274 $('.main_body_container .main_body_content .subtitle').click(function(){ 275 $(this).addClass('active') 276 var subtitleText = $(this).attr('data-title'); 277 var subtitleID = $(this).attr('id'); 278 $('.main_body_container .main_body_content .move .obsah').hide(); 279 $('#obsah_'+subtitleID).show() 280 $('.main_body_container .main_body_content').addClass('position_1') 281 $('.main_body_container .main_body_content .title').removeClass('active') 282 $('.main_body_container .main_body_content .title span:not(.icon)').css({'opacity' : 0}) 283 setTimeout(function () { 284 $('.main_body_container .main_body_content .title').addClass('active') 285 $('.main_body_container .main_body_content .title span:not(.icon)').text(subtitleText) 286 $('.main_body_container .main_body_content .title span:not(.icon)').css({'opacity' : 1}) 287 },200); 288 }); 289 290 $('.main_body_container .main_body_content .model_subtitle').click(function(){ 291 var modelSubtitleText = $(this).attr('data-title'); 292 var modelSubtitleID = $(this).attr('id'); 293 $('.main_body_container .main_body_content .move .model_obsah').hide(); 294 //$('.main_body_container .main_body_content .move').addClass('big'); 295 //$('.main_body_container .main_body_content .mutation_link').addClass('bottom'); 296 //$('.main_body_container .main_body_content').addClass('bottom'); 297 $('#mod_'+modelSubtitleID).show() 298 $('.main_body_container .main_body_content').removeClass('position_1') 299 $('.main_body_container .main_body_content').addClass('position_2') 300 $('.main_body_container .main_body_content .title').removeClass('active') 301 $('.main_body_container .main_body_content .title span:not(.icon)').css({'opacity' : 0}) 302 //$('.main_body_container .main_body_content .admin_link').css({'opacity' : 0}) 303 setTimeout(function () { 304 $('.main_body_container .main_body_content .title').addClass('active') 305 $('.main_body_container .main_body_content .title span:not(.icon)').text(modelSubtitleText) 306 $('.main_body_container .main_body_content .title span:not(.icon)').css({'opacity' : 1}) 307 308 },200); 309 }); 310 311 $('.main_body_container .main_body_content .title .icon').click(function(){ 312 if ($('.main_body_container .main_body_content').hasClass('position_1') ){ 313 $('.main_body_container .main_body_content').removeClass('position_1') 314 var subtitleText = $('.main_body_container .main_body_content .title span:not(.icon)').attr('data-title'); 315 $('.main_body_container .main_body_content .title').removeClass('active') 316 $('.main_body_container .main_body_content .title span:not(.icon)').css({'opacity' : 0}) 317 setTimeout(function () { 318 $('.main_body_container .main_body_content .title span:not(.icon)').text(subtitleText) 319 $('.main_body_container .main_body_content .title span:not(.icon)').css({'opacity' : 1}) 320 },200); 321 $('.main_body_container .main_body_content .subtitle').removeClass('active') 322 }else{ 323 324 $('.main_body_container .main_body_content').removeClass('position_2') 325 $('.main_body_container .main_body_content').addClass('position_1') 326 //$('.main_body_container .main_body_content .move').removeClass('big'); 327 //$('.main_body_container .main_body_content .mutation_link').removeClass('bottom'); 328 //$('.main_body_container .main_body_content').removeClass('bottom'); 329 var subtitleText = $(this).parents('.main_body_content').find('.subtitle.active').attr('data-title'); 330 $('.main_body_container .main_body_content .title span:not(.icon)').css({'opacity' : 0}) 331 //$('.main_body_container .main_body_content .admin_link').css({'opacity' : 1}) 332 setTimeout(function () { 333 $('.main_body_container .main_body_content .title span:not(.icon)').text(subtitleText) 334 $('.main_body_container .main_body_content .title span:not(.icon)').css({'opacity' : 1}) 335 },200); 336 } 337 338 }); 339 340 341 //var dateToday = new Date(); 342 343 //$('.datepicker').datepicker() 344 /* 345 $(".hasDatepicker").each(function (index, element) { 346 var context = $(this); 347 context.on("blur", function (e) { 348 // The setTimeout is the key here. 349 setTimeout(function () { 350 if (!context.is(':focus')) { 351 $(context).datepicker("hide"); 352 } 353 }, 250); 354 }); 355 }); 356 */ 357 $("#password_kosik,#blabol2").keypress(function(e) { 358 if(e.which == 13) { 359 $('.log_user_krok_1').click(); 360 $(this).blur(); 361 return false;
362 } 363 }); 364 $("#blabol3").keypress(function(e) { 365 if(e.which == 13) { 366 $('#repass_1_step').click(); 367 $(this).blur(); 368 return false; 369 } 370 }); 371 372 $('#b_use_delivery_address').click(function(){ 373 if ($(this).is(':checked')){ 374 $('#use_delivery_address').addClass('active'); 375 $('#use_delivery_address input').each(function() { 376 var tabIndex = $(this).attr('tabindex').substring(1); 377 $(this).attr('tabindex', tabIndex); 378 }); 379 }else{ 380 $('#use_delivery_address').removeClass('active'); 381 $('#use_delivery_address input').each(function() { 382 var tabIndex = $(this).attr('tabindex'); 383 $(this).attr('tabindex', '-'+tabIndex); 384 }); 385 } 386 }); 387 388 389 $('.log_user_krok_1').click(function() { 390 var errorMessage = ''; 391 if($('#blabol2').val() == '') { 392 errorMessage = errorMessage + '<p>' + $('#blabol_language_2').val() + '</p>'; 393 } 394 if($('#password_kosik').val() == '') { 395 errorMessage = errorMessage + '<p>' + $('#password_language').val() + '</p>'; 396 } 397 if (errorMessage > ''){ 398 showControlPopup(errorMessage); 399 return false; 400 } 401 $.nette.ajax({ 402 url: '?do=logUser', 403 data: {'val[s_email]': $('#blabol2').val(), 'val[s_password]': $('#password_kosik').val(), 'val[kroky]': 1}, 404 method: 'post', 405 success: function(data) { 406 407 }, 408 }); 409 return false; 410 }); 411 412 $('#repass_1_step').click(function() { 413 $.nette.ajax({ 414 url: '?do=rePass', 415 data: {'s_email': $('#blabol3').val(), 'kroky': 1, 'lost_password': 'ok'}, 416 method: 'post', 417 success: function(data) { 418 419 }, 420 }); 421 return false; 422 }); 423 424 425 $('.message_centering span').click(function(){ 426 $(this).parents('.flash.alert').slideUp(); 427 $(this).parents('.message_centering').removeClass('active'); 428 }); 429 430 $('a.return_false').click(function(){ 431 return false; 432 }); 433 434 if ($('.flash.fade').length){ 435 $('.message_centering').each(function(){ 436 var objekt = $(this); 437 setTimeout(function () { 438 objekt.removeClass('active'); 439 }, 6000) 440 }); 441 } 442 443 444 445 $('.scroll_top').click(function(){ 446 $('html,body').animate({ scrollTop: 0 }, 600); 447 return false; 448 }); 449 450 if ( ($(document).scrollTop() > $(window).height() / 2)){ 451 $('.scroll_top').addClass('active') 452 }else{ 453 $('.scroll_top').removeClass('active') 454 } 455 456 $(window).scroll(function(){ 457 if ( ($(document).scrollTop() > $(window).height() / 2)){ 458 $('.scroll_top').addClass('active') 459 }else{ 460 $('.scroll_top').removeClass('active') 461 } 462 }); 463 464 465 $('article table').each(function(){ 466 var tableWidth = $(this).width(); 467 var parentWidth = $(this).parent().width(); 468 //alert(tableWidth) 469 //alert(parentWidth) 470 if( tableWidth > parentWidth ){ 471 $(this).addClass('over') 472 } 473 }); 474 475 476 477 478 479 $('.control_popup .close').click(function(){ 480 $(this).parents('.control_popup').css({'opacity' : 0}); 481 setTimeout(function () { 482 $('.control_popup').css({'display' : 'none'}); 483 }, 250) 484 }); 485 486 $('.control_popup').click(function(e){ 487 var controlClass = $(e.target).attr('class'); 488 if( controlClass == 'box' ){ 489 $('.control_popup .close').click() 490 } 491 }); 492 493 $('.carrier_popup .close').click(function(){ 494 $(this).parents('.carrier_popup').css({'opacity' : 0}); 495 setTimeout(function () { 496 $('.carrier_popup').css({'display' : 'none'}); 497 }, 250) 498 }); 499 500 $('.carrier_popup').click(function(e){ 501 var controlClass = $(e.target).attr('class'); 502 if( controlClass == 'box' ){ 503 $('.carrier_popup .close').click() 504 } 505 }); 506 507 $(document).keyup(function(e) { 508 if ( (e.keyCode == 27)) { 509 $('.control_popup .close').click() 510 $('.carrier_popup .close').click() 511 $('.buy_popup .close').click() 512 $('.gift_popup .close').click() 513 $('.popup_popup .close').click() 514 $('.video_popup .boxes span.close').click() 515 } 516 }); 517 518 $(document).keyup(function(e) { 519 if ( (e.keyCode == 13) && ( ($('.control_popup').css('opacity') == '1') || ($('.buy_popup').css('opacity') == '1') || ($('.popup_popup').css('opacity') == '1') || ($('.video_popup').css('opacity') == '1') ) ) { 520 $('.control_popup .close').click() 521 $('.buy_popup .close').click() 522 $('.popup_popup .close').click() 523 $('.video_popup .boxes span.close').click() 524 } 525 }); 526 527 $(document).keydown(function(e) { 528 if ( (e.keyCode == 40) ){ 529 if( $('.silencer:not(.hide) li a').length ){ 530 if( $('.silencer li.active').length ){ 531 var thisItem = $('.silencer li.active'); 532 if ( thisItem.next().hasClass('last') ){ 533 }else if ( thisItem.next().hasClass('move') ){ 534 thisItem.next().next().addClass('active'); 535 thisItem.next().next().find('a').focus(); 536 thisItem.removeClass('active'); 537 }else{ 538 thisItem.next().addClass('active'); 539 thisItem.next().find('a').focus(); 540 thisItem.removeClass('active'); 541 } 542 }else{ 543 $('.silencer li:nth-child(2)').addClass('active'); 544 $('.silencer li:nth-child(2)').find('a').focus(); 545 } 546 window.addEventListener("keydown", function(e) { 547 if([39, 40].indexOf(e.keyCode) > -1) { 548 e.preventDefault(); 549 } 550 }, false); 551 } 552 }else if ( (e.keyCode == 38) ){ 553 if( $('.silencer:not(.hide) li a').length ){ 554 if( $('.silencer li.active').length ){ 555 var thisItem = $('.silencer li.active'); 556 if ( thisItem.prev().index() === 0 ){ 557 var fieldInput = $('.search_box input[type=text]') 558 var fieldInputText= $('.search_box input[type=text]').val(); 559 e.preventDefault(); 560 fieldInput.val(''); 561 fieldInput.val(fieldInputText); 562 fieldInput.focus(); 563 $('.silencer li').removeClass('active'); 564 }else if ( thisItem.prev().hasClass('move') ){ 565 thisItem.prev().prev().addClass('active'); 566 thisItem.prev().prev().find('a').focus(); 567 thisItem.removeClass('active'); 568 }else{ 569 thisItem.prev().addClass('active'); 570 thisItem.prev().find('a').focus(); 571 thisItem.removeClass('active'); 572 } 573 } 574 window.addEventListener("keydown", function(e) { 575 if([39, 40].indexOf(e.keyCode) > -1) { 576 e.preventDefault(); 577 } 578 }, false); 579 } 580 } 581 }); 582 583 $('html').click(function(e){ 584 if (e.target == '.silencer' || $(e.target).parents('.silencer').length > 0) { 585 } else { 586 $('.silencer').addClass('hide') 587 } 588 }); 589 590
591 $('.deliveryRadio.delivery_open_PPL').change(function(){ 592 initPPL(); 593 $('.ppl_popup').css({'display' : 'table'}); 594 $('.ppl_popup').css({'opacity' : 1}); 595 return false; 596 }); 597 598 $('#changePPL').click(function(){ 599 $('.deliveryRadio.delivery_open_PPL').change(); 600 }); 601 602 $('#hledej_ppl').keyup(function(){ 603 var obj = $(this); 604 if(obj.val().length == 5) { 605 $('#ppl_opacity').addClass('opacity'); 606 } 607 $.nette.ajax({ 608 url: '?do=pplsearch&srch='+obj.val(), 609 success: function(data) { 610 611 }, 612 complete: function(){ 613 } 614 }) 615 }); 616 617 618 619 $('.deliveryRadio.delivery_open_CP').change(function(){ 620 $('.cp_popup').css({'display' : 'table'}); 621 $('.cp_popup').css({'opacity' : 1}); 622 initCP(); 623 if($('#user_adress').val() == 1) { 624 setTimeout(function() { 625 $('#hledej_cp').keyup(); 626 }, 500); 627 } 628 return false; 629 }); 630 631 $('#changeCP').click(function(){ 632 $('.deliveryRadio.delivery_open_CP').change(); 633 return false; 634 }); 635 636 $('#hledej_cp').keyup(function(){ 637 var obj = $(this); 638 if(obj.val().length == 5) { 639 $('#cp_opacity').addClass('opacity'); 640 } 641 $.nette.ajax({ 642 url: '?do=cpsearch&srch='+obj.val()+'&withoutmap=1&hideClosest=1', 643 success: function(data) { 644 }, 645 }); 646 }); 647 648 $('.deliveryRadio.delivery_open_DPD').change(function(){ 649 $('.dpd_popup').css({'display' : 'table'}); 650 $('.dpd_popup').css({'opacity' : 1}); 651 initDPD(); 652 if($('#user_adress').val() == 1) { 653 setTimeout(function() { 654 $('#hledej_dpd').keyup(); 655 }, 500); 656 } 657 return false; 658 }); 659 660 $('#changeDPD').click(function(){ 661 $('.deliveryRadio.delivery_open_DPD').change(); 662 return false; 663 }); 664 665 $('#hledej_dpd').keyup(function(){ 666 var obj = $(this); 667 if(obj.val().length == 5) { 668 $('#dpd_opacity').addClass('opacity'); 669 } 670 $.nette.ajax({ 671 url: '?do=dpdsearch&srch='+obj.val()+'&withoutmap=1&hideClosest=1', 672 success: function(data) { 673 }, 674 }); 675 }); 676 677 $('.deliveryRadio.delivery_open_ZASILKOVNA').change(function(){ 678 $('.zasilkovna_popup').css({'display' : 'table'}); 679 $('.zasilkovna_popup').css({'opacity' : 1}); 680 initZasilkovna(); 681 if($('#user_adress').val() == 1) { 682 setTimeout(function() { 683 $('#hledej_zasilkovna').keyup(); 684 }, 500); 685 } 686 return false; 687 }); 688 689 $('#changeZASILKOVNA').click(function(){ 690 $('.deliveryRadio.delivery_open_ZASILKOVNA').change(); 691 return false; 692 }); 693 694 $('#hledej_zasilkovna').keyup(function(){ 695 var obj = $(this); 696 if(obj.val().length == 5) { 697 $('#zasilkovna_opacity').addClass('opacity'); 698 } 699 $.nette.ajax({ 700 url: '?do=zasilkovnasearch&srch='+obj.val()+'&withoutmap=1&hideClosest=1', 701 success: function(data) { 702 }, 703 }); 704 }); 705 706 $('.buy_popup .close').click(function(){ 707 $(this).parents('.buy_popup').css({'opacity' : 0}); 708 setTimeout(function () { 709 $('.buy_popup').css({'display' : 'none'}); 710 }, 250) 711 return false; 712 }); 713 $('.buy_popup').click(function(e){ 714 var controlClass = $(e.target).attr('class'); 715 if( controlClass == 'box' ){ 716 $('.buy_popup .close').click() 717 } 718 }); 719 720 $('.gift_popup .close').click(function(){ 721 $(this).parents('.gift_popup').css({'opacity' : 0}); 722 setTimeout(function () { 723 $('.gift_popup').css({'display' : 'none'}); 724 }, 250) 725 return false; 726 }); 727 728 $('.popup_popup .boxes span.close').click(function(){ 729 $(this).parents('.popup_popup').css({'opacity' : 0}); 730 setTimeout(function () { 731 $('.popup_popup').css({'display' : 'none'}); 732 }, 250) 733 }); 734 735 $('.popup_popup').click(function(e){ 736 var controlClass = $(e.target).attr('class'); 737 if( controlClass == 'box' ){ 738 $('.popup_popup .close').click() 739 } 740 }); 741 742 $('.video_popup .boxes span.close').click(function(){ 743 $(this).parents('.srdcovky_popup').css({'opacity' : 0}); 744 setTimeout(function () { 745 $('.video_popup').css({'display' : 'none'}); 746 $('.video_popup iframe').attr('src', '') 747 }, 250) 748 }); 749 750 $('.video_popup').click(function(e){ 751 var controlClass = $(e.target).attr('class'); 752 if( controlClass == 'box' ){ 753 $('.video_popup .boxes span.close').click() 754 } 755 }); 756 757 $('#basket .basket_navigation ul li a.submit').click(function(){ 758 $('#basket .align-center .btn.right')[0].click(); 759 }); 760 761 //$('#basket .doprava_platba .item.platba .box:first').addClass('active'); 762 //$('#basket .doprava_platba .item.doprava .box:first').addClass('active'); 763 764 $(".contact_box_basket").click(function(){$(this).hasClass("active")?$(this).removeClass("active"):$(this).addClass("active")}); 765 766 if( $('.contact_box_basket').html() > ''){ 767 $(".contact_box_basket").addClass('show') 768 var scrollTop=$(window).scrollTop(),contactBoxHeight=$(".contact_box_basket").outerHeight(),contactBoxOffset=$(".contact_box_basket").offset().top,contentOffset=$(".container").offset().top - 30,headerHeight=$("header").outerHeight(),bottomOffset=$("#content").offset().top+$("#content").outerHeight();if(scrollTop<contentOffset-headerHeight)$(".contact_box_basket").addClass("absolute_top"),$(".contact_box_basket").removeClass("absolute_bottom"),$(".contact_box_basket").removeClass("fixed"),$(".contact_box_basket").css({right:""});else if(scrollTop>bottomOffset-$(window).height()&&$(window).width()<1340)$(".contact_box_basket").addClass("absolute_bottom"),$(".contact_box_basket").removeClass("absolute_top"),$(".contact_box_basket").removeClass("fixed"),$(".contact_box_basket").css({right:""});else if(scrollTop>bottomOffset-contactBoxHeight-124&&$(window).width()>1340)$(".contact_box_basket").addClass("absolute_bottom"),$(".contact_box_basket").removeClass("absolute_top"),$(".contact_box_basket").removeClass("fixed"),$(".contact_box_basket").css({right:""});else if($(".contact_box_basket").removeClass("absolute_bottom"),$(".contact_box_basket").removeClass("absolute_top"),$(".contact_box_basket").addClass("fixed"),$("body").width()!=$("html").width()){var leftCount=($("html").width()-$("body").width())/2;$(".contact_box_basket").css({right:leftCount+"px"})}else $(".contact_box_basket").css({right:""}); 769 $(window).scroll(function(){var scrollTop=$(window).scrollTop(),contactBoxHeight=$(".contact_box_basket").outerHeight(),contactBoxOffset=$(".contact_box_basket").offset().top,contentOffset=$(".container").offset().top - 30,headerHeight=$("header").outerHeight(),bottomOffset=$("#content").offset().top+$("#content").outerHeight();if(scrollTop<contentOffset-headerHeight)$(".contact_box_basket").addClass("absolute_top"),$(".contact_box_basket").removeClass("absolute_bottom"),$(".contact_box_basket").removeClass("fixed"),$(".contact_box_basket").css({right:""});else if(scrollTop>bottomOffset-$(window).height()&&$(window).width()<1340)$(".contact_box_basket").addClass("absolute_bottom"),$(".contact_box_basket").removeClass("absolute_top"),$(".contact_box_basket").removeClass("fixed"),$(".contact_box_basket").css({right:""});else if(scrollTop>bottomOffset-contactBoxHeight-124&&$(window).width()>1340)$(".contact_box_basket").addClass("absolute_bottom"),$(".contact_box_basket").removeClass("absolute_top"),$(".contact_box_basket").removeClass("fixed"),$(".contact_box_basket").css({right:""});else if($(".contact_box_basket").removeClass("absolute_bottom"),$(".contact_box_basket").removeClass("absolute_top"),$(".contact_box_basket").addClass("fixed"),$("body").width()!=$("html").width()){var leftCount=($("html").width()-$("body").width())/2;$(".contact_box_basket").css({right:leftCount+"px"})}else $(".contact_box_basket").css({right:""}); }); 770 } 771 772 773 $('#basket .doprava_platba .item.platba .box').click(function(){ 774 if($(this).hasClass('active')){ 775 }else{ 776 $('#basket .doprava_platba .item.platba .box').removeClass('active'); 777 $(this).addClass('active'); 778 } 779 }); 780 781 782 $('#basket .doprava_platba .item.doprava .box').click(function(){ 783 if( $(this).hasClass('popup_click')){ 784 $('#basket .doprava_platba .item.doprava .box').removeClass('active'); 785 $(this).find('a')[0].click(); 786 $(this).addClass('active'); 787 $('.reg_form .box.second').find('input[type=text]').val('') 788 }else if($(this).hasClass('active')){ 789 }else{ 790 $('#basket .doprava_platba .item.doprava .box').removeClass('active'); 791 $(this).find('input[type=radio]')[0].click(); 792 $(this).addClass('active'); 793 $('.reg_form .box.second').find('input[type=text]').val('') 794 } 795 }); 796 797 798 799 800 801 802 803 804 $('.detail .text .price .right_side .basket a.increment').click(function(){ 805 var countValue = parseInt($(this).parents('.basket').find('#count').val()); 806 countValue++ 807 $(this).parents('.basket').find('#count').val(countValue); 808 return false;
809 }); 810 811 $('.detail .text .price .right_side .basket a.decrement').click(function(){ 812 var countValue = parseInt($(this).parents('.basket').find('#count').val()); 813 if(countValue == 1){ 814 815 }else{ 816 countValue-- 817 $(this).parents('.basket').find('#count').val(countValue); 818 } 819 820 return false; 821 }); 822 823 824 $('.product_list .item a.increment').click(function(){ 825 var countValue = parseInt($(this).parents('form').find('.count').val()); 826 countValue++ 827 $(this).parents('form').find('.count').val(countValue); 828 $(this).parents('form').find('.count').attr('value',countValue); 829 return false; 830 }); 831 832 $('.product_list .item a.decrement').click(function(){ 833 var countValue = parseInt($(this).parents('form').find('.count').val()); 834 if(countValue == 1){ 835 }else{ 836 countValue--; 837 $(this).parents('form').find('.count').val(countValue); 838 $(this).parents('form').find('.count').attr('value',countValue); 839 } 840 841 return false; 842 }); 843 844 /* 845 $('.increment').click(function(){ 846 var countValue = $(this).parents('.buy_option').find('input[type=text]').attr('value'); 847 countValue++ 848 $(this).parents('.buy_option').find('input[type=text]').attr('value',countValue); 849 }); 850 851 $('.decrement').click(function(){ 852 var countValue = ($(this).parents('.buy_option').find('input[type=text]').attr('value')-1); 853 var min_mnozstvi = $('#minimalni_mnozstvi').val(); 854 855 if ( countValue < (min_mnozstvi) ){ 856 }else{ 857 //countValue-- 858 $(this).parents('.buy_option').find('input[type=text]').attr('value',countValue); 859 } 860 }); 861 */ 862 $('.delete_basket_item').click(function() { 863 var pk_tbl_temporary_order = $(this).attr('item'); 864 $.nette.ajax({ 865 url: '?do=deleteBasketItem&pk_tbl_temporary_order='+pk_tbl_temporary_order, 866 type: 'post', 867 cache: false, 868 success: function(data) { 869 $('#set_total_price').html("<strong class='total'>"+data.n_total_price+"<span class='dph'>s DPH</span></strong>"); 870 $('#n_total_rema').html(data.n_total_rema); 871 $('#basket_number').html(data.n_total_count); 872 $('#updatedPrice').html(data.n_total_price); 873 }, 874 }); 875 return false; 876 }); 877 878 879 880 881 $( "#basket table.product_souhrn td.three .basket_count" ).keyup(function(){ 882 883 var newValue = $(this).val().replace('-', ''); 884 $(this).val(newValue) 885 var preCountValue = $(this).attr('rel'); 886 var countValue = $(this).val(); 887 var pk_tbl_temporary_order = $(this).parent().find('.pk_tbl_temporary_order').val(); 888 889 $.nette.ajax({ 890 url: '?do=changeBasketCount&pk_tbl_temporary_order='+pk_tbl_temporary_order+'&n_count='+countValue, 891 type: 'post', 892 cache: false, 893 success: function(data) { 894 $('.count_price_'+pk_tbl_temporary_order).html(data.n_price_without_dph+"<span class='dph'>bez DPH</span>"); 895 $('.count_price_dph_'+pk_tbl_temporary_order).html('<strong>'+data.n_price_with_dph+"<span class='dph'>s DPH</span></strong>"); 896 $('#set_total_price').html("<strong class='total'>"+data.n_total_price+"<span class='dph'>s DPH</span></strong>"); 897 $('#n_total_rema').html(data.n_total_rema); 898 $('#basket_number').html(data.n_total_count); 899 $('#updatedPrice').html(data.n_total_price); 900 }, 901 }); 902 903 $(this).attr('value', countValue); 904 if ( countValue == 1 ){ 905 $('#basket table.product_souhrn td.three .decrement').addClass('opacity') 906 } 907 908 }); 909 910 911 $('#basket table.product_souhrn td.three .increment').click(function(){ 912 913 var countValue = $(this).parents('td.three').find('.basket_count').val(); 914 countValue++; 915 $(this).parents('td.three').find('.basket_count').val(countValue); 916 $('#basket table.product_souhrn td.three .decrement').removeClass('opacity') 917 918 var pk_tbl_temporary_order = $(this).parent().find('.pk_tbl_temporary_order').val(); 919 920 $.nette.ajax({ 921 url: '?do=increment&pk_tbl_temporary_order='+pk_tbl_temporary_order, 922 type: 'post', 923 cache: false, 924 success: function(data) { 925 $('.count_price_'+pk_tbl_temporary_order).html(data.n_price_without_dph+"<sp
925an class='dph'>bez DPH</span>"); 926 $('.count_price_dph_'+pk_tbl_temporary_order).html('<strong>'+data.n_price_with_dph+"<span class='dph'>s DPH</span></strong>"); 927 $('#set_total_price').html("<strong class='total'>"+data.n_total_price+"<span class='dph'>s DPH</span></strong>"); 928 $('#n_total_rema').html(data.n_total_rema); 929 $('#basket_number').html(data.n_total_count); 930 $('#updatedPrice').html(data.n_total_price); 931 }, 932 }); 933 return false; 934 }); 935 936 $('#basket table.product_souhrn td.three .decrement').click(function(){ 937 var countValue = $(this).parents('td.three').find('.basket_count').val(); 938 939 if ( countValue > 1 ) { 940 if ( countValue == 2 ){ 941 $(this).addClass('opacity') 942 } 943 944 countValue--; 945 $(this).parents('td.three').find('.basket_count').val(countValue); 946 947 var pk_tbl_temporary_order = $(this).parent().find('.pk_tbl_temporary_order').val(); 948 $.nette.ajax({ 949 url: '?do=decrement&pk_tbl_temporary_order='+pk_tbl_temporary_order, 950 type: 'post', 951 cache: false, 952 success: function(data) { 953 $('.count_price_'+pk_tbl_temporary_order).html(data.n_price_without_dph+"<span class='dph'>bez DPH</span>"); 954 $('.count_price_dph_'+pk_tbl_temporary_order).html('<strong>'+data.n_price_with_dph+"</strong><span class='dph'>s DPH</span>"); 955 $('#set_total_price').html("<strong class='total'>"+data.n_total_price+"<span class='dph'>s DPH</span></strong>"); 956 $('#n_total_rema').html(data.n_total_rema); 957 $('#basket_number').html(data.n_total_count); 958 $('#updatedPrice').html(data.n_total_price); 959 }, 960 }); 961 962 963 } 964 return false; 965 }); 966 967 968 969 970 971 $('.spec_box p.open_login').click(function(){ 972 if ( $(this).hasClass('active') ){ 973 $(this).removeClass('active') 974 $(this).parents('.spec_box').find('.login_form.hide').slideUp() 975 $('.login_form.hide.pass').slideUp() 976 }else{ 977 $(this).addClass('active') 978 $(this).parents('.spec_box').find('.login_form.hide').slideDown() 979 } 980 return false; 981 }); 982 983 var loginFormBoxHeight = $('.login_form.hide').outerHeight() - 47; 984 var loginFormBoxHeight2 = $('.login_form.hide2').outerHeight() - 92; 985 $('.login_form.hide, .login_form.hide2').hide(); 986 $('.login_form.hide').css({'max-height' : loginFormBoxHeight, 'opacity' : 1}) 987 $('.login_form.hide2').css({'max-height' : loginFormBoxHeight2, 'opacity' : 1}) 988 989 $('.login_form .box table td a.forgotten').click(function(){ 990 if( $('header').css("position") === "fixed"){ 991 var headerHeight = $('header').outerHeight() + 20; 992 }else{ 993 var headerHeight = 20; 994 } 995 if ( $(this).hasClass('active') ){ 996 $(this).removeClass('active') 997 $('.login_form .box table td a.forgotten_2').removeClass('active') 998 if ( $(this).parents().hasClass('spec_box') ){ 999 $('.login_form.hide.pass').slideUp() 1000 }else{ 1001 $('.login_form.hide').slideUp() 1002 $('.login_form.hide2').slideUp() 1003 } 1004 1005 }else{ 1006 $(this).addClass('active') 1007 $('.login_form.hide').slideDown() 1008 if( $('#basket').html() > ''){ 1009 var offset = $('.login_form.hide.pass').offset().top - headerHeight; 1010 }else{ 1011 var offset = $('.login_form.hide').offset().top - headerHeight; 1012 } 1013 $('html,body').animate({ scrollTop: offset }, 1200); 1014 } 1015 return false; 1016 }); 1017 1018 $('.login_form .box table td a.forgotten_2').click(function(){ 1019 if ( $(this).hasClass('active') ){ 1020 $(this).removeClass('active') 1021 $('.login_form.hide2').slideUp() 1022 }else{ 1023 $(this).addClass('active') 1024 $('.login_form.hide2').slideDown() 1025 if( $(window).width() < 768 ){ 1026 var offset = $('.login_form.hide2').offset().top - 64; 1027 $('html,body').animate({ scrollTop: offset }, 1200); 1028 } 1029 } 1030 return false; 1031 }); 1032 1033 setInterval(function () { 1034 $('#basket input[type="password"]').each(function(){ 1035 $(this).val(); 1036 }); 1037 1038 },500); 1039 1040 //$('#basket .reg_form').find('.heslo_zaznam input').css({'cursor' : 'default'}) 1041 1042 1043 $( "#basket table.product_souhrn td.two a.main_link, #basket table.product_souhrn td.one a" ).hover(function() { 1044 $( this ).parents('tr').addClass( "hover_efekt" ); 1045 }, function() { 1046 $( this ).parents('tr').removeClass( "hover_efekt" ); 1047 }); 1048 1049 //$('#basket .reg_form').find('.firemni_zaznam input').css({'cursor' : 'default'}) 1050 1051 $('#basket.my_order .item p.title span.ikonka.car').click(function(){ 1052 $(this).parents('.item').find('.zobrazit').click(); 1053 }) 1054 1055 $('.zobrazit').each(function(){ 1056 $(this).click(function(){ 1057 if($(this).parents('.item').hasClass('active')){ 1058 $(this).parents('.item').removeClass('active');
1059 $(this).parents('.item').find('.box').slideUp(); 1060 var thisTitle = $(this).attr('data-title') 1061 $(this).text(thisTitle); 1062 }else{ 1063 $(this).parents('.item').addClass('active'); 1064 $(this).parents('.item').find('.box').slideDown(); 1065 var thisTitle = $(this).attr('data-title2') 1066 $(this).text(thisTitle); 1067 } 1068 return false; 1069 }); 1070 }); 1071 1072 1073 1074 1075 1076 $('.check_email').change(function() { 1077 var email = $(this).val(); 1078 if(email.length > 0) { 1079 $.nette.ajax({ 1080 url: '?do=checkEmail&email='+email, 1081 type: 'get', 1082 cache: false, 1083 success: function(data) { 1084 }, 1085 complete: function(data) { 1086 var ret = data['responseText']; 1087 var json = $.parseJSON(ret); 1088 if(json.response == 1) { 1089 $('.check_email').removeClass('emailFalse'); 1090 $('.check_email').addClass('emailTrue'); 1091 } else { 1092 $('.check_email').removeClass('emailTrue'); 1093 $('.check_email').addClass('emailFalse'); 1094 } 1095 } 1096 }); 1097 } 1098 }); 1099 1100 1101 1102 $('.deliveryRadio').each(function(){ 1103 $(this).change(function(){ 1104 $('#basket .doprava_platba .item.platba.opacity').removeClass('opacity') 1105 var paymentList = payment[$(this).val()].split(','); 1106 var doprava = $('#delivery_price'+$(this).val()).val(); 1107 $('#delivery').val(doprava); 1108 1109 $('#ulozenka-branch-select-options').hide(); 1110 if ($(this).attr('id') == 'Delivery11'){ 1111 $('#ulozenka-branch-select-options').show(); 1112 } 1113 1114 //alert(paymentList); 1115 //alert(delivery[$(this).val()]); 1116 $('.paymentRadio').each(function(){ 1117 $(this).parents('div.box').hide(); 1118 }); 1119 var uz_zvoleno = false; 1120 $('.paymentRadio').each(function(){ 1121 if (paymentList.indexOf($(this).val()) >= 0){ 1122 $(this).parents('div.box').show(); 1123 if (!uz_zvoleno){ 1124 $(this).click().click(); 1125 1126 Suma(); 1127 1128 uz_zvoleno = true; 1129 } 1130 } 1131 }); 1132 }); 1133 }); 1134 // $('.deliveryRadio:first').change(); 1135 1136 $('.paymentRadio').each(function(){ 1137 $(this).change(function(){ 1138 var payment = $('#payment_price'+$(this).val()).val(); 1139 $('#payment').val(payment); 1140 1141 Suma(); 1142 1143 }); 1144 }); 1145 $('.paymentRadio:first').change(); 1146 1147 /* 1148 var deliveryChecked = $('.deliveryRadio:first').val(); 1149 $('.deliveryRadio').each(function(){ 1150 if($(this).is(':checked')) { 1151 deliveryChecked = $(this).val(); 1152 } 1153 }); 1154 1155 $('.deliveryRadio').each(function(){ 1156 if($(this).val() == deliveryChecked) { 1157 $(this).click().click(); 1158 } 1159 }); 1160 */ 1161 1162 $('.personal_menu').find('li').each(function(){ 1163 $(this).find('a').click(function(event){ 1164 $('.personal_menu').find('li').each(function(){ 1165 $(this).removeClass('active'); 1166 }); 1167 $(this).parent().addClass('active'); 1168 1169 event.preventDefault(); 1170 1171 //get the full url - like mysitecom/index.htm#home 1172 var full_url = this.href; 1173 1174 //split the url by # and get the anchor target name - home in mysitecom/index.htm#home 1175 var parts = full_url.split("#"); 1176 var trgt = parts[1]; 1177 1178 //get the top offset of the target anchor 1179 var target_offset = $("#"+trgt).offset(); 1180 var target_top = target_offset.top; 1181 1182 $('html, body').animate({scrollTop:target_top}, 1000, ''); 1183 1184 return false; 1185 1186 }); 1187 }); 1188 1189 1190 // objekt na kliknuti 1191 $('.add_basket').click(function(){ 1192 var count = $('#count').val(); 1193 var skladem = parseInt($('#skladem').val()); 1194 var v_kosiku = parseInt($('#v_kosiku').val()); 1195 var config = $('#sklady').val(); 1196 if(config == 1) { 1197 if (count > skladem) { 1198 showControlPopup($('#notInStock').val()); 1199 }else if ((skladem - v_kosiku - count) < 0){ 1200 showControlPopup($('#notInStock').val()); 1201 } 1202 } 1203 if( $(window).width() > 1024 ){ 1204 $.nette.ajax({ 1205 url: $('#detail').attr('action'), 1206 data: $('#detail').serialize(), 1207 type: 'post', 1208 success: function(data) { 1209 }, 1210 complete: function(){ 1211 $.nette.ajax({ 1212 url: "?do=AddToBasket", 1213 success: function(data) { 1214 } 1215 }); 1216 } 1217 }); 1218 }else{ 1219 1220 // objekt s poctem kusu 1221 // 1222 $.nette.ajax({ 1223 url: $('#detail').attr('action'), 1224 data: $('#detail').serialize(), 1225 type: 'post', 1226 success: function(data) { 1227 1228 }, 1229 complete: function(){ 1230 $.nette.ajax({ 1231 url: "?do=AddToBasket", 1232 success: function(data) { 1233 } 1234 }); 1235 1236 } 1237 }); 1238 } 1239 1240 $('#pocetZaNakup').html(precise_round(parseFloat($('#product_price').val())*parseInt($('.detail').find('#count').val()),0)); 1241 showBuyPopup(); 1242 return false;
1243 }); 1244 1245 // objekt na kliknuti 1246 $('.add_kosik').click(function(){ 1247 var product_id = $(this).attr('for-product'); 1248 var count = $('.count_of_'+product_id).val(); 1249 var skladem = parseInt($('#skladem_'+product_id).val()); 1250 var v_kosiku = parseInt($('#v_kosiku').val()); 1251 var config = $('#sklady').val(); 1252 console.log(skladem); 1253 if(config == 1) { 1254 if (count > skladem) { 1255 showControlPopup($('#notInStock').val()); 1256 }else if ((skladem - v_kosiku - count) < 0){ 1257 showControlPopup($('#notInStock').val()); 1258 } 1259 } 1260 if( $(window).width() > 1024 ){ 1261 $.nette.ajax({ 1262 url: "?do=AddToBasket", 1263 method: 'post', 1264 data: {'buy': 1, 'val[fk_tbl_commodity]': product_id, 'val[n_count]' : count}, 1265 success: function(data) { 1266 } 1267 }); 1268 1269 }else{ 1270 1271 // objekt s poctem kusu 1272 // 1273 $.nette.ajax({ 1274 url: "?do=AddToBasket", 1275 method: 'post', 1276 data: {'buy': 1, 'val[fk_tbl_commodity]': product_id, 'val[n_count]' : count}, 1277 success: function(data) { 1278 } 1279 }); 1280 1281 } 1282 1283 $('#pocetZaNakup').html(precise_round(parseFloat($('#product_price').val())*parseInt($('.detail').find('#count').val()),0)); 1284 showBuyPopup(); 1285 return false; 1286 }); 1287 1288 1289 // objekt na kliknuti 1290 koupit_button(); 1291 1292 1293 1294 // aktualizace ceny 1295 //setInterval(function(){ 1296 /*var hodnota = $('#savebasket').contents().find("body").html(); 1297 var hodnota2 = hodnota.split('##'); 1298 $('#updatedPrice').html(hodnota2[1]+''+$('#mena').val()); 1299 $('#pocet_polozek').html(hodnota2[0]); 1300 1301 $.ajax({ 1302 type: 'get', 1303 url: '/jquery/basket.php', 1304 cache: false, 1305 dataType: 'html', 1306 success: function(data) { 1307 if (data > ''){ 1308 $('#jq_basket').html(data); 1309 } 1310 } 1311 }); 1312 */ 1313 //} ,2000); 1314 1315 1316 1317 1318 1319 // $("aside").css("height", $(".c_column").outerHeight() + "px" ); 1320 1321 $('#sorting-form').on('submit',function() { 1322 $('.container').addClass('opacity'); 1323 }); 1324 1325 $('#nahoru').click(function(){ 1326 $("html,body" ).animate({ 1327 scrollTop: 0 1328 }, 500, function() { }); 1329 return false; 1330 }); 1331 1332 1333 1334 $('#ic').blur(function(){ 1335 var array = []; 1336 //array.push('kontrola0_1','kontrola0_2','kontrola0_4','kontrola0_3'); 1337 if ($('#ic').val() > ''){ 1338 /*$.each(array, function(key, value) { 1339 $('#'+value).attr('disabled','disabled'); 1340 }); */ 1341 //$('#loading').append('<img src="/images/loader.gif" alt="" id="loader"/>'); 1342 1343 $.ajax({ 1344 type: 'get', 1345 url: '/jquery/ares.php?ico='+$('#ic').val(), 1346 cache: false, 1347 success: function(data) { 1348 var json = $.parseJSON(data); 1349 $(json).each(function(i,val){ 1350 $.each(val,function(k,v){ 1351 if ((k == 'firma')&&(v > '')&&(v != undefined)){ 1352 $('#firma').val(v); 1353 } 1354 if ((k == 'ulice')&&(v > '')&&(v != undefined)){ 1355 $('#ulice').val(v); 1356 } 1357 if ((k == 'psc')&&(v > '')&&(v != undefined)){ 1358 $('#psc').val(v); 1359 } 1360 if ((k == 'mesto')&&(v > '')&&(v != undefined)){ 1361 $('#mesto').val(v); 1362 } 1363 1364 }); 1365 }); 1366 1367 /*$.each(array, function(key, value) { 1368 $('#'+value).attr('disabled',''); 1369 }); */ 1370 //$('#loader').remove(); 1371 1372 } 1373 }); 1374 } 1375 }); 1376 1377 /*------------------ Automatická kontrola file inputu ------------------*/ 1378 1379 $("input[type=file]").change(function() { 1380 var fileSize = (this.files[0].size/1024/1024); // Velikost souboru 1381 var maxSize = $(this).attr('max-size'); // Maximálnà velikost 1382 1383 var allowedExtensions = $(this).attr('allowed-extensions'); //Povolené pÅÃlohy 1384 var fileExtension = allowedExtensions.split(','); 1385 1386 if(fileSize >= maxSize && typeof(maxSize) != "undefined" && maxSize !== null && maxSize !== '') { 1387 $(this).val(''); 1388 showControlPopup("Maximálnà možná velikost je "+maxSize+" MB!"); 1389 return false; 1390 } else if ($.inArray($(this).val().split('.').pop().toLowerCase(), fileExtension) == -1 && typeof(allowedExtensions) != "undefined" && allowedExtensions !== null && allowedExtensions !== '') { 1391 $(this).val(''); 1392 showControlPopup("Podporované formáty: "+fileExtension.join(', ').toUpperCase()); 1393 return false; 1394 } 1395 }); 1396 1397 /*------------------------------------*/ 1398 1399 $('#orderitem .inp_count').each(function(){ 1400 $(this).blur(function(){ 1401 $('#orderitem').submit(); 1402 }); 1403 }); 1404 1405 $('#container').css('visibility','visible'); 1406 1407 $('.prepocitat-arrows').click(function(){ 1408 1409 $('#orderitem').submit(); 1410 }); 1411 1412 1413 $('#vypis2').click(function(){ 1414 $.cookie('vypis', '1', options); 1415 1416 window.location.reload(); 1417 return false;
1418 }); 1419 $('#vypis1').click(function(){ 1420 $.cookie('vypis', '0', options); 1421 1422 window.location.reload(); 1423 return false; 1424 }); 1425 1426 1427 /*$('.delivery-list').each(function(){ 1428 $(this).find('input').each(function(){ 1429 if ($(this).attr('type') == 'radio'){ 1430 var id = $(this).attr('id').replace('delivery',''); 1431 if ($(this).is(':checked')){ 1432 $('#deliveryPriceJS').val(parseInt($('#hiddenDeliveryPrice'+id).val())); 1433 SumFinalPrice(); 1434 } 1435 $(this).click(function(){ 1436 //alert(parseInt($('#hiddenDeliveryPrice'+id).val())); 1437 var obj = $(this); 1438 $('.delivery-list').find('.order-box-item').each(function(){ 1439 $(this).removeClass('checked'); 1440 }); 1441 1442 obj.parent().parent().parent().addClass('checked'); 1443 1444 1445 var id = $(this).attr('id').replace('delivery',''); 1446 $('#deliveryPriceJS').val(parseInt($('#hiddenDeliveryPrice'+id).val())); 1447 SumFinalPrice(); 1448 1449 1450 }); 1451 } 1452 }); 1453 });*/ 1454 1455 $('.delivery-list').find('.order-box-item label').each(function(){ 1456 $(this).click(function(){ 1457 1458 var id = $(this).parent().find('.checkbox input').attr('id'); 1459 1460 /*if ($(this).find('.checkbox input').is(':checked')){ 1461 $('#deliveryPriceJS').val(parseInt($('#hiddenDeliveryPrice'+id).val())); 1462 SumFinalPrice(); 1463 }*/ 1464 //$(this).click(function(){ 1465 //alert(parseInt($('#hiddenDeliveryPrice'+id).val())); 1466 var obj = $(this).parent(); 1467 $('.delivery-list').find('.order-box-item').each(function(){ 1468 $(this).removeClass('checked'); 1469 //$(this).find('.checkbox input').prop('checked',false); 1470 }); 1471 1472 obj.parent().addClass('checked'); 1473 1474 //$('#'+id).prop('checked'); 1475 1476 //$(this).find('.checkbox input').click(); 1477 1478 var id = $(this).parent().find('.checkbox input').attr('id').replace('delivery',''); 1479 $('#deliveryPriceJS').val(parseInt($('#hiddenDeliveryPrice'+id).val())); 1480 SumFinalPrice(); 1481 1482 1483 //}); 1484 }); 1485 }); 1486 1487 $('.payment-list').each(function(){ 1488 $(this).find('input').each(function(){ 1489 if ($(this).attr('type') == 'radio'){ 1490 var id = $(this).attr('id').replace('payment',''); 1491 if ($(this).is(':checked')){ 1492 //alert($('#hiddenPaymentPrice'+id).val()); 1493 $('#paymentPriceJS').val(parseInt($('#hiddenPaymentPrice'+id).val())); 1494 SumFinalPrice(); 1495 } 1496 $(this).click(function(){ 1497 var id = $(this).attr('id').replace('payment',''); 1498 $('#paymentPriceJS').val(parseInt($('#hiddenPaymentPrice'+id).val())); 1499 SumFinalPrice(); 1500 1501 var obj = $(this); 1502 $('.payment-list').find('.order-box-item').each(function(){ 1503 $(this).removeClass('checked'); 1504 }); 1505 1506 obj.parent().parent().parent().addClass('checked'); 1507 1508 }); 1509 } 1510 }); 1511 }); 1512 1513/* 1514 $('.delivery-list').each(function(){ 1515 $(this).find('input').each(function(){ 1516 if ($(this).attr('type') == 'radio'){ 1517 var id = $(this).attr('id').replace('delivery',''); 1518 if ($(this).is(':checked')){ 1519 // pripoctu dopravu k cene 1520 $('#finalPrice').html((parseInt($('#pricewithdph').val()) + parseInt($('#hiddenDeliveryPrice'+id).val())) + ' ' + $('#mena').val()); 1521 } 1522 //alert(id); 1523 $(this).click(function(){ 1524 var id = $(this).attr('id').replace('delivery',''); 1525 //alert(parseInt($('#hiddenDeliveryPrice'+id).val())); 1526 $('#finalPrice').html((parseInt($('#pricewithdph').val()) + parseInt($('#hiddenDeliveryPrice'+id).val())) + ' ' + $('#mena').val()); 1527 }); 1528 1529 } 1530 }); 1531 }); 1532*/ 1533 1534 // popis dostupnosti 1535 $('.dostupnostPopUp').each(function(){ 1536 $(this).hover( 1537 function () { 1538 $(this).parent().find('.dostupnostPopUpText').css('display','inline'); 1539 }, 1540 function () { 1541 $(this).parent().find('.dostupnostPopUpText').css('display','none'); 1542 } 1543 ); 1544 }) 1545 1546 1547 // hodnoceni 1548 $('#ratingform .hodnoceni .stars').mousemove(function(e){ 1549 var rating = $(this).offset(); 1550 var x = (e.pageX + 1) - rating.left;
1551 var ratingValue = (x); 1552 1553 if (ratingValue <= 20){ 1554 $posunuti = "-80px"; 1555 $('#hodnoceniValue').val('0'); 1556 $('#ratingform .values').html('0% Nepoužitelný'); 1557 }else if ((ratingValue <= 40)&&(ratingValue > 20)){ 1558 $posunuti = "-60px"; 1559 $('#hodnoceniValue').val('30'); 1560 $('#ratingform .values').html('30% Å patný'); 1561 }else if ((ratingValue <= 60)&&(ratingValue > 40)){ 1562 $posunuti = "-40px"; 1563 $('#hodnoceniValue').val('50'); 1564 $('#ratingform .values').html('50% PrůmÄrný'); 1565 }else if ((ratingValue <= 80)&&(ratingValue > 60)){ 1566 $posunuti = "-20px"; 1567 $('#hodnoceniValue').val('80'); 1568 $('#ratingform .values').html('80% Velmi dobrý'); 1569 }else if ((ratingValue <= 100)&&(ratingValue > 80)){ 1570 $posunuti = "-0px"; 1571 $('#hodnoceniValue').val('100'); 1572 $('#ratingform .values').html('100% PerfektnÃ'); 1573 } 1574 $('#ratingform .hodnoceni .stars').css('background-position',$posunuti + ' 0px'); 1575 1576 }); 1577 1578 $('#ratingform .hodnoceni .stars').click(function(){ 1579 $('#values').html($('#hodnoceniValue').val()); 1580 $('#ratingform').submit(); 1581 }); 1582 1583 1584 // hodnoceni v recenzi 1585 $('#recenze .hodnoceni .stars').mousemove(function(e){ 1586 var rating = $(this).offset(); 1587 var x = (e.pageX + 1) - rating.left; 1588 var ratingValue = (x); 1589 1590 if (ratingValue <= 20){ 1591 $posunuti = "-80px"; 1592 $('#hodnoceniRecenze').val('0'); 1593 $('#recenze .values').html('0% Nepoužitelný'); 1594 }else if ((ratingValue <= 40)&&(ratingValue > 20)){ 1595 $posunuti = "-60px"; 1596 $('#hodnoceniRecenze').val('30'); 1597 $('#recenze .values').html('30% Å patný'); 1598 }else if ((ratingValue <= 60)&&(ratingValue > 40)){ 1599 $posunuti = "-40px"; 1600 $('#hodnoceniRecenze').val('50'); 1601 $('#recenze .values').html('50% PrůmÄrný'); 1602 }else if ((ratingValue <= 80)&&(ratingValue > 60)){ 1603 $posunuti = "-20px"; 1604 $('#hodnoceniRecenze').val('80'); 1605 $('#recenze .values').html('80% Velmi dobrý'); 1606 }else if ((ratingValue <= 100)&&(ratingValue > 80)){ 1607 $posunuti = "-0px"; 1608 $('#hodnoceniRecenze').val('100'); 1609 $('#recenze .values').html('100% PerfektnÃ'); 1610 } 1611 $('#recenze .hodnoceni .stars').css('background-position',$posunuti + ' 0px'); 1612 1613 }); 1614 1615 1616 // silencer 1617 /*$('#words').keyup(function() { 1618 if ($(this).val().length >= 2){ 1619 $('#silencer').css('display','inline'); 1620 $('#silencer').html("<img src='/img/loader.gif' alt='' />"); 1621 //var sHtml = "<ul class='silencer'>"; 1622 $.get('/jquery/silencer.php?srch='+$(this).val(), function(data){ 1623 if (data > ''){ 1624 $('#silencer').html(data); 1625 }else{ 1626 $('#silencer').css('display','none'); 1627 } 1628 }); 1629 1630 } 1631 }); 1632 */ 1633 1634 /* 1635 * pridani focus a blur na pole hledani 1636 */ 1637 $("#words").focus(function () { 1638 if ($(this).val() == ''){ 1639 $(this).val(''); 1640 } 1641 }); 1642 $("#words").blur(function () { 1643 if ($(this).val() == ''){ 1644 $(this).val(''); 1645 } 1646 }); 1647 1648 1649 $('#deliveryCheck').click(function(){ 1650 if ($(this).is(':checked')){ 1651 $('.dodaci_adresa').show(); 1652 }else{ 1653 $('.dodaci_adresa').hide(); 1654 $('.dodaci_adresa').find('input').each(function(){ 1655 if (($(this).attr('type') == 'text')&&($(this).attr('id').indexOf('odaci_') > 0)){ 1656 $(this).val(''); 1657 } 1658 }); 1659 } 1660 1661 }); 1662 1663 1664}); 1665 1666jQuery(function($) { 1667 $(".swipebox").swipebox({ 1668 useCSS : true, // false will force the use of jQuery for animations 1669 hideBarsDelay : 3000 // 0 to always show caption and action bar 1670 }); 1671}); 1672 1673 1674$('html').click(function(e){ 1675 var thisClass = $(e.target).attr('id') 1676 //alert(thisClass) 1677 if( (thisClass == 'swipebox-close') || (thisClass == 'swipebox-prev') || (thisClass == 'swipebox-next') ){ 1678 }else{ 1679 $("#swipebox-close").click() 1680 } 1681}); 1682$('#contact_form').click(() => {ym(75001567, 'reachGoal', 'otpravka'); return true;}) // YANDEX FOR BUTTON 1683 1684/* 1685* kontrola formularu 1686*/ 1687function ControlForm(form){ 1688 var errorMessage = '';
1689 var errorMessageUdaje = ''; 1690 var errorMessageCaptcha = ''; 1691 var obj = $('#'+form); 1692 if (form == 'finalordform'){ 1693 //$('.dokoncit_nakup').html($('#preklad_button').val()); 1694 $('.dokoncit_nakup').attr('disabled',true); 1695 $('#basket').addClass('opacity'); 1696 } 1697/* 1698 var email = $('#form-email').val(); 1699 var zprava = $('#form-zprava').val(); 1700 var jmeno = $('#form-jmeno').val(); 1701 var prijmeni = $('#form-prijmeni').val(); 1702 var mesto = $('#form-mesto').val(); 1703*/ 1704 obj.find('input').each(function(){ 1705 1706 if ($(this).attr('data-validation') > ''){ 1707 var thisName = $(this).attr('name') 1708 if (($(this).attr('type') == 'text')||(($(this).attr('type') == 'password')&&($('#password_strength').length == 0))){ 1709 if ($(this).val() == ''){ 1710 if ($(this).attr('name').search('blabol') != -1){ 1711 if(!EmailControl($(this).val())){ 1712 errorMessage = errorMessage + '<p>' + $(this).attr('data-validation') + '</p>'; 1713 } 1714 }else{ 1715 if ((($(this).attr('id') == 'firma')||($(this).attr('id') == 'blabol')||($(this).attr('id') == 'jmeno')||($(this).attr('id') == 'prijmeni')||($(this).attr('id') == 'ulice')||($(this).attr('id') == 'mesto')||($(this).attr('id') == 'psc')||($(this).attr('id') == 'cp'))&&((!$('#fact').is(':checked')))){ 1716 //if (errorMessage == ''){ 1717 // errorMessage = '\FakturaÄnà adresa:\n' + $(this).attr('data-validation') + '\n'; 1718 //}else{ 1719 errorMessage = errorMessage + '<p>' + $(this).attr('data-validation') + '</p>'; 1720 //} 1721 }else if (($(this).attr('id') == 'slogin')||($(this).attr('id') == 'password_strength')){ 1722 //if (errorMessageUdaje == ''){ 1723 // errorMessageUdaje = '\nPÅihlaÅ¡ovacà údaje:\n' + $(this).attr('data-validation') + '\n'; 1724 //}else{ 1725 errorMessageUdaje = errorMessageUdaje + '<p>' + $(this).attr('data-validation') + '</p>'; 1726 //} 1727 }else if ($(this).attr('id') == 'telefon'){ 1728 1729 // 1730 //alert('a'); 1731 var telefon = $(this).val(); 1732 telefon = telefon.replace(/[^0-9]/g, ''); 1733 1734 if ((telefon.length != 9)&&(telefon.length != 12)) { 1735 errorMessage = errorMessage + '<p>' + $(this).attr('data-validation') + '</p>'; 1736 } 1737 1738 }else if (($(this).attr('id') == 'captchakod')){ 1739 //if (errorMessageCaptcha == ''){ 1740 // errorMessageCaptcha = '\nKontrolnà údaj:\n' + $(this).attr('data-validation') + '\n'; 1741 //}else{ 1742 errorMessage = errorMessage + '<p>' + $(this).attr('data-validation') + '</p>'; 1743 //} 1744 }else{/*else if (($(this).attr('id') != 'firma')&&($(this).attr('id') != 'email')&&($(this).attr('id') != 'telefon')&&($(this).attr('id') != 'jmeno')&&($(this).attr('id') != 'prijmeni')&&($(this).attr('id') != 'ulice')&&($(this).attr('id') != 'mesto')&&($(this).attr('id') != 'psc')&&($(this).attr('id') != 'cp')){*/ 1745 errorMessage = errorMessage + '<p>' + $(this).attr('data-validation') + '</p>'; 1746 } 1747 } 1748 }else if (($(this).attr('id') == 'psc')||($(this).attr('id') == 'dodaci_psc')){ 1749 1750 1751 1752 1753 }else if ( ($(this).attr('id') == 'blabol') && ( $('body .login_form').length ) ){ 1754 if($(this).hasClass('check_email') && $(this).hasClass('emailFalse')) { 1755 errorMessage = errorMessage + '<p>' + $('#blabol_language').val() + '</p>'; 1756 } 1757 1758 1759 }else if ($(this).attr('id') == 'telefon'){ 1760 // 1761 //alert('a'); 1762 var telefon = $(this).val(); 1763 telefon = telefon.replace(/[^0-9]/g, ''); 1764 if ((telefon.length != 9)&&(telefon.length != 12)) { 1765 errorMessage = errorMessage + '<p>' + $('#telefon_language').val() + '</p>'; 1766 } 1767 1768 }else if ($(this).attr('id') == 'blabol'){ 1769 //alert('b') 1770 if(!EmailControl($(this).val())){ 1771 errorMessage = errorMessage + '<p>' + $('#blabol_language').val() + '</p>'; 1772 } 1773 }else if ($(this).attr('name').search('blabol') != -1){ 1774 //alert('b') 1775 if(!EmailControl($(this).val())){ 1776 errorMessage = errorMessage + '<p>' + $('#blabol_language').val() + '</p>'; 1777 } 1778 } 1779 } 1780 }else{ 1781 1782 if ($(this).attr('id') == 'telefon'){ 1783 // 1784 //alert('a'); 1785 if ($(this).val() != ''){ 1786 var telefon = $(this).val(); 1787 telefon = telefon.replace(/[^0-9]/g, ''); 1788 if ((telefon.length != 9)&&(telefon.length != 12)) { 1789 errorMessage = errorMessage + '<p>' + $('#telefon_language').val() + '</p>'; 1790 } 1791 } 1792 }else if ($(this).attr('id') == 'blabol'){ 1793 //alert('b') 1794 if(!EmailControl($(this).val())){ 1795 errorMessage = errorMessage + '<p>' + $('#blabol_language').val() + '</p>'; 1796 } 1797 /*}else if ($(this).attr('id').search('blabol') != -1){ 1798 //alert('b') 1799 if(!EmailControl($(this).val())){ 1800 errorMessage = errorMessage + '<p>' + 'Email nemá správný formát</p>'; 1801 } */ 1802 } 1803 1804 } 1805 }); 1806 1807 if( ($('#password_strength').length) && ( $('#password_strength').attr('data-validation') > '') ) { 1808 1809 if(obj.find('#password_strength').val().length == 0) { 1810 errorMessage = errorMessage + '<p>' + $("#password_strength").attr('data-validation') + '!</p>'; 1811 } 1812 1813 if($('#repassword').length) { 1814 if( (obj.find('#repassword').val().length == 0) ) { 1815 errorMessage = errorMessage + '<p>' + $("#repassword").attr('data-validation') + '!</p>'; 1816 } 1817 } 1818 1819 if(obj.find('#password_strength').val().length < 8) { 1820 errorMessage = errorMessage + '<p>' + $('#delka_hesla_language').val() + '!</p>'; 1821 } 1822 1823 re = /[0-9]/; 1824 if(!re.test(obj.find('#password_strength').val())) { 1825 errorMessage = errorMessage + '<p>' + $('#cisla_hesla_language').val() + '!</p>'; 1826 } 1827 1828 re = /[a-z]/; 1829 if(!re.test(obj.find('#password_strength').val())) { 1830 errorMessage = errorMessage + '<p> ' + $('#male_pismeno_hesla_language').val() + '!</p>'; 1831 } 1832 re = /[A-Z]/; 1833 if(!re.test(obj.find('#password_strength').val())) { 1834 errorMessage = errorMessage + '<p>' + $('#velke_pismeno_hesla_language').val() + '!</p>'; 1835 } 1836 /*re = /[!#$%&?]/; 1837 if(!re.test(obj.find('#password_strength').val())) { 1838 errorMessage = errorMessage + '<p>' + $('#znaky_hesla_language').val() + '!</p>'; 1839 }*/ 1840 if ((obj.find('#password_strength').val() > '')&&(obj.find('#repassword').val() > '')&&(obj.find('#repassword').val() != undefined)&&(obj.find('#password_strength').val() != undefined)){ 1841 if (obj.find('#password_strength').val() != obj.find('#repassword').val()){ 1842 errorMessage = errorMessage + '<p>' + $('#kontrola_hesla_language').val() + '</p>'; 1843 1844 } 1845 } 1846 } 1847 1848 obj.find('select').each(function(){ 1849 //alert('test') 1850 if ($(this).attr('data-validation') > ''){ 1851 if( $(this).val() == '' ){ 1852 errorMessage = errorMessage + '<p>' + $(this).attr('data-validation') + '</p>'; 1853 } 1854 } 1855 }); 1856 1857 1858 if (obj.find('#ulice').val() > ''){ 1859 var ulice = obj.find('#ulice').val(); 1860 //if(!$('#ulice').val().match(/[0-9]$/)) { 1861 if ((ulice.indexOf('1') >= 0)||(ulice.indexOf('1') >= 0)||(ulice.indexOf('2') >= 0)||(ulice.indexOf('3') >= 0)||(ulice.indexOf('4') >= 0)||(ulice.indexOf('5') >= 0)||(ulice.indexOf('6') >= 0)||(ulice.indexOf('7') >= 0)||(ulice.indexOf('8') >= 0)||(ulice.indexOf('9') >= 0)){ 1862 }else{ 1863 errorMessage = errorMessage + '<p>' + $('#ulice_language').val() + '</p>'; 1864 } 1865 } 1866 1867 if (obj.find('#dodaci_ulice').val() > ''){ 1868 var ulice = obj.find('#dodaci_ulice ').val(); 1869 //if(!$('#ulice').val().match(/[0-9]$/)) { 1870 if ((ulice.indexOf('1') >= 0)||(ulice.indexOf('1') >= 0)||(ulice.indexOf('2') >= 0)||(ulice.indexOf('3') >= 0)||(ulice.indexOf('4') >= 0)||(ulice.indexOf('5') >= 0)||(ulice.indexOf('6') >= 0)||(ulice.indexOf('7') >= 0)||(ulice.indexOf('8') >= 0)||(ulice.indexOf('9') >= 0)){ 1871 }else{ 1872 errorMessage = errorMessage + '<p>' + $('#ulice_dodaci_language').val() + '</p>'; 1873 } 1874 } 1875 1876 if (obj.find('#psc').val() > ''){ 1877 var psc = $('#psc').val(); 1878 psc = psc.replace(' ',''); 1879 //if(!$('#ulice').val().match(/[0-9]$/)) { 1880 if (psc.length == 5){ 1881 }else{ 1882 errorMessage = errorMessage + '<p>' + $('#psc_language').val() + '</p>'; 1883 } 1884 } 1885 1886 if (obj.find('#dodaci_psc').val() > ''){ 1887 var psc = obj.find('#dodaci_psc').val(); 1888 psc = psc.replace(' ',''); 1889 //if(!$('#ulice').val().match(/[0-9]$/)) { 1890 if (psc.length == 5){ 1891 }else{ 1892 errorMessage = errorMessage + '<p>' + $('#psc_dodaci_language').val() + '</p>'; 1893 } 1894 } 1895 1896 1897 errorMessageDod = ""; 1898 if (obj.find('#deliveryCheck').is(':checked')){ 1899 1900 $('#'+form).find('input').each(function(){ 1901 if ($(this).attr('man') > ''){ 1902 if (($(this).attr('type') == 'text')&&($(this).attr('id').indexOf('odaci_') > 0)){ 1903 if ($(this).val() == ''){ 1904 //if (errorMessageDod == ''){ 1905 // errorMessageDod = '\n\FakturaÄnà údaje:\n' + $(this).attr('man') + '\n'; 1906 //}else{ 1907 errorMessageDod = errorMessageDod + '<p>' + $(this).attr('man') + '</p>'; 1908 //} 1909 } 1910 } 1911 } 1912 }); 1913 1914 } 1915 1916
1917 $('#'+form).find('textarea').each(function(){ 1918 if ($(this).attr('data-validation') > ''){ 1919 if ($(this).val() == ''){ 1920 errorMessage = errorMessage + '<p>' + $(this).attr('data-validation') + '</p>'; 1921 } 1922 } 1923 }); 1924 1925 $('#'+form).find('input[type="checkbox"]').each(function(){ 1926 if ($(this).attr('data-validation') > ''){ 1927 if (!$(this).is(':checked')){ 1928 errorMessage = errorMessage + '<p>' + $(this).attr('data-validation') + '</p>'; 1929 } 1930 } 1931 }); 1932 1933 $('#'+form).find('input[type="file"]').each(function(){ 1934 if ($(this).attr('data-validation') > ''){ 1935 if ($(this).val() == ''){ 1936 errorMessage = errorMessage + '<p>' + $(this).attr('data-validation') + '</p>'; 1937 } 1938 } 1939 }); 1940 1941 /*if ((errorMessage > '')||(errorMessageDod > '')||(errorMessageCaptcha > '')||(errorMessageUdaje > '')){ 1942 //errorMessage = "<h1>Chyba!</h1><p>MusÃte vyplnit vÅ¡echny povinné pole.<br />ChybnÄ vyplnÄné pole jsou: </p><div class='messages'>" + errorMessage + errorMessageUdaje + errorMessageDod + errorMessageCaptcha +"</div>"; 1943 //PopupMessages(errorMessage,300,200,'errorMessages'); 1944 showControlPopup(errorMessage+errorMessageDod+errorMessageUdaje); 1945 if (form == 'finalordform'){ 1946 //$('.dokoncit_nakup').html($('#preklad_button').val()); 1947 $('.dokoncit_nakup').removeAttr('disabled'); 1948 $('#basket').removeClass('opacity'); 1949 } 1950 //alert(errorMessage+errorMessageDod+errorMessageUdaje); 1951 return false; 1952 }else{ 1953 return true; 1954 } 1955 return false;*/ 1956 if ((errorMessage > '') || (errorMessageDod > '') || (errorMessageCaptcha > '') || (errorMessageUdaje > '')) { 1957 //errorMessage = "<h1>Chyba!</h1><p>MusÃte vyplnit vÅ¡echny povinné pole.<br />ChybnÄ vyplnÄné pole jsou: </p><div class='messages'>" + errorMessage + errorMessageUdaje + errorMessageDod + errorMessageCaptcha +"</div>"; 1958 //PopupMessages(errorMessage,300,200,'errorMessages'); 1959 showControlPopup(errorMessage + errorMessageDod + errorMessageUdaje, form); 1960 //alert(errorMessage+errorMessageDod+errorMessageUdaje); 1961 return false; 1962 } else { 1963 if ($('#' + form).find('.myCaptcha').val() != undefined) { 1964 if (allowSubmit){ 1965 return true; 1966 }else { 1967 if ($('#' + form).find('.g-recaptcha-response').val() > '') { 1968 allowSubmit = true; 1969 $('#' + form).submit(); 1970 } else { 1971 var thisreCaptchaID = $('#' + form).find('.myCaptcha').attr('data-widget-id') 1972 event.preventDefault(); 1973 grecaptcha.execute(thisreCaptchaID); 1974 setTimeout(function(){ 1975 if (grecaptcha.getResponse() > '') { 1976 allowSubmit = true; 1977 $('#' + form).submit(); 1978 } 1979 },300); 1980 } 1981 } 1982 }else { 1983 return true; 1984 } 1985 } 1986 return false; 1987 1988} 1989 1990function ControlLoginForm(form){ 1991 var errorMessage = ''; 1992 var errorMessageUdaje = ''; 1993 var errorMessageCaptcha = ''; 1994 $('#'+form).find('input').each(function(){ 1995 if ($(this).attr('man') > ''){ 1996 1997 if (($(this).attr('type') == 'text')||($(this).attr('type') == 'password')){ 1998 1999 if ($(this).val() == ''){ 2000 //alert($(this).attr('id')); 2001 if (($(this).attr('id') == 'logininputOrder')||($(this).attr('id') == 'passwordinputOrder')){ 2002 if (errorMessageUdaje == ''){ 2003 errorMessageUdaje = '<br /><strong>PÅihlaÅ¡ovacà údaje:</strong><br />' + $(this).attr('man') + '</p>'; 2004 }else{ 2005 errorMessageUdaje = errorMessageUdaje + '<p>' + $(this).attr('man') + '</p>'; 2006 } 2007 } 2008 } 2009 } 2010 } 2011 }); 2012 if (errorMessageUdaje > ''){ 2013 errorMessageUdaje = "<h1>Chyba!</h1><p>MusÃte vyplnit vÅ¡echny povinné pole.<br />ChybnÄ vyplnÄné pole jsou: </p><div class='messages'>" + errorMessageUdaje + "</div>"; 2014 PopupMessages(errorMessageUdaje,300,100,'errorMessages'); 2015 return false;
2016 }else{ 2017 return true; 2018 } 2019} 2020 2021 2022 2023function ControlLoginForm(form){ 2024 var errorMessage = ''; 2025 var errorMessageUdaje = ''; 2026 var errorMessageCaptcha = ''; 2027 $('#'+form).find('input').each(function(){ 2028 if ($(this).attr('man') > ''){ 2029 2030 if (($(this).attr('type') == 'text')||($(this).attr('type') == 'password')){ 2031 2032 if ($(this).val() == ''){ 2033 //alert($(this).attr('id')); 2034 if (($(this).attr('id') == 'logininputOrder')||($(this).attr('id') == 'passwordinputOrder')){ 2035 if (errorMessageUdaje == ''){ 2036 errorMessageUdaje = '<br /><strong>PÅihlaÅ¡ovacà údaje:</strong><br />' + $(this).attr('man') + '</p>'; 2037 }else{ 2038 errorMessageUdaje = errorMessageUdaje + '<p>' + $(this).attr('man') + '</p>'; 2039 } 2040 } 2041 } 2042 } 2043 } 2044 }); 2045 if (errorMessageUdaje > ''){ 2046 errorMessageUdaje = "<h1>Chyba!</h1><p>MusÃte vyplnit vÅ¡echny povinné pole.<br />ChybnÄ vyplnÄné pole jsou: </p><div class='messages'>" + errorMessageUdaje + "</div>"; 2047 PopupMessages(errorMessageUdaje,300,100,'errorMessages'); 2048 return false; 2049 }else{ 2050 return true; 2051 } 2052} 2053 2054function EmailControl(f){ 2055 if ((f=='' || 2056 f=='[email protected]') || 2057 f.indexOf('..') != -1 || 2058 f.indexOf('.@') != -1 || 2059 f.indexOf('@.') != -1 || 2060 ( 2061 f.indexOf('@') < 1 || 2062 f.indexOf('@') != f.lastIndexOf('@') || 2063 f.lastIndexOf('.') < f.lastIndexOf('@')+2 || 2064 f.lastIndexOf('.') > (f.length-3) || 2065 f.lastIndexOf('.') < (f.length-5) 2066 ) 2067 ){ 2068 return false; 2069 } 2070 if ((f.indexOf('Å') > -1) || (f.indexOf('Ä') > -1) || (f.indexOf('Å¡') > -1) || (f.indexOf('Ä') > -1) || (f.indexOf('ž') > -1) || (f.indexOf('ý') > -1) || (f.indexOf('á') > -1) || (f.indexOf('Ã') > -1) || (f.indexOf('é') > -1) || (f.indexOf('ů') > -1) || (f.indexOf('ú') > -1)){ 2071 return false; 2072 } 2073 return true; 2074} 2075 2076function DelCountBasket(ID){ 2077 document[ID].count.value = 0; 2078 document[ID].submit(); 2079} 2080 2081function printDetail(url){ 2082 window.open(url); 2083 //alert(url); 2084} 2085 2086function ControlNumber(){ 2087 if ((event.keyCode <48) || (event.keyCode >57)) event.returnValue = false; 2088} 2089 2090function OpenWindow(sUrl,sParam){ 2091 window.open(sUrl,"_blank",sParam); 2092} 2093 2094 2095/* 2096* lightbox 2097*/ 2098 2099function checkDeliveryPayment() { 2100 2101 var mam_delivery = false; 2102 2103 $(".deliveryRadio").each(function() { 2104 if($(this).is(":checked")) { 2105 mam_delivery = true; 2106 } 2107 }); 2108 2109 var mam_payment = false; 2110 $(".paymentRadio").each(function() { 2111 if($(this).is(":checked")) { 2112 mam_payment = true; 2113 } 2114 }); 2115 2116 if(mam_delivery == true && mam_payment == true) { 2117 $('#delivery').submit(); 2118 } else { 2119 showControlPopup($("#delivery_payment_control").val()); 2120 } 2121 2122 return false; 2123 2124} 2125 2126function PopUpBox(obj,sUrl,nWidth,nHeight,sClass){ 2127 obj.click(function(){ 2128 var screens = ""; 2129 2130 var viewportwidth; 2131 var viewportheight; 2132 2133 2134 if (typeof window.innerWidth != 'undefined'){ 2135 viewportwidth = window.innerWidth, 2136 viewportheight = window.innerHeight 2137 }else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0){ 2138 viewportwidth = document.documentElement.clientWidth, 2139 viewportheight = document.documentElement.clientHeight 2140 }else{ 2141 viewportwidth = document.getElementsByTagName('body')[0].clientWidth, 2142 viewportheight = document.getElementsByTagName('body')[0].clientHeight 2143 } 2144 2145 var height = viewportheight; 2146 var width = viewportwidth; 2147 2148 var scrolledX = document.body.scrollLeft || document.documentElement.scrollLeft || self.pageXOffset || 0; 2149 var scrolledY = document.body.scrollTop || document.documentElement.scrollTop || self.pageYOffset || 0; 2150 var screenWidth = document.body.clientWidth || document.documentElement.clientWidth || self.innerWidth; 2151 //var screenWidth = width; 2152 var screenHeight = document.body.clientHeight || document.documentElement.clientHeight || self.innerHe
2152ight; 2153 //var screenHeight = height; 2154 2155 2156 2157 // get the size information on the modal div 2158 var divHeight = nHeight; 2159 var divWidth = nWidth; 2160 2161 var left = scrolledX + (screenWidth - nWidth)/2; 2162 var top = scrolledY + (height - nHeight)/2; 2163 2164 2165 2166 // prekryti cernou barvou 2167 $("<div class='overlay' style='filter: alpha(opacity=75); ZOOM: 1; height: "+document.body.scrollHeight+"px;'></div>").appendTo('body'); 2168 htmlData = ""; 2169 //$.get(sUrl, function(data){ 2170 // htmlData = data; 2171 2172 // vytvoreni boxu pro formular 2173 sHtml = "<div class='"+sClass+"' style='width: "+nWidth+"px; display: block; top: "+top+"px; left: "+left+"px; height:"+nHeight+"px;'>"+ 2174 " <div class='content'>"+ 2175 " <img src='/img/close.png' alt='' id='close-form' />"+ 2176 " <iframe class='"+sClass+"' src='"+sUrl+"' frameborder='0' style='width: "+nWidth+"px;height:"+(nHeight)+"px;'></iframe>"+ 2177 " </div>"+ 2178 "</div>"; 2179 2180 2181 // priradim html k telu stranky 2182 //$('html, body').animate({scrollTop:0}, 'slow'); 2183 $(sHtml).appendTo('body'); 2184 2185 // akce pro tlacitko zavrit 2186 $('#close-form,#ok-form').click(function(){ 2187 $('.'+sClass).remove(); 2188 $('.overlay').remove(); 2189 }); 2190 $('.overlay').click(function(){ 2191 $('.'+sClass).remove(); 2192 $('.overlay').remove(); 2193 }); 2194 2195 //}); 2196 2197 2198 return false; 2199 }); 2200} 2201 2202function hideDialog(){ 2203 $('#addbuy').hide('slow'); 2204} 2205function SumFinalPrice(){ 2206 //alert($('#deliveryPriceJS').val()); 2207 $('#finalPrice').html((parseInt($('#pricewithdph').val()) + parseInt($('#deliveryPriceJS').val()) + parseInt($('#paymentPriceJS').val()) ) + ' ' + $('#mena').val()); 2208} 2209 2210function mycarousel_initCallback(carousel) 2211{ 2212 // Disable autoscrolling if the user clicks the prev or next button. 2213 carousel.buttonNext.bind('click', function() { 2214 //carousel.startAuto(0); 2215 carousel.startAuto(); 2216 }); 2217 2218 carousel.buttonNext.hover(function() { 2219 carousel.stopAuto(); 2220 }, function() { 2221 carousel.startAuto(); 2222 }); 2223 2224 carousel.buttonPrev.bind('click', function() { 2225 //carousel.startAuto(0); 2226 carousel.startAuto(); 2227 }); 2228 2229 carousel.buttonPrev.hover(function() { 2230 carousel.stopAuto(); 2231 }, function() { 2232 carousel.startAuto(); 2233 }); 2234 2235 2236 // Pause autoscrolling if the user moves with the cursor over the clip. 2237 carousel.clip.hover(function() { 2238 carousel.stopAuto(); 2239 }, function() { 2240 carousel.startAuto(); 2241 }); 2242}; 2243 2244function PopupMessages(text,nWidth,nHeight,sClass){ 2245 var screens = ""; 2246 2247var viewportwidth; 2248 var viewportheight; 2249 2250 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight 2251 2252 if (typeof window.innerWidth != 'undefined'){ 2253 viewportwidth = window.innerWidth, 2254 viewportheight = window.innerHeight 2255 }else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0){ 2256 viewportwidth = document.documentElement.clientWidth, 2257 viewportheight = document.documentElement.clientHeight 2258 }else{ 2259 viewportwidth = document.getElementsByTagName('body')[0].clientWidth, 2260 viewportheight = document.getElementsByTagName('body')[0].clientHeight 2261 } 2262 2263 var height = viewportheight; 2264 var width = viewportwidth; 2265 2266 var scrolledX = document.body.scrollLeft || document.documentElement.scrollLeft || self.pageXOffset || 0; 2267 var scrolledY = document.body.scrollTop || document.documentElement.scrollTop || self.pageYOffset || 0; 2268 var screenWidth = document.body.clientWidth || document.documentElement.clientWidth || self.innerWidth; 2269 //var screenWidth = width; 2270 var screenHeight = document.body.clientHeight || document.documentElement.clientHeight || self.innerHeight; 2271 //var screenHeight = height; 2272 2273 2274 2275 // get the size information on the modal div 2276 var divHeight = nHeight; 2277 var divWidth = nWidth; 2278 2279 var left = scrolledX + (screenWidth - nWidth)/2; 2280 var top = scrolledY + (height - nHeight)/2; 2281 //$('#modal').css('top', top); $('#modal').css('left', left); 2282 // prekryti cernou barvou 2283 $("<div class='overlay' style='filter: alpha(opacity=75); ZOOM: 1; height: "+document.body.scrollHeight+"px;'></div>").appendTo('body'); 2284 htmlData = text; 2285 2286 // vytvoreni boxu pro formular 2287 sHtml = "<div class='"+sClass+"' style='width: "+divWidth+"px; display: block; top: "+top+"px; left: "+left+"px; min-height:"+divHeight+"px;'>"+ 2288 " <div class='content'>"+ 2289 " <img src='/img/close.png' id='close-form' alt='' />"+ 2290 " "+htmlData+ ""+ 2291 " <div class='align-center'><img src='/img/ok.png' id='ok-form' alt='' border='0'/></div>"+ 2292 " </div>"+ 2293 "</div>"; 2294 2295 2296 // priradim html k telu stranky 2297 //$('html, body').animate({scrollTop:0}, 'slow'); 2298 $(sHtml).appendTo('body'); 2299 2300 // akce pro tlacitko zavrit 2301 $('#close-form,#ok-form').click(function(){ 2302 $('.'+sClass).remove(); 2303 $('.overlay').remove(); 2304 }); 2305 $('.overlay').click(function(){ 2306 $('.'+sClass).remove(); 2307 $('.overlay').remove(); 2308 }); 2309 return false;
2310} 2311 2312$.fn.getNodeName = function() { 2313 // returns the nodeName of the first matched element, or "" 2314 return this[0] ? this[0].nodeName : ""; 2315}; 2316 2317 2318$( window ).resize(function() { 2319 //resize(); 2320}); 2321 2322$(window).load(function(){ 2323 2324 2325 $('.reg_form .box.long p.anotation .checker').click(function(){ 2326 if( $(this).parents('p.anotation').hasClass('active') ){ 2327 $(this).parents('p.anotation').removeClass('active') 2328 //$('.reg_form').find('.heslo_zaznam').css({'opacity' : 0}); 2329 if ( $(window).width() < 768 ){ 2330 $('.reg_form').find('.heslo_zaznam').css({'display' : 'none'}); 2331 }else{ 2332 $('.reg_form').find('.heslo_zaznam').css({'display' : 'none'}); 2333 } 2334 $('.reg_form').find('.heslo_zaznam input').attr('value', '').removeAttr('data-validation').attr('readonly', 'readonly'); 2335 2336 $('.reg_form').find('.heslo_zaznam.repass input').attr('value', '').removeAttr('data-validation').attr('readonly', 'readonly'); 2337 2338 }else{ 2339 var passText = $('#heslo_language').val(); 2340 var repassText = $('#reheslo_language').val(); 2341 $(this).parents('p.anotation').addClass('active') 2342 $('.reg_form').find('.heslo_zaznam').css({'opacity' : 1}); 2343 if ( $(window).width() < 768 ){ 2344 $('.reg_form').find('.heslo_zaznam').css({'display' : 'block'}); 2345 }else{ 2346 $('.reg_form').find('.heslo_zaznam').css({'display' : 'table-cell'}); 2347 } 2348 $('.reg_form').find('.heslo_zaznam input').attr('data-validation', passText).removeAttr('readonly') 2349 2350 $('.reg_form').find('.heslo_zaznam.repass input').attr('data-validation', repassText).removeAttr('readonly') 2351 2352 } 2353 }); 2354}); 2355 2356 2357 2358 2359 2360function resize(){ 2361 var theWindow = $('.section.left'), 2362 $bg = $("#bg"), 2363 aspectRatio = $bg.width() / $bg.height(); 2364 2365 function resizeBg() { 2366 2367 if ( (theWindow.width() / theWindow.height()) < aspectRatio ) { 2368 $bg 2369 .removeClass() 2370 .addClass('bgheight'); 2371 } else { 2372 $bg 2373 .removeClass() 2374 .addClass('bgwidth'); 2375 } 2376 } 2377 theWindow.resize(resizeBg).trigger("resize"); 2378 2379 $('aside').height($(document).height()+'px'); 2380 $('nav').height($(document).height()-36+'px'); 2381 $('.content').height($(document).height()-30+'px'); 2382 2383 resizeContent(); 2384 2385 /*if (($(document).width() > 1280)&&($(document).width() <= 1920)){ 2386 $('section.content').width($(document).width() - 230 - 370); 2387 }else if (($(document).width() > 1024)&&($(document).width() <= 1280)){ 2388 $('section.content').width($(document).width() - 230 - 310); 2389 }else if (($(document).width() <= 1024)){ 2390 $('section.content').width($(document).width() - 230); 2391 }else{ 2392 $('section.content').width($(document).width() - 230 - 620); 2393 }*/ 2394 2395} 2396 2397/* 2398if( $('#MyGmapsFooter').length ){ 2399 google.maps.event.addDomListener(window, 'load', init); 2400 function init() { 2401 var mapOptions = { 2402 zoom: 11, 2403 scrollwheel: false, 2404 styles: [ 2405 { 2406 "featureType": "water", 2407 "elementType": "geometry", 2408 "stylers": [ 2409 { 2410 "color": "#e9e9e9" 2411 }, 2412 { 2413 "lightness": 17 2414 } 2415 ] 2416 }, 2417 { 2418 "featureType": "landscape", 2419 "elementType": "geometry", 2420 "stylers": [ 2421 { 2422 "color": "#f5f5f5" 2423 }, 2424 { 2425 "lightness": 20 2426 } 2427 ] 2428 }, 2429 { 2430 "featureType": "road.highway", 2431 "elementType": "geometry.fill", 2432 "stylers": [ 2433 { 2434 "color": "#ffffff" 2435 }, 2436 { 2437 "lightness": 17 2438 } 2439 ] 2440 }, 2441 { 2442 "featureType": "road.highway", 2443 "elementType": "geometry.stroke", 2444 "stylers": [ 2445 { 2446 "color": "#ffffff" 2447 }, 2448 { 2449 "lightness": 29 2450 }, 2451 { 2452 "weight": 0.2 2453 } 2454 ] 2455 }, 2456 { 2457 "featureType": "road.arterial", 2458 "elementType": "geometry", 2459 "stylers": [ 2460 { 2461 "color": "#ffffff" 2462 }, 2463 { 2464 "lightness": 18 2465 } 2466 ] 2467 }, 2468 { 2469 "featureType": "road.local", 2470 "elementType": "geometry", 2471 "stylers": [ 2472 { 2473 "color": "#ffffff" 2474 }, 2475 { 2476 "lightness": 16 2477 } 2478 ] 2479 }, 2480 { 2481 "featureType": "poi", 2482 "elementType": "geometry", 2483 "stylers": [ 2484 { 2485 "color": "#f5f5f5" 2486 }, 2487 { 2488 "lightness": 21 2489 } 2490 ] 2491 }, 2492 { 2493 "featureType": "poi.park", 2494 "elementType": "geometry", 2495 "stylers": [ 2496 { 2497 "color": "#dedede" 2498 }, 2499 { 2500 "lightness": 21 2501 } 2502 ] 2503 }, 2504 { 2505 "elementType": "labels.text.stroke", 2506 "stylers": [ 2507 { 2508 "visibility": "on" 2509 }, 2510 { 2511 "color": "#ffffff" 2512 }, 2513 { 2514 "lightness": 16 2515 } 2516 ] 2517 }, 2518 { 2519 "elementType": "labels.text.fill", 2520 "stylers": [ 2521 { 2522 "saturation": 36 2523 }, 2524 { 2525 "color": "#333333" 2526 }, 2527 { 2528 "lightness": 40 2529 } 2530 ] 2531 }, 2532 { 2533 "elementType": "labels.icon", 2534 "stylers": [ 2535 { 2536 "visibility": "off" 2537 } 2538 ] 2539 }, 2540 { 2541 "featureType": "transit", 2542 "elementType": "geometry", 2543 "stylers": [ 2544 { 2545 "color": "#f2f2f2" 2546 }, 2547 { 2548 "lightness": 19 2549 } 2550 ] 2551 }, 2552 { 2553 "featureType": "administrative", 2554 "elementType": "geometry.fill", 2555 "stylers": [ 2556 { 2557 "color": "#fefefe" 2558 }, 2559 { 2560 "lightness": 20 2561 } 2562 ] 2563 }, 2564 { 2565 "featureType": "administrative", 2566 "elementType": "geometry.stroke", 2567 "stylers": [ 2568 { 2569 "color": "#fefefe" 2570 }, 2571 { 2572 "lightness": 17 2573 }, 2574 { 2575 "weight": 1.2 2576 } 2577 ] 2578 } 2579], 2580 center: new google.maps.LatLng(54.5103777,30.3939378) 2581 }; 2582 2583 var mapElement = document.getElementById('MyGmapsFooter'); 2584 var map = new google.maps.Map(mapElement, mapOptions); 2585 var marker = new google.maps.Marker({ 2586 2587 position: new google.maps.LatLng(54.5103777,30.3939378), 2588 map: map, 2589 icon:'/img/map_pointer.png' 2590 2591 }) 2592} 2593} */ 2594 2595function initialize() { 2596 // GPS pozice prvniho nahledu + zoom 2597 var center = new google.maps.LatLng(49.926955,17.925546); 2598 var options = { 'zoom': 8, 'center': center, mapTypeId: google.maps.MapTypeId.ROADMAP}; 2599 2600 var map = new google.maps.Map(document.getElementById("map_canvas"), options); 2601 var markers = []; 2602 // vypsani jednotlivych pozic na mape 2603 var latLng = new google.maps.LatLng(49.930008,17.914857); 2604 2605 var marker = new google.maps.Marker({'position': latLng, icon:'/img/corratec-bod.png'}); 2606 markers.push(marker); 2607 2608 2609 var markerCluster = new MarkerClusterer(map, markers); 2610} 2611function initialize2() { 2612 // GPS pozice prvniho nahledu + zoom 2613 var center = new google.maps.LatLng(49.926955,17.925546); 2614 var options = { 'zoom': 12, 'center': center, mapTypeId: google.maps.MapTypeId.ROADMAP}; 2615 2616 var map = new google.maps.Map(document.getElementById("map_canvas_1"), options); 2617 var markers = []; 2618 // vypsani jednotlivych pozic na mape 2619 var latLng = new google.maps.LatLng(49.930008,17.914857); 2620 2621 var marker = new google.maps.Marker({'position': latLng, icon:'/img/corratec-bod.png'}); 2622 markers.push(marker); 2623 2624 2625 var markerCluster = new MarkerClusterer(map, markers); 2626} 2627function initialize3() { 2628 // GPS pozice prvniho nahledu + zoom 2629 var center = new google.maps.LatLng(49.926955,17.925546); 2630 var options = { 'zoom': 12, 'center': center, mapTypeId: google.maps.MapTypeId.ROADMAP}; 2631 2632 var map = new google.maps.Map(document.getElementById("map_canvas_2"), options); 2633 var markers = []; 2634 // vypsani jednotlivych pozic na mape 2635 var latLng = new google.maps.LatLng(49.930008,17.914857); 2636 2637 var marker = new google.maps.Marker({'position': latLng, icon:'/img/corratec-bod.png'}); 2638 markers.push(marker); 2639 2640 2641 var markerCluster = new MarkerClusterer(map, markers); 2642} 2643 2644 2645 $(window).scroll(function() { 2646 if ($(document).height() > $(window).height()){ 2647 $('#nahoru').css('display','block'); 2648 }else{ 2649 $('#nahoru').css('display','none'); 2650 } 2651 }); 2652 2653 2654function Suma(){ 2655 var cena = (parseFloat($('#delivery').val()*1.21) + parseFloat($('#payment').val()*1.21) + parseFloat($('#suma').val())); 2656 $('#celkova_cena').html(humanizeNumber(precise_round(cena,0))+' '+$('#mena').val()); 2657} 2658 2659function humanizeNumber(n) { 2660 n = n.toString() 2661 while (true) { 2662 var n2 = n.replace(/(\d)(\d{3})($|,|\.)/g, '$1 $2$3') 2663 if (n == n2) break 2664 n = n2 2665 } 2666 return n 2667} 2668 2669 2670function showControlPopup(text){ 2671 $('.control_popup .text').html(text); 2672 $('.control_popup').css({'display' : 'table'}); 2673 setTimeout(function () { 2674 $('.control_popup').css({'opacity' : 1}); 2675 },10) 2676 2677} 2678 2679function showBuyPopup(text){ 2680 $('.buy_popup').css({'display' : 'table'}); 2681 setTimeout(function () { 2682 $('.buy_popup').css({'opacity' : 1}); 2683 },10) 2684 2685} 2686function showGiftPopup(text){ 2687 $('.gift_popup').css({'display' : 'table'}); 2688 setTimeout(function () { 2689 $('.gift_popup').css({'opacity' : 1}); 2690 },10) 2691 2692} 2693 2694function reloadImg(){ 2695 $('.img_hide.bg').each(function(){ 2696 var thisSrc = $(this).attr('src') 2697 $(this).parent().attr('style','background-image: url('+thisSrc+')'); 2698 }); 2699 2700 $( ".product_list .item" ).hover(function() { 2701 $(this).find('.flipper').addClass( "flipped" ); 2702 }, function() { 2703 $(this).find('.flipper').removeClass( "flipped" ); 2704 }); 2705} 2706function hidePPL(){ 2707 $('.ppl_popup .box .list ul li a').click(function(){ 2708 $(this).parents('ul').hide(); 2709 }); 2710}; 2711function hideCP(){ 2712 $('.cp_popup .box .list ul li a').click(function(){ 2713 $(this).parents('ul').hide(); 2714 }); 2715}; 2716function hideDPD(){ 2717 $('.dpd_popup .box .list ul li a').click(function(){ 2718 $(this).parents('ul').hide(); 2719 }); 2720}; 2721function hideZasilkovna(){ 2722 $('.zasilkovna_popup .box .list ul li a').click(function(){ 2723 $(this).parents('ul').hide(); 2724 }); 2725}; 2726 2727$('a.video').click(function(){ 2728 var thisID = $(this).attr('id'); 2729 var iframe = $(this).attr('data-iframe'); 2730 $('#video_'+thisID+'').css({'display' : 'table'}); 2731 setTimeout(function () { 2732 $('#video_'+thisID+'').css({'opacity' : 1}); 2733 $('#video_'+thisID+' iframe').attr({'src' : iframe}); 2734 },10) 2735 return false;
2736}); 2737 2738$('a.carrier_pop').click(function(){ 2739 $('.carrier_popup').css({'display' : 'table'}); 2740 setTimeout(function () { 2741 $('.carrier_popup').css({'opacity' : 1}); 2742 },10) 2743 return false; 2744}); 2745 2746 2747function precise_round(num,decimals) { 2748 return Math.round(num * Math.pow(10, decimals)) / Math.pow(10, decimals); 2749} 2750 2751function nextPage(){ 2752 $('#next_page').click(function(){ 2753 if ((parseInt($('#page').val())+1) <= parseInt($('#max_page').val())){ 2754 //$('#page').val(parseInt($('#page').val())+1); 2755 $('.product_list').removeAttr('data-ajax-append'); 2756 //$('.category_list').attr('data-ajax-append',''); 2757 var actualScroll = $(document).scrollTop(); 2758 //alert(parseInt($('#page').val())+'-'+(parseInt($('#page').val())+1)); 2759 $('l').val(parseInt($('#page').val())); 2760 2761 $('#page').val((parseInt($('#page').val())+1)); 2762 loadCommodities(false,actualScroll); 2763 }else{ 2764 $('#next_page').hide(); 2765 } 2766 return false; 2767 }); 2768 2769 $('.strankovani ul li a').click(function(){ 2770 $('html,body').animate({ scrollTop: ($('#page_hash').offset().top - $('header').height() - 60 ) }, 600); 2771 var actualScroll = ($('#page_hash').offset().top - $('header').height() - 60 ); 2772 //$('#page').val(parseInt($('#page').val())); 2773 $('#page').val($(this).attr('rel')); 2774 $('#l').val($(this).attr('rel')); 2775 //$('#l1').val($(this).attr('rel')); 2776 $('.product_list').removeAttr('data-ajax-append'); 2777 loadCommodities(true,actualScroll); 2778 2779 /*if ((parseInt($('#page').val())+1) <= parseInt($('#max_page').val())){ 2780 //$('#page').val(parseInt($('#page').val())+1); 2781 loadCommodities(); 2782 }else{ 2783 $('#next_page').hide(); 2784 }*/ 2785 return false; 2786 }); 2787} 2788 2789function loadCommodities(){ 2790 //$('#page').val(parseInt($('#page').val())+1); 2791 //$('.product_list').css('opacity','0.5'); 2792 $.nette.ajax({ 2793 url: $('#url_kategorie').val() > '' ? $('#url_kategorie').val() : $('#sorting-form').attr('action'), 2794 data: $('#sorting-form').serialize(), 2795 success: function(data) { 2796 //$('#load_content').html($('#load_content').html()+data); 2797 pust = true; 2798 }, 2799 complete: function(){ 2800 //$('html,body').animate({ scrollTop: actualScroll + 1 }, 0); 2801 koupit_button(); 2802 if ((parseInt($('#page').val())) == parseInt($('#max_page').val())){ 2803 $('#next_page').hide(); 2804 $('.load_next_page').hide(); 2805 } 2806 } 2807 }); 2808 var toUp = page_hash ? "#page_hash" : ""; 2809 window.history.pushState('page2', 'Title', '?'+$('#sorting-form').serialize()+toUp); 2810} 2811 2812function AddRemoveNewsletter(obj){ 2813 var produkty = $.cookie('newsletter_products') > '' ? $.cookie('newsletter_products') : ""; 2814 var produkty_new = ""; 2815 2816 pole = produkty.split(','); 2817 if (pole.indexOf(obj.attr('rel')) > -1){ 2818 var thisText = obj.attr('data-title') 2819 obj.text(thisText); 2820 obj.removeClass('remove_from_newsletter'); 2821 obj.addClass('add_to_newsletter'); 2822 2823 $.each( pole, function( key, value ) { 2824 //alert(value+':'+obj.attr('rel')); 2825 if (value != obj.attr('rel')){ 2826 produkty_new += produkty_new > '' ? ","+value : value; 2827 } 2828 }); 2829 //alert(produkty_new); 2830 $.cookie('newsletter_products', produkty_new , options); 2831 }else{ 2832 produkty += produkty > '' ? ","+obj.attr('rel') : obj.attr('rel'); 2833 var thisText = obj.attr('data-title1') 2834 obj.text(thisText); 2835 obj.addClass('remove_from_newsletter'); 2836 obj.removeClass('add_to_newsletter'); 2837 $.cookie('newsletter_products', produkty , options); 2838 } 2839 setTimeout(function() { 2840 $.nette.ajax({ 2841 url: '?do=refreshFrontNewsletter', 2842 success: function(data) { 2843 2844 } 2845 }); 2846 }, 200); 2847 return false; 2848}; 2849 2850 2851function koupit_button(){ 2852 $('.koupit_button').unbind(); 2853 $('.koupit_button').each(function(){ 2854 2855 $(this).click(function(){ 2856 if( $(window).width() > 1024 ){ 2857 var obj = $(this); 2858 2859 $.nette.ajax({ 2860 url: $(this).parents('form:first').attr('action'), 2861 data: $(this).parents('form:first').serialize(), 2862 type: 'post', 2863 success: function(data) { 2864 //alert('a'); 2865 } 2866 }); 2867//alert(obj.parents('form:first').find('.count').val()); 2868 obj.parents('form:first').find('.count').animate_from_to('#updatedPrice', { 2869 pixels_per_second: 500, 2870 callback: function(){ 2871 } 2872 },obj.parents('form:first').find('.count').val()); 2873 2874 return false;
2875 }else{ 2876 2877 var obj = $(this); 2878 2879 $.nette.ajax({ 2880 url: $(this).parents('form:first').attr('action'), 2881 data: $(this).parents('form:first').serialize(), 2882 type: 'post', 2883 success: function(data) { 2884 2885 } 2886 }); 2887//alert(obj.parents('form:first').find('.count').val()); 2888 obj.parents('form:first').find('.count').animate_from_to('#updatedPrice', { 2889 pixels_per_second: 500, 2890 callback: function(){ 2891 } 2892 },obj.parents('form:first').find('.count').val()); 2893 2894 return false; 2895 2896 } 2897 2898 }); 2899 }); 2900 2901 $('.add_kosik').unbind(); 2902 // objekt na kliknuti 2903 $('.add_kosik').click(function(){ 2904 var product_id = $(this).attr('for-product'); 2905 var count = $('.count_of_'+product_id).val(); 2906 var skladem = parseInt($('#skladem_'+product_id).val()); 2907 var v_kosiku = parseInt($('#v_kosiku').val()); 2908 var config = $('#sklady').val(); 2909 if(config == 1) { 2910 if (count > skladem) { 2911 showControlPopup($('#notInStock').val()); 2912 }else if ((skladem - v_kosiku - count) < 0){ 2913 showControlPopup($('#notInStock').val()); 2914 } 2915 } 2916 if( $(window).width() > 1024 ){ 2917 $.nette.ajax({ 2918 url: "?do=AddToBasket", 2919 method: 'post', 2920 data: {'buy': 1, 'val[fk_tbl_commodity]': product_id, 'val[n_count]' : count}, 2921 success: function(data) { 2922 } 2923 }); 2924 2925 }else{ 2926 2927 // objekt s poctem kusu 2928 // 2929 $.nette.ajax({ 2930 url: "?do=AddToBasket", 2931 method: 'post', 2932 data: {'buy': 1, 'val[fk_tbl_commodity]': product_id, 'val[n_count]' : count}, 2933 success: function(data) { 2934 } 2935 }); 2936 2937 } 2938 2939 $('#pocetZaNakup').html(precise_round(parseFloat($('#product_price').val())*parseInt($('.detail').find('#count').val()),0)); 2940 showBuyPopup(); 2941 return false; 2942 }); 2943 2944 2945 $('.add_gift').unbind(); 2946 $('.add_gift').click(function(){ 2947 var product_id = $(this).attr('for-product'); 2948 var count = 1; 2949 2950 if( $(window).width() > 1024 ){ 2951 $.nette.ajax({ 2952 url: "?do=AddToBasket", 2953 method: 'post', 2954 data: {'buy': 1, 'val[fk_tbl_commodity]': product_id, 'val[n_count]' : count, 'val[gift]': 1}, 2955 success: function(data) { 2956 } 2957 }); 2958 2959 }else{ 2960 2961 $.nette.ajax({ 2962 url: "?do=AddToBasket", 2963 method: 'post', 2964 data: {'buy': 1, 'val[fk_tbl_commodity]': product_id, 'val[n_count]' : count, 'val[gift]': 1}, 2965 success: function(data) { 2966 } 2967 }); 2968 2969 } 2970 $('.gift_popup').css({'display': 'none', 'opacity': 0}); 2971 return false; 2972 }); 2973 2974 $( ".product_list .item a:not(.related_item, .wishlist)" ).hover(function() { 2975 $( this ).parents('.item').addClass( "hover_efekt" ); 2976 }, function() { 2977 $( this ).parents('.item').removeClass( "hover_efekt" ); 2978 }); 2979 2980} 2981function add_basket() { 2982 // objekt na kliknuti 2983 $('.add_basket_front').click(function(){ 2984 var count = $('#count').val(); 2985 var skladem = parseInt($('#skladem').val()); 2986 var v_kosiku = parseInt($('#v_kosiku').val()); 2987 var config = $('#sklady').val(); 2988 var formid = "#"+$(this).attr('form-id'); 2989 2990 if(config == 1) { 2991 if (count > skladem) { 2992 showControlPopup($('#notInStock').val()); 2993 }else if ((skladem - v_kosiku - count) < 0){ 2994 showControlPopup($('#notInStock').val()); 2995 } 2996 } 2997 if( $(window).width() > 1024 ){ 2998 $.nette.ajax({ 2999 url: $(formid).attr('action'), 3000 data: $(formid).serialize(), 3001 type: 'post', 3002 success: function(data) { 3003 }, 3004 complete: function(){ 3005 /*$.nette.ajax({ 3006 url: "?do=AddToBasket", 3007 success: function(data) { 3008 } 3009 });*/ 3010 } 3011 }); 3012 }else{ 3013 3014 // objekt s poctem kusu 3015 // 3016 $.nette.ajax({ 3017 url: $(formid).attr('action'), 3018 data: $(formid).serialize(), 3019 type: 'post', 3020 success: function(data) { 3021 3022 }, 3023 complete: function(){ 3024 /*$.nette.ajax({ 3025 url: "?do=AddToBasket", 3026 success: function(data) { 3027 } 3028 });*/ 3029 3030 } 3031 }); 3032 } 3033 3034 $('#pocetZaNakup').html(precise_round(parseFloat($('#product_price').val())*parseInt($('.detail').find('#count').val()),0)); 3035 showBuyPopup(); 3036 return false;
3037 }); 3038} 3039 3040function addH(id, obj, type){ 3041 $.nette.ajax({ 3042 type: 'get', 3043 url: '?do=wishlist&id='+id+'&type='+type, 3044 success: function(data) { 3045 }, 3046 complete: function(data) { 3047 //alert(data); 3048 3049 3050 //var objJson = jQuery.parseJSON(data.responseText); 3051 3052 /*if(objJson.favorites > 0) { 3053 $('#favorites_count_id').addClass('active'); 3054 } else { 3055 $('#favorites_count_id').removeClass('active'); 3056 }*/ 3057 3058 if (obj.hasClass('active')){ 3059 obj.attr('title','PÅidat do oblÃbených'); 3060 obj.removeClass('active'); 3061 }else{ 3062 obj.attr('title','Odebrat z oblÃbených'); 3063 obj.addClass('active'); 3064 /*obj.animate_from_to('header .favorite', { 3065 pixels_per_second: 1000, 3066 callback: function(){ 3067 3068 } 3069 },'1');*/ 3070 } 3071 } 3072 }); 3073 3074} 3075 3076function removeItemH(obj){ 3077 obj.parents('.item:first').remove(); 3078} 3079function closeButtons() { 3080 $(document).keyup(function(e) { 3081 if ( (e.keyCode == 27)) { 3082 $('.cp_popup .boxes span.close').click(); 3083 $('.ppl_popup .boxes span.close').click(); 3084 $('.dpd_popup .boxes span.close').click(); 3085 $('.zasilkovna_popup .boxes span.close').click(); 3086 } 3087 }); 3088 $('.cp_popup .close').click(function(){ 3089 $(this).parents('.cp_popup').css({'opacity' : 0}); 3090 setTimeout(function () { 3091 $('.cp_popup').css({'display' : 'none'}); 3092 }, 250) 3093 return false; 3094 }); 3095 3096 $('.cp_popup').click(function(e){ 3097 var controlClass = $(e.target).attr('class'); 3098 if( controlClass == 'box' ){ 3099 $('.cp_popup .close').click() 3100 } 3101 }); 3102 3103 $('.ppl_popup .close').click(function(){ 3104 $(this).parents('.dpd_popup').css({'opacity' : 0}); 3105 setTimeout(function () { 3106 $('.ppl_popup').css({'display' : 'none'}); 3107 }, 250) 3108 return false; 3109 }); 3110 3111 $('.ppl_popup').click(function(e){ 3112 var controlClass = $(e.target).attr('class'); 3113 if( controlClass == 'box' ){ 3114 $('.ppl_popup .close').click() 3115 } 3116 }); 3117 3118 $('.dpd_popup .close').click(function(){ 3119 $(this).parents('.dpd_popup').css({'opacity' : 0}); 3120 setTimeout(function () { 3121 $('.dpd_popup').css({'display' : 'none'}); 3122 }, 250) 3123 return false; 3124 }); 3125 3126 $('.dpd_popup').click(function(e){ 3127 var controlClass = $(e.target).attr('class'); 3128 if( controlClass == 'box' ){ 3129 $('.dpd_popup .close').click() 3130 } 3131 }); 3132 $('.zasilkovna_popup .close').click(function(){ 3133 $(this).parents('.zasilkovna_popup').css({'opacity' : 0}); 3134 setTimeout(function () { 3135 $('.zasilkovna_popup').css({'display' : 'none'}); 3136 }, 250) 3137 return false; 3138 }); 3139 3140 $('.zasilkovna_popup').click(function(e){ 3141 var controlClass = $(e.target).attr('class'); 3142 if( controlClass == 'box' ){ 3143 $('.zasilkovna_popup .close').click() 3144 } 3145 }); 3146} 3147 3148 3149function closeGift() { 3150 $('.close_gift').unbind(); 3151 $('.close_gift').click(function() { 3152 $.cookie('GIFT_HIDE', 1, options); 3153 }); 3154} 3155 3156function VybratPobocku(obj,text, id){ 3157 3158 $('#vyber_dopravy_PPL').html('<br />'+text); 3159 $('#vyber_dopravy_CP').html(''); 3160 $('#vyber_dopravy_DPD').html(''); 3161 $('#vyber_dopravy_ZASILKOVNA').html(''); 3162 $('.ppl_popup').css({'opacity' : 0}); 3163 $('.ppl_popup').css({'display' : 'none'}); 3164 //obj.parents('.boxes:first').find('.close').click(); 3165 3166 $('.deliveryRadio').each(function() { 3167 $(this).parent().removeClass('checked'); 3168 }); 3169 $('.delivery_open_PPL').parent().addClass('checked'); 3170 3171 $.cookie('PPL_POBOCKA', id, options); 3172 $.cookie('DPD_POBOCKA', null, options); 3173 $.cookie('CP_POBOCKA', null, options); 3174 $.cookie('ZASILKOVNA_POBOCKA', null, options); 3175 3176 $('#changePPL').unbind(); 3177 $('#changePPL').click(function(){ 3178 $('.deliveryRadio.delivery_open_PPL').change(); 3179 return false; 3180 }); 3181 return false; 3182} 3183 3184function VybratPobockuCP(obj,text, id){ 3185 3186 $('#vyber_dopravy_CP').html('<br />'+text); 3187 $('#vyber_dopravy_DPD').html(''); 3188 $('#vyber_dopravy_PPL').html(''); 3189 $('#vyber_dopravy_ZASILKOVNA').html(''); 3190 3191 $('.deliveryRadio').each(function() { 3192 $(this).parent().removeClass('checked'); 3193 }); 3194 $('.delivery_open_CP').parent().addClass('checked'); 3195 $('#vyber_dopravy_CP').click(); 3196 3197 $('.cp_popup').css({'opacity' : 0}); 3198 $('.cp_popup').css({'display' : 'none'}); 3199 //obj.parents('.boxes:first').find('.close').click(); 3200 3201 obj.parents('.boxes:first').addClass('active'); 3202 3203 3204 $.cookie('CP_POBOCKA', id, options); 3205 $.cookie('DPD_POBOCKA', null, options); 3206 $.cookie('PPL_POBOCKA', null, options); 3207 $.cookie('ZASILKOVNA_POBOCKA', null, options); 3208 3209 3210 $('#changeCP').unbind(); 3211 $('#changeCP').click(function(){
3212 $('.deliveryRadio.delivery_open_CP').change(); 3213 return false; 3214 }); 3215 return false; 3216} 3217 3218function VybratPobockuDPD(obj,text, id){ 3219 3220 $('#vyber_dopravy_DPD').html('<br />'+text); 3221 $('#vyber_dopravy_CP').html(''); 3222 $('#vyber_dopravy_PPL').html(''); 3223 $('#vyber_dopravy_ZASILKOVNA').html(''); 3224 3225 $('.deliveryRadio').each(function() { 3226 $(this).parent().removeClass('checked'); 3227 }); 3228 3229 $('.delivery_open_DPD').parent().addClass('checked'); 3230 $('#vyber_dopravy_DPD').click(); 3231 3232 $('.dpd_popup').css({'opacity' : 0}); 3233 $('.dpd_popup').css({'display' : 'none'}); 3234 3235 $.cookie('DPD_POBOCKA', id, options); 3236 $.cookie('CP_POBOCKA', null, options); 3237 $.cookie('PPL_POBOCKA', null, options); 3238 $.cookie('ZASILKOVNA_POBOCKA', null, options); 3239 3240 $('#changeDPD').unbind(); 3241 $('#changeDPD').click(function(){ 3242 $('.deliveryRadio.delivery_open_DPD').change(); 3243 return false; 3244 }); 3245 return false; 3246} 3247function VybratPobockuZasilkovna(obj,text, id){ 3248 3249 $('#vyber_dopravy_ZASILKOVNA').html('<br />'+text); 3250 $('#vyber_dopravy_CP').html(''); 3251 $('#vyber_dopravy_PPL').html(''); 3252 $('#vyber_dopravy_DPD').html(''); 3253 3254 $('.deliveryRadio').each(function() { 3255 $(this).parent().removeClass('checked'); 3256 }); 3257 3258 $('.delivery_open_ZASILKOVNA').parent().addClass('checked'); 3259 $('#vyber_dopravy_ZASILKOVNA').click(); 3260 3261 $('.zasilkovna_popup').css({'opacity' : 0}); 3262 $('.zasilkovna_popup').css({'display' : 'none'}); 3263 3264 $.cookie('ZASILKOVNA_POBOCKA', id, options); 3265 $.cookie('CP_POBOCKA', null, options); 3266 $.cookie('PPL_POBOCKA', null, options); 3267 $.cookie('DPD_POBOCKA', null, options); 3268 3269 $('#changeZASILKOVNA').unbind(); 3270 $('#changeZASILKOVNA').click(function(){ 3271 $('.deliveryRadio.delivery_open_ZASILKOVNA').change(); 3272 return false; 3273 }); 3274 return false; 3275} 3276 3277function controlEnters(id) { 3278 var key = window.event.keyCode; 3279 3280 // If the user has pressed enter 3281 if (key === 13) { 3282 //document.getElementById(id).value = document.getElementById(id).value + "\r"; 3283 return false; 3284 } else { 3285 return true; 3286 } 3287}
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.