$(document).ready(function(){

    $("#scroll").css('width', '355px').css('height', '370px').jScrollPane({ scrollbarWidth: 3, scrollbarMargin:20, showArrows:false });

	$('#photo img').hide().fadeIn(1000);

	// $("#photo-icons a").fancybox({ 'overlayShow': true, 'overlayOpacity': .75 });

	$('#photo-icons a').lightBox({
		overlayOpacity: 0.75,
		imageLoading: 	'../layouts/east/image/lightbox/lightbox-ico-loading.gif',
		imageBtnClose:	'../layouts/east/image/lightbox/lightbox-btn-close.gif',
		imageBtnPrev: 	'../layouts/east/image/lightbox/lightbox-btn-prev.gif',
		imageBtnNext: 	'../layouts/east/image/lightbox/lightbox-btn-next.gif'
	});

    $("#direction-button").click(function() {
    	window.open(toTarget());
		return false;
	});

	$("#address").focus(function() {
		if ($(this).val() == 'Your Address + Zip Here') {
			$(this).val('');
     	}
    });

	//Get Directions to Location 
	function toTarget () {
		var addr = $('#address').val();
		addr = addr.replace(/\+/g, '%2B');
		addr = addr.replace(/ /g, '+');
		var googleAddress = '10245+Main+St., Bellevue, WA';
		var txt = 'http://maps.google.com/?q=from:'+addr+'+to:+';
		txt += googleAddress;
		return txt;
	}

});