/* Author: Andrew Becker for Sage Internet Solutions
 Website: http://www.sageinternet.com
 */

(function($) {
    SITE = {
        common : {
            init     : function() {
            },
            finalize : function() {
            }
        },
        single : {
            init     : function() {
            },
            'sample-id'   : function() {
            }
        },
        page : {
            init     : function() {
            },
            'sample-id'   : function() {
            }
        },
        category : {
            init     : function() {
            },
            'sample-id'   : function() {
            }
        }
    };

    UTIL = {

        fire : function(func, funcname, args) {
            var namespace = SITE;  // indicate your obj literal namespace here
            funcname = (funcname === undefined) ? 'init' : funcname;
            if (func !== '' && namespace[func] && typeof namespace[func][funcname] == 'function') {
                namespace[func][funcname](args);
            }
        },

        loadEvents : function() {
            var bodyId = document.body.id;
            // hit up common first.
            UTIL.fire('common');
            // do all the classes too.
            $.each(document.body.className.split(/\s+/), function(i, classnm) {
                UTIL.fire(classnm);
                UTIL.fire(classnm, bodyId);
            });
            UTIL.fire('common', 'finalize');
        }
    };

// kick it all off here
// kick it all off here
    $(document).ready(function() {
        // Correct no-js and js classes for HTML element
        $('html').removeClass('no-js').addClass('js');

	

        UTIL.loadEvents();
    });
})(jQuery);






















