$(document).ready(function(){
		$(".pf_img").hover(function() { //On hover...
		var thumbOver = $(this).find("img").attr("src");
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		$(this).find("span").stop().animate({opacity: 0}, 300);
	} , function() { 
		$(this).find("span").stop().animate({opacity: 1}, 300);
	});


	$('#social a').each(function () {
	    $('<div class="fader" />').css('opacity', 0).prependTo(this);
	  }).hover(function () {
	    $('img', this).stop().animate({
		marginLeft : 5
	    }, 250);
	    $('.fader', this).stop().animate({
	      opacity : 0.15
	    });
	  }, function () {
	    $('img', this).stop().animate({
	      marginLeft : 10
	    }, 250);
	    
	    $('.fader', this).stop().animate({
	      opacity : 0
	    });
	  }).find('img').css('marginLeft', 10);
	  
  	$('#about a').each(function () {
	    $('<div class="fader" />').css('opacity', 0).prependTo(this);
	  }).hover(function () {
	    $('img', this).stop().animate({
	      marginLeft : 5
	    }, 250);
	    $('.fader', this).stop().animate({
	      opacity : 0.15
	    });
	  }, function () {
	    $('img', this).stop().animate({
	      marginLeft : 10
	    }, 250);
	    
	    $('.fader', this).stop().animate({
	      opacity : 0
	    });
	  }).find('img').css('marginLeft', 10);
	
	$('#downloadDOC a').each(function () {
	    $('<div class="fader" />').css('opacity', 0).prependTo(this);
	  }).hover(function () {
	    $('img', this).stop().animate({
		marginLeft : 5
	    }, 250);
	    $('.fader', this).stop().animate({
	      opacity : 0.15
	    });
	  }, function () {
	    $('img', this).stop().animate({
	      marginLeft : 10
	    }, 250);
	    
	    $('.fader', this).stop().animate({
	      opacity : 0
	    });
	  }).find('img').css('marginLeft', 10);
	
	});


Cufon.replace('#hello', {textShadow: '#fff 1px 1px'});
Cufon.replace('#textaboutme h4', {textShadow: '#fff 1px 1px'});
Cufon.replace('#social p', {textShadow: '#fff 1px 1px'});
Cufon.replace('.pf_desc h3', {textShadow: '#fff 1px 1px'});
Cufon.replace('.pf_desc p', {textShadow: '#fff 1px 1px'});
Cufon.replace('h2', {textShadow: '#fff 1px 1px',color: '-linear-gradient( #000, #696969)'});
Cufon.replace('#menu li', {textShadow: '#fff 1px 1px',hover: {color: '#e63232'}});
Cufon.replace('#contact legend', {textShadow: '#fff 1px 1px'});


/* Take Tour */

var name = "#takeatour";
var menuYloc = null;
	
$(document).ready(function(){
	menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
	$(window).scroll(function () { 
		offset = menuYloc+$(document).scrollTop()+"px";
		$(name).animate({top:offset},{duration:500,queue:false});
	});
}); 


var name1 = "#eco";
var menuYloc1 = null;
	
$(document).ready(function(){
	menuYloc1 = parseInt($(name1).css("top").substring(0,$(name1).css("top").indexOf("px")))
	$(window).scroll(function () { 
		offset = menuYloc1+$(document).scrollTop()+"px";
		$(name1).animate({top:offset},{duration:500,queue:false});
	});
}); 



/* Tooltip */
$(document).ready(function(){
	/* Adding a colortip to any tag with a title attribute: */
	$('.white').colorTip({color:'yellow'});
});


/* Input Field Clear */
$(document).ready(function() {
			//$('input[type="text"]').addClass("idleField");
       		$('input[type="text"]').focus(function() {
       			//$(this).removeClass("idleField").addClass("focusField");
    		    if (this.value == this.defaultValue){ 
    		    	this.value = '';
				}
				if(this.value != this.defaultValue){
	    			this.select();
	    		}
    		});
    		$('input[type="text"]').blur(function() {
    			//$(this).removeClass("focusField").addClass("idleField");
    		    if ($.trim(this.value) == ''){
			    	this.value = (this.defaultValue ? this.defaultValue : '');
				}
    		});
		});	

$(document).ready(function() {
$('textarea#comments').focus(function() {
   $(this).val('');
});	
$('textarea#comments').blur(function() {
   $(this).val('So.. What u wanna say?');
});	
});	



