function SetEnterSubmit(){
	// usage: add the class 'submit-on-enter' to any element
	$(".submit-on-enter input[type=text], .submit-on-enter textarea").keydown(function(ev){
        //$(".submit-on-enter").append(ev.keyCode);
        if(ev.keyCode == 13)
        {
            ev.preventDefault();
            ev.stopPropagation();
             //$(".submit-on-enter").append("==submitting");    
             $(this).parents(".submit-on-enter").children("input[type=image], input[type=button]").click();
             return false;
        }
    });
}

function SetExternalLinks(){
	/*
	Purpose: checks all <a>'s in the doc, if it has a rel attribute of 'external', sets to open in new window
	usage: <a href="http://www.google.com" rel="external">Google</a>
	*/
	
	$('a[rel=external]').click(function(){ window.open(this.href); return false; });
	
}

function Equalise(elms){
	/*
	Purpose: simple EQ for columns / pods / etc
	usage: Equalise($(".eq-what";
	*/
	var highest = 0;
	for(i=0; i < elms.length; i++){ if($(elms[i]).height() > highest) highest = $(elms[i]).height(); }
	for(i=0; i < elms.length; i++){ if($(elms[i]).height() < highest) $(elms[i]).height(highest); }
}