﻿(function ($) {
    function blAutoLoad() {
        // UCanNotHaz
        if (typeof $.fn.block === 'function') $('.norightclick').block('contextmenu');

        // Ruled Header
        if (typeof $.fn.ruledHeader === 'function') $('h4.ruledH').ruledHeader();

        // slimbox2
        if (typeof $.fn.slimbox === 'function') {
            var opts = {};
            var group_cb = function (el) {
                return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
            };
            if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
                $("a[rel^='lightbox']").slimbox(opts, null, group_cb);
            }
        }

        // Ledgerview
        if (typeof $.fn.ledgerView === 'function') $("table.ledgerView").ledgerView();
    }

    $.autoLoad(blAutoLoad);

})(jQuery);
