var vnz = {
	init: function(){
	
		$('#primary-nav > ul').menu({
			showFunc: function(ele, callback){
			
				//we want the menu to "slide up"
				$(ele).css({height:'0px', top:'0px', display:'block'}).stop().animate({height:'180px', top:'-180px'}, function(){
					callback();
				});
			},
		
			hideFunc: function(ele, callback){
				$(ele).stop().animate({height:'0px', top:'-0px'}, function(){
					$(ele).hide();
					callback();
				});
			}
		});
		
		//if the menu items don't have a submenu, then we still need to animate the section marker
		$('#primary-nav > ul > li > a').hover(function(){
			$(this).siblings('.section-marker').stop().css({height: '0px', visibility:'visible'}).animate({height: '10px'})
		}, function(){
			$(this).siblings('.section-marker').stop().animate({height: '0px'})
		});
		
	},
	
	//return the current section of the website
	getSection: function(){
		var m = $('body').attr('class').match(/section-([\w\-]+)/);
		return m ? m[1] : '';
	}
}

if (!$.browser.msie || $.browser.version > 6){
	$(vnz.init);
}
