$("body").ready(function(){
locationChoose = location.href.split("#");
ctr=1;
$(".texting").text(locationChoose[1]);
selElem = "images/"+$("#butt1").attr("ha");

prevElem = $("#butt1");
	$(".profileDescription").hide();
	while(ctr < 5){
		if($("#option"+ctr).attr("refName") == locationChoose[1]){
			///Hiding Previous Pane Windows
			$(".profileDescription").hide();
			///Highlight Button
			$("#butt"+ctr).attr({
				src: "images/" + $("#butt"+ctr).attr("ha") + "a.jpg"
			});
			selElem = "images/"+$("#butt"+ctr).attr("ha");
			prevElem = $("#butt"+ctr);
			///Highlight Pane Window
			$("#option"+ctr).show();
			break;
		}else{
			///Hiding Previous Pane Windows
			$(".profileDescription").hide();
			///Highlight Button
			$("#butt1").attr({
				src: "images/" + $("#butt1").attr("ha") + "h.jpg"
			});
			selElem = "images/"+$("#butt1").attr("ha");
			prevElem = $("#butt1")
			///Highlight Pane Window
			$("#option1").show();
		}
		ctr++;
	}
	
	function highTabs(mVals){
		mValue = "images/"+$(mVals).attr("ha");
		$(mVals).attr({
				src: mValue + "a.jpg"
		});
		///Previous Elements
		prevElem = $(this);
		selElem = "images/"+$(this).attr("ha");
	}
	//Button Rollover
	$(".tabs").mouseover(function(){
		mValue = "images/"+$(this).attr("ha");
		if(mValue != selElem){
			$(this).attr({
				src: mValue + "r.jpg"
			});
		}
	}).mouseout(function(){
		mValue = "images/"+$(this).attr("ha");
		if(mValue != selElem){
			$(this).attr({
				src: mValue + "h.jpg"
			});
		}
	}).click(function(){
		$(prevElem).attr({
				src: selElem + "h.jpg"
		});
		$(this).attr({
				src: mValue + "a.jpg"
		});
		//Update URL
        location.href = "#" + $(this).attr("refName");
		
		////
		$(".profileDescription").hide();
		$("#option" + $(this).attr("no")).show();
		///Previous Elements
		prevElem = $(this);
		selElem = "images/"+$(this).attr("ha");
	});
});