$(document).ready(function() {
  
  $('.colour').each(function() {
    // set all screenshot solour version to transparent    
    $(this).animate( {opacity: 0}, 1 );
    
    // screenshot monochrome to colour fade
    $(this).hover(function() {
      $(this).stop().animate( {opacity: 1}, 500 );
    }, function() {
      $(this).stop().animate( {opacity: 0}, 500 );
    });
  });
  
  // shadowbox setup
  Shadowbox.init({
    skipSetup: true
  });  
  Shadowbox.setup("a.shadow", {
    gallery: "Screenshots",
    counterType: 'skip'
  });
  
  // for all links with a class of submit, add a click event listener 
  // that submits the parent form of the element
  $('a.submit').each(function() {
          
    $(this).click(function(e) {   
      e.preventDefault();
      $(this).parents('form')[0].submit();
    });
    
  });  
	
});

