         var cell = self.cell() as! NSButtonCell
         cell.backgroundColor = hoverBackgroundColor
         cell.image = hoverBackgroundImage
-        println("hovered")
         
     }
     

class JZHoverNSButton: NSButton {
    
    var trackingArea:NSTrackingArea!
    var hoverBackgroundColor: NSColor = NSColor.whiteColor()
    var originalBackgroundColor: NSColor = NSColor.whiteColor()
    var hoverBackgroundImage: NSImage!
    var originalBackgroundImage: NSImage!

        var cell = self.cell() as! NSButtonCell
        cell.backgroundColor = originalBackgroundColor
        cell.image = originalBackgroundImage
    }
    
    func setImages(bgColor: NSColor, imageOriginal: NSImage, imageHover: NSImage) {
        self.hoverBackgroundColor = bgColor
        self.originalBackgroundColor = bgColor
        self.originalBackgroundImage = imageOriginal
        self.hoverBackgroundImage = imageHover
    }
    
    func setColors(originalBgColor: NSColor, hoverBgColor:NSColor) {
        self.hoverBackgroundColor = hoverBgColor
        self.originalBackgroundColor = originalBgColor
        self.originalBackgroundImage = nil
        self.hoverBackgroundImage = nil
    }
    
}