﻿$(document).ready(function() {


	jQuery.fn.exists = function() { return jQuery(this).length>0; }
	
	
	// Cufon
	
			if($("h1").exists()) {
				Cufon.replace('h1');
			}
			
			if($("h2").exists()) {
				Cufon.replace('h2');
			}
			
			if($("#najnowsze-wydanie").exists()) {
				Cufon.replace('.more', { hover: true });
			}
	



	// focus

			$("a").focus(function() {
				$(this).blur();
			});





	// Fancybox

			$(".fancy").fancybox({
				'titlePosition'	: 'over'
			});	
		
				   
	


	// Menu

			$(".menu_head").click(function() {
				$(this).next(".menu_body").slideToggle(300).siblings(".menu_body").slideUp("fast");
			});


			$(".hit").next(".menu_body").slideToggle(300).siblings(".menu_body").slideUp("fast");




	// Odd
	
			if($("#comments").exists()) {
				$("#comments dl:odd").css({ background: "#f2f2f2" });
			}

	
	
	
	// Remove in last element
	

			$("#banery a:last-child, #banery object:last-child, #banery div:last-child").css({ marginRight: "0" });
			
			if($("#gallery-index").exists()) {
				$("#gallery-index a:last-child").css({ marginRight: "0" });
			}

		

});



