// BEGIN DOM
$(document).ready(function()
{
	
	// Any link with the rel of backlink will go back history -1
	$('a[rel="backlink"]').click( function() {
		parent.history.back(-1);		
        return false;
    });
	
	// Any External Link will open up a new window.
	$('A[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
	
	// Will handle any PDF to open up without sending you to a new page	
	$("a[href*=.pdf]").click(function()	{
		$(this).attr({"target":"_self"});
		return false;
	});

	
	// Validate the form in the footer
	$("#qualification_form").validate({
		rules: {
			firstname: "required",
			lastname: "required",
			address: "required",
			city: "required",
			zip: "required",
			email: {
				required: "#email",
				email: true
			}
		},
		messages: {
			firstname:"[Required:] Please Enter Your First Name",
			lastname:"[Required:] Please Enter Your Last Name",
			address:"[Required:] Please Enter Your Address",
			city:"[Required:] Please Enter Your City",
			zip:"[Required:] Please Enter Your Zip",
			email:"[Required:] Please Enter Your Email Adress"
		}
	});
	
	

}); // END DOM


// Confirm the click...to make sure that there are no mistakes
function confirmTheClick()
{
	var agree="Are you sure you wish to perform this action?\nCheck your work!";
	if ( confirm( agree ) )
		return true;
	else
		return false;
}

