/**
 * Pager
 *
 * @extends nl.code.pager.Pager
 */
SitePager = new Class({
    Extends: nl.code.pager.Pager,

    /**
     * Constructor
     *
     * @param string, the base url of this project
     */
    initialize: function(base_url) {
        // call parent constructor
        this.parent(base_url);

        // site wide objects
        //this.addListener('update_page', new Menu());

        // settings
        nl.code.pager.PageData.show_loading = false

        this.scanContent($(document.body));
    },

    /**
     * Set the content of the page
     *
     * @param JSON
     * @param string
     * @return void
     */
    setContent: function(data, text) {
        this.parent(data, text);
    },

    /**
     * Scan the inner html of an element
     *
     * @param Element, the element to scan
     */
    scanContent: function(root) {
        // make sure that links to an external website open up in a new window
        nl.code.pager.PageData.parseExternalLinks(root);

        // make all internal links ajax calls
        //nl.code.pager.PageData.parseAjaxElements(this, root);

        // make all links with rel="lightbox" lightbox links
        nl.code.lightbox.Lightboxer.fit_screen = false;
        nl.code.lightbox.Lightboxer.parseLightboxLinks(this, root);

        // create page specific objects
//        this.page_object_arr.push(new CitySelector());
    }
});
