
$(document).ready(function(){

	Cufon.replace("#money");
	Cufon.replace("#money2");
	Cufon.replace("#money3");

	$("div.billing ul a").focus(function(){
        $(this).blur();
    });

  $(".light img").hover(function(){
  		$(this).toggleClass("on");
	},function(){
  		$(this).toggleClass("on");
	});

  $("#actor_menu a").hover(function(){
  		$(this).toggleClass("hover");
	},function(){
  		$(this).toggleClass("hover");
	});

  $("#menu li").hover(function(){
  		$(this).toggleClass("hover");
	},function(){
  		$(this).toggleClass("hover");
	});

  $(".carrier_post input#button").hover(function(){
  		$(this).toggleClass("on");
	},function(){
  		$(this).toggleClass("on");
	});

	$("div.billing ul a").click(function(){
		if ($(this).siblings('div').length) {
			$(this).siblings('div').slideToggle("fast");
			$(this).parent('li').siblings('li').find('div:visible').slideUp("fast");
			return false;
		}
    });

	$("#actors div.one a").hover(function(){
  		$(this).find('img').toggleClass("on");
	},function(){
  		$(this).find('img').toggleClass("on");
	});

	$("#submenu a").hover(function(){
  		$(this).find('img').toggleClass("on");
	},function(){
  		$(this).find('img').toggleClass("on");
	});

	$("#uploadify").uploadify({
		'uploader'       : '/upload/scripts/uploadify.swf',
		'script'         : '/upload/scripts/uploadify.php',
		'cancelImg'      : '/upload/cancel.png',
		'folder'         : 'uploads',
		'queueID'        : 'fileQueue',
		'auto'           : true,
		'multi'          : true
	});

  //--------------------
    $("#gallery a").fancybox({
    	hideOnContentClick: true,
    	overlayShow: true,
    	overlayOpacity: 0.5,
    	zoomSpeedIn: 1500,
    	zoomSpeedOut:600
    });

    $("#video, #video2, .video").fancybox({
    	zoomSpeedIn: 0,
    	zoomSpeedOut:0,
    	frameWidth: 445,
    	frameHeight: 250
    });


    var imageList = [
		{url: "/fancybox_img/05.jpg", title: "Первая картинка"},
		{url: "/fancybox_img/05-1.jpg", title: "Вторая картинка"},
		{url: "/fancybox_img/05-2.jpg", title: "Третья картинка"},
		{url: "/fancybox_img/05-3.jpg", title: "Четвертая картинка"}
	];

	function getGroupItems(opts) {
		jQuery.each(imageList, function(i, val) {
	        opts.itemArray.push(val);
	    });
	}

	$("#custom").fancybox({
	    itemLoadCallback: getGroupItems
	});

    $("#frame").fancybox({
    	zoomSpeedIn: 0,
    	zoomSpeedOut:0,
    	frameWidth: 800,
    	frameHeight: 600
    });


    $("#demotivator_list .photo a, #demotivator_tbl .photo a").fancybox({
    	hideOnContentClick: true,
    	overlayShow: true,
    	overlayOpacity: 0.5,
    	zoomSpeedIn: 1500,
    	zoomSpeedOut:600
    });


    $("#miss2_list .photo a").fancybox({
    	hideOnContentClick: true,
    	overlayShow: true,
    	overlayOpacity: 0.5,
    	zoomSpeedIn: 1500,
    	zoomSpeedOut:600
    });

    $("#konkurs_foto .photo a").fancybox({
    	hideOnContentClick: true,
    	overlayShow: true,
    	overlayOpacity: 0.5,
    	zoomSpeedIn: 1500,
    	zoomSpeedOut:600
    });

  //--------------------

	$("#friends_video .close").click(function(){
		$(this).parent().parent().css('display', 'none');
		return false;
  });

	$("#cast .close").click(function(){
		$(this).parent().parent().css('display', 'none');
		return false;
  });

  $("#map .on_map").hover(function(){
  		$(this).parent().find('.pink_block').css('display', 'block');
	},function(){
  		$(this).parent().find('.pink_block').css('display', 'none');
	});

});

$(window).resize(function(){



});




