<div class="container">
	<div class="row">
		<div class="hidden-xs col-sm-4 col-md-3">
			<div class="section">
				<div class="section-title">
					<h3>
						Live Feeds
					</h3>
				</div>
				<div class="section-body csb mxh-4 xoh" data-simplebar style="height: 439px; max-height: 439px;">
					<div id="live_feeds" class="">
						<div class="spinner-container">
							<div class="spinner">
								<div class="bounce1"></div>
								<div class="bounce2"></div>
								<div class="bounce3"></div>
							</div>
						</div>
					</div>
				</div>
				<div class="section-footer text-right"></div>
			</div>
          
			<?php if(isset($homeBanners['left']) && !empty($homeBanners['left'])) { ?>
				<div class="section hidden-xs">
					<div class="section-body">
						<div class="asa mxh-2">
							<a href="<?php echo $homeBanners['left']['url'] ?>" title="<?php echo $homeBanners['left']['url'] ?>" style="display: block; width: 100%; height: 100%;" target="_blank">
								<img class="img-responsive" src="<?php echo $homeBanners['left']['image'] ?>" alt="<?php $homeBanners['left']['url'] ?>" style="width: 100%; height: 100%;" />
							</a>
						</div>
					</div>
					<div class="section-footer text-right">
					</div>
				</div>
			<?php } ?>

			<div class="section hidden-xs">
				<div class="section-title">
					<h3>
						TRENDING NEWS
					</h3>
				</div>
				<div class="section-body">
					<?php
						$filter = array();
						$filter['sort'] = 'n.`most_read`';
						$filter['order'] = 'DESC';
						$filter['start'] = 0;
						$filter['limit'] = 20;
						$latestNews = getNewsPosts($filter);
						$trending_news = getTemplate('news.trending_news', $latestNews);
						echo $trending_news;
					?>
				</div>
				<div class="section-footer text-right">
					<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>steelnews">View All <i class="fa fa-chevron-circle-right"></i></a>
				</div>
			</div>			
			<div class="section">				
				<!--iframe src="https://www.youtube.com/embed/h1XFU_OUXCQ"  width="262" height="198" frameborder="0" allowfullscreen></iframe-->
			<!--a href="https://www.steel-360.com" target="_blank"><img src="adimages/ad_13082018.jpg" alt="" /></a-->			
			<!--a href="https://www.steel-360.com/indian-auto-recycling-the-goldmine-in-junkyard#startpoint" target="_blank"><img src="images/manage_banner/images/bannerads/home/1/11102018113347.jpg" alt="" /></a-->
			</div>
 
		</div>
		<div class="col-xs-12 col-sm-8 col-md-5">
			<div class="section">
				<div class="section-title">
					<h3>
						Latest News
					</h3>
				</div>
				<div class="section-body">
					<div id="latest_news">
						<?php
							$filter = array();
							$filter['sort'] = 'n.`post_id`';
							$filter['order'] = 'DESC';
							$filter['start'] = 0;
							$filter['limit'] = 20;
							$latestNews = getNewsPosts($filter);
							echo getTemplate('news.latest_news', $latestNews);
						?>
					</div>
				</div>
				<div class="section-footer text-right">
					<div class="sm-tab-footers">
						<div class="sm-tab-footer active" id="latest_news_footer">
							<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>steelnews">View All <i class="fa fa-chevron-circle-right"></i></a>
						</div>
					</div>
				</div>
			</div>

		</div>

		<?php if(DEVICE == 'MOBILE' && file_exists('assets/videos/hitachi-hightech-ad/small2.mp4')) { ?>
			<div class="col-xs-12 hidden-sm hidden-md hidden-lg">
				<div class="section">
					<div class="section-body">
						<div id="mbl_video_ad">
							<video poster="<?php BASEURL ?>assets/videos/hitachi-hightech-ad/hitaaa.jpg" src="<?php BASEURL ?>assets/videos/hitachi-hightech-ad/small2.mp4" style="width: 100%;object-fit: fill;" controls autoplay></video>
						</div>
					</div>
					<div class="section-footer text-right"></div>
				</div>
			</div>
		<?php } ?>

		<div class="col-xs-12 hidden-sm hidden-md hidden-lg">
			<div class="section">
				<div class="section-title">
					<h3>
						Live Feeds
					</h3>
				</div>
				<div class="section-body csb mxh-4 xoh" data-simplebar>
					<div id="mbl_live_feeds">
						<div class="spinner-container">
							<div class="spinner">
								<div class="bounce1"></div>
								<div class="bounce2"></div>
								<div class="bounce3"></div>
							</div>
						</div>
					</div>
				</div>
				<div class="section-footer text-right"></div>
			</div>

			<?php if(isset($homeBanners['left']) && !empty($homeBanners['left'])) { ?>
				<div class="section hidden-xs">
					<div class="section-body">
						<div class="asa mxh-2">
							<a href="<?php echo $homeBanners['left']['url'] ?>" title="<?php $homeBanners['left']['url'] ?>" style="display: block; width: 100%; height: 100%;" target="_blank">
								<img class="img-responsive" src="<?php echo $homeBanners['left']['image'] ?>" alt="<?php echo $homeBanners['left']['url'] ?>" style="width: 100%; height: 100%;" />
							</a>
						</div>
					</div>
					<div class="section-footer text-right">
					</div>
				</div>
			<?php } ?>

			<div class="section hidden-xs">
				<div class="section-title">
					<h3>
						TRENDING NEWS
					</h3>
				</div>
				<div class="section-body">
					<?php $trending_news ?>
				</div>
				<div class="section-footer text-right">
					<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>steelnews">View All <i class="fa fa-chevron-circle-right"></i></a>
				</div>
			</div>			
		</div>				

		<div class="hidden-xs col-sm-4 hidden-md hidden-lg">
			<div class="section">
				<div class="section-title">
					<h3>
						VESSEL LINE-UP
					</h3>
				</div>
				<div class="section-body">
					<?php $commodities = getVesselLineUpCommodities(); ?>
					<div class="sm-tabs">
						<ul>
							<?php if($commodities) { ?>
								<?php foreach($commodities as $key => $commodity) { ?>
									<?php
										$is_active = '';
										if($key == 0) {
											$is_active = ' active';
										}
									?>
									<li>
										<a class="<?php $is_active; ?>" data-target="vessel-line-up-<?php strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)); ?>"><?php $commodity ?></a>
									</li>
								<?php } ?>
							<?php } ?>
						</ul>
					</div>
					<div class="sm-tab-panels" data-effect="slide">
						<?php if($commodities) { ?>
							<?php foreach($commodities as $key => $commodity) { ?>
								<?php
									$is_active = '';
									if($key == 0) {
										$is_active = ' active';
									}										
								?>
								<div class="sm-tab-panel <?php $is_active; ?>" id="vessel-line-up-<?php strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)); ?>">
									<div class="spinner-container">
										<div class="spinner">
											<div class="bounce1"></div>
											<div class="bounce2"></div>
											<div class="bounce3"></div>
										</div>
									</div>
								</div>
							<?php } ?>
						<?php } ?>
					</div>
				</div>
				<div class="section-footer text-right">
					<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>logistics-vessellineup-coal">View All <i class="fa fa-chevron-circle-right"></i></a>
				</div>
			</div>

			<div class="section">
				<div class="section-title">
					<h3>
						FREIGHT
					</h3>
				</div>
				<div class="section-body">
					<?php $commodities = getFreightCommodities(); ?>
					<div class="sm-tabs">
						<ul>
							<?php if($commodities) { ?>
								<?php foreach($commodities as $key => $commodity) { ?>
									<?php
										$is_active = '';
										if($key == 0) {
											$is_active = ' active';
										}
									?>
									<li>
										<a class="<?php $is_active; ?>" data-target="vessel-vesselfreight-<?php strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)) ?>"><?php $commodity ?></a>
									</li>
								<?php } ?>
							<?php } ?>
						</ul>						
					</div>
					<div class="sm-tab-panels" data-effect="slide">
						<?php if($commodities) { ?>
							<?php foreach($commodities as $key => $commodity) { ?>
								<?php
									$is_active = '';
									if($key == 0) {
										$is_active = ' active';
									}
								?>
								<div class="sm-tab-panel <?php $is_active; ?>" id="vessel-vesselfreight-<?php strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)) ?>">
									<div class="spinner-container">
										<div class="spinner">
											<div class="bounce1"></div>
											<div class="bounce2"></div>
											<div class="bounce3"></div>
										</div>
									</div>
								</div>
							<?php } ?>
						<?php } ?>
					</div>
				</div>
				<div class="section-footer text-right">
					<div class="sm-tab-footers">
						<?php if($commodities) { ?>
							<?php foreach($commodities as $key => $commodity) { ?>
								<?php
									$is_active = '';
									if($key == 0) {
										$is_active = ' active';
									}
								?>
								<div class="sm-tab-footer" id="vessel-vesselfreight-<?php strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)) ?>_footer">
									<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>logistics-vesselfreight-<?php strtolower(preg_replace('/[^a-zA-Z]+/', '', $commodity)); ?>">View All <i class="fa fa-chevron-circle-right"></i></a>
								</div>
							<?php } ?>
						<?php } ?>
					</div>
				</div>
			</div>

		</div>

		<div class="col-xs-12 col-sm-8 col-md-4">
			<div class="section mb-0">
				<div class="section-title">
					<h3>
						Prices
					</h3>
					<a class="sm-btn sm-btn-default categories-list-menu-toggler"><i class="fa fa-bars"></i></a>
				</div>
				<div class="section-body" id="price-listing">
					<div id="home-price-listing">
						<div class="spinner-container">
							<div class="spinner">
								<div class="bounce1"></div>
								<div class="bounce2"></div>
								<div class="bounce3"></div>
							</div>
						</div>
						<script type="text/javascript">
							$('#home-price-listing').load('<?php BASEURL ?>ajax_calls.php?getHomePrices=true');
						</script>
					</div>
				</div>
				<div class="section-footer text-right">
					<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>steelprices">View All <i class="fa fa-chevron-circle-right"></i></a>
				</div>
			</div>
		</div>

		<div class="col-xs-12 hidden-sm hidden-md hidden-lg">
			<div class="section">
				<div class="section-title">
					<h3>
						TRENDING NEWS
					</h3>
				</div>
				<div class="section-body">
					<?php $trending_news ?>
				</div>
				<div class="section-footer text-right">
					<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>steelnews">View All <i class="fa fa-chevron-circle-right"></i></a>
				</div>
			</div>
		</div>
	</div>

	<div class="clear"></div>
	
	<div class="row">
		<div class="col-xs-12 hidden-sm col-md-3">
			<div class="section vessel-lineup-section">
				<div class="section-title">
					<h3>
						VESSEL LINE-UP
					</h3>
				</div>
				<div class="section-body">
					<?php $commodities = getVesselLineUpCommodities(); ?>
					<div class="sm-tabs">
						<ul>
							<?php if($commodities) { ?>
								<?php foreach($commodities as $key => $commodity) { ?>
									<?php
										$is_active = '';
										if($key == 0) {
											$is_active = ' active';
										}
									?>
									<li>
										<a class="<?php echo $is_active; ?>" data-target="vessel-line-up-<?php echo strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)); ?>-2"><?php echo $commodity ?></a>
									</li>
								<?php } ?>
							<?php } ?>
						</ul>						
					</div>
					<div class="sm-tab-panels" data-effect="slide">
						<script type="text/javascript">
							var $vesselLineupTabs = [];
						</script>
						<?php if($commodities) { ?>
							<?php foreach($commodities as $key => $commodity) { ?>
								<?php
									$is_active = '';
									if($key == 0) {
										$is_active = ' active';
									}										
								?>
								<div class="sm-tab-panel <?php echo $is_active; ?>" id="vessel-line-up-<?php echo strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)); ?>-2">
									<script type="text/javascript">
										var $vesselLineupTab = new Object();
										$vesselLineupTab.tab = "vessel-line-up-<?php echo strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)); ?>";
										$vesselLineupTab.commodity = '<?php echo $commodity ?>';
										$vesselLineupTab.sort = 'excel_upoad_date_time';
										$vesselLineupTab.start = 0;
										$vesselLineupTab.limit = 10;

										$vesselLineupTabs.push($vesselLineupTab);
									</script>

									<div class="spinner-container">
										<div class="spinner">
											<div class="bounce1"></div>
											<div class="bounce2"></div>
											<div class="bounce3"></div>
										</div>
									</div>
								</div>
							<?php } ?>
						<?php } ?>
					</div>
				</div>
				<div class="section-footer text-right">
					<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>logistics-vessellineup-coal">View All <i class="fa fa-chevron-circle-right"></i></a>
				</div>
			</div>

			<div class="section">
				<div class="section-title">
					<h3>
						FREIGHT
					</h3>
				</div>
				<div class="section-body">
					<?php $commodities = getFreightCommodities(); ?>
					<div class="sm-tabs">
						<ul>
							<?php if($commodities) { ?>
								<?php foreach($commodities as $key => $commodity) { ?>
									<?php
										$is_active = '';
										if($key == 0) {
											$is_active = ' active';
										}
									?>
									<li>
										<a class="<?php echo $is_active; ?>" data-target="vessel-vesselfreight-<?php echo strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)); ?>-2"><?php echo $commodity ?></a>
									</li>
								<?php } ?>
							<?php } ?>
						</ul>						
					</div>
					<div class="sm-tab-panels" data-effect="slide">
						<script type="text/javascript">
							var $vesselFreightTabs = [];
						</script>
						<?php if($commodities) { ?>

							<?php foreach($commodities as $key => $commodity) { ?>
								<?php
									$is_active = '';
									if($key == 0) {
										$is_active = ' active';
									}
								?>
								<div class="sm-tab-panel <?php echo $is_active; ?>" id="vessel-vesselfreight-<?php echo strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)); ?>-2">
									<script type="text/javascript">
										var $vesselFreightTab = new Object();
										$vesselFreightTab.tab = "vessel-vesselfreight-<?php echo strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)); ?>";
										$vesselFreightTab.commodity = '<?php echo $commodity ?>';
										$vesselFreightTab.sort = 's.`updated_on`';
										$vesselFreightTab.order = 'DESC';
										$vesselFreightTab.start = 0;
										$vesselFreightTab.limit = 10;

										$vesselFreightTabs.push($vesselFreightTab);
									</script>

									<div class="spinner-container">
										<div class="spinner">
											<div class="bounce1"></div>
											<div class="bounce2"></div>
											<div class="bounce3"></div>
										</div>
									</div>
								</div>
							<?php } ?>
						<?php } ?>
					</div>
				</div>
				<div class="section-footer text-right">
					<div class="sm-tab-footers">
						<?php if($commodities) { ?>
							<?php foreach($commodities as $key => $commodity) { ?>
								<?php
									$is_active = '';
									if($key == 0) {
										$is_active = ' active';
									}
								?>
								<div class="sm-tab-footer <?php echo $is_active; ?>" id="vessel-vesselfreight-<?php echo strtolower(preg_replace('/[^a-zA-Z]+/', '_', $commodity)); ?>-2_footer">
									<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>logistics-vesselfreight-<?php echo strtolower(preg_replace('/[^a-zA-Z]+/', '', $commodity)); ?>">View All <i class="fa fa-chevron-circle-right"></i></a>
								</div>
							<?php } ?>
						<?php } ?>
					</div>
				</div>
			</div>

		</div>

		<div class="col-xs-12 col-sm-12 col-md-9">
			<div class="row">
				<div class="col-xs-12 col-sm-12 col-md-12 no-pad">
					<div class="col-xs-12 col-sm-6 col-md-6">
						<div class="section">
							<div class="section-title">
								<h3>
									Tenders
								</h3>
							</div>
							<div class="section-body mxh-3" id="tender-listing">
								<div class="spinner-container">
									<div class="spinner">
										<div class="bounce1"></div>
										<div class="bounce2"></div>
										<div class="bounce3"></div>
									</div>
								</div>
								<script type="text/javascript">
									$('#tender-listing').load('<?php BASEURL ?>ajax_calls.php?getHomeTenders=true');
								</script>
							</div>
							<div class="section-footer text-right">
								<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>tenders">View All <i class="fa fa-chevron-circle-right"></i></a>
							</div>
						</div>
					</div>

					<div class="col-xs-12 col-sm-6 col-md-6">
						<?php /*
						<div class="section">
							<div class="section-title">
								<h3>
									STEELVIA - Global Steel Innovations Forum
								</h3>
							</div>
							<div class="section-body" id="stats">
								<?php getTemplate('statistics.home', array()) ?>
							</div>
							<div class="section-footer text-right">
								<!--a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>statistics/">View Stats <i class="fa fa-chevron-circle-right"></i></a-->
								<a class="sm-btn sm-btn-primary br-20" href="http://www.steelvia.com/bulk-registration/" target="_blank">Go To Site <i class="fa fa-chevron-circle-right"></i></a>
								
							</div>
						</div> */ ?>
						
