$(document).ready(function(){

	//********************************************************

	$('a[rel=external]').click(function(){
		window.open(this.href);
	
		return false;
	});
	
	$('a[href=#drukuj]').click(function(){
		window.print();
	
		return false;
	});
	
	
	//********************************************************
	
	
	Cufon.replace('.btn1 a, .btn2 a, #login legend .i, #login .submit button, #menu a, #search .edit a, #search .submit button, .sw1 .w1 h3, .cw4 .buy a, .cw5 .c h3, .cw5 .show a, .cw5 .buy a, .btn3 a, .btn4 a, .cw8 .c h4, .cw8 .show a, .cw8 .buy a, .cw9 .rs .submit button, #over .w3 .submit button, #over .w6 .submit button, .cw9 .rs2 .add a', {fontFamily: 'hn', hover: true});
	
	Cufon.replace('.sw2 a', {fontFamily: 'hn', hover: true});
	Cufon.replace('.cw6 .nav a', {fontFamily: 'hn', hover: true});
	Cufon.replace('.cw7 h3, .cw7 .buy a', {fontFamily: 'hn', hover: true});
	Cufon.replace('.header .h');
	
	
	
	//********************************************************
	
	
	$('.sw1 .w1 li, .sw3 .w1 li').each(function(){
		$(this).click(function(){
			if($(this).find('h3 a').length) {			
				window.location = $(this).find('h3 a').attr('href');
			}
		});
		
	
		$(this).hover(function(){
			$(this).addClass('hover');
		}, function(){
			$(this).removeClass('hover');
		});
	});
	
	
	//********************************************************
	
	
	$('.sw3 #swa').hide();
	
	$('.sw2 a').click(function(){
		$(this).parents('li').addClass('selected').siblings().removeClass('selected');
		
		$('.sw3 ' + $(this).attr('href')).show().siblings().hide();
		
		Cufon.refresh('.sw2 a');
		
		return false;
	});
	
	
	//********************************************************
	
	
	$('.cw6 .w').hide().filter(':eq(0)').show();
	
	$('.cw6 .nav a').click(function(){
		$(this).parents('li').addClass('selected').siblings().removeClass('selected');
		
		$('.cw6 .w' + $(this).attr('href')).show().siblings().hide();
		
		Cufon.refresh('.cw6 .nav a');
		
		return false;
	});

	
	
	
	$('#login2 .input').each(function(){
		$('label', this).click(function(){
			$(this).hide();
		});
		
		$('input', this).focus(function(){
			$(this).siblings('label').hide();
		});
	});
	
	
	
});
