addJQUERYFunc = {}
$(document).ready(function(){
  for(var i in addJQUERYFunc)
	  addJQUERYFunc[i]();

  //для аудио-проигрывателя
	$("#audio img").click(function(){
		if($.cookie('the_stop'))
		{ //надо включить
			$(this).removeClass("audio_stop");
	 		soundManager.play('hhCymbal');
	 		$.cookie('the_stop', null);
			$(this).addClass("audio_play");
			return false;
		}
		else
		{ //надо выключить
			$(this).removeClass("audio_play");
	 		soundManager.stop('hhCymbal');
	 		$.cookie('the_stop', 'ok');
			$(this).addClass("audio_stop");
			return false;
		}
	});
	$("#no_sound a").click(function(){
		{ //надо выключить
			$("#audio img").removeClass("audio_play");
	 		soundManager.stop('hhCymbal');
	 		$.cookie('the_stop', 'ok');
			$("#audio img").addClass("audio_stop");
			return false;
		}
	});

/*
	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");
	});
/*
  $(".light_alw img").hover(function(){
  		$(this).removeClass("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");
	});

  //--------------------
    $("#gallery .photo a").fancybox({
    	hideOnContentClick: true,
    	overlayShow: true,
    	overlayOpacity: 0.5,
    	zoomSpeedIn: 1500,
    	zoomSpeedOut:600
    });

    $("#pressa_gallery .photo 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
    });


    $("#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
    });

    $("#acters_foto a.foto").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');
	});

});



