$(document).ready(
    function()
    {
        if($('#homepage').length)
        {
            HomepageSlideShow();
            HomepageCallouts();
        }

        if($('#overflow-content').length)
        {
            ScrollContent();
        }

        if($('#join-the-club-form').length)
        {
            ValidateForm("#join-the-club-form");
        }

        if($('#sweepstakes-form').length)
        {
            ValidateForm("#sweepstakes-form");
        }

        if($('#distributor-login-form').length)
        {
            ValidateForm("#distributor-login-form")
        }

        if($('#distributor-access-request-form').length)
        {
            ValidateForm('#distributor-access-request-form');
        }

        if($('#employee-access-request-form').length)
        {
            ValidateForm('#employee-access-request-form');
        }

        if($('#distributor-password-reset').length)
        {
            ValidateForm('#distributor-password-reset');
        }

        if($('#employee-password-reset-form').length)
        {
            ValidateForm('#employee-password-reset-form');
        }

        if($('#employee-login').length)
        {
            ValidateForm('#employee-login');
        }

        if($('#admin-login-form').length)
        {
            ValidateForm('#admin-login-form');
        }

        if($('#edit-employee-form').length)
        {
            ValidateAdminForm('#edit-employee-form');
        }

        if($('#add-employee-form').length)
        {
            ValidateAdminForm('#add-employee-form');
        }

        if($('#delete-employee-form').length)
        {
            confirm_delete("Are you sure you want to delete this employee?");
        }


        if($('#edit-distributor-form').length)
        {
            ValidateAdminForm('#edit-distributor-form');
        }
        if($('#delete-distributor-form').length)
        {
            confirm_delete("Are you sure you want to delete this distributor?");
        }

        if($('#contact-form-general').length)
        {
            validate_contact_form('#contact-form-general');
        }
        if($('#contact-form-find').length)
        {
            validate_contact_form('#contact-form-find');
        }


        InitPopupLinks();

        if($('a[rel$="print"]').length)
        {
            InitPrintLink();
        }

        if($('a[rel$="recipe-card"]').length)
        {
            InitCardPrinkLink();
        }
    }
);
