/////////////////
// Portfolio
////////////////

// When the DOM is ready, initialise the scripts.
jQuery(function( $ ){
 
// Get a reference to the container.
var portfolio = $( "#portfolio" );
 
// Bind the link to toggle the slide.
$( "a.portfolio" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (portfolio.is( ":visible" )){

// Hide - slide up.
portfolio.slideUp( 600 );
 
} else {
 
// Show - slide down.
portfolio.delay(200).slideDown( 600 );
}
}
);
// Portfolio
// If #about is open tell it to close

// Get a reference to the container.
var about = $( "#about" );
 
// Bind the link to toggle the slide.
$( "a.portfolio" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (about.is( ":visible" )){
 
// Hide - slide up.
about.slideUp( 300 );
 
} 
}
);
// Portfolio
// If #services is open tell it to close

// Get a reference to the container.
var services = $( "#services" );
 
// Bind the link to toggle the slide.
$( "a.portfolio" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (services.is( ":visible" )){
 
// Hide - slide up.
services.slideUp( 300 );
 
} 
}
);
// Portfolio
// If #contact is open tell it to close

// Get a reference to the container.
var contact = $( "#contact" );
 
// Bind the link to toggle the slide.
$( "a.portfolio" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (contact.is( ":visible" )){
 
// Hide - slide up.
contact.slideUp( 300 );
 
} 
}
);

/////////////////
// About
////////////////

// Get a reference to the container.
var about = $( "#about" );
 
// Bind the link to toggle the slide.
$( "a.about" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (about.is( ":visible" )){
 
// Hide - slide up.
about.slideUp( 600 );
 
} else {
 
// Show - slide down.
about.delay(200).slideDown( 600 );
 
}
}
);

// About
// If #portfolio is open tell it to close

// Get a reference to the container.
var portfolio = $( "#portfolio" );
 
// Bind the link to toggle the slide.
$( "a.about" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (portfolio.is( ":visible" )){
 
// Hide - slide up.
portfolio.slideUp( 300 );
 
} 
}
);
// About
// If #services is open tell it to close

// Get a reference to the container.
var services = $( "#services" );
 
// Bind the link to toggle the slide.
$( "a.about" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (services.is( ":visible" )){
 
// Hide - slide up.
services.slideUp( 300 );
 
} 
}
);
// About
// If #contact is open tell it to close

// Get a reference to the container.
var contact = $( "#contact" );
 
// Bind the link to toggle the slide.
$( "a.about" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (contact.is( ":visible" )){
 
// Hide - slide up.
contact.slideUp( 300 );
 
} 
}
);

/////////////////
// Services
////////////////

// Get a reference to the container.
var services = $( "#services" );
 
// Bind the link to toggle the slide.
$( "a.services" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (services.is( ":visible" )){
 
// Hide - slide up.
services.slideUp( 600 );
 
} else {
 
// Show - slide down.
services.delay(200).slideDown( 600 );
 
}
}
);
// Services
// If #portfolio is open tell it to close

// Get a reference to the container.
var portfolio = $( "#portfolio" );
 
// Bind the link to toggle the slide.
$( "a.services" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (portfolio.is( ":visible" )){
 
// Hide - slide up.
portfolio.slideUp( 300 );
 
} 
}
);
// Services
// If #about is open tell it to close

// Get a reference to the container.
var about = $( "#about" );
 
// Bind the link to toggle the slide.
$( "a.services" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (about.is( ":visible" )){
 
// Hide - slide up.
about.slideUp( 300 );
 
} 
}
);
// Services
// If #contact is open tell it to close

// Get a reference to the container.
var contact = $( "#contact" );
 
// Bind the link to toggle the slide.
$( "a.services" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (contact.is( ":visible" )){
 
// Hide - slide up.
contact.slideUp( 300 );
 
} 
}
);

/////////////////
// Contact
////////////////

// Get a reference to the container.
var contact = $( "#contact" );
 
// Bind the link to toggle the slide.
$( "a.contact" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (contact.is( ":visible" )){
 
// Hide - slide up.
contact.slideUp( 600 );
 
} else {
 
// Show - slide down.
contact.delay(200).slideDown( 600 );
 
}
}
);
// Contact
// If #portfolio is open tell it to close

// Get a reference to the container.
var portfolio = $( "#portfolio" );
 
// Bind the link to toggle the slide.
$( "a.contact" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (portfolio.is( ":visible" )){
 
// Hide - slide up.
portfolio.slideUp( 300 );
 
} 
}
);
// Contact
// If #about is open tell it to close

// Get a reference to the container.
var about = $( "#about" );
 
// Bind the link to toggle the slide.
$( "a.contact" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (about.is( ":visible" )){
 
// Hide - slide up.
about.slideUp( 300 );
 
} 
}
);
// Contact
// If #services is open tell it to close

// Get a reference to the container.
var services = $( "#services" );
 
// Bind the link to toggle the slide.
$( "a.contact" ).click(
function( event ){
// Prevent the default event.
event.preventDefault();
 
// Toggle the slide based on its current
// visibility.
if (services.is( ":visible" )){
 
// Hide - slide up.
services.slideUp( 300 );
 
} 
}
);
 
});
