(function($) {
$.fn.createMenu = function(o) {
	
	var parent = $(this); 
	var activeMenu = $(this).find('li.active');
	$(activeMenu).find('ul:first').show();

	if(activeMenu.get(0) == undefined)
	{
		activeMenu = $(this).find('li:first');
		$(activeMenu).find('ul:first').show();
	}

	$(this).hover(
		function(){;},
		function(){
			$(activeMenu).find('ul:first').show();
		}
	);

	return $(this).find('> li').each(function() {
		var me = $(this);
		
		$(this).hover(
			function(){
				if($(this)[0] != $(activeMenu)[0])
				{
					$(activeMenu).find('ul:first').hide();
				}

				$(this).find('ul:first').show();
			},
			function(){
				$(this).find('ul:first').hide();
				//$(activeMenu).find('ul:first').show();
			}
		
		)
		

	});
};
})(jQuery);


$(document).ready(function(){

	/*$("#gift_blog .head").hover(
		
		function(){
			$("#gift_blog .head a:first").addClass('active');
			$("#gift_blog .body").show('slow');
		},

		function(){
			$("#gift_blog .head a:first").removeClass('active');
			$("#gift_blog .body").hide('slow');
		}

	);*/

	$("#gift_blog .head").click(function(){
		
		if($("#gift_blog .head a:first").hasClass('active'))
		{
			$("#gift_blog .head a:first").removeClass('active');
			$("#gift_blog .body").hide('slow');
		}
		else
		{
			$("#gift_blog .head a:first").addClass('active');
			$("#gift_blog .body").show('slow');
		}

	});
});
