$(document).ready(function() {


   $("ul.CMSListMenuUL").superfish({ 
            delay:      500,                            // one second delay on mouseout 
            animation:  {opacity:'show',height:'show'}  // fade-in and slide-down animation 
         }); 


	$(".clearFocus").focus(function () {
		if ($(this).val() === $(this).attr("value")) {
		$(this).val("");
		}
		}).blur(function () {
		if ($(this).val() === "") {
		$(this).val($(this).attr("value"));
		}
	});
	
	$(".col4 .inner").equalHeights();
	
	$('#clickme').click(function() {
  		$('#logForm1').slideToggle('slow', function() {
		  });
	});
	
	$(".tnav a:nth-child(2)").addClass("sec");
	$("td.EditingFormLabelCell:contains('*')").addClass('req');
	$(".newsItem h4:first-child").addClass("first");

	$('span.top a').click(function(){
		$('html, body').animate({scrollTop:0}, 'slow');
	    return false;
	    });
	    
	
	 
	
	// cache references to the input elements into variables
    var passwordField = $('#logBox input[type=password]');
    var emailField = $('input[name=email]');
    // get the default value for the email address field
    var emailFieldDefault = emailField.val();
 
    // add a password placeholder field to the html
    passwordField.after('<input id="passwordPlaceholder" type="text" value="password" class="clearFocus" />');
    var passwordPlaceholder = $('#passwordPlaceholder');
 
    // show the placeholder with the prompt text and hide the actual password field
    passwordPlaceholder.show();
    passwordField.hide();

    // when focus is placed on the placeholder hide the placeholder and show the actual password field
    passwordPlaceholder.focus(function() {
        passwordPlaceholder.hide();
        passwordField.show();
        passwordField.focus();
    });
    // and vice versa: hide the actual password field if no password has yet been entered
    passwordField.blur(function() {
        if(passwordField.val() == '') {
            passwordPlaceholder.show();
            passwordField.hide();
        }
    });
 
    // when focus goes to and moves away from the email field, reset it to blank or restore the default depending if a value is entered
    emailField.focus(function() {
        if(emailField.val() == emailFieldDefault) {
            emailField.val('');
        }
    });
    emailField.blur(function() {
        if(emailField.val() == '') {
            emailField.val(emailFieldDefault);
        }
    });
	
}); //oe $
