jQuery(document).ready(function() {
    jQuery('.interact #gform_wrapper_1').hide();
    jQuery('.interact #gform_wrapper_5').hide();
    jQuery('.gform_validation_error').show();
    
    jQuery('#btn-apply').click(function(){
        jQuery('#btn-apply').toggleClass('active decorative');
        jQuery('#gform_wrapper_1').slideToggle('slow');
        return false;
    });
    
    jQuery("#btn-apply").toggle(function (){
       jQuery('#btn-apply').text('Close');
    }, function(){
       jQuery('#btn-apply').text('Apply Now');
    });
    
    if ( jQuery('#gform_wrapper_1').is('.gform_validation_error') ) {
        jQuery('#btn-apply').addClass('active decorative');
        jQuery('#btn-apply').text('Close');
        jQuery("#btn-apply").toggle(function (){
           jQuery('#btn-apply').text('Apply Now');
        }, function(){
           jQuery('#btn-apply').text('Close');
        });
    }
    
    jQuery('#btn-refer').click(function(){
        jQuery('#btn-refer').toggleClass('active decorative');
        jQuery('#gform_wrapper_5').slideToggle('slow');
        return false;
    });
    
    jQuery("#btn-refer").toggle(function (){
       jQuery('#btn-refer').text('Close');
    }, function(){
       jQuery('#btn-refer').text('Refer Now');
    });
    
    if ( jQuery('#gform_wrapper_5').is('.gform_validation_error') ) {
        jQuery('#btn-refer').addClass('active decorative');
        jQuery('#btn-refer').text('Close');
        jQuery("#btn-refer").toggle(function (){
           jQuery('#btn-refer').text('Refer Now');
        }, function(){
           jQuery('#btn-refer').text('Close');
        });
    }
    
    jQuery('#inner-content').hide();
    jQuery('#btn-inner').click(function(){
        jQuery('#inner-content').slideToggle('slow');

        return false;
    });
    
    jQuery('.testimonial-list .testimonials .entry-content .accordion').hide();
    jQuery( ".testimonial-list .testimonials .entry-content .more-link" ).click(function(){
        jQuery(this).next('.accordion').slideDown('slow');
        jQuery('.testimonial-list .testimonials.active .entry-content .accordion').slideUp('slow');
        jQuery('.testimonial-list .testimonials').removeClass('active');
        jQuery(this).closest('.testimonials').addClass('active');
        jQuery('.testimonial-list .testimonials .entry-content .more-link').show();
        jQuery(this).hide();
        return false;
    })
    
    jQuery('#toggle-inner').hide();
    
    jQuery('#toggle').click(function(){
        jQuery('#toggle-inner').slideToggle('slow');

        return false;
    });
    
});

