'#description' => t('Checking this box will enable Lightbox2 Lite and will disable all of the automatic image URL re-formatting features. It also disables all grouping features.'),

@@ -277,7 +286,7 @@ function lightbox2_general_settings_form() {

// Add checkbox for alternative layout.

- $form['lightbox2_use_alt_layout'] = array(

+ $form['layout_fieldset']['lightbox2_use_alt_layout'] = array(

'#type' => 'checkbox',

'#title' => t('Use Alternative Layout'),

'#description' => t('Enabling this option alters the layout of the lightbox elements. In the alternative layout the navigational links appear under the image with the caption text, instead of being overlayed on the image itself. This doesn\'t apply when using Lightbox Lite.'),

@@ -285,7 +294,7 @@ function lightbox2_general_settings_form() {

);

// Add checkbox for force navigation display.

- $form['lightbox2_force_show_nav'] = array(

+ $form['layout_fieldset']['lightbox2_force_show_nav'] = array(

'#type' => 'checkbox',

'#title' => t('Force visibility of navigation links'),

'#description' => t('When viewing grouped images using the default layout, the navigational links to the next and previous images are only displayed when you hover over the image. Checking this box forces these links to be displayed all the time.'),

@@ -293,7 +302,7 @@ function lightbox2_general_settings_form() {

);

// Add text box for image count for grouping.

- $form['lightbox2_image_count_str'] = array(

+ $form['layout_fieldset']['lightbox2_image_count_str'] = array(

'#type' => 'textfield',

'#title' => t('Image Count Text'),

'#description' => t('This text is used to display the image count underneath the image in the lightbox when image grouping is enabled. Use !current as a placeholder for the number of the current image and !total for the total number of images in the group. For example, "Image !current of !total".'),

@@ -301,23 +310,51 @@ function lightbox2_general_settings_form() {

);

// Add text box for page count for grouping.

- $form['lightbox2_page_count_str'] = array(

+ $form['layout_fieldset']['lightbox2_page_count_str'] = array(

'#type' => 'textfield',

'#title' => t('Page Count Text'),

'#description' => t('This text is used to display the page count underneath HTML content displayed in the lightbox when using groups. Use !current as a placeholder for the number of the current page and !total for the total number of pages in the group. For example, "Page !current of !total".'),

'#description' => t('By default, when the image being displayed in the lightbox is larger than the browser window, it is resized to fit within the window and a zoom button is provided for users who wish to view the image in its original size. Checking this box will disable this feature and all images will be displayed without any resizing.'),

+ '#description' => t('When the image being displayed in the lightbox is resized to fit in the browser window, a "zoom in" button is shown. This allows the user to zoom in to see the original full size image. They will then see a "zoom out" button which will allow them to see the smaller resized version. Checking this box will prevent these buttons from appearing.'),

'#default_value' => variable_get('lightbox2_disable_zoom', FALSE),

);

+

+ // Define Lightbox2 video fieldset.

+ /* -------------------------------- */

+ $form['video_fieldset'] = array(

+ '#type' => 'fieldset',

+ '#title' => t('Video Settings'),

+ '#collapsible' => TRUE,

+ '#collapsed' => TRUE,

+ );

+

// Add checkbox for video support.

- $form['lightbox2_enable_video'] = array(

+ $form['video_fieldset']['lightbox2_enable_video'] = array(

'#type' => 'checkbox',

'#title' => t('Enable Video Support'),

'#description' => t('By default, video support is disabled in order to reduce the amount of javascript needed. Checking this box will enable it.'),

@@ -330,7 +367,7 @@ function lightbox2_general_settings_form() {

'#type' => 'fieldset',

'#title' => t('Page Specific Lightbox2 Settings'),

'#collapsible' => TRUE,

- '#collapsed' => FALSE,

+ '#collapsed' => TRUE,

);

// Add radio buttons for the actions to take for the listed pages, i.e.

'#description' => t('By default, the caption for imagefields is the image title text configured. If no title is configured, then the alt text will be used. This option allows you to override that and always display the node title as the image caption.'),

@@ -402,35 +439,103 @@ function lightbox2_general_settings_form() {

// Define advanced settings fieldset.

/* ---------------------------------- */

- $form['lightbox2_advanced_options'] = array(

+ $form['advanced_options'] = array(

'#type' => 'fieldset',

'#title' => t('Advanced settings'),

'#collapsible' => TRUE,

'#collapsed' => TRUE,

);

+ // Allow users to decide where javascript should be loaded - header or footer.

+ // Header is recommended so user can click on images before page has finished

+ // loading, but footer is needed for sites in IE which use SWFObject.

+ '#description' => t('By default, the lightbox javascript files are loaded in the HTML header. However, for sites using SWFObject to load their Flash content, the footer setting is recommended to prevent "Operation Aborted" errors in IE. If using the footer setting, please note that not all themes correctly implement the footer region and may require a small change.'),

'#description' => t('The overlay opacity setting determines how visible the background page is behind the lightbox. The opacity value can range from 0.0 to 1.0 where 0.0 is 100% transparent and 1.0 is 100% opaque.'),

- '#description' => t('By default, the lightbox javascript files are loaded in the HTML header. However, for sites using SWFObject to load their Flash content, the footer setting is recommended to prevent "Operation Aborted" errors in IE. If using the footer setting, please note that not all themes correctly implement the footer region and may require a small change.'),