<div class="upfront-youtube-container <?php if ($multiple_videos && count($multiple_videos) < 2) { ?>uyoutube-single<?php } else { ?>uyoutube-multiple-<?php echo $display_style ?><?php } ?>">
    <?php if ($multiple_videos && count($multiple_videos) == 1) { ?>
		<?php if(!empty($multiple_videos[0]['id'])) { ?>
			<iframe src="http://www.youtube.com/embed/<?php echo $multiple_videos[0]['id'] ?>?modestbranding=1" height="<?php echo $player_height ?>" width="<?php echo $player_width ?>"></iframe>
			<?php if(!empty($multiple_show_title[0])){ ?>
				<h3><?php echo $multiple_videos[0]['title'] ?></h3>
			<?php } ?>
		<?php } else { ?>
			<div class="uyoutube-player" style="width: <?php echo $player_width ?>px; height: <?php echo $player_height ?>px;"></div>
		<?php } ?>
	<?php } ?>
	
	<?php if (count($multiple_videos) > 1) { ?>
    <div class="uyoutube-main-video">
      <?php if ( !empty($multiple_videos[0] ) ) { ?>
        <iframe src="http://www.youtube.com/embed/<?php echo $multiple_videos[0]['id'] ?>?modestbranding=1" height="<?php echo $player_height ?>" width="<?php echo $player_width ?>"></iframe>
      <?php } else { ?>
        <div class="uyoutube-player" style="height:<?php echo $player_height ?>px; width:<?php echo $player_width ?>px;"></div>
      <?php } ?>
    </div>
	<div class="uyoutube-thumbnails">
    <?php if ($display_style == 'gallery') { ?>
      <?php if ($multiple_videos && count( $multiple_videos )  ) {  ?>
        <?php for ($i = 0; $i < count( $multiple_videos ); $i++) {  ?>
		<?php if(empty($first_to_thumbnails[0]) && $i == 0) { continue; } ?>
          <div class="uyoutube-thumbnail uyoutube-gallery-item <?php if(empty($first_to_thumbnails[0])) { ?>firstHidden<?php } ?>" data-video-id="<?php echo $multiple_videos[$i]['id'] ?>" style="width:<?php echo $thumbWidth ?>px;">
            <div class="uyoutube-thumb-mask" style="width:<?php echo $thumbWidth ?>px;height:<?php echo $thumbHeight ?>px"><!-- add width height dynamicly -->
				<img class="uyoutube-thumb" src="http://img.youtube.com/vi/<?php echo $multiple_videos[$i]['id'] ?>/hqdefault.jpg" style="width:<?php echo $thumbWidth ?>px; margin-top: -<?php echo $thumbOffset ?>px;">
            </div>
            <?php if(!empty($multiple_show_title[0])){ ?>
            <h4 class="uyoutube-title"><?php echo $multiple_videos[$i]['title'] ?></h4>
            <?php } ?>
          </div>
        <?php } ?>
      <?php } ?>
    <?php } ?>
    <?php if ($display_style == 'list') { ?>
      <?php if ($multiple_videos) { ?>
        <?php for ($i = 0; $i < count( $multiple_videos ); $i++) { ?>
		<?php if(empty($first_to_thumbnails[0]) && $i == 0) { continue; } ?>
        <div class="uyoutube-thumbnail uyoutube-list-item <?php if(empty($first_to_thumbnails[0])) { ?>firstHidden<?php } ?>" data-video-id="<?php echo $multiple_videos[$i]['id'] ?>">
            <div class="uyoutube-thumb-holder" style="width:<?php echo $thumbWidth ?>px;">
              <div class="uyoutube-thumb-mask" style="width:<?php echo $thumbWidth ?>px;height:<?php echo $thumbHeight ?>px">
                <img class="uyoutube-thumb" style="width:<?php echo $thumbWidth ?>px; margin-top: -<?php echo $thumbOffset ?>px" src="http://img.youtube.com/vi/<?php echo $multiple_videos[$i]['id'] ?>/hqdefault.jpg" width="80">
              </div>
            </div>
            <div class="uyoutube-content-holder">
              <?php if ($multiple_show_title[0]) { ?>
                <h4 class="uyoutube-title"><?php echo $multiple_videos[$i]['title'] ?></h4>
              <?php } ?>
            </div>
          </div>
        <?php } ?>
      <?php }  ?>
    <?php } ?>
	</div>
  <?php } ?>
</div>
