// JavaScript Document
function attachFooterNav(){
	
$('.fnav_float').hover(m_over, m_out);
$('.fnav_float').click(m_click);

}


function m_over(){
	//get the item number so we can apply style to all the elements of that item
	var str=this.id;
	var last = str.substr(6,1);
	//get the hover color from a wglobal variable
	var hoverColor = window['navlink_'+last];
	//change box graphic background colour
	var obj = "#flink_" + last; // flink = box id
	$(obj).css('background-color',hoverColor);
	
	//change text color
	obj = "#tlink_" + last; // flink = text id
	$(obj).css('color',hoverColor);
	
	//change line color
	obj = "#llink_" + last; // flink = text id
	$(obj).css('border-top-color',hoverColor);

	//$('#msg').html("over... " + this.id + "...>>" +str + " ... ["+ last +"]" + " ... boxobj = "+boxobj+ " ... textobj = "+textobj);

}

function m_out(){
	var str=this.id;
	var last = str.substr(6,1);
	//change box graphic background colour
	var obj = "#flink_" + last; // flink = box id
	$(obj).css('background-color',window['navlinkbase_'+last]);
	
	//change text color
	obj = "#tlink_" + last; // flink = text id
	$(obj).css('color',window['navlinkbase_'+last]);
	
	//change line color
	obj = "#llink_" + last; // flink = text id
	$(obj).css('border-top-color',window['navlinkbase_'+last]);
	
	
	//$('#msg').html("over... " + this.id + "...>>" +str + " ... ["+ last +"]" + " ... boxobj = "+boxobj+ " ... textobj = "+textobj);

}

function m_click(){
	
	var str=this.id;
	var last = str.substr(6,1);
	//$('#msg').html("Clicked this shit.... "+last);
	//only jump if not clicking this page
	if (last != window['selected']){
		var base = "http://billbakerandco.com/";
		window.location = base + window["linkurl_"+last];
		
	}
}


