$(document).ready(function() {
						   
	//Contact Form Validation
	$('#emailForm').submit(function(){
	  //check fields
	  if($(this).find("input[name='contactname']").val() == "" || $(this).find("input[name='contactname']").val() == "name" || $(this).find("input[name='email']").val() == "" || $(this).find("input[name='email']").val() == "email address" ){
		// show error
		alert('There is an error in the form you\'re trying to submit.  Please check all that you have supplied a valid name and email address so we can contact you.');
		// don't send the form
		return false;
	  }
	  // if we get to this point send the form
	  return true;
	});

	if($('body').attr('id')!='newsPage'){
		$('.leftContent p:first').addClass('pullQuote');
	}

	$('#newsList li').last().addClass('lastLi');
	$('#caseManagers tr:nth-child(odd)').addClass('trOdd');
	$('.greenBox ul li:last-child').removeClass('listMargin');
	
	// CONTACT DROP DOWN

	$('#contactTab').toggle(function() {
        $('#contactDetails').stop().animate({top: "-50px"}, 'slow', 'easeOutBounce' )},
        function(){
        $('#contactDetails').stop().animate({top: "-360px"}, 'slow' )
     });
	
	$('#contactTab').toggle(function() {
		$(this).css('backgroundPosition', '0');
    }, function(){
        $(this).css('backgroundPosition', '-110px');
    });


	
	// MAIN MENU DROP DOWNS
	
	$('#mainCanvas #headerContent ul li').hover(function() {
		$(this).children('ul').slideDown(200);
		queue:false;
	},
	function(){
		$(this).children('ul').slideUp(200);
	});
	
	
	
	// MAIN MENU DROP DOWNS
	
    $('#slideshow').cycle({
        fx: 'fade',
        speed: 1000
    });	
	
	
	
	// FAQ SCROLL TO
	
	$('#scrollTop').click(function() {
        $.scrollTo('.leftContent', 700);
        return false;
    });
    $('#scrollOne').click(function() {
        $.scrollTo('#one', 700);
        return false;
    });
    $('#scrollTwo').click(function() {
        $.scrollTo('#two', 700);
        return false;
    });
    $('#scrollThree').click(function() {
        $.scrollTo('#three', 700);
        return false;
    });
    $('#scrollFour').click(function() {
        $.scrollTo('#four', 700);
        return false;
    });
    $('#scrollFive').click(function() {
        $.scrollTo('#five', 700);
        return false;
    });
    $('#scrollSix').click(function() {
        $.scrollTo('#six', 700);
        return false;
    });
    $('#scrollSeven').click(function() {
        $.scrollTo('#seven', 700);
        return false;
    });
    $('#scrollEight').click(function() {
        $.scrollTo('#eight', 700);
        return false;
    });
    $('#scrollNine').click(function() {
        $.scrollTo('#nine', 700);
        return false;
    });
    $('#scrollTen').click(function() {
        $.scrollTo('#ten', 700);
        return false;
    });
    $('#scrollEleven').click(function() {
        $.scrollTo('#eleven', 700);
        return false;
    });
    $('#scrollTwelve').click(function() {
        $.scrollTo('#twelve', 700);
        return false;
    });	

	//CONTACT CTA
    $('#btnContact').click(function() {
		$.scrollTo(0,700);
		$('#contactDetails').stop().delay(750).animate({top: "-50px"}, 'slow', 'easeOutBounce' );
		$('#contactTab').css('backgroundPosition', '0');
		return false;
    });



	//CASE MANAGERS TABLE LINKS	

	$('#caseManagers tr').click( function() {
    window.location = $(this).find('a').attr('href');
	});



	//FAQ STICKY FLOAT
	
	$('#scrollTop').stickyfloat({ duration: 500 }); 


});


