﻿$(document).ready(function () {

    // Set column heights
    $(".TwoColLefter").equalHeights();
    $(".TwoColRighter").equalHeights();

   
    // Newsletter text box
    $("#ea").focus(function () {

        $(this).filter(function () {
            return $(this).val() == "" || $(this).val() == "Your email here"

        }).removeClass("WatermarkOn").val("");

    });

    $("#ea").blur(function () {

        $(this).filter(function () {
            return $(this).val() == ""

        }).addClass("WatermarkOn").val("Your email here");
    });

    // Scrolling
    $(".scroll").click(function (event) {
        event.preventDefault();
        $('html,body').animate({ scrollTop: $(this.hash).offset().top }, 500);
    });

});


// Fix equal column Heights
(function (jQuery) {
    jQuery.fn.equalHeights = function () {
        var maxheight = 0;
        jQuery(this).children().not(".clearer").each(function () {
            maxheight = (jQuery(this).height() > maxheight) ? jQuery(this).height() : maxheight;
        });
        jQuery(this).children().not(".clearer").css("height", maxheight);
    }
})(jQuery);


// Newsletter Signup
function Signup()
{
	var myForm = document.forms[0];
	myForm.action = "http://visitor.constantcontact.com/d.jsp";
	myForm.target = "_blank";
	myForm.method = "post";
	myForm.submit();
}
