var AMP = function($) {
	
	function initPage(){
		if($("label.errorname").length) $("label.noerrorfirstname").css("display", "none");
		if($("label.errorlastname").length) $("label.noerrorlastname").css("display", "none");
		if($("label.erroremail").length) $("label.noerroremail").css("display", "none");
		if($("label.errorcompany").length) $("label.noerrorcompany").css("display", "none");
		if($("label.erroraddress").length) $("label.noerroraddress").css("display", "none");
		if($("label.errorzip").length) $("label.noerrorzip").css("display", "none");
		if($("label.errorcity").length) $("label.noerrorcity").css("display", "none");
		
		if($("label.erroremail").length || $("label.errorlastname").length || $("label.errorname").length || $("label.errorcompany").length || $("label.erroraddress").length || $("label.errorzip").length || $("label.errorcity").length) {
			$('p.tx-srfeuserregister-pi1-notice').css("display","none");
			$('p.replacebox').css("display","block");																	
		}
		
		if($("p.tx-srfeuserregister-pi1-error").length) {
			$('p.tx-srfeuserregister-pi1-notice').css("display","none");
			$('p.replacebox').css("display","none");
		}

	};
	/* ////// RETURN/MAKE PUBLIC ALL FUNCTIONS/VARIABLES THAT MAY NEED TO BE ACCESSED FROM THE OUTSIDE	*/
	return {
		// PUBLIC FUNCTIONS
		initPage : initPage
	};
}(jQuery);

/**
 * AVOID CONFLICTS WITH ADDITIONAL FRAMEWORKS
 */
(function($) {
	// DO THIS WHEN DOM IS READY
	$(document).ready(function() {
		AMP.initPage();
	});

})(jQuery);

