$(document).ready(
	function()
	{
		$("select[name='producer_url']").change(
			function()
			{
				window.location.href=($("select[name='producer_url']").val());
			}
		);
		
		$("input[class='ToStoreA']").click(
			function()
			{	
				createBlockStorage();
			}
		);
		
		$("input[class='DPAddStore']").click(
			function()
			{
				createBlockStorage();
			}
		);
		
		$(".jsStorageTop").click(function(e){
				e.preventDefault();
				createBlockStorage();
		});
		
		$("input[name='jsUserIdCheck']").click(function(){
			$.unblockUI();
		});
		
		$("input[name='jsLoginRedirect']").click(function(){
			document.location = '/loguj';
		});
		
		$("input[name='jsRegristerRedirect']").click(function(){
			document.location = '/rejestracja';
		});
		
		$("input[name='fraza']").focus(function(){
			if($(this).val() == 'Wpisz czego szukasz...')
			{
				$(this).val('');
			}
		});
		
		$("input[name='email_n']").focus(function(){
			if($(this).val() == 'e-mail')
			{
				$(this).val('');
			}
		});
		
		$("#jsNameComment").focus(function(){
			if($(this).val() == 'Imię')
			{
				$(this).val('');
			}
		});
		
		function createBlockStorage()
		{
			$.blockUI({ 
				message: $('#jsUserId'), 
				fadeIn: 700, 
				fadeOut: 700, 
				showOverlay: false,
				css: { 
					border: 'none',
					backgroundColor: 'transparent',
					width: '352px',
					height: '82px',
					textAlign: 'left'
				}
			});
		}
	}

);
