function goFancy (target){
	//$('#'+target).click();
	console.log(target);
}

sfHover = function(element) {
	var sfEls = document.getElementById(element).getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
};

$(document).ready(function() {
	//sfHover('vacancy');
	
	// fix height of wrapAll div for IE6
	if ($.browser.msie && $.browser.version <= 7) {
		var wrapAllH = $('#wrapAll').width();
		var height = $(document).height();
		$('#wrapAll').height(height);
		$('#wrapAll').width(wrapAllH);
		$('.layer').height(height);
		$('#wrap').height(height);
	}
	
	var activeTab = '#tabs-1';
	$('.subpageSideLinks a[href='+activeTab+']').addClass('active');
	
	$('.subpageSideLinks a').bind('click', function() {
		var clickedTab = $(this).attr('href');
		
		if (activeTab != clickedTab) {
			$('.subpageSideLinks a[href='+activeTab+']').removeClass('active');
			$(this).addClass('active');
			
			$(activeTab+' > .subImage > img').fadeOut();
			$(activeTab+' > .tabText').slideUp('slow', function() {
				$(activeTab).fadeOut('fast', function() {
					$(clickedTab).fadeIn('fast');
				});
				$(clickedTab+' > .subImage > img').fadeIn('fast', function() {
					// fox for IE 6 & 7 for lost top margin on image
					if ($.browser.msie && $.browser.version < 8) {
						$(clickedTab+' > .subImage > img').css('margin-top', 8);
					}
					$(clickedTab+' > .tabText').slideDown("slow");
				});
				// fix height of wrapAll div for IE6
				if ($.browser.msie && $.browser.version < 7) {
					var height = $(document).height();
					$('#wrapAll').height(height);
					$('.layer').height(height);
					$('#wrap').height(height);
				}
				activeTab = clickedTab;
			});
		}
		return false;
	});
});