<?php /*if($_COOKIE['uid']==56350){ echo '<pre>';print_R($homeBanners); ?>
<?php echo '----';print_R($banners); echo '</pre>';} */ ?>
						<!--div class="section hidden-xs">
							<div class="section-body">
								<div class="asa mxh-125">
									<a href="https://www.steelvia.com/blog/" title="SteelVia Events" style="display: block; width: 100%; height: 100%;" target="_blank">
										<img class="img-responsive" src="<?php echo BASEURL ?>images/manage_banner/images/steelvia.jpg" alt="SteelVia Events" style="display: block !important; width: 100%; height: 100%;" />
									</a>
								</div>
							</div>
							<div class="section-footer text-right">
							</div>
						</div-->
						<?php if(isset($homeBanners['right']) && !empty($homeBanners['right'])){  ?>
						<?php foreach($homeBanners['right'] as $key_pos=>$rightArr):  ?>
							<div class="section hidden-xs">
								<div class="section-body">
									<div class="asa mxh-125">
										<a href="<?php echo $rightArr['url'] ?>" title="<?php echo $rightArr['url'] ?>" style="display: block; width: 100%; height: 100%;" target="_blank">
											<img class="img-responsive" src="<?php echo $rightArr['image'] ?>" alt="<?php echo $rightArr['url'] ?>" style="display: block !important; width: 100%; height: 100%;" />
										</a>
									</div>
								</div>
								<div class="section-footer text-right">
								</div>
							</div>
						<?php endforeach; ?>
						<?php } ?>
						<?php if(isset($homeBanners['right_2']) && !empty($homeBanners['right_2'])){  ?>
							<div class="section hidden-xs">
								<div class="section-body">
									<div class="asa mxh-125">
										<a href="<?php echo $homeBanners['right_2']['url'] ?>" title="<?php echo $homeBanners['right_2']['url'] ?>" style="display: block; width: 100%; height: 100%;" target="_blank">
											<img class="img-responsive" src="<?php echo $homeBanners['right_2']['image'] ?>" alt="<?php echo $homeBanners['right_2']['url'] ?>" style="display: block !important; width: 100%; height: 100%;" />
										</a>
									</div>
								</div>
								<div class="section-footer text-right">
								</div>
							</div>
						<?php } ?>
						<?php if(isset($homeBanners['right_3']) && !empty($homeBanners['right_3'])){  ?>
							<div class="section hidden-xs">
								<div class="section-body">
									<div class="asa mxh-125">
										<a href="<?php echo $homeBanners['right_3']['url'] ?>" title="<?php echo $homeBanners['right_3']['url'] ?>" style="display: block; width: 100%; height: 100%;" target="_blank">
											<img class="img-responsive" src="<?php echo $homeBanners['right_3']['image'] ?>" alt="<?php echo $homeBanners['right_3']['url'] ?>" style="display: block !important; width: 100%; height: 100%;" />
										</a>
									</div>
								</div>
								<div class="section-footer text-right">
								</div>
							</div>
						<?php } ?>
						<?php /*if(isset($banners['2']) && !empty($banners['2'])) { ?>
							<?php $bannerUrl = (isset($banners['2']['url']) && !empty($banners['2']['url'])) ? $banners['2']['url'] : '#'; ?>
							<?php $bannerImage = (isset($banners['2']['image']) && !empty($banners['2']['image'])) ? $banners['2']['image'] : ''; ?>
							<?php if($bannerImage) { ?>
								<div class="section hidden-xs">
									<div class="section-body">
										<div class="asa mxh-125">
											<a href="<?php echo $bannerUrl ?>" title="<?php echo $bannerUrl ?>" style="display: block; width: 100%; height: 100%;">
												<img class="img-responsive" src="<?php BASEURL ?>images/manage_banner/images/bannerads/home/2/<?php echo $bannerImage ?>" alt="<?php echo $bannerUrl ?>" style="display: block !important; width: 100%; height: 100%;" />
											</a>
										</div>
									</div>
									<div class="section-footer text-right">
									</div>
								</div>
							<?php } ?>
						<?php }*/ ?>
					</div>

					<div class="col-xs-12 col-sm-12 col-md-12">
						<div class="section">
							<div class="section-title">
								<h3>
									Reports
								</h3>
							</div>
							<div class="section-body">
								<div id="reports">
									<div class="spinner-container">
										<div class="spinner">
											<div class="bounce1"></div>
											<div class="bounce2"></div>
											<div class="bounce3"></div>
										</div>
									</div>
								</div>
								
								<script type="text/javascript">
									$('#reports').load('<?php BASEURL ?>ajax_calls.php?getHomeReports=true');
								</script>
							</div>
							<div class="section-footer text-right">
								<a class="sm-btn sm-btn-primary br-20" href="<?php BASEURL ?>steelreport">View All <i class="fa fa-chevron-circle-right"></i></a>
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="clear"></div>

		</div>
	</div>

	<div class="clear"></div>

	<div class="row">
		<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
			<div class="section">
				<div class="section-title">
					<h3>
						Trending Tags
					</h3>
				</div>
				<div class="section-body">
					<?php
						$filter = array();
						$filter['start'] = 0;
						$filter['limit'] = 10;
						$tags = getTags($filter);
						$trendingTags = getTemplate('news.tags', $tags);

						echo $trendingTags;
					?>
				</div>
				<div class="section-footer text-right"></div>
			</div>
		</div>
		<?php /*if( $_GET['debug'] == true ){ ?>
		<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
			<div class="section">
				<div class="section-title">
					<h3>
						Fotomine Images
					</h3>
				</div>
				<div class="section-body">
					<?php
						$fotomineImages = CallAPICURL("GET", "http://www.steelmint.com/fotomine/api/public/", $data = false);
						//$fotomineImages = json_decode(file_get_contents("/home/steelmin/public_html/fotomine/api/public/"), true);
						if($fotomineImages) { 
					?>
						<div class="fotomine-image-slider" style="height: 300px; text-align: center; position: relative; width: 100%;">
							<?php foreach($fotomineImages as $image) { ?>
								<div style="width: 100%; height: 300px; text-align: center;">
									<?php if($image['type'] == 'I' || $image['type'] == 'i') { ?>
										<img src="<?php echo $image['path'] ?>" style="width: auto; height: 100%; margin: 0 auto;">
									<?php } else if($image['type'] == 'V' || $image['type'] == 'v') { ?>
										<iframe src="<?php echo $image['path'] ?>" style="width: 100%; height: 100%; margin: 0 auto; border: 0px;" frameborder="0" allowfullscreen></iframe>
									<?php } ?>
								</div>
							<?php } ?>
						</div>
						<script type="text/javascript">
							$(document).ready(function() {
								$('.fotomine-image-slider').slick({
									autoplay: false,
									infinite: true,
									arrows: true,
									prevArrow: '<div class="slide-prev">&#8249;</div>',
									nextArrow: '<div class="slide-next">&#8250;</div>',
								});
							});
						</script>
					<?php } ?>
				</div>
				<div class="section-footer text-right"></div>
			</div>
		</div>
		<?php }*/ ?>
		
		<div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
			<div class="section">
				<div class="section-title">
					<h3>
						Fotomine
					</h3>
				</div>
	<!--link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" -->
	    <style>
                    
                    .carousel-caption {
    position: absolute;
    right:0% !important; 
    bottom: 0px;
    left: 0% !important;
    z-index: 10;
    padding-top: 20px;
    padding-bottom: 20px !important;
    color: #fff;
    text-align: center;
    background-color: rgba(44, 44, 44, 0.8) !important;
    width: 100% !important;
}
                    
                    
                </style>    
    <!--link rel="stylesheet" href="reset.css"> 
    <link rel="stylesheet" href="style.css"-->
    <!-- Custom styles for this template -->
    <link href="css/thumbnail-gallery.css" rel="stylesheet">				
				<div class="section-body">
				
				
	<?php  
	
   $json = file_get_contents('/home/steelmin/public_html/fotomine/data.json');
   $json_data = json_decode($json,true);
   if( $_GET['debug'] == true ){
   echo "<pre>"; print_r($json_data);
   }
   if($json_data["type#"] == "single"){
     if($json_data["data#"][0]["type"] == 'I'){
   ?>
    <a href="https://www.steelmint.com/gallery.html" style="color:#fff"> <img  src='<?php $paths = explode("/",$json_data["data#"][0]["path"]); echo "https://www.steelmint.com/fotomine/api/public/fotomine/images/slider/".$paths[count($paths)-1]; /*echo $json_data["data#"][0]["path"]*/ ?>'  width="100%"  /> 
	<h5><u style="font-weight:700 !important;color:#333">
	<?php echo $json_data["data#"][0]["title"] ?></u></h5>
	<p style="font-style:italic"><?php echo $json_data["data#"][0]["desc"] ?></p></a>
<?php  
    } else {
  ?>
   <iframe src="https://www.youtube.com/embed/<?php echo $json_data["data#"][0]["path"];?> "  width="450" height="250" frameborder="0" allowfullscreen></iframe>
<?php   
     }
   } else {
   ?>
   <style>
   .rslides {
  position: relative;
  list-style: none;
  overflow: hidden;
  width: 100%;
  padding: 0;
  margin: 0;
  }

.rslides li {
  -webkit-backface-visibility: hidden;
  position: absolute;
  display: none;
  width: 100%;
  left: 0;
  top: 0;
  }

.rslides li:first-child {
  position: relative;
  display: block;
  float: left;
  }

.rslides img {
  display: block;
  height: auto;
  float: left;
  width: 100%;
  border: 0;
  margin-bottom: 15px;
  }
  
  * {
  margin: 0;
  padding: 0;
  }

html {
  background: #fff;
  }



.rslides {
  margin: 0 auto;
  }

.rslides_container {
  margin-bottom: 50px;
  position: relative;
  float: left;
  width: 100%;
  }

.rslides1_nav {
  position: absolute;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  top: 50%;
  left: 0;
  z-index: 99;
  opacity: 0.7;
  text-indent: -9999px;
  overflow: hidden;
  text-decoration: none;
  height: 61px;
  width: 38px;
  background: transparent url("themes.gif") no-repeat left top;
  margin-top: -45px;
  }

.rslides1_nav:active {
  opacity: 1.0;
  }

.rslides1_nav.next {
  left: auto;
  background-position: right top;
  right: 0;
  }

.rslides2_nav {
  position: absolute;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  top: 0;
  left: 0;
  display: block;
  background: #fff; /* Fix for IE6-9 */
  opacity: 0;
  filter: alpha(opacity=1);
  width: 48%;
  text-indent: -9999px;
  overflow: hidden;
  height: 91%;
  }

.rslides2_nav.next {
  left: auto;
  right: 0;
  }

.rslides3_nav {
  position: absolute;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  opacity: 0.6;
  text-indent: -9999px;
  overflow: hidden;
  top: 0;
  bottom: 0;
  left: 0;
  background: #000 url("themes.gif") no-repeat left 50%;
  width: 38px;
  }

.rslides3_nav:active {
  opacity: 1.0;
  }

.rslides3_nav.next {
  left: auto;
  background-position: right 50%;
  right: 0;
  }

.rslides1_nav:focus,
.rslides2_nav:focus,
.rslides3_nav:focus {
  outline: none;
  }

.rslides_tabs {
  margin-top: 10px;
  text-align: center;
  }

.rslides_tabs li {
  display: inline;
  float: none;
  _float: left;
  *float: left;
  margin-right: 5px;
  }

.rslides_tabs a {
  text-indent: -9999px;
  overflow: hidden;
  -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  border-radius: 15px;
  background: #ccc;
  background: rgba(0,0,0, .2);
  display: inline-block;
  _display: block;
  *display: block;
  -webkit-box-shadow: inset 0 0 2px 0 rgba(0,0,0,.3);
  -moz-box-shadow: inset 0 0 2px 0 rgba(0,0,0,.3);
  box-shadow: inset 0 0 2px 0 rgba(0,0,0,.3);
  width: 9px;
  height: 9px;
  }

.rslides_tabs .rslides_here a {
  background: #222;
  background: rgba(0,0,0, .8);
  }

.caption {
  /*position: absolute;*/
  display: block;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  text-align: center;
  /*background: #000;*/
  /*background: rgba(0,0,0, .8);*/
  color: #000!important;
}


  </style>
   <div id="gallery"> 
	<ul class="gallaery">
		<?php $j=0;  foreach($json_data["data#"] as $v){ ?>		
			<li>
				
							     <?php  if($v["type"] == "V"){ ?>
								   <iframe src="<?php echo $v["path"];?> "  width="450" height="250" frameborder="0" allowfullscreen></iframe>
							   <?php } else { ?>
							      <a href="https://www.steelmint.com/gallery.html" style="color:#fff"> <img src="<?php $paths = explode('/',$v['path']); echo 'https://www.steelmint.com/fotomine/api/public/fotomine/images/slider/'.$paths[count($paths)-1]; /*echo $v['path'];*/ ?>" height="223px" />
                                      <p class="caption" style="color:#fff;text-align:left;margin-bottom:0px"><u><?php echo substr($v["title"],0,60);?></u></p></a>
							   <?php }  ?>
							
			</li>
		<?php } ?>
	</ul>
	

 <?php /* ?>
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
    <ol class="carousel-indicators" style="display:none">
	  <?php $i=0;  foreach($json_data["data#"] as $v){ $class = $i==0?"active":""; ?>
      <li data-target="#carouselExampleCaptions" data-slide-to="0" class="<?php echo $class; ?>"></li>
      <!--li data-target="#carouselExampleCaptions" data-slide-to="1" class=""></li>
      <li data-target="#carouselExampleCaptions" data-slide-to="2" class=""></li-->
	  <?php $i++; }  ?>
    </ol>
    <div class="carousel-inner">
	<?php $j=0;  foreach($json_data["data#"] as $v){ $class = $j==0?"active":"";
	     if($v["type"] == "V"){
	?>
	<div class="carousel-item <?php echo $class; ?>">
         <iframe src="<?php echo $v["path"];?> "  width="450" height="250" frameborder="0" allowfullscreen></iframe>
        <!--div class="carousel-caption d-none d-md-block">
          <h5>First slide label</h5>
          <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
        </div-->
      </div>
	  <?php $j++;  } else { ?>
      <div class="carousel-item <?php echo $class; ?>">
        <img class="d-block w-100" data-src="holder.js/800x400?auto=yes&amp;bg=777&amp;fg=555&amp;text=First slide" alt="First slide [800x400]" src="<?php echo $v["path"]; ?>" data-holder-rendered="true">
        <div class="carousel-caption d-none d-md-block"   style="text-align:left;padding-left:7px">
          <h5><u><?php echo $v["title"];?></u></h5>
          <p style="color:#fff"><?php echo $v["desc"];?></p>
        </div>
      </div>
	 <?php $j++; } }  ?>
      <!--div class="carousel-item">
        <img class="d-block w-100" data-src="holder.js/800x400?auto=yes&amp;bg=666&amp;fg=444&amp;text=Second slide" alt="Second slide [800x400]" src="chotu600X300.jpg" data-holder-rendered="true">
        <div class="carousel-caption d-none d-md-block">
          <h5>Second slide label</h5>
          <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
        </div>
      </div>
      <div class="carousel-item ">
        <img class="d-block w-100" data-src="holder.js/800x400?auto=yes&amp;bg=555&amp;fg=333&amp;text=Third slide" alt="Third slide [800x400]" src="chitos600X300.jpg" data-holder-rendered="true">
        <div class="carousel-caption d-none d-md-block">
          <h5>Third slide label</h5>
          <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
        </div>
      </div-->
    </div>
    <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
      <span class="carousel-control-prev-icon" aria-hidden="true"></span>
      <span class="sr-only">Previous</span>
    </a>
    <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
      <span class="carousel-control-next-icon" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div> 
<?php */  ?>
</div>
  <?php }  ?>
				</div>
				<div class="section-footer text-right"></div>
			</div>
		</div>
		<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
		<!-- <div class="section">
				<div class="section-title">
					<h3>
						Featured Images
					</h3>
				</div>
		<img  src="image (2).png"  width="100%"  height="223px"  />
		</div> -->
		</div>
	</div>

	<div class="clear"></div>

