$(document).ready(function() { 
//start jQuery

//show header, hide about_drop, remove focus, etc...
	$('h1').hide();
	$('h1:hidden').fadeIn("slow");
	$('a').click(function() {
		this.blur();
	});
	
	if ($.browser.version = jQuery.browser.msie && parseInt(jQuery.browser.version) < 7) {  
	$('#about_drop').append('<div class=\"ie6alert\"></div>');
	$('.ie6alert').html('There are features of this site that will not work in your browser. Please update your version of <a href=\"http://www.microsoft.com/windows/Internet-explorer/default.aspx\" target=\"_blank\">Internet Explorer</a>.');
  } else {
	$('#about_drop').hide();
	$('#about_drop .close_about').css({'display':'block'});	
  }
	
});




$(window).load(function () {
						 
	 

//load the home age gallery thumbs
	$('#holdme').empty();
	$('#holdme').append('<div id="div_gallery" class="homeimg"></div>');
	setTimeout(function () { 
		$('#div_gallery').load('home/home_list.php');
		}, 10);
	
//reload home gallery onclick
	$('#gallerydroplink').click(function(){
	$(this).attr('href','#gallery');
	$('#newcaption').fadeOut('slow');
	$('#div_gallery').fadeTo('400', 0);
		setTimeout(function () { 
		$('#holdme').empty();
		}, 500);
	$('#about_drop').slideUp(800);	
	setTimeout(function () { 
	$('#holdme').append('<div id="div_gallery" class="homeimg"></div>');
	}, 600);
	setTimeout(function () { 
		$('#div_gallery').load('home/home_list.php');
		}, 800);
	});


//toggle info/contact menu

	$('.close_about').click(function(){
		$(this).attr('href', '#');
		$('#about_drop').slideUp(800);							
	});
	$('#aboutdroplink').click(function(){							   
		$(this).attr('href', '#about');
		$('#about_drop').slideDown(800);							
	});		
	

//just to make the form pretty	

	$('#contactform a.clear').click(function(){
		$('#contactform .inputnormal').val("");
    });
	$('#contactform').attr('action', './php/contact-send.php');	

	$('.images').css({'padding-bottom':'50px'});


// fuckin with the captions cause IE is teh sux

	$('*').click(function(){
		var iecaption = $('.caption').html();
		$('#newcaption').html(iecaption);
	});



//end jQuery
});

