jQuery(function(){
	clearInputs();
	jQuery('div.navigation').each(function(){
		if(jQuery(this).find('a').length == 0) jQuery(this).remove();
	});
	jQuery('#menu li:has("ul") > a').addClass('with-drop');
	if(jQuery('#meal-box').length){
		jQuery.ajax({
			url: jQuery('#meal-box div.box').text(),
			type: 'GET',
			data: 'get_meal=1',
			success: function(_html){
				jQuery('#meal-box div.box').html(jQuery(_html).find('#container').html()).css('display', 'block');
			}
		});
	}
});
/*---- clear inputs ---*/
function clearInputs(){
	jQuery('input:text, input:password, textarea').each(function(){
		var _el = jQuery(this);
		_el.data('val', _el.val());
		_el.bind('focus', function(){
			if(_el.val() == _el.data('val')) _el.val('');
		}).bind('blur', function(){
			if(_el.val() == '') _el.val(_el.data('val'));
		});
	});
}
