/* FUNCTION : SLIDE SCREENS */

/* DOM READY */

$(document).ready(function(){
   
 /* target blank */  
 $('#network a').click(function(event) {window.open(this.href,'_blank');return false;});  
 $('#tweet a').click(function(event) {window.open(this.href,'_blank');return false;});  
 $('.detail_desc h3 a').click(function(event) {window.open(this.href,'_blank');return false;}); 
 $('#contacttext a').click(function(event) {window.open(this.href,'_blank');return false;});  
   
 /* about button */
 $('#label').click(function(event) {
  $('#about').slideToggle('slow');
  event.preventDefault();
 });
 
 $('#aboutme').click(function(event) {
  $('#about').slideToggle('slow');
  event.preventDefault();
 });
  
 $('.detail_extrascreen a').click(function(event) {
 var $active = $('.detail_screen img.active');
 var $next =  $('.detail_screen img#screen-'+this.rel);
 if(!$next.hasClass('active')) { /* do nothing if it's already active */
 $active.addClass('last-active');
 $next.css({opacity: 0.0})
  .addClass('active')
  .animate({opacity: 1.0}, 1000, function() {
    $active.removeClass('active last-active');});}
 return false;
 });

 /* empty form */
 $('#c_message textarea').focus(function(event) {
  if($(this).val()=="Your message") {$(this).val('');}
 });
 
 $('#c_detail #form_name').focus(function(event) {
  if($(this).val()=="Your name") {$(this).val('');}
 });
 
 $('#c_detail #form_mail').focus(function(event) {
  if($(this).val()=="Your e-mail address") {$(this).val('');}
 });
 
 $('#c_detail #form_phone').focus(function(event) {
  if($(this).val()=="Your phone number") {$(this).val('');}
 });

});
    

