$(document).ready(function(){

	$(document).pngFix();

	$(".scroll").css('height', '400px').jScrollPane({ scrollbarWidth: 4 });

    $("#content").hide().fadeIn(3000);
    
    $("#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 = '8440+160th+Ave+NE, Redmond, WA';
		var txt = 'http://maps.google.com/?q=from:'+addr+'+to:+';
		txt += googleAddress;
		return txt;
	}

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