
$(document).ready(function(){ 
	
	$('input.selectme').click(function() {
		this.select();
	});

	$('form.submit-with-ajax').submit(function() {
		$(this).load(this.action, $(this).serializeArray());
		return(false);
	});

	$('a.new-window').click(function() {
		window.open(this.href);
		return(false);
	});

	// dynamically add a spamcheck hidden input field to portalus forms
	// this will not be filled in if a spambot fills in the form so we can check for its existance 
	// to differentiate spambots from people, unfortunately somebody without javascript will be treated like a spambot
	$('.portalus-form form').append('<input type="hidden" name="spamcheck" value="1" />')
	
}); 
