Cufon.replace('h2,.cufon-this');
Cufon.replace('h1',{textShadow:"rgba(255,255,255,1) 1px 1px"});
Cufon.replace('.main-menu a',{
	textShadow:"rgba(16,57,196,1) -0.5px -0px, rgba(255,255,255,1) 0.5px 0.5px"
});
Cufon.replace('.blue-button span',{textShadow:"rgba(0,0,0,0.4) 1.5px 1.5px"});

$(document).ready(function(){
	$('div[id^=yt]').each(function(){
		var ytid = this.id.split(':')[1];
		
		var width = $(this).width();
		var height = $(this).height();
		
		$(this).html('<object width="'+width+'" height="'+height+'"><param name="movie" value="http://www.youtube.com/v/'+ytid+'?fs=1&amp;hl=pl_PL"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="opaque"></param><embed src="http://www.youtube.com/v/'+ytid+'?fs=1&amp;hl=pl_PL" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+width+'" height="'+height+'" wmode="opaque"></embed></object>');
	});
	
	try {
		$('a[rel=nyro]').nyroModal();
	} catch (ex) {};
	
	$("input[type=text],input[type=password],textarea")
	.filter(".auto-clear")
	.bind("focus", function(e) {
		if (this.value==this.defaultValue) { 
			this.value = "";
			$(this).addClass("focused");
		}
	})
	.bind("blur", function(e) {
		if (this.value=="") {
			this.value = this.defaultValue;
			$(this).removeClass("focused");
		}
	})
	.attr("value", function() {
		return this.defaultValue;
	});	
	
	$('.full-column .submenu').each(function(){
		var ul = $('ul',this).css('display','block').get(0);
		this.origStyle = {
			height: $(ul).height(),
			marginTop: $(ul).css('marginTop'),
			paddingTop: $(ul).css('paddingTop')
		};
		this.hideStyle = {
			height: 0,
			marginTop: 0,
			paddingTop: 0
		};
		$(ul).css('display','none').css({height:"0px",marginTop:"0px",paddingTop:"0px"});
		
		$(this).bind('mouseenter',function(){
			var ul = $('ul',this).get(0);				   
			$(ul).css('display','block').stop().animate(this.origStyle,600,"easeOutExpo");
		}).bind('mouseleave',function(){
			var ul = $('ul',this).get(0);
			$(ul).stop().animate(this.hideStyle,600,"easeOutExpo",function(){$(this).css('display','none');});
		});
	});
	
	$('a.print').bind('click',function(e){
		e.preventDefault();
		window.print();
	});
});	
