
// CODA-SLIDER  //
		
 $().ready(function() {
       $('#coda-slider-1').codaSlider({
           dynamicArrows: false,
           dynamicTabs: false,
           crossLinking: false
    });
});

// HIDE THE STUFF MADE FOR JS DISABLED USERS  //
		
$(document).ready(function() {
		$(".hide-on-js").hide();
	});


// BACKGROUND CHANGER  //

<!--
function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}
//-->


// RUN LOOPED SLIDER  //

$(function(){
		$('#loopedSlider').loopedSlider();
	});
	

// RUN LOOPED CAROUSEL  //

$(function(){
		$('#loopedCarousel').loopedCarousel({
			vertical: true
		});
	});
	
	
	        
$(document).ready(function() {
	
    $("#ajax-contact-form").submit(function() {
        $('#load').append('<center><img src="/style/images/ajax-loader.gif" alt="Currently Loading" id="loading" /></center>');

        var fem = $(this).serialize(),
			note = $('#note');
	
        $.ajax({
            type: "POST",
            url: "contact/contact.php",
            data: fem,
            success: function(msg) {
				if ( note.height() ) {			
					note.slideUp(500, function() { $(this).hide(); });
				} 
				else note.hide();

				$('#loading').fadeOut(300, function() {
					$(this).remove();

					// Message Sent? Show the 'Thank You' message and hide the form
					result = (msg === 'OK') ? '<div class="success">Your message has been sent. Thank you!</div>' : msg;

					var i = setInterval(function() {
						if ( !note.is(':visible') ) {
							note.html(result).slideDown(500);
							clearInterval(i);
						}
					}, 40);    
				}); // end loading image fadeOut
            }
        });

        return false;
    });
});


