﻿/* ********************************************************* */
/* This script file is used to load all the other script     */
/* libraries that may be required                            */
/* ********************************************************* */

function LoadLibrary(strLib, fDelayLoad)
{
    /// <summary>Loads a javascript library</summary>
    /// <param name="strLib">The relative or full path to the library to load</param>
    /// <param name="fDelayLoad">True to load as 'deferred'</param>
    /// <returns>True if the script tag was successfully written to the document</returns>
    var strScriptTag = "<script src=\"" + strLib + "\"  language=\"javascript\" type=\"text/javascript\" ";
    if (fDelayLoad) strScriptTag += "defer=\"Defer\" ";
    strScriptTag += "></script>";
    try
    {
        document.write(strScriptTag);
        return true;
    }
    catch (e)
    {
        return false;
    }
}

/* ********************************************************* */
/* Load the core libraries                                   */
/* ********************************************************* */
if (typeof (LoadLibrary) == "function") {

    LoadLibrary(scriptPath + "/jQuery/jQuery-1.3.2.min.js", false);
    //LoadLibrary("scripts/jQuery/ui/ui.core.js", false);
    LoadLibrary(scriptPath + "/jQuery/ui/jQuery-ui-1.7.1.custom.min.js", false);

    //LoadLibrary(scriptPath + "/jQuery/jquery.cycle.all.min.js", false);
    LoadLibrary(scriptPath + "/jQuery/jquery.jcarousel.js", false);

    LoadLibrary(scriptPath + "/fivelimes.js", true);
    LoadLibrary(scriptPath + "/oomph.js", true);

    LoadLibrary(scriptPath + "/lightbox/jquery.lightbox-0.5.js", true);
}
