﻿var Unident = (function () {

    return {

        init: function () {
            $("body").ready(function () {
                $('#navigation > ul').dropmenu({
                    effect: 'fade',
                    speed: 250,
                    timeout: 500
                });

                $("#slideshow").cycle({
                    fx: "scrollRight",
                    easing: "backinout",
                    cleartypeNoBg: true,
                    fit: false
                });

                $('.answer').hide();

                $('.question').each(function (index, el) {
                    $(el).click(function (obj) {
                        $('#' + obj.currentTarget.id + '-answer').slideToggle();
                    });
                });

            });
        },

        loadDentist: function (data) {
            if (data.cid > 0) {
                location.href = data.url + "?cid=" + data.cid + (data.pid ? "&pid=" + data.pid : "");
            }
        }
    }

})();
