// ************************ // *** animacje JD menu *** // ************************ function onAnimateFadeInOut(show) { if (show) { $(this).hide().fadeIn('normal'); } else { $(this).fadeOut('normal'); } } function onAnimateSlideUpDown(show) { if (show) { $(this).hide().slideDown('fast'); } else { $(this).slideUp('fast'); } } function onAnimateSlideLeftRight(show) { if (show) { $(this).hide().animate({width: 'show'}, 'fast'); } else { $(this).animate({width: 'hide'}, 'fast'); } } function onAnimateShowHide(show) { if (show) { $(this).hide().show('normal'); } else { $(this).hide('normal'); } } // *********************** $.extend($.validator.messages, { required: "pole wymagane" }); $(document).ready(function(){ $("#CMSform").validate({errorElement: "span", errorPlacement: function(error, element) {error.appendTo(element.parent().prev());} }); }); // ******************** // *** site map hover *** // ******************** $(document).ready(function(){ $("#sitemap li").hover( function () { $(this).addClass("hover"); }, function () { $(this).removeClass("hover"); } ); }); // ********************* // *** search container *** // ********************* $(document).ready(function() { $('input[type="text"]').addClass("idleField"); $('input[type="text"]').focus(function() { $(this).removeClass("idleField").addClass("focusField"); if (this.value == this.defaultValue){ this.value = ''; } if(this.value != this.defaultValue){ this.select(); } }); $('input[type="text"]').blur(function() { $(this).removeClass("focusField").addClass("idleField"); if ($.trim(this.value) == ''){ this.value = (this.defaultValue ? this.defaultValue : ''); } }); }); // PNG Fix $("#openhair").ready(function(){$(document).pngFix();}); $(".imgframe").ready(function(){$(document).pngFix();}); $(".jcarousel-prev").ready(function(){$(document).pngFix();}); $(".jcarousel-next").ready(function(){$(document).pngFix();});