Cufon.replace('.mainMenu a, .logo a span');
Cufon.replace('#footerWrapper .fr em');
Cufon.replace('.contentHeader h1');
Cufon.replace('.contentHeader h2');
Cufon.replace('.smallBoxTitle h2, .slider_box_title');
Cufon.replace(".swf_player_title");

$(document).ready(function (){

	$("a[rel='lightbox']").colorbox({
		current: "Zdjęcie {current} z {total}"
	});

	$("div.photosListItem a").hover(
		function(){
			$(this).children("span").css({right: "5px", bottom: "5px"});
		},
		function(){
			$(this).children("span").css({right: "0px", bottom: "0px"});
		}
	);

	$("div.photos_scrollable_list").scrollable();
	if ($("div.photos_scrollable_list div.items div").length <= 1) {
		$("div.photos_scrollable_list").css("padding-left","40px");
		$(".photos_scrollable_pane .prev, .photos_scrollable_pane .next").hide();
	}
	$(".photos_scrollable_list .items img").click(function(){

		if ($(this).hasClass("active")) {
			return;
		}
		var url = $(this).attr("src").replace("mini/","midi/");
		var title = $(this).attr("title");
		var wrap = $(".photos_scrollable_thumb").fadeTo("medium", 0.5);
		var img = new Image();
		img.onload = function() {
			wrap.fadeTo("fast", 1);
			wrap.find("img").attr("src", url).attr("title",title);
		};
		img.src = url;
		$(".photos_scrollable_list .items img").removeClass("active");
		$(this).addClass("active");
		$("div.photos_scrollable_thumb_title").html(title);
	}).filter(":first").click();
    
	$(".fckd").live("mousedown",function(){
		if($.browser.msie) {
           $(this).css({
			width:"auto",
			position:"relative",
			"z-index":"50"
		   });
       }
   });
   $(".fckd").live("change",function(){
       if ($.browser.msie) {
           $(this).css("width","180px");
       }
   });
   $(".fckd").live("blur",function(){
       if ($.browser.msie) {
           $(this).css("width","180px");
       }
   });
	
});
