     _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)

        enabled: true
        fadeTime: 400           # Show/hide animation speed
        margin:     
          x: 20                 # Distance from left and right edge of the container
          y: 20                 # Distance from top and bottom edge of the container
      strings: # String for the controls 
        prev: 'prev'
        next: 'next'

        threshold: 100          # Distance in pixels the "finger" has to swipe to create the touch event
        _start: undefined        
        _end: undefined         
      randomStart: false  
      funcEase: 'easeInOutQuad' # jQuery easing function name for the movement of items
      theme: 'default'          # CSS theme class which gets added to the rondell container
      preset: ''                # Configuration preset
