<!--
$(document).ready(function () {
	$(".textField").each(function() {
	    var default_value = this.value;
		$(this).css('color', '#CCC'); // this could be in the style sheet instead
    	$(this).focus(function() {
	        if(this.value == default_value) {
        	    this.value = '';
				$(this).css('color', '#333');
    	    }
	    });
    	$(this).blur(function() {
			$(this).css('background-color', '#F9F9F9');
	        if(this.value == '') {
				$(this).css('color', '#CCC');
            	this.value = default_value;
        	}
    	});
	});
	
    calcImage = $('#calculate img').attr("src");
	$('#calculate img').hover(
    	function(){
        	$(this).attr("src", "image/calculateHover.png");
		},
    	function(){
        	$(this).attr("src", calcImage); // mouseout
    	}
	);
	
	resetImage = $('#reset img').attr("src");
	$('#reset img').hover(
    	function(){
        	$(this).attr("src", "image/resetHover.png");
		},
    	function(){
        	$(this).attr("src", resetImage); // mouseout
    	}
	);
	
	$('.textField').click(function(){
		$(this).css("background-color", "#FFFFFF");
	});
	
	$(".getStarted").click(function(){
		$("html,body").animate({
			scrollTop: $("#featured").offset().top
		}, 2000);
	});
	
	$(".help").click(function(){
		$("html,body").animate({
			scrollTop: $("#featured").offset().top
		}, 2000);
	});
	
	$(".about").click(function(){
		$("html,body").animate({
			scrollTop: $('#aboutPuntkit').offset().top
		}, 2000);
	});
	
	//How to use steps navigation
	$("#step1 #1step2").click(function(){
		$("#step1").fadeOut('slow', function(){
			$("#step2").fadeIn('slow');
		});
	});
	
	$("#step2 #2step1").click(function(){
		$("#step2").fadeOut('slow', function(){
			$("#step1").fadeIn('slow');
		});
	});
	
	$("#step2 #2step3").click(function(){
		$("#step2").fadeOut('slow', function(){
			$("#step3").fadeIn('slow');
		});
	});
	
	$("#step3 #3step2").click(function(){
		$("#step3").fadeOut('slow', function(){
			$("#step2").fadeIn('slow');
		});
	});
	
	$(".popup").fancybox({
		'padding'				: 20,
		'frameWidth'			: 600,
		'frameHeight'			: 400,
		'overlayShow'			: false,
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack'
	});
	
	$("#featured").tabs({fx:{opacity: "toggle"}}).tabs("rotate");   

});

function clearValues(){
	$(':input').each(function() {
    	var type = this.type;
    	var tag = this.tagName.toLowerCase(); // normalize case
    
		if (type == 'text' || type == 'password' || tag == 'textarea')
      		this.value = "";
    
    });
	
	//Reset back/lay radio buttons after wipe
	$("#blStakeBack").val(1);
	$("#blStakeLay").val(0);
};

//-->