@if(!Auth::check())
	<style type="text/css">
        #header, #footer, .chatbox-container{
            display:none;
        }
        
        #content-container{
            margin-top:0px;
        }
		
		.business-back-button-area{
			margin-top:10px !important;	
		}
		
		#menu-with-bg{
			padding-top: 0px !important;
			margin-top: -15px;
		}
    </style>
@endif

@if($page->theme==2)
	<style type="text/css">
       .business-back-button-area{
		 width: 100% !important;
		 max-width: 100% !important; 
		 margin-top: 0px !important; 
	   }
    </style>
@endif

<input type="hidden" value="business" id="current-access-page-type">
<input type="hidden" value="{{$page->id}}" id="current-access-page-type-id">
<meta name="user-auth" content="{{Auth::check() ? '1' : '0'}}">
<meta name="csrf-token" content="{{ csrf_token() }}">

<link href="{{Theme::asset()->get('theme/css/business/main.css')}}" type="text/css" rel="stylesheet" defer="defer"/>
<link href="{{Theme::asset()->get('theme/css/business/mbl.css')}}" type="text/css" rel="stylesheet" defer="defer"/>
<link href="{{Theme::asset()->get('theme/css/business/products.css')}}" type="text/css" rel="stylesheet" defer="defer"/>
	<?php 
		$businessListingUrl="";
		$previousUrl=URL::previous();
		$previousUrlParams=explode("/",$previousUrl);
		
		if(isset($previousUrlParams[3]) and isset($previousUrlParams[4])){ 
			
			$subUrl=explode("?",$previousUrlParams[4]);
			if(isset($subUrl[0])){
				if($previousUrlParams[3]=='pages' and $subUrl[0]=='business-search'){
					$businessListingUrl=$previousUrl;
				}
			}
		}
		if(isset($previousUrlParams[3]) and isset($previousUrlParams[5])){ 
			
			$subUrl=explode("?",$previousUrlParams[5]);
			if(isset($subUrl[0])){
				if($previousUrlParams[3]=='c' and $subUrl[0]=='business-search'){
					$businessListingUrl=$previousUrl;
				}
			}
		}
	?>
    @if($businessListingUrl)
    	@if($page->theme==1)
            <div class="container business-back-button-area">
                <div class="row">
                    <div class="col-sm-1 col-xs-2 business-listing-home">
                        <a href="{{$businessListingUrl}}"><i class="fa fa-briefcase"></i></a>
                    </div>  
                    
                    <div class="col-sm-11 col-xs-10 business-listing-search-form">   
                        {!! Theme::section('page.listing.search-form') !!}
                    </div>
                </div>        
            </div>
         @else
         	<div class="business-back-button-area">
                  <div class="container">
                        <div class="row">
                            <div class="col-sm-1 col-xs-2 business-listing-home">
                                <a href="{{$businessListingUrl}}"><i class="fa fa-briefcase"></i></a>
                            </div>  
                            
                            <div class="col-sm-11 col-xs-10 business-listing-search-form">   
                                {!! Theme::section('page.listing.search-form') !!}
                            </div>
                        </div>        
                  </div>
            </div>  
         @endif   
    @endif
    
<?php /*?>@endif<?php */?>

{!! $content !!}
