$(document).ready(function(){ 
		$(".bottomRow ul li:first-child").addClass('first');
		$("hr").attr('noshade','noshade');
		$(".bottomRow ul li:last-child").addClass('last');
		$(".bottomRow ul li:nth-child(3n)").addClass("odd");
		$("#footer ul li:last-child").addClass('last');
		$("#nav ul li:last-child").addClass('last');
		$("#nav ul li.parent").hover(
		  function () {
			$(this).find('ul').css('display','block');
			$(this).find('a:first').addClass('activeHover');
			}, 
		  function () {
			$(this).find('ul').css('display','none');
			$(this).find('a:first').removeClass('activeHover');
			});
$(".inputBoxEmail").val('Enter your email address');
$(".inputBoxEmail").css("color", "#888");
$(".inputBoxEmail").each(function() {
    var default_value = this.value;
	$(this).focus(function() {
        if(this.value == default_value) {
            this.value = '';
			$(this).css("color", "#000");

        }
		else
		{
		this.value = $.trim(this.value);
		}
    });
    $(this).blur(function() {
        if(this.value == '') {
            this.value = default_value;
			$(this).css("color", "#888");
        }
		else{
		this.value = $.trim(this.value);
		if(this.value == ''){
		$(".inputBoxEmail").val('Enter your email address');
		$(".inputBoxEmail").css("color", "#888")
		}
		}
    });
});
$("#newsletter").submit(function() {
	    var checkMail = $("#newsletter input:first").val();
		var AtSym     = checkMail.indexOf('@')
		var period1   = checkMail.indexOf('.')
		var Period    = checkMail.lastIndexOf('.')
		var Space     = checkMail.indexOf(' ')
		var Length    = checkMail.length - 1  
      if ($("#newsletter input:first").val() == "Enter your email address") {
		 alert("Please enter your email address.");
        return false;
      }
	   else if ((AtSym < 1) ||
				(Period <= AtSym+1) ||
				(period1 < 1) ||
				(Period == Length ) ||
				(Space  != -1))
			{
				alert("Please enter E-mail in correct format.");
				return false;
			}
    });
$('#nav ul li.parent:eq(6)').append($('ul#cat'));
});
$(window).load(function(){ 
var testHeight = $('#contentArea .testimonial').height() + 10;
		$('#welcomeTxt').css('padding-bottom',testHeight);	
});
