/*-- equal Column --*/function equalHeight(group) {	var tallest = 0;	group.each(function() {		var thisHeight = $(this).height();		if(thisHeight > tallest) {			tallest = thisHeight;		}	});	group.height(tallest);}$(function() {    if (window.PIE) {        $('#banerTop, #right_entry, #sales_point, .radius, .form').each(function() {           PIE.attach(this);        });    }});$(document).ready(function() {	$('#content h2, #content h2 span, #banerTop h2,#sliderContent li strong,#sliderContent-eng li strong #rightBaner li a, #menu ul li a, #mechanic strong, #rightBaner li a ').css({visibility:'visible'});	$('table.partners tr:even td').css("border-bottom","none");	/*--scroll site--*/	$.localScroll();		/*--slider--*/			$('#sliderContent').cycle({ 			fx:     'fade', 			speedIn:  1300,    	speedOut: 1300,			pager:  '#sliderNav',			timeout:7000		}); 	//FANCYBOX		$("a[rel=lightbox]").fancybox({			'transitionIn'		: 'none',			'transitionOut'		: 'none',			'titlePosition' 	: 'over',			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {				return '<span id="fancybox-title-over">Zdjęcie ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';			}		});		$("a[rel=external], .print a").attr('target', '_blank');	// Reset Font Size		  var originalFontSize = $('.font').css('font-size');		    $(".resetFont").click(function(){		    	$('.font').css('font-size', originalFontSize);		  	});		  // large Font Size		  $(".largeFont").click(function(){		    //var currentFontSize = $('html').css('font-size');    		//var currentFontSizeNum = parseFloat(currentFontSize, 10);    		//var newFontSize = currentFontSizeNum*1.2;    		//$('html').css('font-size', newFontSize);		    $('.font').css('font-size', 16);		    return false;		  });		  // small Font Size		  $(".smallFont").click(function(){		    //var currentFontSize = $('html').css('font-size');    		//var currentFontSizeNum = parseFloat(currentFontSize, 10);    		//var newFontSize = currentFontSizeNum*0.8;    		//$('html').css('font-size', newFontSize);		    $('.font').css('font-size', 11);		    return false;		  });	/*--showAll--*/	$("#showAll a").click(function () {      $("#restForum").slideToggle(300);      $(this).text($(this).text() == 'Pokaż wszystkie »' ? 'Ukryj wszystkie »' : 'Pokaż wszystkie »');      return false;    }); 		/*--contast--*/	$("#contrast").click(function () {      $("body").toggleClass("contrast");      if($.cookie("fota_contrast") == 'on'){      	$.cookie("fota_contrast", 'off', {path: '/'});      	Cufon('#sliderContent li strong, #sliderContent-eng li strong', {	    fontFamily: 'BreuerText',	     color: '#27559F'	 	});      	Cufon.replace('#content h2, #content h2 span', { color: '#383B3F' });      	Cufon('#banerTop h2', {	    fontFamily: 'BreuerText',	     color: '#295AAA'	 	});      	Cufon.refresh();      }                          else{      	$.cookie("fota_contrast", 'on', {path: '/'});      	Cufon.replace('#sliderContent li strong,#sliderContent-eng li strong, #content h2, #content h2 span', { color: '#fff' });      	Cufon.refresh();       //      }                	//Cufon.replace('#sliderContent li strong, #content h2, #content h2 span', { color: '#fff' })    });	    if($.cookie("fota_contrast") == 'on') {        $("body").toggleClass("contrast");        Cufon.refresh();      	Cufon.replace('#sliderContent li strong,#sliderContent-eng li strong, #content h2, #content h2 span', { color: '#fff' })    }		/*--search--	$('#searchBox .text').bind({		'focus': function(){			($(this).val() == 'Szukana fraza...')?$(this).val(''):null;			 $(this).css('color','#194da4');			 $('#searchBox').addClass('active');		},		'blur': function(){			($(this).val() == '')?$(this).val('Szukana fraza...'):null;			$(this).css('color','#787a7e');			$('#searchBox').removeClass('active');		}	});		*/	$('#newsletter .text').bind({		'focus': function(){			($(this).val() == 'Twój adres e-mail')?$(this).val(''):null;			$(this).css('color','#333');		},		'blur': function(){			($(this).val() == '')?$(this).val('Twój adres e-mail'):null;			$(this).css('color','#787a7e');		}	});/*	$('#sales_point .text').bind({		'focus': function(){			($(this).val() == 'Wpisz swój kod pocztowy lub miasto')?$(this).val(''):null;			$(this).css('color','#333');		},		'blur': function(){			($(this).val() == '')?$(this).val('Wpisz swój kod pocztowy lub miasto'):null;			$(this).css('color','#787a7e');		}	});*/		/*--set equal height--*/	//equalHeight($("#news .box .news"));		/*---submit IE-*/	$('.submit').hover(      function () {		$(this).addClass('selected');      },       function () {		$(this).removeClass('selected');      }    );         /*---tell a friend-*/   $('#closeTell').click(      function () {		$('#tell').css('display','none');      }    );	$('.tell a').click(      function () {		$('#tell').css('display','block');      }    );     /*--- fade logotypy---*/   	  $("#logos li a").css({"opacity": "0"});	  $("#logos li a").hover(	    function() {	      $(this).stop().animate({"opacity": "1"}, 400);	    },	    function() {	      $(this).stop().animate({"opacity": "0"}, 400);	    });       	/*---rightBanner span hover---*/	if (!$.browser.msie) {		$('#rightBaner li span, #mechanic a span').css('opacity', 0);		$("#rightBaner li, #mechanic a").hover(			function() {				$(this).find("span").stop().animate({"opacity": "1"}, "slow");			},			function() {				$(this).find("span").stop().animate({"opacity": "0"}, "slow");		});  };     // bind form using ajaxForm     $('#contact-form').ajaxForm({  	    target:"#hiddenDIV", 	    beforeSubmit:function() {	       $("#msg").html("Wysyłanie...");	       //$("#msg").css({border:"1px solid #a00", backgroundColor:"#fdd"});	       $("#msg").addClass("error");	    },	    success:function(response) {	      var result = Number(response);	      if (result=="") {	        $("#contact-form").resetForm();	        $("#msg").addClass("success");	        $("#msg").html("Wiadomość została wysłana");	      } 	      else {	        $("#msg").html(  $("#hiddenDIV #content").html() );	        $("#msg").removeClass("success");	        $("#msg").addClass("error");	        $("#hiddenDIV").empty(); 	      }	    }  	});  	  	  	 $('#contact-form-en').ajaxForm({  	    target:"#hiddenDIV", 	    beforeSubmit:function() {	       $("#msg").html("Sending...");	       //$("#msg").css({border:"1px solid #a00", backgroundColor:"#fdd"});	       $("#msg").addClass("error");	    },	    success:function(response) {	      var result = Number(response);	      if (result=="") {	        $("#contact-form-en").resetForm();	        $("#msg").addClass("success");	        $("#msg").html("Message was send");	      } 	      else {	        $("#msg").html(  $("#hiddenDIV #content").html() );	        $("#msg").removeClass("success");	        $("#msg").addClass("error");	        $("#hiddenDIV").empty(); 	      }	    }  	});  	  	$('#tell-a-friend').ajaxForm({  	    target:"#hiddenDIV", 	    beforeSubmit:function() {	       $("#msg").html("Wysyłanie...");	       $("#msg").addClass("error");	    },	    success:function(response) {	    	var result = Number(response);	    	if (response.match(/<title>Błąd<\/title>/)) {	    		$("#msg").html(  $("#hiddenDIV #content").html() );	        	$("#hiddenDIV").empty(); 	    	}	    	else{	    		$("#msg").html(  $("#hiddenDIV #content").html() );	    		$("#msg").removeClass("error");	       		$("#msg").addClass("success");	        	$("#hiddenDIV").empty(); 	    	}	        	    }  	});  	 $('#newsletterForm').ajaxForm({  	    target:"#hiddenDIV", 	    beforeSubmit:function() {	       $("#msg").html("Wysyłanie...");	       $("#msg").addClass("error");	    },	    success:function(response) {	      var result = Number(response);	       if (response.match(/<title>Błąd<\/title>/)) {	       		       	//alert($("#hiddenDIV #content").text());	        $("#msg").html($("#hiddenDIV #content").html());	        $("#msg").addClass("error");	        $("#hiddenDIV").empty(); 	       }	       else{	       	$("#msg").html($("#hiddenDIV #content").html());	       	$("#msg").removeClass("error");	       	$("#msg").addClass("success");	        $("#hiddenDIV").empty(); 	       }	    }  	});  	});
