$(document).ready(function() {

	// load all links in a new window
	$('p a').each(function(){
		$(this).attr('target','_blank');
	});

	// the currently loaded section
	var curLoaded = '';

	/* start by showing the about us section
	$('#contentContainer').animate({
		height: 625
	},"slow", function(){
		// fade in the content
		$('#' + curLoaded).fadeIn();
	});
	*/

$('#project_info').children().css('display', 'none');

$("#closeUP").click(function() {
				$("#container").slideUp( 1000 );
				$('#project_info').children().fadeOut( 1000 );
        });

	
	// navigation trigger
	$('.box a').each(function() {
		var $this = $(this)
		var target = $this.attr('href').split('#')[1];
		var $contentContainer = $('#container');

	// Bind the link to toggle the slide.
	$this.click(
		function( event ){
			// Prevent the default event.
			event.preventDefault();

			// Toggle the slide based on its current
			// visibility.
			if ($contentContainer.is( ":visible" )){

				// Hide - slide up.
				$contentContainer.slideUp( 1000 );
				$('#project_info').children().fadeOut( 1000 );

			} else {

				// Show - slide down.
				$contentContainer.slideDown( 1000 );
				$('#' + target).fadeIn( 2000 );
				$('#cover').fadeIn('slow')

			}

			return false;
		});
		

	});
	
	$('.inner_button').click(function() {
		$('#cover').fadeOut('slow');
	});

	// remove the focus lines
	$('a').focus( function() { $(this).blur(); } );

});

$('#case1_1').mouseover(function() {
      $('#case1_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case1_2').mouseout(function() {
      $('#case1_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
    $('#case2_1').mouseover(function() {
      $('#case2_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case2_2').mouseout(function() {
      $('#case2_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
    $('#case3_1').mouseover(function() {
      $('#case3_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case3_2').mouseout(function() {
      $('#case3_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
    $('#case4_1').mouseover(function() {
      $('#case4_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case4_2').mouseout(function() {
      $('#case4_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
    $('#case5_1').mouseover(function() {
      $('#case5_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case5_2').mouseout(function() {
      $('#case5_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
    $('#case6_1').mouseover(function() {
      $('#case6_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case6_2').mouseout(function() {
      $('#case6_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
    $('#case7_1').mouseover(function() {
      $('#case7_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case7_2').mouseout(function() {
      $('#case7_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
    $('#case8_1').mouseover(function() {
      $('#case8_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case8_2').mouseout(function() {
      $('#case8_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
    $('#case9_1').mouseover(function() {
      $('#case9_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case9_2').mouseout(function() {
      $('#case9_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
	
	  $('#case10_1').mouseover(function() {
      $('#case10_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case10_2').mouseout(function() {
      $('#case10_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
	
	  $('#case11_1').mouseover(function() {
      $('#case11_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case11_2').mouseout(function() {
      $('#case11_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
	
	  $('#case12_1').mouseover(function() {
      $('#case12_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case12_2').mouseout(function() {
      $('#case12_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
	
	  $('#case13_1').mouseover(function() {
      $('#case13_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case13_2').mouseout(function() {
      $('#case13_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
	
	  $('#case14_1').mouseover(function() {
      $('#case14_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case14_2').mouseout(function() {
      $('#case14_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
		
	  $('#case15_1').mouseover(function() {
      $('#case15_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case15_2').mouseout(function() {
      $('#case15_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
		
	  $('#case16_1').mouseover(function() {
      $('#case16_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case16_2').mouseout(function() {
      $('#case16_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
	
		  $('#case17_1').mouseover(function() {
      $('#case17_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case17_2').mouseout(function() {
      $('#case17_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
	
		  $('#case18_1').mouseover(function() {
      $('#case18_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case18_2').mouseout(function() {
      $('#case18_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
	
		  $('#case19_1').mouseover(function() {
      $('#case19_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case19_2').mouseout(function() {
      $('#case19_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
			  $('#case20_1').mouseover(function() {
      $('#case20_2').fadeIn('slow', function() {
        // Animation complete
      });
    });
    
    $('#case20_2').mouseout(function() {
      $('#case20_2').fadeOut('slow', function() {
        // Animation complete
      });
    });
    
    
    
/* When the DOM is ready, initialize the scripts.
		jQuery(function( $ ){
 
			// Get a reference to the container.
			var container = $( "#container" );
 
 
			// Bind the link to toggle the slide.
			$( "a" ).click(
				function( event ){
					// Prevent the default event.
					event.preventDefault();
 
					// Toggle the slide based on its current
					// visibility.
					if (container.is( ":visible" )){
 
						// Hide - slide up.
						container.slideUp( 1000 );
 
					} else {
 
						// Show - slide down.
						container.slideDown( 1000 );
 
					}
				}
			);
 
		});
*/