</div>

<?php
	include('company_brief.html');
?>

<script type="text/javascript">
	var $getVesselLineUpData_xhr = null;
	var $getVesselFreightData_xhr = null;

	var $getVesselLineUpData = function($vesselLineupIndex) {
		$vesselLineupTab = $vesselLineupTabs[$vesselLineupIndex];

		if($getVesselLineUpData_xhr === null) {
			$getVesselLineUpData_xhr = $.ajax({
				url: 'ajax_calls.php?getHomeVesselLineupData=true',
				type: 'POST',
				data: $vesselLineupTab,
				dataType: 'html',
				beforeSend: function() {

				},
				complete: function() {
					$getVesselLineUpData_xhr = null;
					if($vesselLineupIndex < (parseInt($vesselLineupTabs.length) - 1)) {
						$vesselLineupIndex++;
						$getVesselLineUpData($vesselLineupIndex);
					}
				},
				success: function($html) {
					$('#'+$vesselLineupTab.tab).html($html);
					$('#'+$vesselLineupTab.tab+'-2').html($html);
				}
			});
		}
	}

	var $getVesselFreightData = function($vesselFreightIndex) {
		$vesselFreightTab = $vesselFreightTabs[$vesselFreightIndex];

		if($getVesselFreightData_xhr === null) {
			$getVesselFreightData_xhr = $.ajax({
				url: 'ajax_calls.php?getHomeVesselFreightData=true',
				type: 'POST',
				data: $vesselFreightTab,
				dataType: 'html',
				beforeSend: function() {

				},
				complete: function() {
					$getVesselFreightData_xhr = null;
					if($vesselFreightIndex < (parseInt($vesselFreightTabs.length) - 1)) {
						$vesselFreightIndex++;
						$getVesselFreightData($vesselFreightIndex);
					}
				},
				success: function($html) {
					$('#'+$vesselFreightTab.tab).html($html);
					$('#'+$vesselFreightTab.tab+'-2').html($html);
				}
			});
		}
	}

	function scrollToPriceList($elem) {
		$('a.categories-list-menu-toggler').removeClass('in-active');
		$('.price-category-listing').removeClass('active');

		var $target = $elem.attr('data-target');
		var $container = $('#home-price-listing .home-prices');
		var $scrollTo = $('#home-price-listing .home-prices ul.'+$target);
		var $scrollTopValue = $scrollTo.offset().top - $container.offset().top + $container.scrollTop();
		$container.animate({
		    scrollTop: $scrollTopValue
		});
	}

	function openPriceCategoryMenu($btn) {
		$('.price-category-listing').show();
		$btn.addClass('in-active');
		$('.price-category-listing').addClass('active');
		setTimeout(function() {
			$('.price-category-listing ul').slideDown(100);
		}, 250);
	}

	function closePriceCategoryMenu($animate) {
		if($animate == true) {
			$('.price-category-listing ul').slideUp(100, 'linear', function() {
				$('.price-category-listing').removeClass('active');
				$('a.categories-list-menu-toggler').removeClass('in-active');
				setTimeout(function() {
					$('.price-category-listing').hide();
				}, 200);
			});
		} else {
			$('.price-category-listing').hide();
			$('.price-category-listing ul').hide();
			$('.price-category-listing').removeClass('active');
			$('a.categories-list-menu-toggler').removeClass('in-active');
		}
	}

	function getLiveFeeds() {
		$.get('<?php BASEURL ?>ajax_calls.php?getLiveFeeds=true', function(html) {
			$('#live_feeds').html(html);
			$('#mbl_live_feeds').html(html);
		});
	}

	getLiveFeeds();

	$(document).ready(function() {

		/*setInterval(function() {
			getLiveFeeds();
		}, 60000);*/

		if($vesselLineupTabs.length > 0) {
			$getVesselLineUpData(0);
		}

		if($vesselLineupTabs.length > 0) {
			$getVesselFreightData(0);
		}

		$('.stats-slider').slick({
			autoplay: true,
			infinite: true,
			arrows: true,
			prevArrow: '<div class="slide-prev">&#8249;</div>',
			nextArrow: '<div class="slide-next">&#8250;</div>',
		});

		$(document).on('click', 'a.categories-list-menu-toggler', function() {
			$btn = $(this);
			openPriceCategoryMenu($btn);
		});

		$(document).on('click', 'a.price-category-listing-close-btn', function() {
			closePriceCategoryMenu(true);
		});

		$(document).on('click', '#home-price-listing .price-category-listing ul li a', function() {
			scrollToPriceList($(this));
			closePriceCategoryMenu(false);
		});

		$(document).on('click', '#home-price-listing .home-prices ul li.price-listing-header a.price-listing-title', function() {
			scrollToPriceList($(this));
		});

	});
</script>