$(document).ready(function(){
      
    $('.holder div').mouseover(function() {

    $(this).css('background-image', 'url("images/key_hover.png")');

    $(this).css('cursor', 'pointer');

});

$('.holder div').mouseout(function() {

    $(this).css('background-image', 'url("images/key.png")');

    $(this).css('cursor', 'pointer');

});  

	// Main entrance

    $('.main_entrance').click(function() {   
        
	$('<div class="newContainer"/>').appendTo('.container').animate({"height" : "304px"});
    	
    $('.newContainer').load("data.php .element_one").click(function(){
    	
    $(this).remove();
    	
	});
	
    });
    
    $('.main_entrance').mouseover(function(){
    	
    $('<div class="titleContainer"/>').appendTo('.container').load("data.php .element_one p	").animate({"height" : "30px"});
    
    $('.main_entrance').mouseout(function(){
    	
    $('.titleContainer').remove();
    
    });
    
    });

	// Secure storage
	
	$('.secure_storage').click(function() {   
        
	$('<div class="newContainer"/>').appendTo('.container').animate({"height" : "304px"});
    	
    $('.newContainer').load("data.php .element_two").click(function(){
    	
    $(this).remove();
    	
	});
	
    });
    
    $('.secure_storage').mouseover(function(){
    	
    $('<div class="titleContainer"/>').appendTo('.container').load("data.php .element_two p	").animate({"height" : "30px"});
    
    });
    
    $('.secure_storage').mouseout(function(){
    	
    $('.titleContainer').remove();
    
    });
    
    	// Office utility
	
	$('.office_utility').click(function() {   
        
	$('<div class="newContainer"/>').appendTo('.container').animate({"height" : "304px"});
    	
    $('.newContainer').load("data.php .element_three").click(function(){
    	
    $(this).remove();
    	
	});
	
    });
    
    $('.office_utility').mouseover(function(){
    	
    $('<div class="titleContainer"/>').appendTo('.container').load("data.php .element_three p	").animate({"height" : "30px"});
    	
    });
    
    $('.office_utility').mouseout(function(){
    	
    $('.titleContainer').remove();
    
    });
    
        // Facilities integration
	
	$('.facilities_integration').click(function() {   
        
	$('<div class="newContainer"/>').appendTo('.container').animate({"height" : "304px"});
    	
    $('.newContainer').load("data.php .element_four").click(function(){
    	
    $(this).remove();
    	
	});
	
    });
    
    $('.facilities_integration').mouseover(function(){
    	
    $('<div class="titleContainer"/>').appendTo('.container').load("data.php .element_four p	").animate({"height" : "30px"});
    	
    });
    
    $('.facilities_integration').mouseout(function(){
    	
    $('.titleContainer').remove();
    
    });
    
		// Building security
	
	$('.building_security').click(function() {   
        
	$('<div class="newContainer"/>').appendTo('.container').animate({"height" : "304px"});
    	
    $('.newContainer').load("data.php .element_five").click(function(){
    	
    $(this).remove();
    	
	});
	
    });
    
    $('.building_security').mouseover(function(){
    	
    $('<div class="titleContainer"/>').appendTo('.container').load("data.php .element_five p	").animate({"height" : "30px"});
    	
    });
    
    $('.building_security').mouseout(function(){
    	
    $('.titleContainer').remove();
    
    });
    
    	// Site access
	
	$('.site_access').click(function() {   
        
	$('<div class="newContainer"/>').appendTo('.container').animate({"height" : "304px"});
    	
    $('.newContainer').load("data.php .element_six").click(function(){
    	
    $(this).remove();
    	
	});
	
    });
    
	$('.site_access').mouseover(function(){
    	
    $('<div class="titleContainer"/>').appendTo('.container').load("data.php .element_six p	").animate({"height" : "30px"});
    	
    });
    
    $('.site_access').mouseout(function(){
    	
    $('.titleContainer').remove();
    
    });


});


