Cufon.replace('#bar p, #top ul li a, #slider ul li h5, #search-boxes h5, #info-boxes .box h5, #login-box h5, #photo-box h4,' +
	'#best-photos h5, .toc .expand, .header h3, #news ul li .read, #news ul li .title h5, #read-about h5, #archive h5, ' + 
	'#archive h4, #news .category span, #archive .nav li, #archive .box li, #actual h5, #actual li, #archive-list h4, ' + 
	'#news a.more, a.goback, #article h4, #authors a.more, #authors h4, #authors small, #addcomment h4, #addcomment .input-submit, ' + 
	'#detailed-article .authors div, #detailed-article h2, #detailed-article h3, #related ul li, #related h5, #road h5, #news .title h4, ' + 
	'.aw-list ul li a, .articles-list li .data .info strong, .articles-list li .data .info .page, .download-list li .data h2', { fontFamily: 'Myriad Pro SemiCn', hover: 'true' });
Cufon.replace('#news .title h4, #news .category strong, .articles-list li .data .inner h2', { fontFamily: 'Myriad Pro BoldCondensed', hover: 'true' });

$(document).ready(function() {

$("#social-bar .extend").mouseenter(function(){
	$(this).find(".extended").slideDown(200);
}).mouseleave(function(){
	$(this).find(".extended").slideUp(100);
});

$("#archive-list ul li:nth-child(4n)").addClass("remove");
						   
$("#archive .nav a").click(function(){
	var curList = $("#archive .nav a.current").attr("rel");
	var curListHeight = $("#archive .months").height();
	$("#archive .nav a").removeClass("current");
	$(this).addClass("current");
	var listID = $(this).attr("rel");
	if (listID != curList) {
		$("#"+curList).fadeOut(0, function() {
			$("#"+listID).fadeIn();
			var newHeight = $("#"+listID).height();
		});
	}        
	return false;
});						   


	/* autoclear function for inputs */
	$('.autoclear').click(
	function() {
	if (this.value == this.defaultValue) {
	this.value = '';
	}
	}
	);
	$('.autoclear').blur(
	function() {
	if (this.value == '') {
	this.value = this.defaultValue;
	}
	}
	);					
		
		
// world map in abecadlo

$("#w-an").mouseover(function(){
  $("#world-map").removeAttr("class");
  $("#world-map").addClass("w-an");
});

$("#w-as").mouseover(function(){
  $("#world-map").removeAttr("class");
  $("#world-map").addClass("w-as");
});

$("#w-eu").mouseover(function(){
  $("#world-map").removeAttr("class");
  $("#world-map").addClass("w-eu");
});

$("#w-af").mouseover(function(){
  $("#world-map").removeAttr("class");
  $("#world-map").addClass("w-af");
});

$("#w-au").mouseover(function(){
  $("#world-map").removeAttr("class");
  $("#world-map").addClass("w-au");
});

$("#w-az").mouseover(function(){
  $("#world-map").removeAttr("class");
  $("#world-map").addClass("w-az");
});

$("#world-map").mouseout(function(){
$(this).removeAttr("class");
});

$(".alphabet a").click(function(){
	if(!$(this).hasClass('disabled'))
		window.location.href = "abecadlo_swiata.html?a="+$(this).text();
});


$("#aw-map .slide.up").click(function () {
		
	$("#world-map").slideUp("normal");
	$(this).hide();
	$("#aw-map .slide.down").show();
	$.cookie("aw-closed", 1);
	
});
$("#aw-map .slide.down").click(function() {
	$(this).hide();
	$("#world-map").slideDown("normal");
	$("#aw-map .slide.up").show();
	$.cookie("aw-closed", 0);
});
	
if($.cookie("aw-closed") ==1) 
	$("#aw-map .slide.up").click();
/* odpowiada za show/hide dymkow w audiobookach */
$(".articles-list li .play .button").hover(function(){
	$(this).find(".cloud").show();
},function(){
	$(this).find(".cloud").hide();
	});	
	
});
		
