// JavaScript Document
jQuery().ready( function(){
		
		
		
		$( 'a' ).click(
			function(){
				//remove this for the functionality to work again
				return true;
				
				
				var uCase = this.title.toUpperCase();
				var modalDiv = "<div id='modalDiv' style='display:none; background:#000; position:fixed; left:0; top:0; width:100%; height:100%; opacity:.65; z-index:9999;' ></div>";
				
				if( uCase.search( 'SCHEDULE' ) > -1 && uCase.search( 'ONLINE' ) > -1 ) {
					
					$( 'body' ).append( '<div class="popup_block"></div>' );
					//they chose to schedule online
					$('.popup_block').fadeIn().css({ 'width': Number( 800 ), 'height' : Number( 600 ) } ).css( { 'margin-left' : Number( -440 ), 'margin-top' : Number( -340 ) } ).load( 'http://www.ahconnections.com/wp-content/themes/ahconnec/scheduler.php' );
					
					
					$( 'body' ).append( modalDiv );
					$( '#modalDiv' ).css( {'filter' : 'alpha(opacity=65)'} ).fadeIn();
					
					return false;
				}
				
			}
		);
		
		$( '#modalDiv' ).live( 'click',
			function() {
				
				$( '#modalDiv, .popup_block' ).fadeOut(
					function() {
						$( '#modalDiv, .popup_block' ).remove();
					}
				);
				
			}
		 );
		
		var openNav = function( e ) {
			$( '.page_item li ul' ).hide();
			$( '.page_item .current_page_item ul' ).slideDown();
		};
		
		$('.page_item').click( 
			function( e ) {
				//e.preventDefault();
				$( '.page_item' ).removeClass( 'current_page_item' );
				$( this ).addClass( 'current_page_item' );
				
				openNav();
				
			} 
		);

});

