colorbox_style.js 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. (function ($) {
  2. Drupal.behaviors.initColorboxPlainStyle = {
  3. attach: function (context, settings) {
  4. $(context).bind('cbox_complete', function () {
  5. // Make all the controls invisible.
  6. $('#cboxCurrent, #cboxSlideshow, #cboxPrevious, #cboxNext', context).addClass('element-invisible');
  7. // Replace "Close" with "×" and show.
  8. $('#cboxClose', context).html('\327').addClass('cbox-close-plain');
  9. // Hide empty title.
  10. if ($('#cboxTitle:empty', context).length == true) {
  11. $('#cboxTitle', context).hide();
  12. }
  13. $('#cboxLoadedContent', context).bind('mouseover', function () {
  14. $('#cboxClose', context).animate({opacity: 1}, {queue: false, duration: "fast"});
  15. if ($('#cboxTitle:empty', context).length == false) {
  16. $('#cboxTitle', context).slideDown();
  17. }
  18. });
  19. $('#cboxOverlay', context).bind('mouseover', function () {
  20. $('#cboxClose', context).animate({opacity: 0}, {queue: false, duration: "fast"});
  21. if ($('#cboxTitle:empty', context).length == false) {
  22. $('#cboxTitle', context).slideUp();
  23. }
  24. });
  25. });
  26. $(context).bind('cbox_closed', function () {
  27. $('#cboxClose', context).removeClass('cbox-close-plain');
  28. });
  29. }
  30. };
  31. })(jQuery);