/**
* File: sale_message_functions.js
* Author: Brian Schemp
* 
*
* History:	10/21/2009 Brian - Created.
*			12/29/2010 Wil - Changed so popups are loaded via jQuery and displayed on the fly. 
*			This prevents them from having to be preloaded on all pages
*
*/


/**
* Display the discount exemptions window.
*
*/
function displayDiscountExceptionsPopup() {
	//display the background.
	$("#backgroundPopup").css({"opacity": "0.7"});  
	$("#backgroundPopup").fadeIn("slow");		
	
	$(document).ready(function(){
		$("#loadedContent").load("discountexemptionmessagewindow.html");
		//display the discount exceptions.
		$("#discountExceptionsMessagePopup").fadeIn("slow");
	});
				
}

/**
* Close the discount exemptions window.
*
*/
function closeDiscountExceptionsPopup() {		 
	$("#discountExceptionsMessagePopup").fadeOut("slow");
	$("#backgroundPopup").fadeOut("slow");
}

/**
* Display the free shipping exemptions window.
*
*/
function displayFreeshippingExceptionsPopup() {
	//display the background.
	$("#backgroundPopup").css({"opacity": "0.7"});  
	$("#backgroundPopup").fadeIn("slow");		
	
	$(document).ready(function(){
		$("#loadedContent").load("freeshippingexemptionmessagewindow.html");
		//display the free shipping exceptions popup.
		$("#freeShippingExceptionsMessagePopup").fadeIn("slow");
	
	});
}

/**
* Close the free shipping exemptions window.
*
*/
function closeFreeshippingExceptionsPopup() {		 
	$("#freeShippingExceptionsMessagePopup").fadeOut("slow");
	$("#backgroundPopup").fadeOut("slow");
}	

/**
* Display All Sale exemptions window.
*
*/
function displayAllSaleExceptionsPopup() {
	//display the background.
	$("#backgroundPopup").css({"opacity": "0.7"});  
	$("#backgroundPopup").fadeIn("slow");
	
	$(document).ready(function(){
		$("#loadedContent").load("AllSaleExemptionMessageWindow.html");
		//display the All Sale shipping exemptions popup.
		$("#AllSaleExceptionsMessagePopup").fadeIn("slow");
	
	});
}

/**
* Close the All Sale shipping exemptions window.
*
*/
function closeAllSaleExceptionsPopup() {		 
	$("#AllSaleExceptionsMessagePopup").fadeOut("slow");
	$("#backgroundPopup").fadeOut("slow");
}	
