	// 'More' menu
	$(document).ready(function() {
		$('#profile-more').hover(function() {
			$('#profileMoreMenu').fadeIn("fast");
		}, function() {
			$('#profileMoreMenu').fadeOut("fast");
		});
	});
	
	// 'More' menu
	$(document).ready(function() {
		$('#profile-reports').hover(function() {
			$('#profileReportsMenu').fadeIn("fast");
		}, function() {
			$('#profileReportsMenu').fadeOut("fast");
		});
	});
// dropdown menu code
$(document).ready(function(){
    $("#navlist li").hover(
        function(){ $("ul", this).fadeIn("fast"); }, 
        function() { } 
    );
    if (document.all) {
        $("#navlist li").hoverClass ("sfHover");
    }
});
 
$.fn.hoverClass = function(c) {
    return this.each(function(){
        $(this).hover( 
            function() { $(this).addClass(c);  },
            function() { $(this).removeClass(c); }
        );
    });
};    



$(function(){
	// makes search box 'watermark text' work
	$('input').searchField();
	$('textarea').searchField();


	// navbar hover code
	$('#nav-myexpo').hover(function() {
		$('#nav-myexpo a').css({ backgroundPosition:"0 -25px" });
	}, function() {
		$('#nav-myexpo a').css({ backgroundPosition:"0 0" });
	});

	$('#nav-myexpo .nav-dropdown').hover(function() {
		$('#nav-myexpo a').css({ backgroundPosition:"0 -25px" });
	}, function() {
		$('#nav-myexpo a').css({ backgroundPosition:"0 0" });
	});

	$('#nav-collect').hover(function() {
		$('#nav-collect a').css({ backgroundPosition:"0 -25px" });
	}, function() {
		$('#nav-collect a').css({ backgroundPosition:"0 0" });
	});

	$('#nav-collect .nav-dropdown').hover(function() {
		$('#nav-collect a').css({ backgroundPosition:"0 -25px" });
	}, function() {
		$('#nav-collect a').css({ backgroundPosition:"0 0" });
	});

	$('#nav-discuss').hover(function() {
		$('#nav-discuss a').css({ backgroundPosition:"0 -25px" });
	}, function() {
		$('#nav-discuss a').css({ backgroundPosition:"0 0" });
	});

	$('#nav-discuss .nav-dropdown').hover(function() {
		$('#nav-discuss a').css({ backgroundPosition:"0 -25px" });
	}, function() {
		$('#nav-discuss a').css({ backgroundPosition:"0 0" });
	});

	$('#nav-research').hover(function() {
		$('#nav-research a').css({ backgroundPosition:"0 -25px" });
	}, function() {
		$('#nav-research a').css({ backgroundPosition:"0 0" });
	});

	$('#nav-research .nav-dropdown').hover(function() {
		$('#nav-research a').css({ backgroundPosition:"0 -25px" });
	}, function() {
		$('#nav-research a').css({ backgroundPosition:"0 0" });
	});

});




// SEARCH RESULTS JQUERY CODE
// mouseover row highlight
$('table.searchResults tr td').hover(function() {
	$(this).addClass('rowHover');
}, function() {
	$(this).removeClass('rowHover');
});

// toggles the sections on clicking the headers 
$(document).ready(function() {
  $('a#title-items').click(function() {
    $('#results-items').slideToggle();
    return false;
  });
});

$(document).ready(function() {
  $('a#title-articles').click(function() {
    $('#results-articles').slideToggle();
    return false;
  });
});

$(document).ready(function() {
  $('a#title-members').click(function() {
    $('#results-members').slideToggle();
    return false;
  });
});

function hideAllSections() {
    $('#results-items').slideUp();
    $('#results-articles').slideUp();
    $('#results-members').slideUp();
}

function showSection(theSection) {
	if (theSection == "all") {
		$('#results-items').slideDown();
		$('#results-articles').slideDown();
		$('#results-members').slideDown();
	} else {
		hideAllSections()
		divName = "#results-" + theSection;
		$(divName).slideDown();
	}
}





// categoryMenu
$(document).ready(function() {
	$('#header-home').hover(function() {
		$('#categoryMenu').fadeIn("fast");
	}, function() {
		$('#categoryMenu').fadeOut("fast");
	});
});





// SELECT ALL CHECKBOXES
$(document).ready(function() {
	$("#checkboxall").click(function() {
		var checked_status = this.checked;
		$("input[@name=checkall]").each(function() {
			this.checked = checked_status;
		});
	});
});





// GROUPS - mouseover row highlight
$('table.groupMsgs tr td').hover(function() {
	$(this).addClass('rowHover');
}, function() {
	$(this).removeClass('rowHover');
});
