	$(document).ready(function($) {

		//first/last-child
		$('ul li:first-child').addClass('first-child');
		$('ul li:last-child').addClass('last-child');
		$('#middle .box:last-child').addClass('last-child');
		
		//back to top
		$('#back-to-top').click(function(e) {
			$('html, body').animate({scrollTop:0}, 'fast');
			return false;
		});
		
		//screenshots
		if($('#screenshots .image img').length == 0){
			var first = $('#screenshots .pagination ul li.active a').attr('href');
			$('#screenshots .image').append('<img src="' + first + '" alt="" />');
		}
		var thumb = $('#screenshots .pagination ul li a');
		$.each(thumb, function(id, data){
			$(this).click(function(e) {
				var image = $(this).attr('href');
				var current_image = thumb[id];
				$('#screenshots .image img').attr('src', image);
				thumb.parent().removeClass('active')
				$(current_image).parent().addClass('active')
				return false;
			});
		});
		
		//showcase
		$('#coda-slider').codaSlider({
			crossLinking: false
		});
		
	});