jQuery(function( $ ){
	/* 	CONTACT FORM */
	$('#add_contact_form INPUT').focus(function(){
		if(($(this).val()=="email address")||($(this).val()=="first name")||($(this).val()=="last name")||($(this).val()=="zip code")){
			$(this).val('');
		}
		$('#add_contact_form INPUT').removeClass('active');
		$(this).addClass('active');
	});
	var form_options = {
		beforeSubmit: function(){
			fail = false;
			if($('#ContactFirstName').val() == ""){fail = true;}
			if($('#ContactLastName').val() == ""){fail = true;}
			if($('#ContactZip').val() == ""){fail = true;}
			if($('#ContactEmail').val() == ""){fail = true;}
			if(fail){
				alert('Please fill out all the fields.');
				return false;
			}
		},
		success: function(){
			alert('Thanks for submitting your information!');
			$('#add_contact_form').hide();
		}
	};
	$('#add_contact_form').ajaxForm(form_options);
	$('#add_contact_form a.submit').click(function() {
		$(this).parents("form").submit();
		return false;
	});

	/* 	HOME PAGE BUTTONS */
	var homehtml = $('#link_1').html();
	var ishome = true;
	$('#home_subnav a').click(function(){
		href = $(this).attr("href");
		
		switch(href.substring(0,1)){
			case "h":
 				window.open	(href);
				break;
			default:
				if($.browser.msie){
					$('#media_roller_1').hide();
				}
				$('#link_1').animate({
					marginTop:'370px'
				},600,'',function(){
					$('#link_1').html($(href).html());
				});
				$('#link_1').animate({
					marginTop:'0px'
				},600);
				ishome = false;
				break;
		}

		return false;
	});
	
	$('a.lightbox').lightBox()
	
	
	
	/* 	HOMEPAGE GALLERY */
	/*
$('#plugin_flickr_feed a').lightBox({
		overlayBgColor: '#FFF',
		overlayOpacity: 0.6,
		imageLoading: '/img/lightbox/loading.gif',
		imageBtnClose: '/img/lightbox/close.gif',
		imageBtnPrev: '/img/lightbox/prev.gif',
		imageBtnNext: '/img/lightbox/next.gif',
		containerResizeSpeed: 350,
		txtImage: 'Imagem',
		txtOf: 'de'
	});
*/

});