// JavaScript Document
$(document).ready(function(){  
  $("#navigation ul li").hover(function(){
  $(this).animate({
    marginTop: "39px",
    fontSize: "200%",},"fast");
  }, function(){
	  if($(this).hasClass("active")) {
		  	$(this).animate({
    		marginTop: "39px",
    		fontSize: "200%"},"fast");
	  } else {
  			$(this).animate({
			marginTop: "50px",
			fontSize: "130%"},"fast");
	  }
  });
  
  // scroller
  $('#content').jScrollPane();
  
  // fancybox
  $("a#example1").fancybox({
	'titleShow'     : false
  });
  $("a#example2").fancybox({
	'titleShow'     : false,
	'transitionIn'	: 'elastic',
	'transitionOut'	: 'elastic'
  });
  
  //Caption Sliding (Partially Hidden to Visible)
  $('.boxgrid.caption').hover(function(){
	$(".cover", this).stop().animate({top:'130px'},{queue:false,duration:160});
  }, function() {
	$(".cover", this).stop().animate({top:'170px'},{queue:false,duration:160});
  });
  $('.boxgrid2.caption').hover(function(){
	$(".cover", this).stop().animate({top:'80px'},{queue:false,duration:160});
  }, function() {
	$(".cover", this).stop().animate({top:'120px'},{queue:false,duration:160});
  });
  
  // form focus
  $('input:text, textarea').focus(function(){
	 if (this.value == this.defaultValue){  
             this.value = '';  
         }  
         if(this.value != this.defaultValue){  
             this.select();  
         } 
  });
  $('input:text, textarea').blur(function() {
		if ($.trim(this.value) == ''){
			this.value = (this.defaultValue ? this.defaultValue : '');
		}
   });

});
