
var rewriteFormSubmitAction = function() {
	jQuery("form").each(function(){
		this.action = this.action.replace(/^(http:\/\/)?[^\/]*\//, serverPath + "/");
	});
};

jQuery(document).ready(rewriteFormSubmitAction);