     _initItem: (layerNum, item) =>
       @items[layerNum - 1] = item
       
+      # If item is an img tag, wrap with div
+      if item.object[0].nodeName.toLowerCase() is "img"
+        item.object.wrap("<div/>")
+        item.object = item.object.parent()
+        item.icon = $('img:first', item.object)
+      
       # Wrap other content as overlay caption
       captionContent = item.icon?.siblings()
       if not (captionContent?.length or item.icon) and item.object.children().length
         captionContent = item.object.children()
         
       # Or use title/alt texts as overlay caption
-      if not captionContent.length 
-        caption = item.object.attr('title') or item.icon?.attr('alt') or item.icon?.attr('title')  
+      unless captionContent?.length 
+        caption = item.object.attr('title') or item.icon?.attr('title') or item.icon?.attr('alt')  
         if caption
           captionContent = $("<p>#{caption}</p>")
           item.object.append(captionContent)
 
       # Create overlay from caption if found
-      if captionContent.length
+      if captionContent?.length
         captionContainer = $('<div class="rondellCaption"></div>')
         captionContainer.addClass('overlay') if item.icon
         captionContent.wrapAll(captionContainer)

(($) ->
  ### Global rondell plugin properties ###
  $.rondell =
    version: '0.8.5'
    name: 'rondell'
    defaults:
      showContainer: true       # When the plugin has finished initializing $.show() will be called on the items container

      currentLayer: 0           # Active layer number in a rondell instance
      container: null           # Container object wrapping the rondell items
      radius:                   # Radius for the default circle function
        x: 250 
        y: 50  
      center:                   # Center where the focused element is displayed
        left: 340 
        top: 160
      size:                     # Defaults to center * 2 on init
        width: null
        height: null
