jQuery(document).ready(function(){

    /* init lightbox */

    jQuery("a[rel=lightbox]").fancybox({
        'zoomSpeedIn'	:	500,
        'zoomSpeedOut' :	500,
        'hideOnContentClick': false,
        'frameWidth': 840,
        'frameHeight': 400
    });



    // initialize scrollable
    jQuery("div.scrollable").scrollable(
    {
        size: 4
    }
    ).mousewheel();



    // select all desired fields and attach tooltips to them
    jQuery("input[title]").tooltip({
        // place tooltip on the right edge
        position: "center right",
        // a little tweaking of the position
        offset: [-2, 10],
        // use the built-in fadeIn/fadeOut effect
        effect: "fade",
        // custom opacity setting
        opacity: 1,
        // use this single tooltip element
        tip: '.tooltip'
    });
    jQuery("div[title]").tooltip({
        // place tooltip on the right edge
        position: "center right",
        // a little tweaking of the position
        offset: [-2, 10],
        // use the built-in fadeIn/fadeOut effect
        effect: "fade",
        // custom opacity setting
        opacity: 1,
        // use this single tooltip element
        tip: '.tooltip'
    });
    jQuery("select[title]").tooltip({
        // place tooltip on the right edge
        position: "center right",
        // a little tweaking of the position
        offset: [-2, 10],
        // use the built-in fadeIn/fadeOut effect
        effect: "fade",
        // custom opacity setting
        opacity: 1,
        // use this single tooltip element
        tip: '.tooltip'
    });
    jQuery("textarea[title]").tooltip({
        // place tooltip on the right edge
        position: "center right",
        // a little tweaking of the position
        offset: [-2, 10],
        // use the built-in fadeIn/fadeOut effect
        effect: "fade",
        // custom opacity setting
        opacity: 1,
        // use this single tooltip element
        tip: '.tooltip'
    });
})
