jQuery(function() {
	if(jQuery('#home-carousel').length > 0) {
		// hcbi
		// hcii
		var i = 1;
		var height = 395;
		var newHeight = 0;
		jQuery('.hc-block h2').click(function() {
			var current = jQuery(this);
			jQuery('.active .hc-details').slideUp(250, function() {
				jQuery(this).parent().removeClass('active');
				
				var string = jQuery(this).parent().attr('id');
				i = string.substr(4, 1);
				i = parseInt(i);
				
				newHeight = i * height;
				
				jQuery('#hci-holder').animate({
					marginTop: '-' + newHeight
				}, 500);
				
				jQuery(current).parent().find('.hc-details').slideDown(500, function() {
					jQuery(current).parent().addClass('active');
				});
			});
		});
	}
});
