// JavaScript Engine

	$(document).ready(function(){
	
	Cufon.replace("h1, h2, h3, .social-links li", {
       textShadow: '#1B5282 1px 1px'
    });
    
    Cufon.replace(".home-links h2", {
       textShadow: '#699EC4 1px 1px',
       color: '-linear-gradient(#255F8C, #184A76)'
    });
	
	$(".ngg-gallery-thumbnail a, .col .galleryoverview a").fancybox({
		'hideOnContentClick': false
	});
	
	$('#ss ul').innerfade({
			speed: 'slow',
			timeout: 4000,
			type: 'sequence',
			containerheight: '275px'
	});
	
	 // submit form
 	$('#myForm').ajaxForm(function(data) {
            if (data==1){
                $('#success').fadeIn("slow");
                 $('#myForm').slideUp("slow");
                $('#myForm').resetForm();
            }
            else if (data==2){
                $('#badserver').fadeIn("slow");
            }
            else if (data==3)
            {
                $('#bademail').fadeIn("slow");
                setTimeout(function() { 
  				$('#bademail').fadeOut("slow"); 
				}, 10000);
            }
        });
	
	$(function(){$('a[href][rel*=external]').addClass("external").each(function(i){this.target = "_blank";});});
  
});
