var active = 0;
var imgHeight = 304;
var activeOffset = 25;

var activeTab = 0;

jQuery(document).ready(function($) {

	$('#hfThumbs .hfThumb').each(function(x){
	
		$(this).click(function(){
			$('#hfLargeImages img:first').animate({
				marginTop: -(x * imgHeight)
			}, 1000);
			$('#hfActive').animate({
				top: activeOffset + (x * 80)
			}, 1000);
			active = x;		
		});
	
	});
	
	
	$('#hfTabB1').click(function(){
		if(activeTab==0) return;
		$('#hfTab2').fadeIn();
		$('#hfTab1').fadeOut();
		
		$('#hfContent1').fadeIn();
		$('#hfContent2').fadeOut();
		activeTab = 0;		
	});
	
	$('#hfTabB2').click(function(){
		if(activeTab==1) return;
		$('#hfTab1').fadeIn();
		$('#hfTab2').fadeOut();
		
		$('#hfContent2').fadeIn();
		$('#hfContent1').fadeOut();
		activeTab = 1;		
	});
	
	
});
