var Thomson = {
	initialize: function() {
		this.setup_external_links();
		this.setup_image_banner();
		this.setup_datepicker();
	},
	
	setup_external_links: function() {
		$("a[@rel~='external']").click(function() {
			window.open($(this).attr('href'));
			return false;
		});
	},
	
	setup_image_banner: function() {
		if ($('#image_banner').length > 0) {
			$('#image_banner').innerfade({ 
				speed: 'slow',
				timeout: 10000,
				type: 'sequence',
				containerheight: '258px' 
			});
		}
	},
	
	setup_datepicker: function() {
		$('input[name=delivery_date]').datepicker({
			minDate: '+0d',
			maxDate: '6m',
			beforeShowDay: $.datepicker.noWeekends
		});
	}
}


$(function(){
	Thomson.initialize();
});
