$(document).ready(function() {
	// KEEP THOSE IMAGES SAFE FROM PIRATES ARRGH!
	
	$('img').bind('contextmenu', function(e){
    return false;
}); 
  
  // CONTACT SLIDER
   
       // Create contact div and make it hidden
       jQuery('.header').before('<div class="contact"  />');
       
       // Ajax request for contact page contents      
       jQuery('.contact').load('contact.html .container');
       
       // Animation speeds of sliding
       var slideSpeed = 1000; 
       
       // When clicking on contact link...
       jQuery('.contact-button').toggle(
       
           function(event) {
           
               // Turn off link so we don't go to the contact page
               event.preventDefault(); 
               
               // Change main nav selected link
               jQuery('.main-nav').addClass('contact-nav');
               
               // Fade in content
               jQuery('.contact .container').hide().fadeIn('1000');
               
               // Slide down the contacts div
               jQuery('.contact').animate({'top': '0px'}, {duration: slideSpeed});
                   
               // Change the position of the background image so background colours match height of content areas
               jQuery('.header').animate(
                   { 'top': '449px' }, 
                   { duration: slideSpeed } 
               );
               
               jQuery('.page .content').animate(
                   { 'margin-top':'578px' }, 
                   { duration: slideSpeed } 
               );            
               
               jQuery('.hero').animate(
                   { 'margin-top':'577px' }, 
                   { duration: slideSpeed } 
               );
           }, 
       
           // When clicking on div again...
           function(event) { 
           
               // Turn off link so we don't go to the contact page
               event.preventDefault();
               
               // Change main nav selected link
               jQuery('.main-nav').removeClass('contact-nav');
               
               // Fade out content
               jQuery('.contact .container').fadeOut(slideSpeed);
               
               // Slide up the contacts div
               jQuery('.contact').animate({'top': '-449px'}, {duration: slideSpeed});
 
               
               // Change the position of the background image so background colours match height of content areas
               jQuery('.header').animate(
                   { top:'0px' }, 
                   { duration: slideSpeed } 
               );
               
               jQuery('.home .content').animate(
                   { 'margin-top':'50px' }, 
                   { duration: slideSpeed } 
               );
               
               jQuery('.page .content').animate(
                   { 'margin-top':'124px' }, 
                   { duration: slideSpeed } 
               );
               
               jQuery('.hero').animate(
                   { 'margin-top':'124px' }, 
                   { duration: slideSpeed } 
               );
               
               
               
       }); // end contact slider

	//sldier
    $('.slideshow').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		speed:  6000,
		pager:  '#nav', 
		next:   '#next', 
    	prev:   '#prev' 
	});
});
