var fordmJobs = {
		tabContainerID: "navJobs",
		tabs: new Array(),
		initialize: function() {
		},
		
		createTabs: function() {
			var classObject = this;
			this.tabs = $$("#navJobs li a");
			this.tabs.each(function(el) {
				Event.observe($(el), "click", function() {
					classObject.switchTab(el);
				});
			});
			if(window.location.search){
				this.switchTab($(window.location.search.substr(1)));
				if(!window.location.hash)
					Effect.ScrollTo(this.tabContainerID, { duration: 0.5, offset:-10 });
				else
					Effect.ScrollTo(window.location.hash.substr(1), { duration: 0.5, offset:-10 });
			}else
				this.switchTab($(this.tabs[0]));
			
		},
		
		switchTab: function(tab) {
			var content = $(tab.id + "_data");
			if (content) {
				this.tabs.pluck("id").each(function(elid) {
					$(elid).className = "blue";
					$(elid + "_data").hide();
				});
				tab.className = "activeBlueTab blue";
				content.show();
			} else {}
		}
	};
	
document.observe("dom:loaded", function() {
	fordmJobs.createTabs();
});
