var lang = "cs"; var searchString = ""+"…"; $(document).ready(function(){ $("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_square',social_tools:false, deeplinking: false}); // svgeezy.init('nocheck', 'png'); // this will tell the plugin to not check images with a class of 'nocheck' svgeezy.init(false, 'png'); // this will let the plugin check all images jQuery('.content portray').unbind('click'); // removes/detaches any click events from the elements with 'content portray' //class. Because the canvas has this class. // kraceni pro jednotlive stranky if ($(".shortplease.title").length){ $(".shortplease.title").ThreeDots({ max_rows: 1 }); } if ($(".shortplease.title1").length){ $(".shortplease.title1").ThreeDots({ max_rows: 1 }); } if ($(".shortplease.title2").length){ $(".shortplease.title2").ThreeDots({ max_rows: 2 }); } if ($(".shortplease.dsc2").length){ $(".shortplease.dsc2").ThreeDots({ max_rows: 2 }); } if ($(".shortplease.dsc3").length){ $(".shortplease.dsc3").ThreeDots({ max_rows: 3 }); } if ($(".shortplease.dsc3a").length){ $(".shortplease.dsc3a").ThreeDots({ max_rows: 3, ellipsis_string: ' Více zde ' }); } if ($(".shortplease.dsc4").length){ $(".shortplease.dsc4").ThreeDots({ max_rows: 4 }); } $("input#hledat").click(function(){ var hledat = $("input#hledat").val(); if(hledat == searchString){ $("input#hledat").val(''); $("input#hledat").css("color","#000000"); }else{ this.select(); } }); $("input#hledat").blur(function(){ var hledat = $("input#hledat").val(); if(hledat == ""){ $("input#hledat").val(searchString); $("input#hledat").css("color","#ababab"); } }); $("input#hledat").keydown(function(e) { if (e.keyCode == 13) { var hledat = $("input#hledat").val(); if(hledat != "" && hledat != searchString){ if($('#form-query-hp').text()){ $('#form-query-hp').submit(); } if($('#form-query').text()){ $('#form-query').submit(); } }else{ return false; // alert('Zadejte prosím výraz, který chcete vyhledat.'); } } }); $("a#b-submit-query").click(function(e){ var hledat = $("input#hledat").val(); if(hledat != "" && hledat != searchString){ if($('#form-query-hp').text()){ $('#form-query-hp').submit(); } if($('#form-query').text()){ $('#form-query').submit(); } }else{ return false; // alert('Zadejte prosím výraz, který chcete vyhledat.'); } }); // disable autocomplete for all forms var allforms = document.getElementsByTagName("form"); for (var f = 0; f < allforms.length; f++) { allforms[f].setAttribute("autocomplete", "off"); } });