﻿$(document).ready(function() {

    // expose the form when it's clicked or cursor is focused 
    $("form.expose").bind("click keydown", function() {

        $(this).expose({

            // custom mask settings with CSS 
            maskId: 'mask',

            // when exposing is done, change form's background color 
            onLoad: function() {
                this.getExposed().css({ backgroundColor: '#0E0E0E' });
            },

            // when "unexposed", return to original background color 
            onClose: function() {
                this.getExposed().css({ backgroundColor: null });
            },

            api: true

        }).load();
    });
});

$(document).ready(function () {
    /* chained call: scrollable().find("a").tooltip().overlay().gallery(); */

    $(".scrollable").scrollable().find("a").tooltip({

        // use this single tooltip element for all trigger elements
        tip: '#tooltip'


    }).overlay({

        // each trigger uses the same overlay with id "gallery"
        target: '#gallery',

        // optional exposing effect with custom color
        expose: '#111',

        // clicking outside the overlay does not close it
        closeOnClick: false

        // gallery plugin
    }).gallery({

        // do not use the same disabled class name as scrollable
        disabledClass: 'inactive'
    });
});

