$(document).ready(function(){
	
		$("#nav ul li a").hover(function() { 
    
			$(this).parent().find("ul.subnav").slideDown('slow').show(); 
	
			$(this).parent().hover(function() {

			}, function(){
				$(this).parent().find("ul.subnav").slideUp('slow');
			});

		});
        
        /*$(":text").labelify({ 
                text: "label",
                labelledClass: "notfocused"
        });
        
        $("textarea").labelify({ 
                text: "label",
                labelledClass: "notfocused"
        });*/

        
        $('#contact-form div').children('input:text', 'textarea').each( function() {
        
                var element_id = $(this).attr('id');
                var title_txt = $('input#' + element_id).attr('title');
                
                //alert('Element ID ' + element_id + ' is -' + $('#' + element_id).val() + '-');
                
                if($('#' + element_id).val() == '') {
                        
                        $('#' + element_id).val(title_txt);
                        $(this).addClass('notfocused');
                        
                }
                
                if($(this).attr('title') == $(this).val()) {
                        $(this).addClass('notfocused');
                }
                
        });
        
        $('input:text').focus(function() {
        
                $(this).removeClass('notfocused');
                
                if($(this).attr('title') == $(this).val()) {
                        $(this).val('');
                }
        
        });
        
        $('input:text').blur(function() {
        
                
                
                if($(this).val() == '') {
                        
                        $(this).addClass('notfocused');
                        $(this).val($(this).attr('title'));
                        $(this).addClass('notfocused');
                        
                }
        
        });
        
        
	});

 DD_belatedPNG.fix('ul');
