summaryrefslogtreecommitdiff
path: root/sites/all/modules/colorbox/styles/plain/colorbox_style.js
diff options
context:
space:
mode:
Diffstat (limited to 'sites/all/modules/colorbox/styles/plain/colorbox_style.js')
-rw-r--r--sites/all/modules/colorbox/styles/plain/colorbox_style.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/sites/all/modules/colorbox/styles/plain/colorbox_style.js b/sites/all/modules/colorbox/styles/plain/colorbox_style.js
new file mode 100644
index 000000000..19d8e66e0
--- /dev/null
+++ b/sites/all/modules/colorbox/styles/plain/colorbox_style.js
@@ -0,0 +1,33 @@
+(function ($) {
+
+Drupal.behaviors.initColorboxPlainStyle = {
+ attach: function (context, settings) {
+ $(context).bind('cbox_complete', function () {
+ // Make all the controls invisible.
+ $('#cboxCurrent, #cboxSlideshow, #cboxPrevious, #cboxNext', context).addClass('element-invisible');
+ // Replace "Close" with "×" and show.
+ $('#cboxClose', context).html('\327').addClass('cbox-close-plain');
+ // Hide empty title.
+ if ($('#cboxTitle:empty', context).length == true) {
+ $('#cboxTitle', context).hide();
+ }
+ $('#cboxLoadedContent', context).bind('mouseover', function () {
+ $('#cboxClose', context).animate({opacity: 1}, {queue: false, duration: "fast"});
+ if ($('#cboxTitle:empty', context).length == false) {
+ $('#cboxTitle', context).slideDown();
+ }
+ });
+ $('#cboxOverlay', context).bind('mouseover', function () {
+ $('#cboxClose', context).animate({opacity: 0}, {queue: false, duration: "fast"});
+ if ($('#cboxTitle:empty', context).length == false) {
+ $('#cboxTitle', context).slideUp();
+ }
+ });
+ });
+ $(context).bind('cbox_closed', function () {
+ $('#cboxClose', context).removeClass('cbox-close-plain');
+ });
+ }
+};
+
+})(jQuery);