$(document).ready(function()
{



//displays drop down so it will show when toggled
$("#nav ul li ul").addClass('dropdown');

//hides drop down until it is toggled
$("#nav ul li ul.dropdown").hide();

$('#nav > ul > li').hover(

//Opens drop down
function () {
$(this).addClass('active');
$("#nav ul li.active ul").slideDown(200);
},

//Closes drop down
function () {
$("#nav ul li.active ul").delay(50).slideUp(100);
$(this).removeClass('active');

}
);


//hide the all of the element with class msg_body
$(".xpander-body").hide();
//toggle the componenet with class msg_body
$(".xpander-target").click(function()
{
$(this).next(".xpander-body").slideToggle(300);
});

$(".xpander-body:first").show();




//News Table
$("#news table:last-child").addClass("last");



//E-Newsletter Form
var clearMePrevious = '';
	
	// clear input on focus
	$('.clear-form').focus(function()
	{
		if($(this).val()==$(this).attr('title'))
		{
			clearMePrevious = $(this).val();
			$(this).val('');
		}
	});
	// if field is empty afterward, add text again
	$('.clear-form').blur(function()
	{
		if($(this).val()=='')
		{
			$(this).val(clearMePrevious);
		}
	});


});
