/**
 * SimpleModal Test
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2009 Eric Martin - http://ericmmartin.com
 *
 * Revision: $Id: simplemodal.js 185 2009-02-09 21:51:12Z emartin24 $
 *
 */
$(document).ready(function () {

	$('a#house1').click(function (e) {
		e.preventDefault();
		$.modal("<div class='sketch'>\
					<h1>6318 Bryan Pkway</h1>\
					<p><img src='2009/sketches/6318BryanParkway.jpg' /></p>\
				</div>");
	});
	$('a#house2').click(function (e) {
		e.preventDefault();
		$.modal("<div class='sketch'>\
					<h1>5316 Live Oak</h1>\
					<p><img src='2009/sketches/5316LiveOak.jpg' /></p>\
				</div>");
	});
	$('a#house3').click(function (e) {
		e.preventDefault();
		$.modal("<div class='sketch'>\
					<h1>4918 Swiss Avenue</h1>\
					<p><img src='2009/sketches/4918Swiss.jpg' /></p>\
				</div>");
	});
	$('a#house4').click(function (e) {
		e.preventDefault();
		$.modal("<div class='sketch'>\
					<h1>5002 Swiss Avenue</h1>\
					<p><img src='2009/sketches/5002Swiss.jpg' /></p>\
				</div>");
	});
	$('a#house5').click(function (e) {
		e.preventDefault();
		$.modal("<div class='sketch'>\
					<h1>5032 Swiss Avenue</h1>\
					<p><img src='2009/sketches/5032Swiss.jpg' /></p>\
				</div>");
	});
	$('a#house6').click(function (e) {
		e.preventDefault();
		$.modal("<div class='sketch'>\
					<h1>5908 Swiss Avenue</h1>\
					<p><img src='2009/sketches/5907Swiss.jpg' /></p>\
				</div>");
	});
	$('a#house7').click(function (e) {
		e.preventDefault();
		$.modal("<div class='sketch'>\
					<h1>6220 Worth Street/h1>\
					<p><img src='2009/sketches/6220Worth.jpg' /></p>\
				</div>");
	});
	$('a#house8').click(function (e) {
		e.preventDefault();
		$.modal("<div class='sketch'>\
					<h1>6015 Bryan Parkway</h1>\
					<p><img src='2009/sketches/6015BryanParkway.jpg' /></p>\
				</div>");
	});
		$('a#map').click(function (e) {
			e.preventDefault();
			$.modal("<div class='sketch'>\
						<p><iframe width='725' height='500' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://maps.google.com/maps/ms?hl=en&amp;gl=us&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=114879240199195124130.0004670ee291b6285d6b0&amp;ll=32.80863,-96.759167&amp;spn=0.014428,0.025749&amp;z=15&amp;output=embed&amp;t=h'></iframe><br />View <a href='http://maps.google.com/maps/ms?hl=en&amp;gl=us&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=114879240199195124130.0004670ee291b6285d6b0&amp;ll=32.80863,-96.759167&amp;spn=0.014428,0.025749&amp;z=14&amp;source=embed' >Swiss Avenue Home Tour 2009</a> in a larger map</p>\
					</div>");
	});
	
});

/**
 * When the open event is called, this function will be used to 'open'
 * the overlay, container and data portions of the modal dialog.
 *
 * onOpen callbacks need to handle 'opening' the overlay, container
 * and data.
 */
function modalOpen (dialog) {
	dialog.overlay.fadeIn('slow', function () {
		dialog.container.fadeIn('slow', function () {
			dialog.data.slideDown('slow');
		});
	});
}

/**
 * When the close event is called, this function will be used to 'close'
 * the overlay, container and data portions of the modal dialog.
 *
 * The SimpleModal close function will still perform some actions that
 * don't need to be handled here.
 *
 * onClose callbacks need to handle 'closing' the overlay, container
 * data and iframe.
 */
function modalClose (dialog) {
	dialog.data.fadeOut('slow', function () {
		dialog.container.hide('slow', function () {
			dialog.overlay.slideUp('slow', function () {
				$.modal.close();
			});
		});
	});
}

/**
 * After the dialog is show, this callback will bind some effects
 * to the data when the 'button' button is clicked.
 *
 * This callback is completely user based; SimpleModal does not have
 * a matching function.
 */
function modalShow (dialog) {
	dialog.data.find('input.animate').one('click', function () {
		dialog.data.slideUp('slow', function () {
			dialog.data.slideDown('slow');
		});
	});
}