/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 */

/**
 * Config.js
 *
 * File Path: /scripts/
 *
 * $Id: Config.js 176 2007-08-28 15:28:04Z topdog $
 *
 * LICENSE: copyright 2005 - 2007 Edward Vermillion - Doggydoo Codeworks.
 * Unless otherwise stated ALL RIGHTS ARE RESERVED. Use or reuse without prior
 * written permission from the author or Doggydoo Codeworks is prohibited.
 * Visit http://www.doggydoo.net/license/DDJS-V1.X.txt for the full license.
 * Installation and use of this software implies agreement to the full
 * license.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DOGGYDOO
 * CODEWORKS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * @package     DDJS
 * @author      Edward Vermillion <evermillion@doggydoo.net>
 * @copyright   2005 - 2007 Edward Vermillion, Doggydoo Codeworks
 * @license     http://www.doggydoo.net/license/DDJS-1.x.txt
 * @version     1.0
 */

if (typeof DDJS == 'undefined') {
    throw('DDJS.Config: DDJS not initialized');
}

/**
 * Set directory paths...
 */
DDJS.baseURL = 'http://certichem.com/scripts/';
DDJS.siteURL = 'http://certichem.com/';


/**
 * @object DDJS.Config
 *
 * Site-specific configuration file
 *
 * This can be used to figure out which classes to load and do any site-specific
 * initializations. This file is intended to help keep site-specific modifications
 * out of the library files so that updates to the library can be added with as
 * little extra coding as possible.
 *
 * init() will be called on page load, loadClasses() should be called in the
 * <head> of the page. If everything is set correctly then the <head> should
 * only need to load ddjs then this file then call DDJS.Config.loadClasses() to
 * get the environment set up correctly. At least that's the intention.
 */
DDJS.Config = {

    /**
     * @method init
     *
     * Initializes site-specific functions
     *
     * @return void
     */
    init: function () {

    },

    page: null,

    /**
     * @method loadClasses
     *
     * 'Loads' the necessary class files for a page
     *
     * @return void
     */
    loadClasses: function (page) {

        // This is the page loader class...
        document.write("\n"+'<script type="text/javascript" src="'+DDJS.baseURL+'Utils/Loader.js"></script>'+"\n");

        DDJS.baseDir = this.baseDir;

        this.page = page;

        switch (this.page) {

            case 'Home':
                break;

            case 'Gallery':
            	document.write("\n"+'<script type="text/javascript" src="'+DDJS.baseURL+'Gallery.js"></script>'+"\n");
            	document.write('<script type="text/javascript" src="'+DDJS.baseURL+'Effects.js"></script>'+"\n");
            	document.write('<script type="text/javascript" src="'+DDJS.baseURL+'Effects/Scroller.js"></script>'+"\n");
            	document.write('<script type="text/javascript">DDJS.addInit(DDJS.Gallery);</script>');
            	break;

            case 'Calendar':
                break;

            case 'Cart':
                break;

            case 'Contacts':
                break;

            case 'FAQ':
                break;

            case 'News':
                break;

            case 'Newsletter':
                break;

            case 'Product':
                break;

            case 'Search':
                break;

            case 'Sitemap':
                break;

            default:

        };

    },

    /**
     * @method toString
     *
     * @return {String}
     */
    toString: function () {
        return '[Object] DDJS.Config';
    }

}; // End Class DDJS.Config

