/*
Fancy Menu V1, 28.09.09
Copyright (C) 2009 Bogdan Pop of WebRaptor (http://www.bogdanpop.info, http://www.webraptor.eu)
Published by Freelancer Magazine (http://www.freelancermagazine.com)

Released under Creative Commons Attribution 3.0 (http://creativecommons.org/licenses/by/3.0)
If you modify this source codes and use it in your own projects you must not modify or remove the above credits. However, you may add your own below this line.
*/
jQuery(document).ready(function($)
	{
	// start the magic

	// if javascript is on, the menu will work ok.
	// Therefor we hide the expanded menu
	$('.menu-extend').hide();
	$('.clear').height(0);
	
	// if the "Detailed menu" button is clicked, fade it out and fade in the "Close menu button"
	// also slide the expanded menu into place
	$('.portfolio-but').click(function ()
		{ 	
		var isVisible = $('.menu-extend').is(':visible');
		var isVisibleportfolio = $('.portfolio').is(':visible');
        if(isVisible)
            {
            if(!isVisibleportfolio)
                {
                if(isVisiblecooking)
                    {
                    $('.cooking').slideUp("1000", function() { $('.portfolio').slideDown("1000") });
                    }
                else if(isVisiblegardening)
                    {
                    $('.gardening').slideUp("1000", function() { $('.portfolio').slideDown("1000") });   
                    }
                }
                else
                {
                $('.portfolio').slideUp("1000"); 
                }
            }
        else
            {
            $('.portfolio').slideDown();
            }
        });
	 });
