$('#fp_scroll').cycle(
{
	fx: 'fade',
	speed: 1700,
	timeout: 6000,
	next: '#controllerNext',
	prev: '#controllerPrev'
});


$(document).ready(function()
{
	$('#tabs_links a').click(function()
	{
		$('#tabs_links a').removeClass('selected')
		$(this).addClass('selected');
		var index = $(this).attr('id');

		$('#tab_contents table:visible').fadeOut("fast", function(result)
		{
			$('#tabs' + index).css('display', 'block');
		});
		
		if($('#tab_contents table:visible').size() == 0)
		{
			$('#tabs' + index).css('display', 'block');
		}
		return false;
	}).filter(':first').click();
	
	
	$('.content table td')
		.bind('mouseover', function(event)
		{
			$(this).addClass('tr_hover');
			$(this).siblings().addClass('tr_hover');
			$('#product_card').css({'display' : 'block', 'margin-top' : event.pageY - 440});
		})
		.bind('mouseout', function()
		{
			$(this).removeClass('tr_hover');
			$(this).siblings().removeClass('tr_hover');
			$('#product_card').hide();
		});
	
	$('#thumbs img').click(function()
		{
			var thumb = $(this).attr('src');
			var file = thumb.replace('thumb', 'pic');
			
			$('#large_image img').fadeOut("fast", function()
			{
				$('#large_image img:first').attr('src', file);
			});
			$('#large_image img').fadeIn("fast", function()
			{
				
			});
		});
});

function clearInput(text, element)
{
	$(element).val('');
}
