jQuery.fn.log = function (msg) {

  // console.log("%s: %o", msg, this);
  return this;
};


var test_for_buggy_offet = function () {
    ///BUGGY_OFFSET_VALUES_FOR_STATIC_ELEMENTS_INSIDE_POSITIONED_ONES
  var body = document.body, isBuggy = null;
  if (body &&
      body.insertBefore &&
      document.createElement && document.getElementById) {
      var id = "x" + (Math.random() + "").slice(2);
      var clearance = "margin:0;padding:0;border:0;visibility:hidden;";
      var payload = "<div style=\"position:absolute;top:10px;" + clearance + "\">" + "<div style=\"position:relative;top:10px;" + clearance + "\">" + "<div style=\"height:10px;font-size:1px;" + clearance + "\"></div>" + "<div id=\"" + id + "\">x</div>" + "</div>" + "</div>";
      var wrapper = document.createElement("div");
      if (wrapper) {
          wrapper.innerHTML = payload;
          body.insertBefore(wrapper, body.firstChild);
          var el = document.getElementById(id);
          if (el && el.style) {
              if (el.offsetTop !== 10) {
                  el.style.position = "relative";
                  if (el.offsetTop === 10) {
                      isBuggy = true;
                  }
              } else {
                  isBuggy = false;
              }
          }
          body.removeChild(wrapper);
      }
      wrapper = null;
  }
  return isBuggy;
}

// ================
// = Button Stuff =
// ================


$j(document).ready(function(){
    $j('p.bogi_button').hover(function() { // Are there any buttons?
        var el=$j(this);
        if (el.hasClass('bogi_button_links')) {
            el.addClass('bogi_button_links_hover');
        };
        if (el.hasClass('bogi_button_rechts')) {
            el.addClass('bogi_button_rechts_hover');
        };


    }, function() {
        var el=$j(this);
        if (el.hasClass('bogi_button_links')) {
            el.removeClass('bogi_button_links_hover');
        };
        if (el.hasClass('bogi_button_rechts')) {
            el.removeClass('bogi_button_rechts_hover');
        }
    });
    
    // $j('p.bogi_button').click(function() {
    //     el=$j(this)
    //     if (!el.hasClass('disabled')) {
    //         // console.log(this);            
    //     };
    // })
    
});
