$(document).ready(function()
{
	// Collapsible Pricing Page
	$('.collapse').click(function()
	{
		var tbl = $(this).attr('id') + '_table';
		$('#' + tbl).toggle("slow");
		return false;
	});

	// Slideshows
	var slide_shows = new Array(
		new Array(
			'slideshow',											// Container
			'/inc/slideshow/MagneticSlideshow.swf',					// Slideshow
			660,													// Width
			440,													// Height
			{ xmlURL: '/inc/slideshow/slideshow_home.xml' },		// Flash Vars
			{ },													// Params
			{ }														// Attributes
		),
		
		new Array(
			'equip_slideshow',										// Container
			'/inc/slideshow/MagneticSlideshow.swf',					// Slideshow
			660,													// Width
			440,													// Height
			{ xmlURL: '/inc/slideshow/slideshow_equipment.xml' },	// Flash Vars
			{ },													// Params
			{ }														// Attributes
		),
		
		new Array(
			'pricing_carousel',										// Container
			'http://ezphotoscanning.com/carouselGallery.swf',		// Slideshow
			800,													// Width
			400,													// Height
			{ },													// Flash Vars
			{ },													// Params
			{ }														// Attributes
		)
	);

	// Replace slideshows
	for (i = 0; i < slide_shows.length; i++)
	{
		var show = slide_shows[i];
		swfobject.embedSWF(show[1], show[0], show[2], show[3], '9.0.0', false, show[4], show[5], show[6]);
	}
	
	$('input[name="scanner_checkout_submit"]').click(function()
	{
		if ($('input[name="email_address"]').val() == "" || $('input[name="telephone_number"]').val() == "")
		{
			alert("You must enter your email address and telephone number to continue.\n");
			return false;
		}
	});
	
	// Modal
	$('.gallery_account_login').click(function (e)
	{
		e.preventDefault();
		$.get("modal/continue.php", function(data)
		{
			$(data).modal();
		});
	});
	
});
