/*
 * Gasparilla Properties - Open Realty Theme Javascript
 * (c) 2008 Brice Burgess <bhb@iceburg.net>
 */


$().ready(function(){

	// load menu
	$('#navigation ul.nav').superfish({autoArrows: false});

	// badges (footer) modal
	$('#modal').jqm({
		trigger: '#bottomBar div.badges a.modal',
		ajax: '@href',
		target: '.jqmContent',
		overlay: 94,
		modal: true
	});

/*
	// request additional info modal
	$('#contactModal').jqm({
		trigger: '#gpMoreInfo',
		overlay: 94,
		onShow: function(h) {
			// add property title to comments field
			$('label[@for=dreamComments]',h.w).html('Inquiry Regarding '+h.t.hash);

			// add propert title to hidden form field
			$('input[@name=dreamProperty]',h.w).val(h.t.hash);
			h.w.show();
		},
		modal: true
	});
*/

	// slideshow
	 var imgPath = 'template/gasparilla-template/assets/img/slideshow/';
	//var imgPath = '../img/slideshow/';
	if($('#gpSlideShow').length > 0) {
		$('#gpSlideShow').crossSlide({
		  sleep: 3,  	//px/sec
		  fade: 1.2     //sec
		}, [
		  { src: imgPath+'lighthouse.jpg', dir: 'down'   },
		  { src: imgPath+'north.jpg', dir: 'up' },
		  { src: imgPath+'dock.jpg', dir: 'down'   },
		  { src: imgPath+'path.jpg', dir: 'up' },
		  { src: imgPath+'banyan.jpg', dir: 'down'   },
		  { src: imgPath+'golf.jpg', dir: 'up' },
		  { src: imgPath+'dog.jpg', dir: 'down'   },
		  { src: imgPath+'grille.jpg', dir: 'up'   },
		  { src: imgPath+'sun.jpg', dir: 'down' },
		  { src: imgPath+'cart.jpg', dir: 'up' }
		]);
	}

	// ajax form
	$('div.ajaxForm form').ajaxForm({target:'div.ajaxForm'}).jqValidate();

	// drop down filter selections
	$('#selFilter').change(function(){
		window.location.href = $(this).val();
	});

});


