// JavaScript Document


// get host URL first, then split
//function getHost() {
	var url = window.location.href;
	var nohttp = url.split('//')[1];
	var hostPort = nohttp.split('/')[1];
	// lets split another one!
	var hostPort2 = hostPort.split('?')[1];
//}

function assignID(ref){
	var all_links = getElementsByClassName(document, "a", ref);
	var found = all_links[0];
	var parent = found.parentNode;
	parent.id = 'selected';
}

// a long conditional hack.
// only way to go, plus nav is not changable.

var currentPage;

if(hostPort2 == 'tabindex=14&tabid=185'){ currentPage = 'dining'; assignID(currentPage);}
if(hostPort2 == 'tabindex=2&tabid=137'){ currentPage = 'weddings'; assignID(currentPage);}
if(hostPort2 == 'tabindex=3&tabid=138'){ currentPage = 'menus'; assignID(currentPage);}
if(hostPort2 == 'tabindex=4&tabid=139'){ currentPage = 'events'; assignID(currentPage);}
if(hostPort2 == 'tabindex=5&tabid=140'){ currentPage = 'galleries'; assignID(currentPage);}
if(hostPort2 == 'tabindex=6&tabid=147'){ currentPage = 'aboutus'; assignID(currentPage);}
if(hostPort2 == 'tabindex=7&tabid=148'){ currentPage = 'whatson'; assignID(currentPage);}
if(hostPort2 == 'tabindex=8&tabid=149'){ currentPage = 'sebel'; assignID(currentPage);}
if(hostPort2 == 'tabindex=9&tabid=150'){ currentPage = 'treasury'; assignID(currentPage);}
if(hostPort2 == 'tabindex=10&tabid=151'){ currentPage = 'contactus'; assignID(currentPage);}


