         .removeAttr('width')
 
     $(window).resize ->
-      newWidth = $(container).width()
       $videos.each ->
         $elm = $(this)
+        $parent = if container then $(container) else $elm.parent()
+        newWidth = $parent.width()
         $elm
           .width(newWidth)
           .height(newWidth * $elm.data('aspectRatio'))

    size.replace(/\"/g, '')

class Lightbox
  constructor: ->
  @init: ->
    $("a[href$='.jpg'],a[href$='.png'],a[href$='.jpeg']").each ->
      $link = $(this)

        })

class Calendar
  @init: ->
    $('#fullcalendar').html("").fullCalendar({
      events: {
