diff --git a/js/auto_image_handling.js b/js/auto_image_handling.js
index e769a8beb5511e3b7fb29489415d38a211a436ce..f5c4f971a3cd5bd3043f0086a5a252c63c437f28 100644
--- a/js/auto_image_handling.js
+++ b/js/auto_image_handling.js
@@ -1,9 +1,9 @@
-/* $Id: auto_image_handling.js,v 1.1.4.33 2010/09/22 21:07:57 snpower Exp $ */
-
// Image Node Auto-Format with Auto Image Grouping.
// Original version by Steve McKenzie.
// Altered by Stella Power for jQuery version.
+(function ($) {
+
function parse_url(url, param) {
param = param.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
url = url.replace(/&/, "&");
@@ -31,14 +31,10 @@ function lightbox2_init_triggers(classes, rel_type, custom_class) {
}
$("a:has("+classes+")").each(function(i) {
-
if ((!settings.disable_for_gallery_lists && !settings.disable_for_acidfree_gallery_lists) || (!$(this).parents("td.giAlbumCell").attr("class") && !$(this).parents(".galleries").length && !$(this).parents(".acidfree-folder").length && !$(this).parents(".acidfree-list").length) || ($(this).parents(".galleries").length && !settings.disable_for_gallery_lists) || (($(this).parents(".acidfree-folder").length || $(this).parents(".acidfree-list").length) && !settings.disable_for_acidfree_gallery_lists)) {
-
var child = $(this).find(classes);
-
// Ensure the child has a class attribute we can work with.
- if ($(child).attr("class") && !$(this).parents("div.acidfree-video").length) {
-
+ if ($(child).attr("class")) {
// Set the alt text.
var alt = $(child).attr("alt");
if (!alt) {
@@ -79,7 +75,6 @@ function lightbox2_init_triggers(classes, rel_type, custom_class) {
orig_href = orig_href.replace(lang_pattern, Drupal.settings.basePath);
}
var frame_href = orig_href;
-
// Handle flickr images.
if ($(child).attr("class").match("flickr-photo-img") ||
$(child).attr("class").match("flickr-photoset-img")) {
@@ -156,7 +151,6 @@ function lightbox2_init_triggers(classes, rel_type, custom_class) {
rewrite = 0;
}
}
-
// Modify the image url.
var img_title = $(child).attr("title");
if (!img_title) {
@@ -205,39 +199,7 @@ function lightbox2_init_triggers(classes, rel_type, custom_class) {
});
}
-function lightbox2_init_acidfree_video() {
- var settings = Drupal.settings.lightbox2;
-
- var link_target = "";
- if (settings.node_link_target !== 0) {
- link_target = 'target="'+ settings.node_link_target +'"';
- }
-
- var link_text = settings.node_link_text;
- var rel = "lightframe";
-
- $("div.acidfree-video a").each(function(i) {
-
- if (!settings.disable_for_acidfree_gallery_lists || (!$(this).parents(".acidfree-folder").length && !$(this).parents(".acidfree-list").length) || (($(this).parents(".acidfree-folder").length || $(this).parents(".acidfree-list").length) && !settings.disable_for_acidfree_gallery_lists)) {
- var orig_href = $(this).attr("href");
- var href = orig_href + "/lightframevideo";
- var title = $(this).attr("title");
- var title_link = "";
- if (link_text.length) {
- title_link = "
"+ link_text + "";
- }
-
- $(this).attr({
- rel: rel,
- title: title + title_link,
- href: href
- });
- }
- });
-}
-
function lightbox2_image_nodes() {
-
var settings = Drupal.settings.lightbox2;
// Don't do it on the image assist popup selection screen.
@@ -251,15 +213,14 @@ function lightbox2_image_nodes() {
lightbox2_init_triggers(settings.trigger_slideshow_classes, "lightshow");
lightbox2_init_triggers(settings.trigger_lightframe_classes, "lightframe_ungrouped");
lightbox2_init_triggers(settings.trigger_lightframe_group_classes, "lightframe");
- if (settings.enable_acidfree_videos) {
- lightbox2_init_acidfree_video();
- }
-
}
}
-
-Drupal.behaviors.initAutoLightbox = function (context) {
- lightbox2_image_nodes();
+Drupal.behaviors.initAutoLightbox = {
+ attach: function(context, settings) {
+ lightbox2_image_nodes();
+ }
};
+//End jQuery block
+}(jQuery));
diff --git a/js/lightbox_modal.js b/js/lightbox_modal.js
index b9041a9b43518c67587575942f937ddba0bb08ed..5010a43f49aff205b7024cd1664c3d8e8d852619 100644
--- a/js/lightbox_modal.js
+++ b/js/lightbox_modal.js
@@ -1,7 +1,7 @@
-// $Id: lightbox_modal.js,v 1.1.2.5 2010/06/07 17:22:03 snpower Exp $
+(function ($) {
function lightbox2_login() {
- (function ($) {
+
$("a[href*='/user/login'], a[href*='?q=user/login']").each(function() {
$(this).attr({
href: this.href.replace(/user\/login?/,"user/login/lightbox2"),
@@ -9,11 +9,9 @@ function lightbox2_login() {
});
$(this).addClass('lightmodal-login');
});
- })(jQuery);
}
function lightbox2_contact() {
- (function ($) {
$("a[href$='/contact'], a[href$='?q=contact']").each(function() {
if (!this.href.match('admin/build/contact')) {
$(this).attr({
@@ -23,7 +21,6 @@ function lightbox2_contact() {
$(this).addClass('lightmodal-contact');
}
});
- })(jQuery);
}
Drupal.behaviors.initLightboxModal = {
@@ -36,4 +33,5 @@ Drupal.behaviors.initLightboxModal = {
}
}
};
-
+//End jQuery block
+}(jQuery));