$(function() {
	$('.info1').hide();
	$('.info2').hide();
	$('.info3').hide();
	$('.info4').hide();
	$('.info5').hide();
	$('.info6').hide();
	$('.info7').hide();
	$('.info8').hide();
	$('.info9').hide();
	$('.info10').hide();
 
	$('.slider1').click(function(){
		$('.info1').slideToggle();
	});
	
	$('.slider2').click(function(){
		$('.info2').slideToggle();
	});
	
	$('.slider3').click(function(){
		$('.info3').slideToggle();
	});
	
	$('.slider4').click(function(){
		$('.info4').slideToggle();
	});
	
	$('.slider5').click(function(){
		$('.info5').slideToggle();
	});
	
	$('.slider6').click(function(){
		$('.info6').slideToggle();
	});
	
	$('.slider7').click(function(){
		$('.info7').slideToggle();
	});
	
	$('.slider8').click(function(){
		$('.info8').slideToggle();
	});
	
	$('.slider9').click(function(){
		$('.info9').slideToggle();
	});
	
	$('.slider10').click(function(){
		$('.info10').slideToggle();
	});
});


$(function() {
    // These first three lines of code compensate for Javascript being turned on and off. 
    // It simply changes the submit input field from a type of "submit" to a type of "button".

    var paraTag = $('input#submit').parent('p');
    $(paraTag).children('input').remove();
    $(paraTag).append('<input type="button" name="submit" id="submit" value="Email Us Now!" />');

    $('#contact input#submit').click(function() {
        $('#contact').append('<img src="graphics/ajax-loader.gif" class="loaderIcon" alt="Loading..." />');

        var name = $('input#name').val();
        var email = $('input#email').val();
        var comments = $('textarea#comments').val();

        $.ajax({
            type: 'post',
            url: 'sendEmail.php',
            data: 'name=' + name + '&email=' + email + '&comments=' + comments,

            success: function(results) {
                $('#contact img.loaderIcon').fadeOut(1000);
                $('ul#response').html(results);
            }
        }); // end ajax
    });
});