<!-- Start Slider Dynamation -->
<div class="container-fluid">
<?php 
$result = db_query("SELECT nid from node where type = 'home_page_slider'");
// fetch node id using sql query 
$records = $result->fetchField();
$node = node_load($records);
$wrapper = entity_metadata_wrapper('node', $node);
$formtype = field_get_items('node', $node, 'field_slider');
?>
  <div class="camera_wrap camera_emboss pattern_1" id="camera_wrap_4">
  <?php foreach($formtype as $itemid) {
	$item = field_collection_field_get_entity($itemid);
	if($item->field_slider_image['und'][0]['uri']) {
		 $img_url = file_create_url($item->field_slider_image['und'][0]['uri']);
	}  ?>
    <div data-src="<?php print $img_url; ?>">
      <div class="camera_caption fadeFromBottom"><?php print $item->field_slider_description['und'][0]['safe_value']; ?></div>
    </div>
    <?php }?>
  </div>
</div>
<!-- End Slider Dynamation -->
<div id="wrapper">
<div class="header">
    <div class="col-sm-6 col-md-5 nopadding logo"><img src="<?php print $logo ?>" usemap="#logos" class="img-responsive"></div>
		<map name="logos">
			<area shape="rect" coords="0,0,190,100" href="http://www.i2r.a-star.edu.sg/" target="_blank" />
			<area shape="rect" coords="190,0,420,100" href="<?php print base_path(); ?>"  />
		</map>
    <div class="col-sm-6 col-md-7 nopadding">
      <div class="col-sm-4 search-bar pull-right">
         <?php print render($page['search']); ?>
      </div>
     
    </div>
  </div>
  
 <div class="clearfix"></div>
  
  <div class="mainmenu">
    <nav class="navbar navbar-default" role="navigation">
      <div class="navbar-header"> <a class="navbar-brand visible-md-block" href="#">Main Menu</a>
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
      </div>
      <div id="navbar" class="navbar-collapse collapse">
         <?php 
		 $top_menu = menu_tree_output(menu_tree_all_data('main-menu'));
		 print drupal_render($top_menu); ?>
      </div>
    </nav>
  </div> 
    <div class="clearfix"></div>
  
  <div class="content">
     <div id="moredetail" class="collapse moredetail">
      <div class="row nopadding">
       <?php print render($page['footerblocks']); ?>
      </div>
    </div>
    
  		 <div class="more-detail">
 <p  class="collapsed" data-toggle="collapse" data-target="#moredetail">Click Here for More Details  </p>    </div>
    
    
    
    <div class="clearfix"></div>
   
  
    <div class="footer">
      <div class="col-md-8 col-sm-6  col-xs-12 footer-menu">
         <?php
		 $bottom_menu = menu_tree('menu-footer-menu');
		 print drupal_render($bottom_menu); 
	?>
      </div>
      <div class="col-md-4 col-sm-6 col-xs-12 pull-right copyright">
        <?php print render($page['footeraddress']); ?>
      </div>
    </div>
  </div>  
</div>
<?php
	drupal_add_js('jQuery(document).ready(function () {       		
		jQuery("#edit-submit--3").click(function()
		{
			var val_search = jQuery("#edit-search-block-form--2").val();
			jQuery("#search-block-form").attr("action","/robotics/search/node/"+val_search);
		}
		);
     });', 'inline');
?>