Cufon.replace('#Content h1', { 
	fontFamily: 'Helvetica' ,
	hover: true
});
Cufon.replace('#Content h2', { 
	fontFamily: 'Helvetica' ,
	hover: true
});
Cufon.replace('#Content h3', { 
	fontFamily: 'Helvetica' ,
	hover: true
});
Cufon.replace('.ProductTeaser dt', { 
	fontFamily: 'Helvetica' ,
	hover: true
});
Cufon.replace('#HomeButtons dt', { 
	fontFamily: 'Helvetica' ,
	hover: true
});

$(function()
{
	$('.ImageHolder a').lightBox();
	$('.GalleryRow dt a').lightBox();
});

$(function()
{
	$('#Form textarea').autogrow();				
});

$(function(){

	$('.FAQToggle').click(function () 
	{
		var ResultID = this.id.replace('more_', '');
		$('#detail_'+ResultID+'').slideToggle('fast');
		
		$( this ).toggleClass('FAQCollapse');
	}),

	$('.FAQToggleAll').click(function () 
	{
		$('.FAQAnswer').show('fast');
		$('.FAQToggle').addClass('FAQCollapse');
		
		$( this ).hide();
		$('.FAQCollapseAll').show();
	}),

	$('.FAQCollapseAll').click(function () 
	{
		$('.FAQAnswer').hide('fast');
		$('.FAQToggle').removeClass('FAQCollapse');
		
		$( this ).hide();
		$('.FAQToggleAll').show();
	})
});

jQuery.fn.fadeToggle = function(speed, easing, callback) {
   return this.animate({opacity: 'toggle'}, speed, easing, callback);

}; 

function equalHeight(group) {
    tallest = 0;
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}
$(document).ready(function() {
    equalHeight($("#HomeButtons dl"));
});


$(document).ready(function(){
$('a[href*=#]').click(function() {
  if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
  && location.hostname == this.hostname) {
	var $target = $(this.hash);
	$target = $target.length && $target
	|| $('[name=' + this.hash.slice(1) +']');
	if ($target.length) {
	  var targetOffset = $target.offset().top;
	  $('html,body')
	  .animate({scrollTop: targetOffset}, 1000);
	 return false;
	}
  }
});
});