$( function () {
	$("div#arrow_left, div#arrow_right").hover( function () {
		$side = $(this).attr('id');
		$timer = setInterval( function () {
			if($side == 'arrow_left') {
				$scroll = $("ul.downloads").scrollLeft() - 10;
			} else {
				$scroll = $("ul.downloads").scrollLeft() + 10;
			}
			$("ul.downloads").scrollLeft( $scroll );
		}, 50);
	}, function () {
		clearInterval( $timer );
	});
	
	$("ul.downloads li a").css('cursor', 'pointer').click( function () {
		$bigImageSrc = $(this).attr('src');
		
		if($("div#big-image img").attr('src') == $bigImageSrc)
			return;
		
		$("div#big-image img").fadeOut(100, function () {
			$(this).attr('src', $bigImageSrc).fadeIn(100);
		});
	});
});
