
  <?php

 Yii::app()->setLanguage(isset(Yii::app()->session['lang']) ? Yii::app()->session['lang'] : 'ar'); 
 $lang=Yii::app()->getLanguage();
 
?>
 <style>
 ul.yiiPager .first, ul.yiiPager .last{display:block;}
 </style>
<section class="videos">
    <section class="videos-section1">
        <div class="container">
      <h2>  <?php echo($lang=='ar'?$catname_ar:$catname_en) ?> </h2>
           <div class="row">
               <div class="col-sm-offset-1 col-sm-10 col-xs-12 col-xs-offset-0">
                    
               </div>
           </div>
            <div class="row">
            <div class="col-sm-offset-1 col-sm-10 col-xs-offset-0 col-xs-12 ">
			<?php 
			$i=1;
			foreach($videos as $video){
				if($i==1){?>
			
                   <div class="row">
                   <div class="div col-xs-12">
                   <div class="video-container">
                   <?php 
                       echo '<iframe class="main-iframe" src="https://www.youtube.com/embed/'.$video->video_ip.'?enablejsapi=1&rel=0&modestbranding=1"></iframe> ';
                      ?>
                   </div> 
                   </div>
                </div>
                <?php }else{
                   if($i==2)
					   echo '<div class="row">';
				   
                     
                         
                        echo '
                     <div class="col-xs-12 col-sm-6">
                      <div class="video-container">
                   
                       <iframe class="main-iframe2" src="https://www.youtube.com/embed/'.$video->video_ip.'?enablejsapi=1&rel=0&modestbranding=1"   > 
                        </iframe> 
                         </div>
                     </div> 
                     ';
                        
                        
                      }
					$i++;					  
                     }
                        ?>
                     
               <?php if($i>1) echo "</div>";?>
			
				</div>
            </div>
			
                <?php $this->widget('CLinkPager',array(
                'pages'=>$pages,
                // "cssFile" => false,
                // 'lastPageLabel'=>false,
                // 'firstPageLabel'=>false,
                // 'nextPageLabel'=>'Next  &#x2190;',
                // 'nextPageCssClass'=>'next-pager-button',
                // 'previousPageCssClass'=>'prev-pager-button',
                // 'prevPageLabel'=>'&#x2192; Prev',
                // 'header'=>false
                  'header' => false,
        'maxButtonCount' => '10',
        'firstPageLabel'=>'<< '.($lang=='ar'?'الاول':'First'),
        'lastPageLabel'=>' >> '.($lang=='ar'?'الاخير':'Last'),
        'prevPageLabel' => '<' ,
        'nextPageLabel' => '>',
                 )  
			);   
			?> 
        </div> 
    </section>
</section>
