//, textShadow: '0 1px 0 #ccc8c1'
Cufon.replace('#left-menu li a, #right-menu li a, #language-pick li a',{hover: true});
Cufon.replace('h1,h3,h5');
Cufon.replace('h2');
Cufon.replace('#navigator .next,#navigator .prev');
Cufon.replace('#categories a, #send-data',{hover: true});
$(function(){
	$('#categories a, #send-data')
		.css( {backgroundPosition: "50% -55px"} )
		.mouseover(function(){
			$(this).stop().css("color","#ffffff").animate({backgroundPosition:"(50% -15px)"}, {duration:200})
		})
		.mouseout(function(){
			$(this).stop().css("color","#514b4b").animate({backgroundPosition:"(50% -55px)"}, {duration:150, complete:function(){
				$(this).css({backgroundPosition: "50% -55px"})
		}})
	});
	
	$('#send-data').unbind('click').click( function(){
		var formElements = $("form input, form textarea").serialize();
		var url = $("#send_message").attr("action");
		$('#message-status .response').html('');
		$('#send-message .btn').hide();
		$('#message-status .loading').show();
		$.ajax({
			type: "POST",
			url: url,
			data: formElements,
			success: function(wynik){
				$('#message-status .loading').hide();
				$('#message-status .response').html( wynik );
				$('#send-message .btn').show()
			}
		});
	});
	$('.tipped').qtip({
		position: {
			my: "bottom center",
			at: "top center",
			adjust: {
				y: -12,
				x: 10
			}
		},
		style: {
		  classes: 'ui-tooltip-mts'
		}
	});
});
