$(document).ready(function() {

	$("span.pseudo_link").click(function() {
		$(this).parents().filter('form').submit();
	});
	$("#clear_basket_link").click(function() {
		$("#basket_mod").val('clear');
		$("#basket_form").submit();
	});
	$("#download_from_basket").click(function() {
		var license_accept = $("#license_accept");
		if ( ! license_accept.is(":checked")) {
			license_accept.before('<span class="red">In order to continue you must check this box.</span><br />');
			return;
		}
		$("#basket_mod").val('download');
		$("#basket_form").submit();
	});

	$("#horizontal_solution_PPeCheck").click(function() {
		window.open(
		'https://www.paypal.com/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside',
		'olcwhatispaypal',
		'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350'
		);
	});

	$("table.common_table img").click(function() {
		window.location = "see_image_details.php?idi=" + $(this).attr("id").substr(4);
	});

});
