(function ($) {
  Drupal.behaviors.initColorboxStockholmsyndromeStyle = {
    attach: function (context, settings) {
      $(document).bind('cbox_open', function () {
        // Hide close button initially.
        $('#cboxClose', context).css('opacity', 0);
      });
      $(document).bind('cbox_load', function () {
        // Hide close button. (It doesn't handle the load animation well.)
        $('#cboxClose', context).css('opacity', 0);
      });
      $(document).bind('cbox_complete', function () {
        // Show close button with a delay.
        $('#cboxClose', context).fadeTo('fast', 0, function () {$(this).css('opacity', 1)});
      });
      $('#colorbox').css('padding-bottom', '0');
    }
  };
})(jQuery);
;
/*
(function($) {
  var loginLink = 'a[href="/user"]';
  var loginForm = '#block-user-login';
  var drupalLogin = '#edit-submit';
  
  $(document).ready(function(){
    $(loginForm).dialog({
        autoOpen: false,
        buttons: {
            "Enter": function() {
              $(drupalLogin).click();
            },
            Cancel: function() {
                $(this).dialog("close");
            }
        },
        height: 175,
        modal: true,
        position: {
            my: 'right top',
            at: 'right bottom',
            of: loginLink
        },
        resizable: false,
        title: "Log In",
		width: 350
    });

    $(loginLink).click(function(e){
        e.preventDefault();
        $(loginForm).dialog("open");
    });
    
    // TODO hide Drupal generated login button
    $(drupalLogin).css('display', 'none');
});
}(jQuery));
*/;

