function start_slideshow() {
	// Stub
}

$(document).ready(function() {
	$('#quality').change(function() {
		$.ajax({
			url: '/show?quality=' + this.options[this.selectedIndex].value,
			type: 'GET',
			dataType: 'html',
			success: function(result) {
				$('#next_chick').attr('href', result);
			}
		});
	});
	$('#category').change(function() {
		$.ajax({
			url: '/show?category=' + this.options[this.selectedIndex].value,
			type: 'GET',
			dataType: 'html',
			success: function(result) {
				$('#next_chick').attr('href', result);
			}
		});
	});
	$('#slideshow').click(function() {
		$.ajax({
			url: '/show?slideshow=1',
			type: 'GET',
			dataType: 'html',
			success: function(result) {
				$('#slideshow_status').html(result);
				if (result == 'ON') {
					start_slideshow();
				}
			}
		});
		return false;
	});
	$("a[rel=external]").attr('target', '_blank');
	$(document).keypress(function(e) {
		if (e.which == 78 || e.which == 110) {
			window.location = $('#next_chick').attr('href');
			return false;
		}
	});
});
