/**
 * esUtil JavaScript Library
 *
 * This JS Library is an extension of jQuery and the NetSuite API which contains client-side utility functions
 * that can be used to easily add AJAX and Session-based components to NetSuite e-Commerce Web Stores
 * and Customer Centres.
 *
 * @author Elim Solutions (http://elimsolutions.ca)
 * @version 1.0
 *
 * 
 */
(function(){
	var esUtil = {
	
		elems: [],	
		
		/**
		* Hide or show the Login/Logout link based on active user session. This function uses
		* jQuery AJAX.
		* 
		* @param {String} scriptId This is the user-defined script ID of a SuiteScript in NetSuite
		* @param {String} deployId This is a user-defined deployment ID of a SuiteScript in NetSuite
		* @returns void  
		*/
		toggleLogin: function(scriptId, deployId){
			var scriptSrc = '/app/site/hosting/scriptlet.nl?script='+scriptId+'&deploy='+deployId;
			$.get(
				scriptSrc,
				function(data)
				{
					$(data).show(); 
				}
			); 
		},
		
		test: function(x, y){
			alert(x + y);
		}	
	
	}
	if(!window.e$){window.e$=esUtil;}
})();
