function show(id)
{
	document.getElementById(id).style.display = 'block';
}
function hide(id)
{
	document.getElementById(id).style.display = 'none';
}
function hide_all()
{
	bloki = document.getElementById("content").getElementsByTagName("div");
	
	for(var i=0; i < bloki.length; i++)
	{
		bloki[i].style.display = 'none';
	}
}

jQuery(document).ready(function() {

	jQuery('body').addClass("js");
  
	if(typeof Cufon != 'undefined') {
		Cufon.replace('.first-letter', { fontFamily: 'English111 Vivace BT' });
		Cufon.replace('p.intro', { fontFamily: 'Apple Chancery', hover:true });
		Cufon.replace('#main h1', { fontFamily: 'Century Gothic', hover:true });
		
				
		//Cufon.replace('#intro span.subline', { fontFamily: 'Apple Chancery', hover:true });
		//Cufon.replace('#intro span.subline', { textShadow: '1px 1px 2px rgba(255, 255, 255, 0.7)' });
		Cufon.replace('#nav a,#header .menu a,#footer a,#sub-page-menu li a', { fontFamily: 'Century Gothic', hover:true });
		//Cufon.replace('#nav a,#main h1,#main h2,#main h3,#main h4,#main h5,#main h6,.offer a,#header .menu a,#footer a,#sub-page-menu li a', { fontFamily: 'Century Gothic', hover:true });
		Cufon.replace('#intro h1 a', {
				fontFamily: 'Century Gothic',
				textShadow: '1px 1px 2px rgba(255, 255, 255, 0.7)'
			});

		
	};

	if(typeof DD_belatedPNG != 'undefined'){
	  DD_belatedPNG.fix('.channel-lounge .wrapper, #wybierz-kanal, .logo, .logo span, #main-nav, #main-nav .primary li a, #promo, #promo h2 img, .carousel, #content span.t, #content span.b, .carousel li a, .carousel .prev, .carousel .next, .carousel .prev a, .carousel .next a, .rating, .rating .value, .carousel-promo h2, .tab-panel, .tabs li a, .page-title, #modal h2, #modal .close, #modal h3 span, #modal .bt, footer.container .channels li a, .featured, .featured-inner');
	};

	
	jQuery("#slider").wslide({
		width: 960,
		height: 236,
		autolink: true,
		fade: true,
		duration: 2000
	});

	//dodanie automatycznego sliderowania

	var id = "#slider";
	var nav = jQuery(id+"-menu a");
	var i = 0;
	var whoClicked = "";
	autoSlider(6000);
	jQuery(id+"-menu a").bind("click",interruptSliderCheck);


	function autoSlider(time) {
		jQuery(id+"-wrap").everyTime(time, function() {
			if(nav.length == i-1)
				i=0;
			else
				i=i+1;
			whoClicked="auto";
			jQuery(nav[i]).click();
			whoClicked="";
		});
	}
	function interruptSliderCheck() {
		if(whoClicked!="auto") {
			jQuery(id+"-wrap").stopTime();
			i = parseInt(jQuery(this).text()) - 1;
			autoSlider(15000);
		}
	
		return true;
	}

});
