if(argos.marketing !=null && argos.marketing.ESpotLoader != null){

	argos.marketing.HomePageESpotLoader = {
			contexts:{
				 "HP_1": {espotname: "HP_1", sessionid:"", espotPrimary:"#espotprimary_HP_1", espotSecondary:"#espotsecondary_HP_1", postResponseHandler: homepageEspotTagging },		
				 "HP_2": {espotname: "HP_2", sessionid:"", espotPrimary:"#espotprimary_HP_2", espotSecondary:"#espotsecondary_HP_2", postResponseHandler: homepageEspotTagging },		
				 "HP_3": {espotname: "HP_3", sessionid:"", espotPrimary:"#espotprimary_HP_3", espotSecondary:"#espotsecondary_HP_3", postResponseHandler: homepageEspotTagging }
			},

			init: function(emsName){
				var argmkhmespotldr = argos.marketing.HomePageESpotLoader;
				
				var context = argmkhmespotldr.contexts[emsName];
				context.onsuccess=argmkhmespotldr.success;
				context.onfail=argmkhmespotldr.fail;				

				argos.marketing.ESpotLoader.load(context);
			},
			
			success: function(context, json){	
				context.postResponseHandler(context, json);
				var argmkhmespotldr = argos.marketing.HomePageESpotLoader;	
				if(json.success === true ){					
					$(context.espotPrimary).html(json.html);
					$(context.espotSecondary).hide();
					$(context.espotPrimary).show();
				}else{
					$(context.espotSecondary).show();
					$(context.espotPrimary).hide();
				}
			},
			
			fail: function(context){	
				alert('Here');
				context.postResponseHandler(context);
				$(context.espotPrimary).hide();
				$(context.espotSecondary).show();
			}
	};
	
	$(document).ready(function(){		
		//argos.marketing.HomePageESpotLoader.init();Moved to storehomepagemarketingespotholder.jsp to speed up espot loading
	});
}


function homepageEspotTagging(context, json){
	
	//alert(context.espotname);
	//alert(json);
	if(json != null && json.success===true && json.assetname != null ){		
		s.eVar5=json.assetname;
		s.tl();
	}
}
