$(document).ready(function() {
	$('.help').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(500, 1);
	  }, function () {
	    $span.stop().fadeTo(500, 0);
	  });
	});
});


$(document).ready(function(){
   $(".wizard_step.active").addClass('highlight');
   $(".wizard_step.active").fadeTo("slow", 0.1); // This sets the opacity of the thumbs to fade down to 30% when the page loads
   $(".wizard_step.active").fadeTo("slow", 1);
   $(".wizard_step.active").fadeTo("slow", 0.1);
   $(".wizard_step.active").fadeTo("slow", 1);

});

// wizard_step active


$(function() {
    $('.items_list table tbody tr').mouseover(function() {
        $(this).addClass('selected_item'); // add row highlight
        $('#inactive_actions', this).removeClass('inactive_actions'); // show button in action_column

		if ($('#inactive_actions img', this).attr('src') !== undefined) { // change icon from inactive -> active
			var src = $('#inactive_actions img', this).attr("src").replace("_inactive", "");
			$('#inactive_actions img', this).attr("src", src);		
    	}    
    }).mouseout(function() {
        $(this).removeClass('selected_item'); // remove row highlight
        $('#inactive_actions', this).addClass('inactive_actions'); // hide button in action_column

		if ($('#inactive_actions img', this).attr('src') !== undefined) { // change icon from active -> inactive
    	     var src = $('#inactive_actions img', this).attr("src").replace(/(.*)\.[^\.]*/, "$1") + "_inactive.png";    	    
			$('#inactive_actions img', this).attr("src", src);
		}
    });
});

$(function() {
    $('.portal_item_list .portal_item').mouseover(function() {
        $(this).addClass('selected_portal_item'); // add row highlight
    }).mouseout(function() {
        $(this).removeClass('selected_portal_item'); // remove row highlight
    });
});
