(function( $ ) {
	var data = {};
	$.getReg = function(key) {
		var ret = data;
		$.each( key.split('.'), function(i,k){
			ret = ret[k];
			return typeof ret == 'object';
		});
		return ret && ret[0];
	};
	$.setReg = function(key, val, locked) {
		var ret = data;
		$.each(key.split('.'), function(i,k){
			ret = ret[k] = ret[k] || [];
		});
		// if not locked
		if(!ret[1]) {
			ret[0] = val; 
			ret[1] = locked;
		}
		return ret[0];
	};
	$.cleanReg = function() { data = null; };
})( jQuery );

// global form id for normal validation
$.setReg('constants.formId','#aspnetForm');
$.setReg('constants.formFieldsetId','#aspnetForm');
$.setReg('constants.rp.productLayerId','#product-layer');
$.setReg('constants.rp.productLayerTopPos','15em',true);