///<reference path="jquery-1.3.2.js"/>
$(function(){
	/**
	*	Jquery Horizontal Slide Navigation
	*	webmaster@chazzuka.com
	*	http://www.chazzuka.com
	*	Nov 13th 2008 @ Denpasar, Bali Paradise Island
	**/
	//@ active scroll
    var _active = null;
	//@ max expand in pixel
    var _hmax = 80;
	//@ min height in pixel
    var _hmin = 0;	
	//@ loop through matches selector
    $("ul#nav li a").each(function(){
		//@ in/out handler
		$(this).hover(
			//@ hover
			function(){
				//@ child span expand
				
				$(this).find('span').animate({height: _hmax+"px"}, {queue:false, duration:300, easing:'easeOutBack'});
				//@ set active to current hovered
				_active = $(this);
				
			},
			//@ out
			function() {
				//@ slide back
				$(_active).find('span').animate({height: _hmin+"px"}, {queue:false, duration:300,easing:'easeInBack'});
			}
		);	
	});
});

function initMenu() {
$('#menu ul').hide();
//$('#menu .Listing').show();

$('#menu li a').click(
function() {
    
    var checkElement = $(this).next();
    if ((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        checkElement.slideUp('normal');
        return false;
    }
    if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menu ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
    }
}
);

$('.Drop').hover(
function() {

    //
    $('.List', this).hide(0);

    var fade = $(".List", this);
    if (fade.is(':animated')) {
        fade.show();
    } else {
        fade.fadeIn(300);
    }

    return false;


},
function() {
  
    var fade = $(".List", this);
    if (fade.is(':animated')) {
        fade.hide();
    } else {

        fade.fadeOut(300);
    }

 
    return false;

}
);

}
$(document).ready(function() {
    initMenu();
  
});
