protected void Page_Load(object sender, EventArgs e)
        {
            //Get THIS module class and put it in _Module
            //ALWAYS GET THE MODULE AND PUT IT IN A PRIVATE VARIABLE
            this._Module = this.Module as CuyaLightBoxModule;

            ////Add Admin Page Specific CSS and Javascript to page
            //RegisterAdminJavascript("AdminScript", UrlHelper.GetApplicationPath() + "Modules/CuyaLightBox/javascript/AdminCuyaLightBox.aspx.cs.js");
            RegisterAdminStylesheet("AdminCss", UrlHelper.GetApplicationPath() + "Modules/CuyaLightBox/Css/Editor.css");

            Cuyahoga.Core.Domain.User _currentUser = Context.User.Identity as Cuyahoga.Core.Domain.User;

            ShowSelectedLightBox();

            CheckSelected();

            if (!Page.IsPostBack)
            {
                DatabindLightBoxes();
                DatabindLightBoxImages(Convert.ToInt32(this._Module.Section.Settings["LIGHTBOX_NAME"]));
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //Get THIS module class and put it in _Module
            //ALWAYS GET THE MODULE AND PUT IT IN A PRIVATE VARIABLE
            this._Module = this.Module as CuyaLightBoxModule;

            //Register jQuery (Note: I think that when registering jQuery the 'key' should be jQuery to prevent multiple registrations?
            RegisterJavaScript("jQuery", UrlHelper.GetApplicationPath() + "Modules/CuyaLightBox/JavaScript/jquery-1.3.2.min.js");
            //Register Javascripts
            RegisterJavaScript("jQueryLightBox", UrlHelper.GetApplicationPath() + "Modules/CuyaLightBox/JavaScript/jquery.lightbox-0.5.min.js");
            
            //Register Css
            RegisterStyleSheet("jQueryLightBoxCss", UrlHelper.GetApplicationPath() + "Modules/CuyaLightBox/css/jquery.lightbox-0.5.css");
            RegisterStyleSheet("jQueryLightBoxCss2", UrlHelper.GetApplicationPath() + "Modules/CuyaLightBox/css/CuyaLightBox.ascx.css");

            int lightboxid = Convert.ToInt32(this._Module.Section.Settings["LIGHTBOX_NAME"].ToString());
            if(this._Module._cuyaLightBoxDao.LightBoxExists(lightboxid)){
                LightBox l = this._Module._cuyaLightBoxDao.GetLightBox(lightboxid);

                //rptImageItems.DataSource = l.LightboxImages;
                rptImageItems.DataSource = this._Module._cuyaLightBoxDao.GetActiveLightboxSpecificImages(l);
                rptImageItems.DataBind();
            }
            else
            {
                lblMessages.Text = "There is no lightbox assigned to this section.";
            }

            string lightboxjs = "<script type=\"text/javascript\">" + System.Environment.NewLine
                + "$(document).ready(function() {" + System.Environment.NewLine
                + "$(\"#" + pnlGallery.ClientID + " a\").lightBox();" + System.Environment.NewLine
                + "$(\"#" + pnlGallery.ClientID + "\").addClass(\"lightbox\");" + System.Environment.NewLine 
                + "});" + System.Environment.NewLine
                + "</script>" + System.Environment.NewLine;
 
            Page.RegisterClientScriptBlock(this._Module.Section.Id.ToString(), lightboxjs);
        }