function get_home_url(){
	return $("base").attr("href");
}

function get_url_to_ajax(){
	return get_home_url()+"ajax/";
}

function jezyk(id)
{
	document.cookie = "LANGUAGE="+id;
	window.location.href='';
}

function newsletter(action)
{
	var email = $("#nslt_email").val();
	$.post(get_url_to_ajax()+ "newsletter.html",
	{ 
		akcja: action,
		email: email
	},
	  function(data){
	  	$("#komm_txt").html(data.komunikat);
	  	$("#komm_button").attr('onclick', "javascript:newsletter_link('"+data.link+"');");
	  	$("#nltr_form").hide();
	  	$("#nltr_komm").show();
	  }, "json");	
}

function newsletter_link(url)
{
	if(url == 'newsletter')
	{
	  	$("#nltr_form").show();
	  	$("#nltr_komm").hide();
	}
	else
	{
		window.location.href='';	
	}
}

$(document).ready(function() {

  $(".part_logo").hover(
    function() {
    
      szer = $(this).attr("alt");
      new_szer = parseInt(szer)+4;
      $(this).animate( { width:new_szer }, 200 );
   
    
    },
    function() {
    
      szer = $(this).attr("alt");
      new_szer = parseInt(szer);
      $(this).animate( { width:new_szer }, 200 );
    
    }
  );

});