﻿$(document).ready(function(){
						   $(".boxed_port").fadeTo("fast", 0.7); // This sets the opacity of the thumbs to fade down to 30% when the page loads
						   $(".boxed_port").hover(function(){
						   $(this).fadeTo("fast", 1.0); // This should set the opacity to 100% on hover
						   },function(){
						   $(this).fadeTo("normal", 0.7); // This should set the opacity back to 30% on mouseout
							   	});
						   });

//**************

$(document).ready(function() {
	
	//if submit button is clicked
	$('#submit').click(function () {		
		
		//Get the data from all the fields
		var name = $('input[name=name]');
		var email = $('input[name=email]');
		var website = $('input[name=website]');
		var comment = $('textarea[name=comment]');

		//Simple validation to make sure user entered something
		//If error found, add hightlight class to the text field
		if (name.val()=='') {
			name.addClass('hightlight');
			return false;
		} else name.removeClass('hightlight');
		
		if (email.val()=='') {
			email.addClass('hightlight');
			return false;
		} else email.removeClass('hightlight');
		
		if (comment.val()=='') {
			comment.addClass('hightlight');
			return false;
		} else comment.removeClass('hightlight');
		
		//show the loading sign
		$('.loading').show();
		
		//cancel the submit button default behaviours
		return true;
	});	
});	

		
		
//////////////////////////////////////////////////////////////////////////////////


			Cufon.replace('h1');
			Cufon.replace('h2');
			Cufon.replace('h3');
			Cufon.replace('h4');
			Cufon.replace('h5');
			Cufon.replace('h6');