// JavaScript Document
Cufon.replace('h2.pageTitle', {color: '-linear-gradient(#fff, #999)', textShadow: '#f1f1f1 0px -1px' });

$(document).ready(function() {
	
	
	$('.icon').click(function(){
		window.location.href = $(this).find('a').attr('href');
	});
	
	$('#sidebar:not(.nondynamic) a').click(function(){
		var id = $(this).attr('rel');
		$('#sidebar li').removeClass('active');
		$(this).parent('li').addClass('active');
		$('.product_panel').addClass('hide');
		$('#' + id).removeClass('hide');
		
		return false;
	})
	
	$('#product_info h3:first-of-type').css('margin-top', '0');
	
	
	$('.product_panel li.clickable').hover(function(){
		$(this).addClass('hover');
	}, function(){
		$(this).removeClass('hover');
	});
	
	$('.product_panel li.clickable').click(function(){
			window.location = $(this).find('a').attr('href');
	});
	
	$('.knowledge img:not(.avatar)').removeAttr('height').removeAttr('width').wrap('<div class="imgwrapper">').each(function(){ $(this).after("<p class='caption'>" + this.alt + "</p>")});
	
	$('#testimonial_list a').click(function(){
		var id = $(this).attr('href');
		$('#testimonial_list a').removeClass('active');
		$(this).addClass('active');
		$('.testimonial_message').addClass('hide');
		$(id).removeClass('hide');
		return false;
	});
});


