var MivaMerchantDesign = {
	init: function () {
		var mivaScreen = document.body.id;
		if (MivaMerchantDesign[mivaScreen]) {
			$(document).ready(function () {MivaMerchantDesign[mivaScreen] (); }); // ---- If the function exists, run it, otherwise, don't do anything. ---- //
		}
		$(document).ready(function () {
			// ---- Global ---- //
		});
	},
	
	BASK: function () {
	/*--- Remove Item From Basket (Compatible down to IE6) ---*/
		$('#removeProd').click(function(){
			$(this).next('input').attr('checked','checked');
			if($(this).next('input').is(":checked")){$('#bask-form').submit();}
		});
	},
	
	OCST: function () {
	// ---- Toggle Show/Hide Log-In Form ---- //
		$('#login-form').hide();
		$('#ocst-login').click(function (e) {
			$('#login-form').slideToggle('slow');
			e.preventDefault();
		});
		$(".error-message").find("font").css('display','none');
		$(".error-message").html('One or more required fields were not filled out correctly.');
	},
	
	OPAY: function () {
		$('input[name$="AuthorizeNet_Cvv"]').css({'width':'30px', 'float':'left'}).after('<a></a>');
		$('input[name$="AuthorizeNet_Cvv"]').next().addClass('cvvCode').attr('rel', 'tooltip').attr('title', 'This is a 3 or 4 digit number displayed on the front or back of your credit card');
		
		$(".error-message").find("font").attr('color','#333');
		$(".error-message br").remove();
		
		$("#checkout_customer td").find("span").css('font-weight','bold');
	},
	
	INVC: function () {
	// ---- Order Summary Controls ---- //
		$('#order-summary-steps').mvAccordion();
	}
};
MivaMerchantDesign.init();
