/**
 * @author rozario.chivers
 */
var addUrlClass =  {
	imagePath : "",
	PRE_CLASS : "url-", // appended class name in format url-http, url-https
	url: "", 
	prefix : "", 
	bodyTag : null, 
	bodyClass : "",
	newClass : "",
	HTTP_URL : "http://brands.scene7.com/is/image/brands/",
	HTTPS_URL : "https://a248.e.akamai.net/f/248/9086/10h/origin-g2.scene7.com/is/image/brands/",
	init : function() {
		$(function() {
			// reduce namespace
			var uc = addUrlClass;
			uc.url = window.location.href; 
			uc.prefix = uc.url.substring(0,uc.url.indexOf(":"));
			uc.bodyTag = document.getElementsByTagName("body")[0];
			uc.bodyClass = uc.bodyTag.className;
			// append class
			uc.newClass = uc.bodyClass + " " + uc.PRE_CLASS + uc.prefix.toLowerCase();
			uc.bodyTag.className = uc.newClass;
			switch(uc.prefix) {
				case "http" : uc.imagePath = uc.HTTP_URL;
				break;
				case "https" : uc.imagePath = uc.HTTPS_URL;
				break;
				case "file" : uc.imagePath = uc.HTTP_URL;
				break;
			}
			// update UDM
			um.baseSRC = addUrlClass.imagePath;
		});
	}()
}; // end addUrlClass


