$(document).ready(
	function()
	{
		
		$('#social-media-wp div.st').mouseenter(function() {$('#social-media-wp').animate({right : 0}, 600)});
		$('#social-media-wp').mouseleave(function() {$('#social-media-wp').animate({right : -225}, 600)});
		
		$(".imag").each(
			function(){
				var marginL = Math.ceil((158-$(this).width())/2);
				var marginT = Math.ceil((103-$(this).height())/2);
				$(this).css("margin-left", marginL + "px");
				$(this).css("margin-top", marginT + "px");
				$(this).css("visibility", "visible");
			}
		)
		$(".imag_m").each(
			function(){
				
				var marginT = Math.ceil( ( 72 - $(this).height() ) / 2 );
				
				$(this).css("margin-top",marginT + "px");
				$(this).css("visibility", "visible");
			}
		)

		var menu = $("#menu").position();
		var p = $(".cennik").position();
		
		$(".button_right").mousehold(
			function(){
			
				var mLeft     = $("#w11").css("margin-left");
				    mLeft	  = mLeft.substring(0,mLeft.length-2);
				var nextmLeft = mLeft - 10;
				$("#w11").css("margin-left",nextmLeft+"px");
				
			}
		)
		$(".button_left").mousehold(
			function(){
				var mLeft = $("#w11").css("margin-left");
				mLeft=mLeft.substring(0,mLeft.length-2);
				var nextmLeft = mLeft-(-5);
				$("#w11").css("margin-left",nextmLeft+"px");
			}
		)
		
		
		$(".cennik").hover(
			function(){
				var width = $(this).width();
				$("#sub_przejscie").width($(this).width()+10);
				$("#sub1").show();
			
			},
			function(){
				$("#sub1").hide();
			}		
		)
		
		$('.inp1 input').focus(function(){
			
			if($(this).val()=='Imię i nazwisko')
					$(this).val('');	
		
		});
		$('.inp1 input').blur(function(){
			
			if($(this).val()=='')
					$(this).val('Imię i nazwisko');	
		
		});
		
		$('.inp2 input').focus(function(){
			
			if($(this).val()=='E-mail')
					$(this).val('');	
		
		});
		$('.inp2 input').blur(function(){
			
			if($(this).val()=='')
					$(this).val('E-mail');	
		
		});
		
		
	}	

);

$(function(){
	$(".img4ltbx").lightBox({
	overlayBgColor: '#222',
	overlayOpacity: 0.8,
	imageLoading: '/public/images/lightbox-ico-loading.gif',
	imageBtnClose:'/public/images/lightbox-btn-close.gif',
	imageBtnPrev: '/public/images/lightbox-btn-prev.gif',
	imageBtnNext: '/public/images/lightbox-btn-next.gif',
	containerResizeSpeed: 400,
	txtImage: 'Obraz',
	txtOf: 'z'
   });
})

