MGCatMap = { "map":
[ {
     "vehicle": {
         "OAS": "/classifieds/transportation/index",
         "SC": "Classifieds.Transportation",
		 "CI": "20252501",
		 "CT": "fn_class"
     },
     "housing/sale": {
         "OAS": "/classifieds/real_estate/index",
         "SC": "Classifieds.Real_Estate",
		 "CI": "20243001",
		 "CT": "fn_class_ls"
     },
     "housing/rent": {
         "OAS": "/classifieds/rentals",
         "SC": "Classifieds.Rentals",
		 "CI": "20244001",
		 "CT": "fn_class_ls"
     },
     "job": {
         "OAS": "/classifieds/jobs/index",
         "SC": "Classifieds.Jobs",
		 "CI": "20218501",
		 "CT": "fn_class_jobs"
     },
     "sale/pet": {
         "OAS": "/classifieds/pets",
         "SC": "Classifieds.Pets",
		 "CI": "20238001",
		 "CT": "fn_class"
     },
     "sale": {
         "OAS": "/classifieds/merchandise/index",
         "SC": "Classifieds.Merchandise",
		 "CI": "20233001",
		 "CT": "fn_class"
     },
     "sale/tickets": {
         "OAS": "/classifieds/tickets",
         "SC": "Classifieds.Tickets",
		 "CI": "20233001",
		 "CT": "fn_class"
	},
     "service": {
         "OAS": "/classifieds/services/index",
         "SC": "Classifieds.Services",
		 "CI": "20247501",
		 "CT": "fn_class"
	},
	 "personals": {
         "OAS": "/classifieds/personals",
         "SC": "Classifieds.Personals",
		 "CI": "20237501",
		 "CT": "fn_class"
	},
         "community": {
         "OAS": "/classifieds.community",
         "SC": "Classifieds.Announcements",
                   "CI": "20215001",
                   "CT": "fn_class"
        }
 }]}

	function mapCat(oc,mgmap){
		if(typeof(mgmap.map[0][oc]) !== "undefined") return mgmap.map[0][oc];
	}
	var uriQuery = window.location.search.toLowerCase();
	var uriQueryObj = uriQuery.split("&");
	var oodleCat = {"OAS":"/classifieds/index","SC":"Classifieds","CI": ["20237501"], "CT": ["fn_class"]};// <<------- default category for the Oodle page
	if(uriQuery!=''){
		for(i=0;i<=(uriQueryObj.length-1);i++){
			if(uriQueryObj[i].substring(0, 1) == '?'){
    			    uriQueryObj[i] = uriQueryObj[i].substring(1);
  			}
			uriQueryObjele = uriQueryObj[i].split("=");
			if(uriQueryObjele[0]=="category" && uriQueryObjele[1] != ''){
				oodleCat = mapCat(uriQueryObjele[1],MGCatMap); 
				break;
			}
		}
	}

	sitepage += oodleCat.OAS;