jQuery(function($){
				
				$.supersized({
				
					// Functionality
					slide_interval          :   12000,		// Length between transitions
					transition              :   1, 			// 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
					transition_speed		:	700,		// Speed of transition
															   
					// Components							
					slide_links				:	'blank',	// Individual links for each slide (Options: false, 'number', 'name', 'blank')
					slides 					:  	[			// Slideshow Images
														
														{image : 'images/bg9.jpg'},
														{image : 'images/bg2.jpg'},
														{image : 'images/bg3.jpg'},
														{image : 'images/bg4.jpg'},
														{image : 'images/bg5.jpg'},
														{image : 'images/bg6.jpg'},
														{image : 'images/bg7.jpg'},
														{image : 'images/bg8.jpg'},
														{image : 'images/bg10.jpg'},
														{image : 'images/bg11.jpg'}
														
												]
					
				});
		    });

$(function(){
	
	$('#secNav div').hover(function(){ 
		$(this).find('.subNav').stop(true, true).slideDown();
	},function(){ 
		$(this).find('.subNav').slideUp();
	});
	
	
	if ($('footer').css('bottom') == '-105px'){
		$('#footer-btn a').addClass('openBtn');
	}

	$('#footer-btn a').click(function(){
		var footer = $('footer');
		
		if (footer.css('bottom') == '0px'){
		footer.animate({bottom: '-105px'}, 200);
		$(this).addClass('openBtn');
		}else{
		footer.animate({bottom: '0'}, 200);
		$(this).removeClass('openBtn');
		}
		return false;
	});
	
	$('img.btn').hover(function(){
	var src = $(this).attr("src").match(/[^\.]+/) + "-over.jpg";

	$(this).attr('src', src);
	},function(){ 
	var src = $(this).attr("src").replace("-over.jpg", ".jpg");

	$(this).attr('src', src);
	});
	

	 $("#contact-form").submit(function(){

		var str = $(this).serialize();
		
	   $.ajax({
		   type: "POST",
		   url: "/mailer.php",
		   data: str,
		   success: function(msg){
		
				$("#contact-form").ajaxComplete(function(event, request, settings){
				
					if(msg == 'ok') // Message Sent? Show the 'Thank You' message and hide the form
					{
						result = '<p><strong>Thank you!</strong> We will be in touch</p>';
						$("#contact-form").fadeOut();
					} else {
						result = msg;
					}
					
					$('#answer').html(result);
					
				});
		
			}

		});
		
		return false;
		
		});

	

	$('.videoLink').click(function(){
		$('#videos').show();
		$('#videos').flash({
		    src: 'switchback-flash.swf',
		    width: '100%',
		    height: '100%',
		    scale: 'noscale',
		    bgcolor: '#00fff',
		    wmode: 'transparent',
		    menu: 'true',
		    allowFullScreen: 'true'
		});
		return false;
	});
	
	
});


function closeFlash(){
	$('#videos').hide();
	$('#videos').empty();
	
	
}



















