jQuery().ready(function(){
	setToolTips();
	jQuery.easing.def = 'easeInOutBack';


	$("#mediakit_thumbs img").fadeTo("slow", 0.4); // This sets the opacity of the thumbs to fade down to 60% when the page loads
	$("#mediakit_download img").fadeTo("slow", 0.4);

	$("#mediakit_thumbs img").hover(function(){
		$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
	},function(){
		$(this).fadeTo("slow", 0.4); // This should set the opacity back to 60% on mouseout
	});
	
	$("#mediakit_download img").hover(function(){
		$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
	},function(){
		$(this).fadeTo("slow", 0.4); // This should set the opacity back to 60% on mouseout
	});
	
	$("#mediakit_thumbs").yoxview();
	
	

	// $("#contact_form").validate();
	console.log("jQuery is ready...");

});

jQuery.fn.fadeToggle = function(speed, easing, callback) {
   return this.animate({opacity: 'toggle'}, speed, easing, callback);
};

function setToolTips() {
	// $('h1.location').tipsy({
	// 		gravity : 'e',
	// 		fade : true,
	// 		delayin : 500,
	// 		delayout : 1500,
	// 		offset : 4
	// 	});
	
	$('#mediakit_thumbs a:odd').tipsy({
		fade : true,
		gravity : 'w',
		delayin : 500,
		delayout : 1500,
		offset : 4
		
	});
	
	$('#mediakit_thumbs a:even').tipsy({
		fade : true,
		gravity : 'e',
		delayin : 500,
		delayout : 1500,
		offset : 4
		
	});
	
	$('#mediakit_download .download').tipsy({
		fade : true,
		gravity : 'n',
		delayin : 500,
		delayout : 1500
	})
	
}

function setActiveTab(tabID) {
	$('nav a#'+'nav_'+tabID).addClass('current');
}

function scrollWin(target,duration){
	
	$('html, body').animate({
	scrollTop: target.offset().top
	}, duration);
}

// function(){
//     $("#contact_form").validate();
// }
// 
// function() {
//  
//    $('#contact_form').submit(function() {
//  
//         // Hide the form
//         $('#contact_form').hide(500);
//  
//         $.get('form-action.php', {
//             name: $('#name').val(),
//             company: $('#company').val(),
//             email: $('#email').val(),
//             tel: $('#tel').val(),
//             subject: 'Test from Contact Form',
//             message: $('#message').val()
//         });
//  
//         // Keeps the user on the page
//         return false;
//  
//    });
//  
// }




//function setActiveTab(tabClass) {
//	$('li.'+tabClass).addClass('current');
//}

