var rm = {
	/* 
	* <settings> is a json object where we store all condition value and reference of rm objects</settings>
	* <isStubLoaded> is a boolean label which will be turned to true or false according to ajax success result.
	* <index> is a string label which is dummy value may helps us to configure the intial page flow load.</index>
	*/
	settings: {
		isStubLoaded:false,
		index: 'rb',
		storeID:null
	},
	/* 
	* <init> is a function where we write all function and condition for rm object initiation.</init>
	* <cancelOrder> function called in init function to reset all primary key pair variable in all initiated objects.</cancelOrder>
	* <rb.ajaxCall> is called in init function to load all book stub data on initial point of time.</rb.ajaxCall>
	*/
	init:function(){
		rm.ajaxCall();
	},
	/* 
	* <ajaxCall> is a function with dynamic ajax call option to get result based on input parameter</ajaxCall>
	* <rm.loading> is a function which adds progress bar on screen untill the result populated to use. It has option of removing progress by passed false as argument</rm.loading>
	* <isStubLoaded> is boolean label which is located in rm setting object. It will be conditionally turned to true or false according to ajax success result.</isStubLoaded>
	*/
	ajaxCall: function(){
		var strId = document.getElementById("storeId").value;
		var catId =10001;
		var langId = -1
		
		var protocal = location.protocol;
		//alert(protocal);
		
			var cmdUrl='';
		//if the page is http then call BNCBShowShoppingCartDetailsCmd (http) else call BNCBShowShoppingCartHttpsCmd (https) command 
	//	if(location.protocol=="http:")
	//	{
	//	cmdUrl = '/webapp/wcs/stores/servlet/BNCBMiniShoppingCartUserNameView';
	//	}else{
	//	cmdUrl='/webapp/wcs/stores/servlet/BNCBMiniShoppingCartView';
	//	}		
		cmdUrl = '/webapp/wcs/stores/servlet/BNCBMiniShoppingCartUserNameView';
	
		$.ajax({
			 type: 'get',
			 url: cmdUrl,
			 dataType: 'text/html',
			 data:"catalogId=" + catId + "&langId=" + langId+"&storeId="+strId,
			 success: function(html){
			//alert('success');
				var miniC = document.getElementById("miniCart");
 				miniC.innerHTML = html;
			 }
		});
	}
	
};

function processMiniCartData(){
rm.ajaxCall();
}


//$(document).ready(function () {
//	rm.init();
//}); 
