$(document).ready(function(){ $("#linkBox").hide(); $("a.slideup").click(function(event){ event.preventDefault(); if ($(this).hasClass("slideup")) { $('#linkownia').removeClass(); $('#linkownia').addClass('sliddown'); //$('#linkownia').html('Zwiń'); $('#linkBox').slideDown('fast'); } else { $('#linkBox').slideUp('fast'); $('#linkownia').removeClass(); //$('#linkownia').html('Rozwiń'); $('#linkownia').addClass('slideup'); } }); $(".msg_body").hide(); $(".msg_head").click(function(){ $(this).next(".msg_body").slideToggle(100); }); }); // ************************ // *** 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());} }); $("a.slidedown").click(function(event){ event.preventDefault(); if ($(this).hasClass("slidedown")) { $('#linkBox div').hide().slideDown('fast'); $('#linkownia').removeClass(); $('#linkownia').addClass('slideup'); } else { $('#linkownia').removeClass(); $('#linkownia').addClass('slidedown'); $('#linkBox div').slideUp('fast') } }); }); /* $(document).ready(function(){$('#viewportasd').click(function(){ location.href='http://openhair.firma.vobacom.pl/Sieradz_Open_Hair_Festival/Partnerzy';});}); */ /** * @author Stéphane Roucheray * @extends jquery */ jQuery.fn.carousel = function(previous, next, options){ var sliderList = jQuery(this).children()[0]; if (sliderList) { var increment = jQuery(sliderList).children().outerWidth("true"), elmnts = jQuery(sliderList).children(), numElmts = elmnts.length, sizeFirstElmnt = increment, shownInViewport = Math.round(jQuery(this).width() / sizeFirstElmnt), firstElementOnViewPort = 1, isAnimating = false; for (i = 0; i < shownInViewport; i++) { jQuery(sliderList).css('width',(numElmts+shownInViewport)*increment + increment + "px"); jQuery(sliderList).append(jQuery(elmnts[i]).clone()); } jQuery(previous).click(function(event){ if (!isAnimating) { if (firstElementOnViewPort == 1) { jQuery(sliderList).css('left', "-" + numElmts * sizeFirstElmnt + "px"); firstElementOnViewPort = numElmts; } else { firstElementOnViewPort--; } jQuery(sliderList).animate({ left: "+=" + increment, y: 0, queue: true }, "swing", function(){isAnimating = false;}); isAnimating = true; } }); jQuery(next).click(function(event){ if (!isAnimating) { if (firstElementOnViewPort > numElmts) { firstElementOnViewPort = 2; jQuery(sliderList).css('left', "0px"); } else { firstElementOnViewPort++; } jQuery(sliderList).animate({ left: "-=" + increment, y: 0, queue: true }, "swing", function(){isAnimating = false;}); isAnimating = true; } }); } }; jQuery(document).ready(function(){ jQuery('#viewport').carousel('#simplePrevious', '#simpleNext'); function slide(){ $('#simpleNext').click(); } var intervalId = window.setInterval(slide, 5000); }); // PNG Fix //$(document).ready(function(){$(document).pngFix();});