// JavaScript Document

/*-------------------------- ICON HOVER --------------------------*/

$(function() {
	$('.redactiemenu a img').hover(
		function() {
			this.src = this.src.replace( /\.png$/, '-rollover.png' );
		},
		function() {
			this.src = this.src.replace( /-rollover\.png$/, '.png' );
		}
	);
	
}); 


/*-------------------------- HELP TEXT HOVER --------------------------*/

$(document).ready(function(){

	$(".redactiemenu li").hover(function() {
	  $(this).find("span.help").animate({opacity: "show", top: "60"}, "slow");
	  $(this).find("div.redactiesubmenu").animate({opacity: "show", top: "102"}, "slow");
	}, function() {
	  $(this).find("span.help").animate({opacity: "hide", top: "60"}, "fast");
	  $(this).find("div.redactiesubmenu").animate({opacity: "hide", top: "102"}, "fast");
	});
	
	$(".redactiesubmenu li").hover(function() {
	  $(this).find("span.subhelp").animate({opacity: "show", top: "27"}, "slow");
	}, function() {
	  $(this).find("span.subhelp").animate({opacity: "hide", top: "27"}, "fast");
	});

});

/*-------------------------- EDIT HOVER --------------------------*/

$(document).ready(function(){
    
        $("#content-container").hover(function() {
          $(this).find("span.edit").animate({opacity: "show", top: "10"}, "slow");
        }, function() {
          $(this).find("span.edit").animate({opacity: "hide", top: "12"}, "fast");
        });
        $(".block").hover(function() {
          $(this).find("span.edit").animate({opacity: "show", top: "10"}, "slow");
          $(this).find("span.edit-menu").animate({opacity: "show", top: "-26"}, "slow");
          $(this).find("span.edit-menu2").animate({opacity: "show", top: "22"}, "slow");
        }, function() {
          $(this).find("span.edit").animate({opacity: "hide", top: "12"}, "fast");
          $(this).find("span.edit-menu").animate({opacity: "hide", top: "-10px"}, "fast");
          $(this).find("span.edit-menu2").animate({opacity: "hide", top: "-8px"}, "fast");
        });

});