/* * jQuery HoverPulse Plugin by M. Alsup * Examples and docs at: http://malsup.com/jquery/hoverpulse/ * Dual licensed under the MIT and GPL * Requires: jQuery v1.2.6 or later * @version: 1.01 26-FEB-2009 */ (function($) { $.fn.hoverpulse = function(options) { // in 1.3+ we can fix mistakes with the ready state if (this.length == 0) { if (!$.isReady && this.selector) { var s = this.selector, c = this.context; $(function() { $(s,c).hoverpulse(options); }); } return this; } var opts = $.extend({}, $.fn.hoverpulse.defaults, options); // parent must be relatively positioned this.parent().css({ position: 'relative' }); // pulsing element must be absolutely positioned this.css({ position: 'absolute', top: 0, left: 0 }); this.each(function() { var $this = $(this); var w = $this.width(), h = $this.height(); $this.data('hoverpulse.size', { w: parseInt(w), h: parseInt(h) }); }); // bind hover event for behavior return this.hover( // hover over function() { var $this = $(this); $this.parent().css('z-index', opts.zIndexActive); var size = $this.data('hoverpulse.size'); var w = size.w, h = size.h; $this.stop().animate({ top: ('-'+(opts.size-3)+'px'), left: ('-'+(opts.size+12)+'px'), height: (h+2*opts.size-5)+'px', width: (w+2*opts.size+12)+'px' }, opts.speed); //$this.parent().find(".addShadow").show(300); //$this.parent().find(".addShadow").css("display","block"); $this.parent().find(".addShadow").fadeIn(130); }, // hover out function() { var $this = $(this); $this.parent().find(".addShadow").css("display","none"); var size = $this.data('hoverpulse.size'); var w = size.w, h = size.h; $this.stop().animate({ top: 0, left: 0, height: (h+'px'), width: (w+'px') }, opts.speed, function() { $this.parent().css('z-index', opts.zIndexNormal); }); } ); }; $.fn.hoverpulse.defaults = { size: 20, speed: 200, zIndexActive: 100, zIndexNormal: 1 }; })(jQuery); SB_obraz = "obraz"; /* Slimbox v2.04 - The ultimate lightweight Lightbox clone for jQuery (c) 2007-2010 Christophe Beyls MIT-style license. */ (function(w){var E=w(window),u,f,F=-1,n,x,D,v,y,L,r,m=!window.XMLHttpRequest,s=[],l=document.documentElement,k={},t=new Image(),J=new Image(),H,a,g,p,I,d,G,c,A,K;w(function(){w("body").append(w([H=w('
')[0],a=w('
')[0],G=w('
')[0]]).css("display","none"));g=w('
').appendTo(a).append(p=w('
').append([I=w('').click(B)[0],d=w('').click(e)[0]])[0])[0];c=w('
').appendTo(G).append([w('').add(H).click(C)[0],A=w('
')[0],K=w('
')[0],w('
')[0]])[0]});w.slimbox=function(O,N,M){u=w.extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:SB_obraz+" {x} / {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},M);if(typeof O=="string"){O=[[O,N]];N=0}y=E.scrollTop()+(E.height()/2);L=u.initialWidth;r=u.initialHeight;w(a).css({top:Math.max(0,y-(r/2)),width:L,height:r,marginLeft:-L/2}).show();v=m||(H.currentStyle&&(H.currentStyle.position!="fixed"));if(v){H.style.position="absolute"}w(H).css("opacity",u.overlayOpacity).fadeIn(u.overlayFadeDuration);z();j(1);f=O;u.loop=u.loop&&(f.length>1);return b(N)};w.fn.slimbox=function(M,P,O){P=P||function(Q){return[Q.href,Q.title]};O=O||function(){return true};var N=this;return N.unbind("click").click(function(){var S=this,U=0,T,Q=0,R;T=w.grep(N,function(W,V){return O.call(S,W,V)});for(R=T.length;Q=0)?C():(M(N,u.nextKeys)>=0)?e():(M(N,u.previousKeys)>=0)?B():false}function B(){return b(x)}function e(){return b(D)}function b(M){if(M>=0){F=M;n=f[F][0];x=(F||(u.loop?f.length:0))-1;D=((F+1)%f.length)||(u.loop?0:-1);q();a.className="lbLoading";k=new Image();k.onload=i;k.src=n}return false}function i(){a.className="";w(g).css({backgroundImage:"url("+n+")",visibility:"hidden",display:""});w(p).width(k.width);w([p,I,d]).height(k.height);w(A).html(f[F][1]||"");w(K).html((((f.length>1)&&u.counterText)||"").replace(/{x}/,F+1).replace(/{y}/,f.length));if(x>=0){t.src=f[x][0]}if(D>=0){J.src=f[D][0]}L=g.offsetWidth;r=g.offsetHeight;var M=Math.max(0,y-(r/2));if(a.offsetHeight!=r){w(a).animate({height:r,top:M},u.resizeDuration,u.resizeEasing)}if(a.offsetWidth!=L){w(a).animate({width:L,marginLeft:-L/2},u.resizeDuration,u.resizeEasing)}w(a).queue(function(){w(G).css({width:L,top:M+r,marginLeft:-L/2,visibility:"hidden",display:""});w(g).css({display:"none",visibility:"",opacity:""}).fadeIn(u.imageFadeDuration,h)})}function h(){if(x>=0){w(I).show()}if(D>=0){w(d).show()}w(c).css("marginTop",-c.offsetHeight).animate({marginTop:0},u.captionAnimationDuration);G.style.visibility=""}function q(){k.onload=null;k.src=t.src=J.src=n;w([a,g,c]).stop(true);w([I,d,g,G]).hide()}function C(){if(F>=0){q();F=x=D=-1;w(a).hide();w(H).stop().fadeOut(u.overlayFadeDuration,j)}return false}})(jQuery); // AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED) if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) { jQuery(function($) { $("a[class^='thickbox']").slimbox({/* Put custom options here */}, null, function(el) { return (this == el) || ((this.rel.length > 1) && (this.rel == el.rel)); }); }); } // ************************ // *** 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'); } } // Settings var CSSR = 'tree_menu_flag_root'; var CSSH = 'tree_menu_hover'; // Public methods $.fn.treeMenu = function() { return this.each(function() { $(this).addClass(CSSR); addEvents(this); }); }; // Private methods function addEvents(ul) { $('li', ul).hover(hoverOver,hoverOut); }; function removeEvents(ul) { $('li', ul).unbind('mouseover'); }; function hoverOver() { $(this).addClass(CSSH).find('> a').addClass(CSSH); }; function hoverOut() { $(this).removeClass(CSSH).find('> a').removeClass(CSSH); }; $.extend($.validator.messages, { required: "required" }); $(document).ready(function(){ //rozwijane pole apla var $apla = $('table.expand'); if ($apla.length) { $apla.find('.msg_body').hide(); $apla.find('.msg_head').bind('click', function() { $(this).next('.msg_body').slideToggle(100); $(this).toggleClass('apl_open'); }); } //podswietlanie wiersza w notowaniach var $notowaniaHover = $('#notowania'); if ($notowaniaHover.length) { $notowaniaHover.find('li').bind("mouseenter mouseleave", function() { $(this).toggleClass("hoverLI"); }); } $('#submit').click(function () { var ajx = $('input[name=ajx]'); var imie = $('input[name=imie]'); var nazwisko = $('input[name=nazwisko]'); var email = $('input[name=email]'); var tel = $('input[name=tel]'); if (imie.val()=='first name') { imie.addClass('hightlight'); return false; } else imie.removeClass('hightlight'); if (nazwisko.val()=='last name') { nazwisko.addClass('hightlight'); return false; } else nazwisko.removeClass('hightlight'); if (email.val()=='e-mail address') { email.addClass('hightlight'); return false; } else email.removeClass('hightlight'); if (tel.val()=='phone'){ tel.addClass('hightlight'); return false; } else tel.removeClass('hightlight'); var patt=/^[0-9-()]+$/; var result=patt.test(tel.val()); if (result) { tel.removeClass('hightlight'); } else { tel.addClass('hightlight'); return false; } var data = 'ajx=' + ajx.val() + '&imie=' + imie.val() + '&nazwisko=' + nazwisko.val() + '&email=' + encodeURIComponent(email.val()) + '&tel=' + encodeURIComponent(tel.val()); $('#napisz_do_nas form fieldset').hide('fast'); $('#napisz_do_nas .loading').show(); var action = $("#napisz_do_nas form").attr("action"); action = (action.substring(0,9)); $.ajax({ url: action, type: "GET", data: data, cache: false, success: function (html) { $('#napisz_do_nas .loading').fadeOut('slow'); if (html==1) { $('#napisz_do_nas p').append('Dziękujemy formularz został wysłany.'); } else $('#napisz_do_nas p').append('Przepraszamy wystąpił błąd.'); $('#napisz_do_nas').delay(2000).fadeOut("fast"); } }); return false; }); $('#searchTrigger').bind('click', function(e) { e.preventDefault(); $("#search_form_container").fadeIn("fast"); $("#napisz_do_nas").fadeOut("fast"); }); $('#search_form_container a').bind('click', function(e) { e.preventDefault(); $("#search_form_container").fadeOut("fast"); }); $('#emailTrigger').bind('click', function(e) { e.preventDefault(); $('#napisz_do_nas p span').remove(); //$('#napisz_do_nas input[name=imie]').val('first name'); //$('#napisz_do_nas input[name=nazwisko]').val('last name'); //$('#napisz_do_nas input[name=email]').val('e-mail address'); //$('#napisz_do_nas input[name=tel]').val('phone'); $('#napisz_do_nas fieldset').fadeIn("fast"); $("#napisz_do_nas").fadeIn("fast"); }); $('#napisz_do_nas a').bind('click', function(e) { e.preventDefault(); $("#napisz_do_nas").fadeOut("fast"); }); $('input[type="text"]').focus(function() { if (this.value == this.defaultValue){ this.value = ''; } if(this.value != this.defaultValue){ this.select(); } }); $('input[type="text"]').blur(function() { if ($.trim(this.value) == ''){ this.value = (this.defaultValue ? this.defaultValue : ''); } }); $("#CMSform").validate({errorElement: "span", errorPlacement: function(error, element) {error.appendTo(element.parent().prev());} }); $("#sitemap li").hover( function () { $(this).addClass("hover"); }, function () { $(this).removeClass("hover"); } ); }); /** * jCarouselLite - jQuery plugin to navigate images/any content in a carousel style widget. * @requires jQuery v1.2 or above * * http://gmarwaha.com/jquery/jcarousellite/ * * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Version: 1.0.1 * Note: Requires jquery 1.2 or above from version 1.0.1 */ (function($) { // Compliant with jquery.noConflict() $.fn.jCarouselLite = function(o) { o = $.extend({ btnPrev: null, btnNext: null, btnGo: null, mouseWheel: false, auto: null, hoverPause: false, speed: 200, easing: null, vertical: false, circular: true, visible: 3, start: 0, scroll: 1, beforeStart: null, afterEnd: null }, o || {}); return this.each(function() { // Returns the element collection. Chainable. var running = false, animCss=o.vertical?"top":"left", sizeCss=o.vertical?"height":"width"; var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible; if(o.circular) { ul.prepend(tLi.slice(tl-v+1).clone()) .append(tLi.slice(0,o.scroll).clone()); o.start += v-1; } var li = $("li", ul), itemLength = li.size(), curr = o.start; div.css("visibility", "visible"); li.css({overflow: "hidden", float: o.vertical ? "none" : "left"}); ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"}); div.css({overflow: "hidden", position: "relative", "z-index": "2", left: "0px"}); var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation var ulSize = liSize * itemLength; // size of full ul(total length, not just for the visible items) var divSize = liSize * v; // size of entire div(total length for just the visible items) li.css({width: li.width(), height: li.height()}); ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize)); div.css(sizeCss, divSize+"px"); // Width of the DIV. length of visible images if(o.btnPrev) { $(o.btnPrev).click(function() { return go(curr-o.scroll); }); if(o.hoverPause) { $(o.btnPrev).hover(function(){stopAuto();}, function(){startAuto();}); } } if(o.btnNext) { $(o.btnNext).click(function() { return go(curr+o.scroll); }); if(o.hoverPause) { $(o.btnNext).hover(function(){stopAuto();}, function(){startAuto();}); } } if(o.btnGo) $.each(o.btnGo, function(i, val) { $(val).click(function() { return go(o.circular ? o.visible+i : i); }); }); if(o.mouseWheel && div.mousewheel) div.mousewheel(function(e, d) { return d>0 ? go(curr-o.scroll) : go(curr+o.scroll); }); var autoInterval; function startAuto() { stopAuto(); autoInterval = setInterval(function() { go(curr+o.scroll); }, o.auto+o.speed); }; function stopAuto() { clearInterval(autoInterval); }; if(o.auto) { if(o.hoverPause) { div.hover(function(){stopAuto();}, function(){startAuto();}); } startAuto(); }; function vis() { return li.slice(curr).slice(0,v); }; function go(to) { if(!running) { if(o.beforeStart) o.beforeStart.call(this, vis()); if(o.circular) { // If circular we are in first or last, then goto the other end if(to<0) { // If before range, then go around ul.css(animCss, -( (curr + tl) * liSize)+"px"); curr = to + tl; } else if(to>itemLength-v) { // If beyond range, then come around ul.css(animCss, -( (curr - tl) * liSize ) + "px" ); curr = to - tl; } else curr = to; } else { // If non-circular and to points to first or last, we just return. if(to<0 || to>itemLength-v) return; else curr = to; } // If neither overrides it, the curr will still be "to" and we can proceed. running = true; ul.animate( animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing, function() { if(o.afterEnd) o.afterEnd.call(this, vis()); running = false; } ); // Disable buttons when the carousel reaches the last/first, and enable when not if(!o.circular) { $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); $( (curr-o.scroll<0 && o.btnPrev) || (curr+o.scroll > itemLength-v && o.btnNext) || [] ).addClass("disabled"); } } return false; }; }); }; function css(el, prop) { return parseInt($.css(el[0], prop)) || 0; }; function width(el) { return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight'); }; function height(el) { return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom'); }; })(jQuery);