$(document).ready(function() {
	
	$('#pl_btn').attr('href','http://www.unital.com.pl/pl/');
	$('#en_btn').attr('href','http://www.unital.com.pl/en/');
	$('#ru_btn').attr('href','http://www.unital-avtoramki.ru/');
	
	$('#de_btn').attr('href','http://unital-kennzeichenhalter.de');
	$('#hu_btn').attr('href','http://unital-rendszamkeretek.hu/');	
	$('#sk_btn').attr('href','http://www.unital.sk/');
	$('#ro_btn').attr('href',' http://unital.ro/');
	$('#nl_btn').attr('href',' http://unital.nl/');
	$('#lt_btn').attr('href',' http://unital.lt/');
	$('#es_btn').attr('href',' http://unital.es/');
	$('#cz_btn').attr('href',' http://www.unital.cz/');
	$('#se_btn').attr('href',' http://unital-skylthallare.se/');
} );

	jQuery(document).ready(function($){
		buildMenu();
		boxesAnim();
	});
	function buildMenu() {
		$('#header .menu ul li').hover(rollover, rollout).find('img').addClass('jquery');
		$('#header .menu ul li.selected').find('img').removeClass('jquery');
	}
	function rollover() {
		if (!$(this).hasClass('selected')) {
			if ($(this).parent().hasClass('lang')) {
				$(this).animate({'top': '-57px'},200);
			} 
			else { $(this).find('img').animate({'top': '-57px'},200); }
		}

	}
	function rollout() {
		if (!$(this).hasClass('selected')) {
			if ($(this).parent().hasClass('lang')) {
				$(this).animate({'top': '0px'},200);
			} 
			else { $(this).find('img').animate({'top': '0px'},200); }		
		}

	}
	function boxesAnim() { 

if ($('body').hasClass('pl_PL') || $('body').hasClass('en_US')) {
		$('.box').hover(function() { $(this).find('img').stop().animate({'top': '-63px'},200); }, function() { $(this).find('img').stop().animate({'top': '0px'},200); }).addClass('jquery');
	}
}

jQuery(document).ready(function() {
	$('#zamow_ramki').click(function(){ zamow_ramki(); return false;});
});

function zamow_ramki() {
	$.fancybox({
		'href': $('#zamow_ramki').attr('href') + '&showtemplate=false', 
		'margin': 40, 
		'width': 600,
		'autoDimensions':false
	});
}
