(function($){
		  
	$(document).ready(function(){
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////						   
		
		// -------------------------------------------------------------------------------------------------------
		// Cufon - font replacement
		// -------------------------------------------------------------------------------------------------------

		Cufon.replace('#nav-galleries li a, #nav li a, .photo-description, h1, h2', {hover: true});
		
		// -------------------------------------------------------------------------------------------------------
		// DD_belated - IE6 png transparency fix
		// -------------------------------------------------------------------------------------------------------
		
		if ( $.browser.msie ){
			if ( $.browser.version == 6 ){ // only apply the png transparency fix for Internet Explorer 6
				
				DD_belatedPNG.fix('#container li .photo-description, #nav');
				
			}
		}
		
		// -------------------------------------------------------------------------------------------------------
		// Tipsy - facebook like tooltips jQuery plugin
		// -------------------------------------------------------------------------------------------------------
		
		$('.lightbox').tipsy({gravity: 'n'});
		
		// -------------------------------------------------------------------------------------------------------
		// Fancybox - lightbox jQuery plugin
		// -------------------------------------------------------------------------------------------------------
		
		$("a.lightbox").fancybox({
			'overlayOpacity': 0.7,
			'overlayColor'	: '#333'
		});
		
		// -------------------------------------------------------------------------------------------------------
		// Contact Form
		// -------------------------------------------------------------------------------------------------------
		
		$("#contact-form").submit(function(){
				var str = $(this).serialize();
				$.ajax({
				   type: "POST",
				   url: "_layout/php/send.php",
				   data: str,
				   success: function(msg)
				   {
						$("#formstatus").ajaxComplete(function(event, request, settings){
							if(msg == 'OK'){ // Message Sent? Show the 'Thank You' message and hide the form
								result = '<div class="formstatusok">Your message has been sent. Thank you!</div>';
								$("#fields").hide();
							}
							else{
								result = msg;
							}
							$(this).html(result);
						});
					}
				
				 });
				return false;
			});
		
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
	});

})(window.jQuery);

// non jQuery plugins below


