
function show_menu(event){
 jQuery('#left_links').animate({'margin-left':'-115px'},500,'easeOutExpo',function(e){
  //jQuery(this.parentNode).css({'display':'none'})
  })
 .parent().css({'z-index':4});
 jQuery('#top_links_container>ul').delay(400).animate({'top':'0px'},500,'easeOutExpo',function(e){
  jQuery('#top_links_container').css({'overflow':'visible'});
  });
	jQuery('#tintfade').css({'z-index':3})
	.stop().delay(400).animate({'height':'330px'}
	,{'duration':500,'easing':'easeOutExpo','complete':function(e){  }
	,'step':function(){ jQuery(this).css({'background-position':'0px '+(jQuery(this).height()-607)+'px'}); }
	});
 }
function hide_menu(event){
 //reset init settings
 jQuery('#top_links_container').data('init',null);
 jQuery('#tintfade').css({'z-index':2}).stop().animate(
  {'height':'430px'},{'duration':800,'easing':'easeOutExpo','complete':function(){}
  ,'step':function(){ jQuery(this).css({'background-position':'0px '+(jQuery(this).height()-607)+'px'}); }
  });
 //slide the 'lhs menu' in from left to right
 jQuery('#left_links').delay(300).animate({'margin-left':'0px'},500,'easeOutExpo',function(e){
  jQuery(this).find('#li_0_1>.visible').animate({opacity:1},400,'linear',function(e){ });
  })
 .parent().css({'z-index':11})
 ;
 //hide all submenus
 jQuery('#top_links_container>ul>li>ul').css({display:'none'});
 //slide the 'top menu' out of view upward
 jQuery('#top_links_container').css({'overflow':'hidden'}).find('ul').eq(0)
 .animate({'top':'-32px'},500,'easeOutExpo',function(e){
  
  });
 }

function top_links_init(event){
 jQuery('#top_links_container').data('init',true)
 .unbind('mouseover',top_links_init);
 jQuery('#left_links #li_0_1>.visible')
 .animate({opacity:1},400,'linear',function(e){ });
 }

jQuery(document).ready(function(event){
jQuery('#top_links_container>ul').bind('mouseover',top_links_init);
jQuery('#top_links_container>ul>li').each(function(n,i){

if(jQuery(this).find('ul:first-child').size()>0)
jQuery(this).bind('mouseover',function(event){
 jQuery(this).find('ul:first-child').css({'display':'block'});
 //jQuery('#top_links_container').css({'z-index':10});
 jQuery('#tintfade').css({'z-index':9}).stop().animate(
  {'height':'430px'},{'duration':800,'easing':'easeOutExpo','complete':function(){}
  ,'step':function(){ jQuery(this).css({'background-position':'0px '+(jQuery(this).height()-607)+'px'}); }
  });
 })

})
.parent().bind('mouseover',function(event){ })
.parent().find('li>ul').css({'display':'none'});

jQuery(document).bind('mouseover',function(event){
 event = ( window.event || event );
 var target = ( event.target || event.srcElement );
 
 jQuery('#top_links_container>ul:first-child>li').each(function(i){
  if(!jQuery.contains(this,target)&&this!=target){
   jQuery(this).find('ul:first-child').css({'display':'none'});
   }
  });
 
 if(!jQuery.contains(jQuery('#top_links_container').get(0),target)
 && jQuery('#top_links_container').data('init')){
 
  //jQuery('#top_links_container').css({'z-index':5});
  jQuery('#tintfade').css({'z-index':3})
  .stop().animate({'height':'330px'}
  ,{'duration':500,'easing':'easeOutExpo','complete':function(e){  }
  ,'step':function(){ jQuery(this).css({'background-position':'0px '+(jQuery(this).height()-607)+'px'}); }
  });
  
  }//!jQuery.contains
 
 });//jQuery(document).bind
 });//jQuery(document).ready
