
			
$(document).ready(function() {
		$(function() {
	        jQuery.validator.methods.NotEqual = function(value, element, param) {
	   			return value != param;
			};
			
		    $('#contact-form-body').validate({
		        rules: {
					name: {
						required: true,
						NotEqual: 'imię i nazwisko:'
						
					},
					message: {
						required: true,
						NotEqual: 'wiadomość:'
					},
					email: {
						required: true,
						email: true,
						NotEqual: 'e-mail:'
					}
				},
				messages: {
						name: {
					   		required: "Pole wymagane!",
					      	NotEqual: "Proszę wypełnić pole!"
					   },
						message: {
					   		required: "Pole wymagane!",
					      	NotEqual: "Proszę wypełnić pole!"
					   },
						email: {
					   		required: "Pole wymagane!",
					      	email: "Niepoprawny adres e-mail!",
					      	NotEqual: "Proszę wypełnić pole!"
					    }
						
				},	
		        submitHandler: function(form) {
		   			var data = $('form:first').serialize();
					$.post(
					'mail.php',
					data,
					function(data){
						$('#form-body').hide();
						$('#response').html(data).show();
					}, 'html');
				}
		    });
		});
		
			
				
		slide("#sliding-navigation", 25, 15, 150, .8);
		
		$('#content').jScrollPane();
		function hideFooter() {
			var scnWid,scnHei;
			if (self.innerHeight) // all except Explorer
			{
				scnWid = self.innerWidth;
				scnHei = self.innerHeight;
			}
			else if (document.documentElement && document.documentElement.clientHeight)
				// Explorer 6 Strict Mode
			{
				scnWid = document.documentElement.clientWidth;
				scnHei = document.documentElement.clientHeight;
			}
			else if (document.body) // other Explorers
			{
				scnWid = document.body.clientWidth;
					scnHei = document.body.clientHeight;
				}
				if(scnHei <= 700) {
					$('#panel-left-footer').hide();
				} else {
					$('#panel-left-footer').show();
				}
		};

		$(window).ready(function() {
			hideFooter();		
		});
		
		$(window).resize(function() {
			var resizeTimer;
			clearTimeout(resizeTimer);
			$('#content').jScrollPane();
			resizeTimer = setTimeout(hideFooter, 10);
		});
				
				
		if ( $.browser.msie ) {
			
			$('#panel-left').css({
				"-ms-filter" : "progid:DXImageTransform.Microsoft.gradient(startColorstr=#59000000,endColorstr=#59000000)",
				"filter" : "progid:DXImageTransform.Microsoft.gradient(startColorstr=#59000000,endColorstr=#59000000)",
				"zoom" : "1"
			}); 
								
			$('#panel-left-footer').css( "border-top","10px solid #535F18" );
			
			$('#content').css ({
				"-ms-filter": "progid:DXImageTransform.Microsoft.gradient(startColorstr=#59000000,endColorstr=#59000000)", 
				"filter": "progid:DXImageTransform.Microsoft.gradient(startColorstr=#59000000,endColorstr=#59000000)",
				"zoom" : "1"
			});
			
			$('#content p').css( "color", "#fff");
			$('#content h1').css( "color", "rgb(176, 203, 30)");
			$('#content ul li').css ({
									"background" : "none repeat 0 0 #535F18",
									"border-left" : "15px solid rgb(176, 203,3)",
									"color" : "#fff" 
			}); 
			
			$('#oferta #content ul li').css ({
									"background" : "#000",
									"border-left" : "none",
									"color" : "#fff" 
			}); 
			
			$('input:focus, textarea:focus').css("border", "3px solid rgb(176, 203, 30");
					
			$('.main-nav ul li a').css({
									"background" : "#535F18",
									"color" : "#fff",
									"-ms-filter" : "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4CB0CB1E,endColorstr=#4CB0CB1E)",   
									"filter" : "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4CB0CB1E,endColorstr=#4CB0CB1E)",  
									"zoom" : "1"
			});
					
			$('.jspTrack').css ('background','rgb(0, 0, 0)');
			$('.jspDrag').css ('background','#535F18'); 
		} 
					
		function slide(navigation_id, pad_out, pad_in, time, multiplier) {
			// creates the target paths
			var list_elements = navigation_id + " li.sliding-element";
			var link_elements = list_elements + " a";
			
			// initiates the timer used for the sliding animation
			var timer = 0;
			
			// creates the slide animation for all list elements 
			$(list_elements).each(function(i)
			{
				// margin left = - ([width of element] + [total vertical padding of element])
				$(this).css("margin-left","-180px");
				// updates timer
				timer = (timer*multiplier + time);
				$(this).animate({ marginLeft: "0" }, timer);
				$(this).animate({ marginLeft: "25px" }, timer);
				$(this).animate({ marginLeft: "0" }, timer);
			});

			// creates the hover-slide effect for all link elements 		
			$(link_elements).each(function(i)
			{
				$(this).hover(
				function()
				{
					$(this).animate({ marginLeft: "25px" }, { duration: 500, easing: 'jswing' });
				},		
				function()
				{
					$(this).animate({ marginLeft: "0px" }, { duration: 500, easing: 'jswing' });
				});
			});
		}
	
	$('#katalogi a').css("opacity", "0.7");
	
	$('#katalogi a').mouseover(function(){
		$(this).animate({ opacity: "1" },300);
	}); 	
	
	$('#katalogi a').mouseout(function(){
		$(this).animate({ opacity: "0.8" },300);
	}); 	
		
});
