summaryrefslogtreecommitdiff
path: root/sites/all/modules/colorbox/styles/default/colorbox_style.js
diff options
context:
space:
mode:
Diffstat (limited to 'sites/all/modules/colorbox/styles/default/colorbox_style.js')
-rw-r--r--sites/all/modules/colorbox/styles/default/colorbox_style.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/sites/all/modules/colorbox/styles/default/colorbox_style.js b/sites/all/modules/colorbox/styles/default/colorbox_style.js
new file mode 100644
index 000000000..47875ffdb
--- /dev/null
+++ b/sites/all/modules/colorbox/styles/default/colorbox_style.js
@@ -0,0 +1,22 @@
+(function ($) {
+
+Drupal.behaviors.initColorboxDefaultStyle = {
+ attach: function (context, settings) {
+ $(context).bind('cbox_complete', function () {
+ // Only run if there is a title.
+ if ($('#cboxTitle:empty', context).length == false) {
+ $('#cboxLoadedContent img', context).bind('mouseover', function () {
+ $('#cboxTitle', context).slideDown();
+ });
+ $('#cboxOverlay', context).bind('mouseover', function () {
+ $('#cboxTitle', context).slideUp();
+ });
+ }
+ else {
+ $('#cboxTitle', context).hide();
+ }
+ });
+ }
+};
+
+})(jQuery);