$(function(){

	$("#control").bind('dblclick', function() {
		$("#control").fadeOut();
		return false;
	});
	
	$("#slider").easySlider({
		auto: true, 
		continuous: true,
		controlsShow: false,
		speed: 1000
	});

	$('a[rel=lightbox]').lightBox();

	function changeCountry(countryid) {
		$.ajax({
			url: '/ajax/content.php',
			data: 'section=address&countryid=' + countryid,
			success: function(xml) {
				if ($("status", xml).text() != 1) {
					alert($("message", xml).text());
					return false;
				}
				$('#deliveryfieldset').html($("body", xml).text());
			},
			error: function() {
				alert('Communication Error');
			}
		});
	}
	
	$('#deliverycountryid').change(function() {
		changeCountry($(this).val());
	});
	
	if ($('#deliverycountryid').val()) {
		changeCountry($('#deliverycountryid').val());
	}

	if ($('h3.accessories')) { 
		setInterval(function() {
			$('h3.accessories').toggleClass('blink');
		}, 1000);
	}	
	
});




