// In older versions of Firefox, only console.log is defined.
var console = window.console;
var log = function(console, method, msg) {
- if (method) {
+ if (method && typeof(method) == 'function') {
method.call(console, msg);
} else {
console.log(msg);
if(obj.offsetParent) {
var copyObj = obj;
while(1) {
+ // NOTE: the if statement here is for IE8.
var borderLeft = "0";
if (window.getComputedStyle) {
borderLeft = window.getComputedStyle(copyObj, null).borderLeft || "0";
if(obj.offsetParent) {
var copyObj = obj;
while(1) {
+ // NOTE: the if statement here is for IE8.
var borderTop = "0";
if (window.getComputedStyle) {
borderTop = window.getComputedStyle(copyObj, null).borderTop || "0";