var RecaptchaOptions = {
    theme : 'clean'
 };
function validateCaptcha()
{
    challengeField = $("input#recaptcha_challenge_field").val();
    responseField = $("input#recaptcha_response_field").val();
    //alert(challengeField);
    //alert(responseField);
    //return false;
    var html = $.ajax({
    type: "POST",
    url: "ajax.recaptcha.php",
    data: "recaptcha_challenge_field=" + challengeField + "&recaptcha_response_field=" + responseField,
    async: false
    }).responseText;
    
    if(html == "success")
    {
        $("#captchaStatus").html("");
        return true;
    }
    else
    {
        $("#captchaStatus").html("Your captcha is incorrect. Please try again");
        Recaptcha.reload();
        return false;
    }
}


		$(document).ready(function(){	
			$("#slider").easySlider({
			    prevId: 'prevBtn',
                nextId: 'nextBtn',	
                speed: 600,
                pause: 4000,
				auto: true,
				continuous: true 
			});
		});	
$(document).ready(function () {
    $('.first a').mouseenter(function () {
        $('ul.sub').stop(true, true).show('fast');
		 });
	$('.dropdown').mouseleave(
        function() {
            $('ul.sub').stop(true, true).hide('fast');
        }
    );
    
	//$('ul.sub li a').mouseover(function () {
	//$(this).animate({ fontSize: "14px", paddingLeft: "10px" }, 50 );
   // });
	//$('ul.sub li a').mouseout(function () {
	//$(this).animate({ fontSize: "14px", paddingLeft: "10px" }, 50 );
    //});
  
});


			$(document).ready(function(){
				//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
				//Full Caption Sliding (Hidden to Visible)
				$('.boxgrid.captionfull').hover(function(){
					$(".cover", this).stop().animate({top:'140px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'260px'},{queue:false,duration:160});
				});

			});

			$(document).ready(function(){
				//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
				//Full Caption Sliding (Hidden to Visible)
				$('.boxgrid_logo.captionfull').hover(function(){
					$(".cover_logo", this).stop().animate({top:'140px'},{queue:false,duration:160});
				}, function() {
					$(".cover_logo", this).stop().animate({top:'260px'},{queue:false,duration:160});
				});

			});

        $(function() {
        var settings = { containerResizeSpeed: 350
            };
            $('.boxgrid a').lightBox(settings);
        });

$(document).ready(function() {
 $("#contact").validationEngine();    
    $('input[name=referrer]').change(function(){
    $("#refereefield").hide();
    if($(this).val() == 'Referral')
    $("#refereefield").slideToggle();
    $("#otherfield").hide();
    if($(this).val() == 'Other')
    $("#otherfield").slideToggle();
})});
