jQuery(document).ready( function() {

	//content is 100% all the time
	jQuery('#content').css( 'height', jQuery(document).height() );
	
	jQuery('.category-news-events #content').css('height', 'auto');
			
	jQuery('#content.reviews').css( 'minHeight', jQuery(document).height() );
	
	//prettyPhoto
	if( jQuery(".gallery-grid a[rel^='prettyPhoto']").length > 0 ) {
		jQuery(".gallery-grid a[rel^='prettyPhoto']").prettyPhoto();
	}
	
	//handle menu overlapping 
	jQuery('.menu li').not('.current-page-ancestor, .current-menu-item').has('ul').hover( 
		function() {
			//if( jQuery(this).attr('class').indexOf('current-menu-item') > -1 ) { //if you are not hovering over the current menu item
				jQuery('.menu li.current-menu-item .sub-menu, .menu li.current-menu-ancestor .sub-menu, .menu li.current-page-ancestor .sub-menu').hide();
			//}
		},
		function() {
			jQuery('.menu li.current-menu-item .sub-menu, .menu li.current-page-ancestor .sub-menu, .menu li.current_page_ancestor .sub-menu').show();
		}
	);
	
	//background always 100%, never repeating
	
	//take off border bottom from last menu item
	jQuery('.menu li:last').addClass('noBorderBottom');
	
	//fix ugly Open Table button
	jQuery('.OT_TableButton').attr('src','http://morrellwinebar.com/wp-content/themes/morrell/images/btn-find-table.gif');
	jQuery('.OT_TableButton').attr('value','Find Table');
	jQuery('.OT_TableButton').show();

	//scrollbar for home top bar'	
	if( jQuery("#webticker").length > 0 ) 
		setTimeout( function() { jQuery("#webticker").liScroll() }, 2000 );
});
