jQuery(document).ready(function(){ // This sets the opacity of the thumbs to fade down to 60% when the page loads

	jQuery("#sub-nav li.flickr a img").hover(function(){
		jQuery("#sub-nav li.flickr a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("#sub-nav li.flickr a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("#sub-nav li.skype a img").hover(function(){
		jQuery("#sub-nav li.skype a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("#sub-nav li.skype a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("#sub-nav li.twitter a img").hover(function(){
		jQuery("#sub-nav li.twitter a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("#sub-nav li.twitter a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("#sub-nav li.sharethis a img").hover(function(){
		jQuery("#sub-nav li.sharethis a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("#sub-nav li.sharethis a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("#submit_btn").hover(function(){
		jQuery("#submit_btn").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("#submit_btn").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab1 a img").hover(function(){
		jQuery(".coda-nav ul li.tab1 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab1 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab2 a img").hover(function(){
		jQuery(".coda-nav ul li.tab2 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab2 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab3 a img").hover(function(){
		jQuery(".coda-nav ul li.tab3 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab3 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab4 a img").hover(function(){
		jQuery(".coda-nav ul li.tab4 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab4 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab5 a img").hover(function(){
		jQuery(".coda-nav ul li.tab5 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab5 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab6 a img").hover(function(){
		jQuery(".coda-nav ul li.tab6 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab6 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab7 a img").hover(function(){
		jQuery(".coda-nav ul li.tab7 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab7 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab8 a img").hover(function(){
		jQuery(".coda-nav ul li.tab8 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab8 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab9 a img").hover(function(){
		jQuery(".coda-nav ul li.tab9 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab9 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery(".coda-nav ul li.tab10 a img").hover(function(){
		jQuery(".coda-nav ul li.tab10 a img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery(".coda-nav ul li.tab10 a img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("a.item1 img").hover(function(){
		jQuery("a.item1 img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("a.item1 img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("a.item2 img").hover(function(){
		jQuery("a.item2 img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("a.item2 img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("a.item3 img").hover(function(){
		jQuery("a.item3 img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("a.item3 img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("a.item4 img").hover(function(){
		jQuery("a.item4 img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("a.item4 img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("a.item5 img").hover(function(){
		jQuery("a.item5 img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("a.item5 img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("a.item6 img").hover(function(){
		jQuery("a.item6 img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("a.item6 img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("a.item7 img").hover(function(){
		jQuery("a.item7 img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("a.item7 img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("a.item8 img").hover(function(){
		jQuery("a.item8 img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("a.item8 img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

	jQuery("a.item9 img").hover(function(){
		jQuery("a.item9 img").fadeTo("slow", 0.6); // This sets the opacity to 100% on hover
	},function(){
		jQuery("a.item9 img").fadeTo("slow", 1.0); // This sets the opacity back to 60% on mouseout
	});

});

function validateContact() {
	var validForm = true;
    var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ;
    var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;

	if(jQuery('#your_name').val() == '' || jQuery('#your_name').val() == "Your Name Is Required") {
		jQuery('#your_name').addClass("errorfld").val("Your Name Is Required");
		validForm = false;
	} else {
		jQuery('#your_name').removeClass("errorfld");
	}
	if(jQuery('#email').val() == '' || jQuery('#email').val() == "Your Email Is Required") {
		jQuery('#email').addClass('errorfld').val('Your Email Is Required');
		validForm = false;
	} else if (!emailFilter.test(jQuery('#email').val())) {
        jQuery('#email').addClass('errorfld').val('Invalid Email Id');
		validForm = false;
    } else {
		jQuery('#email').removeClass('errorfld');
	}
	if(jQuery('#message').val() == '' || jQuery('#message').val() == 'Your Message Is Required') {
		jQuery('#message').addClass('errorfld').val('Your Message Is Required');
		validForm = false;
	} else {
		jQuery('#message').removeClass('errorfld')
	}
	return validForm;
}

