//mouseleave
jQuery.inputHighlight = function(color){  
    $("input[type='text'],textarea").each(function(){		
        $(this).focus(function(){
			if( this.id != 'none')
	            $(this).css({"background" : color});  
        });  
        $(this).blur(function(){
			if( this.id != 'none')
            $(this).css({"background" : "white"});  
        });  
    });  
}

$(document).ready(function(){
	//$.inputHighlight("#f1fbff");
	var search_keywords = $('#search_keywords');
	search_keywords.focus(function(){
		if( Trim($(this).val()) == 'Nhập từ khóa cần tìm kiếm' )
			$(this).val('');
	}).blur(function(){
		if( Trim($(this).val()) == '' )
			$(this).val('Nhập từ khóa cần tìm kiếm');
	});
	//=====================================================
	$('#page_top').click(function(){
		$('html,body').animate({scrollTop:0},500);							  
	});
	//=====================================================
	$('.navbar li.scat').mouseover(function(){
		$(this).prev().addClass('sh');
		$(this).next().addClass('sh');
		$(this).addClass('h').find('ul:first').stop().show().find('li:last a').css('border',0);
	}).mouseleave(function(){
		$(this).prev().removeClass('sh');
		$(this).next().removeClass('sh');
		$(this).removeClass('h').find('ul:first').stop().hide();
	});
	
});

