$(document).ready(function(){

	/* Big Target */
	$("div.content_box a.arrow").bigTarget({
		hoverClass: 'hover', // CSS class applied to the click zone onHover
		clickZone : 'div:eq(0)' // jQuery parent selector
	});

	$("div.fizz_chart div.showme_btn a").bigTarget({
		hoverClass: 'hover', // CSS class applied to the click zone onHover
		clickZone : 'div:eq(1)' // jQuery parent selector
	});

	$("form#login_form input").ezpz_hint(); // Input hinting
	$("form#login_form label:visible").hide(); // Hide label
	//$("form#login_form #submit").hide(); // Hide label

	/*$("form#login_form").validate({rules: { user_name: { required:true, email:true }, password: {required:true} }, messages: {
		password: "Please enter your password.",
		user_name: {
			required: "Please enter your username.",
			email: "Please enter a valid email address."
		}
		},
		onsubmit: function(){ console.log('trying to submit'); }
	});*/

	$('li#legalpop').qtip(
	{
		content: 'TWITTER and the "T" logo are trademarks of Twitter, Inc. FACEBOOK and the "F" logo are trademarks of Facebook, Inc. Neither Twitter nor Facebook are affiliated with, associated with, or sponsors of Fizziology, LLC or the Fizziology service.',
		prerender: true,
		delay: 0,
		position: {
			corner: { target: 'topMiddle', tooltip: 'bottomMiddle' },
			adjust: { x: 0, y: -8 }
		},
		hide: {
			fixed: true
		},
		style: { 
			width: { min: 250, max: 450 },
			padding: 5,
			background: '#A2D959',
			color: 'black',
			textAlign: 'center',
			border: { width: 5,	radius: 5, color: '#A2D959'	},
			tip: 'bottomMiddle',
			name: 'dark'
		}
	});

	if($('#contact_form').length > 0)
	{
		$('#contact_form').validate(
			{rules : {
				cf_name: { required:true,minlength: 3 },
				cf_company: { required:true,minlength: 3 },
				cf_email: { required:true,email:true },
				cf_message: { required:true,minlength: 3 }
			}}
		);
	}

	if($('#col_3 .feedbox').length > 0)
	{
		$('#col_3 .feedbox').cycle({ 
		    fx:    'fade', 
		    delay: -8000
		});
	}

	$('a.preview').loupe({
	  width: 300, // width of magnifier
	  height: 200, // height of magnifier
	  loupe: 'loupe' // css class for magnifier
	});

});
