/* jslint browser: true */
/* global jQuery */
(function($) {
    "use strict";

    $(document).ready(function() {
        var binder = function(context) {
            $('div.availability', context).unbind('mouseover')
                .bind('mouseover', function() {
                    var details = $('div.availability_details',
                        $(this));
                    if (!details.is(":visible")) {
                        details.show();
                    }
                });
            $('div.availability', context).unbind('mouseout')
                .bind('mouseout', function() {
                    var details = $('div.availability_details',
                        $(this));
                    if (details.is(":visible")) {
                        details.hide();
                    }
                });
        };
        if (typeof(window.bdajax) !== "undefined") {
            $.extend(window.bdajax.binders, {
                buyable_controls_binder: binder
            });
        }
        binder(document);
    });

})(jQuery);

/* jslint browser: true */
/* global jQuery, bdajax */
(function($, bdajax) {
    "use strict";

    $(document).ready(function() {
        var binder = function(context) {
            $('div.availability', context).unbind('mouseover')
                .bind('mouseover', function() {
                    var details = $('div.availability_details',
                        $(this));
                    if (!details.is(":visible")) {
                        details.show();
                    }
                });
            $('div.availability', context).unbind('mouseout')
                .bind('mouseout', function() {
                    var details = $('div.availability_details',
                        $(this));
                    if (details.is(":visible")) {
                        details.hide();
                    }
                });
        };
        if (typeof(window.bdajax) !== "undefined") {
            $.extend(bdajax.binders, {
                buyable_controls_binder: binder
            });
        }
        binder(document);
    });

})(jQuery, bdajax);

Revert "dont pass bdajax. get it from window"
Revert "dont pass bdajax. get it from window"

This reverts commit 05393ce7c10b99eca03f1c8fb5c8f1a3abcc32b1.
