<?php $this->load->view('site/templates/commonheader'); ?>
<!--[if lt IE 9]>
<script src="js/html5shiv/dist/html5shiv.js"></script>
<![endif]-->

<script src="js/plugin.js" type="text/javascript"></script>
<script type="text/javascript">	
		$(document).ready(function() {
			$('.slidewrap').carousel({
				slider: '.slider',
				slide: 'li',
				nextSlide: '.next',
				prevSlide: '.prev',
				speed: 1000 // ms.
			});
		});

		$(document).ready(function() {
			$('.slidewrap').carousel({
				slider: '.slider2',
				slide: 'li',
				nextSlide: '.next2',
				prevSlide: '.prev2',
				speed: 1000 // ms.
			});
		});

</script>

<script type="text/javascript">

function hoverView(val){

	if($('#hoverlist'+val).css('display')=='block'){
		$('#hoverlist'+val).hide('');	
	}else{
		$('#hoverlist'+val).show('');
	}
		
}

</script>


<script src="js/site/main.js" type="text/javascript"></script>

<style>


#tooltip{
	position:absolute;
	border:1px solid #333;
	background:#333333;
	padding:2px 5px;
	color:#FFFFFF;
	display:none;
    bottom: auto;
    top: -12px;
	border-radius: 3px;
	padding: 3px 6px;
	white-space: nowrap;
	font-size: 11px;
    font-weight: normal;
}

</style>


  <!-- include jQuery -->
<!-- include jQuery -->

  <!-- Include the plug-in -->


</head>
 		<?php
				if($this->session->flashdata('sErrMSG') != '') { ?>
                <div class="errorContainer" id="<?php echo $this->session->flashdata('sErrMSGType'); ?>">
                  <script>setTimeout("hideErrDiv('<?php echo $this->session->flashdata('sErrMSGType'); ?>')", 5000);</script>
                  <p><span> <?php echo $this->session->flashdata('sErrMSG');  ?> </span></p>
                </div>
   		 <?php } ?>
<?php $bodyArr1 = array('category-list','friends','purchase-review','registry','search','edit-product','products');  $bodyArr3 = array('favorites','banner','profile','onboarding'); ?>          
<body <?php if(in_array($this->uri->segment(1),$bodyArr1)){ echo 'class="bodybg"';} if(in_array($this->uri->segment(3),$bodyArr3)){ echo 'class="bodybg"';} ?>>
<header>
        
        	<div class="main">
            
            	<div class="header_top">
                
                	<!-- win ul class="header_topleft">
                    
                    	<li><a title="Sell" href="shop/sell"><?php if($this->lang->line('comm_sell') != '') { echo stripslashes($this->lang->line('comm_sell')); } else echo 'Sell'; ?></a></li>
                        
                       
                        <li ><a title="Registry" href="registry"><?php if($this->lang->line('comm_registry') != '') { echo stripslashes($this->lang->line('comm_registry')); } else echo 'Registry'; ?></a></li> -->
                        
                        <!-- class="reg-popup"-->
                        <!-- win
                        <li class="account_sub2"><a title="Community" href="community"><?php if($this->lang->line('user_community') != '') { echo stripslashes($this->lang->line('user_community')); } else echo 'Community'; ?></a><ul class="community_menu_list">
                        <span class="menuarrow"></span>
                        <li style="padding-top:10px"><a href="community"><?php if($this->lang->line('user_community') != '') { echo stripslashes($this->lang->line('user_community')); } else echo 'Community'; ?></a></li>
                        <li><a href="events"><?php if($this->lang->line('comm_events') != '') { echo stripslashes($this->lang->line('comm_events')); } else echo 'Events'; ?></a></li>
                        <li><a href="teams"><?php if($this->lang->line('user_teams') != '') { echo stripslashes($this->lang->line('user_teams')); } else echo 'Teams'; ?></a></li>
                        </ul></li>
                        <li><a title="Blogs" href="blog"><?php if($this->lang->line('comm_blog') != '') { echo stripslashes($this->lang->line('comm_blog')); } else echo 'Blog'; ?></a></li> --> 
                        
                       <!-- <li><a href="gift-cards">Gift Cards</a></li>--> <!-- win
                        
                    </ul !-->
                    
                    <ul class="header_topright">
                    <?php if(!empty($this->session->userdata['shopsy_session_user_name'])){?>
                    	<li><span><?php if($this->lang->line('comm_hi') != '') { echo stripslashes($this->lang->line('comm_hi')); } else echo 'Hi'; ?>  </span><a href="view-profile/<?php echo $this->session->userdata['shopsy_session_user_name']?>"><span style="color: #0192B5 !important;" id="display_first_name_header"><?php echo $this->session->userdata['shopsy_session_full_name'];?></span></a></li>
                        <?php if($curruserGroup=='Seller'){ ?>
                        <li><a href="shop/sell"><span style="color: #0192B5 !important;" id="display_first_name_header"><?php if($this->lang->line('temp_yourshop') != '') { echo stripslashes($this->lang->line('temp_yourshop')); } else echo 'Your Shop'; ?></span></a></li>
                        <?php } ?>
                        
                        <li class="account_sub"><a  href="settings/my-account/<?php echo $this->session->userdata['shopsy_session_user_name']; ?>"><?php if($this->lang->line('comm_account') != '') { echo stripslashes($this->lang->line('comm_account')); } else echo 'Your Account'; ?></a><ul class="account_menu_list">
                        <span class="menuarrow"></span>
                        <li style="padding-top:15px;"><a href="purchase-review"><?php if($this->lang->line('purchases-review') != '') { echo stripslashes($this->lang->line('purchases-review')); } else echo 'Purchases & Reviews'; ?></a></li>
                        <li><a href="public-profile"><?php if($this->lang->line('user_pub_profile') != '') { echo stripslashes($this->lang->line('user_pub_profile')); } else echo 'Public Profile'; ?></a></li>
                        <li><a href="settings/my-account/<?php echo $this->session->userdata['shopsy_session_user_name']?>"><?php if($this->lang->line('user_settings') != '') { echo stripslashes($this->lang->line('user_settings')); } else echo 'Settings'; ?></a></li>
                        <!--<li><a href="javascript: void(0);">Apps</a></li>
                        <li><a href="prototypes">Prototype</a></li>-->
                        <li><a href="manage-community"><?php if($this->lang->line('comm_community') != '') { echo stripslashes($this->lang->line('comm_community')); } else echo 'Manage Community'; ?></a></li>
                        <?php if($this->session->userdata['FBlogout']==''){ ?>
                        <li><a href="logout"><?php if($this->lang->line('sign_out') != '') { echo stripslashes($this->lang->line('sign_out')); } else echo 'Sign Out'; ?></a></li>
                        <?php }else{ ?>
                        <li><a href="<?php echo $this->session->userdata['FBlogout']; ?>"><?php if($this->lang->line('sign_out') != '') { echo stripslashes($this->lang->line('sign_out')); } else echo 'Sign Out'; ?></a></li>
                        <?php } ?>
                        
                        </ul></li>
                    <?php }else{?>
                    	<!--<li class="reg-popup"><a href="#">Sign In</a></li>-->
                    <?php }?>
                        <!-- li><a title="Help" href="pages/help"><?php if($this->lang->line('comm_help') != '') { echo stripslashes($this->lang->line('comm_help')); } else echo 'Help'; ?></a></li -->
                        
                    </ul>
                    
                
                </div>
                
                <div class="header_bottom">
                
                	<h1><a class="logo" href="<?php echo base_url(); ?>"><img src="images/logo/<?php echo $this->config->item('logo_image'); ?>" alt="<?php echo $this->config->item('email_title'); ?>" title="<?php echo $this->config->item('email_title'); ?>" /></a></h1>
                    
                    <div class="header_nav">
                    
                    	<ul class="header_menu">
                        
                           <?php if(!empty($this->session->userdata['shopsy_session_user_name'])){?>
                           
                        	<li>
                            <a class="tooltip" title="Activity" id="activity" href="activity">
                            <?php if($userActivityCount>0){ ?>
                            	<span class="count"><?php echo $userActivityCount; ?></span>
                            <?php } ?>
                            </a>
                            </li>
                            
                            <!-- win li><a class="tooltip" title="Blog" id="conversations" href="blog"></a></li -->
                            
                            <li><a class="tooltip" title="Favorites" id="favorites" href="people/<?php echo $this->session->userdata['shopsy_session_user_name'];?>/favorites"></a></li>
                               <?php }else{?>
                             <li><a href="register<?php if($this->uri->segment(1)=='cart'){ echo '?action=cart';}?>"> <?php if($this->lang->line('user_register') != '') { echo stripslashes($this->lang->line('user_register')); } else echo 'Register'; ?></a></li>
                             <li><a href="login<?php if($this->uri->segment(1)=='cart'){ echo '?action=cart';}?>"> <?php if($this->lang->line('user_signin') != '') { echo stripslashes($this->lang->line('user_signin')); } else echo 'Sign In'; ?></a></li>
                              <?php }?>
                        
                        </ul>
                        
                        <div class="search_main"> 
                        
                        
                                                     
                                <?php $c_url=current_url();  
								 if($this->uri->segment(1) != ''){
								$lnk=$this->uri->segment(1);
								}
								if($this->uri->segment(2) != ''){
								$lnk.='/'.$this->uri->segment(2);
								} 
								if($this->uri->segment(3) != ''){
								$lnk.='/'.$this->uri->segment(3);
								} 
								if($this->uri->segment(4) != ''){
								$lnk2=$lnk.'/'.$this->uri->segment(4);
								} else { $lnk2=$lnk; } 
								
								if($this->input->get('item') != ''){
								$s_key='item='.$this->input->get('item');;
								}else { $s_key ='';}
								
								if($this->input->get('gift_cards') == 'on'){
								    $s_gift='&gift_cards='.$gift;
								}else { $s_gift ='';}
								
								if($this->input->get('min_price') != ''){
								$minVal=$this->input->get('min_price');
									 $min_price='&min_price='.$this->input->get('min_price');
								} else { $minVal=''; $min_price=''; }
								
								
								if($this->input->get('max_price') != ''){
								$maxVal=$this->input->get('max_price');
									 $max_price='&max_price='.$this->input->get('max_price');
								} else { $maxVal=''; $max_price=''; }  
		                     
							 
								if($this->input->get('location') != ''){
								    $location='&location='.$this->input->get('location');
									$locVal=$this->input->get('location');
								}else { $location =''; $locVal='';}  
							   
							   
							   if($this->input->get('shipto') != ''){
								    $shipto='&shipto='.$this->input->get('shipto');
									$shipVal=$this->input->get('shipto');
								}else { $shipto =''; $shipVal='';} 
							   ?> 
                        
                        
                            <form name="search" action="search/all" method="get">
                        	<input type="text" class="search" name="item" placeholder="<?php if($this->lang->line('temp_srchitems') != '') { echo stripslashes($this->lang->line('temp_srchitems')); } else echo 'Search for items and shops'; ?>" value="<?php if($this->input->get('item') != ''){ echo $this->input->get('item');}?>" id="search_items" autocomplete="off" />
                             <?php if($this->input->get('gift_cards') == 'on'){ ?>
                                    <input type="hidden" name="gift_cards" value="<?php echo $gift;?>" /> <?php  }?>
                                     <?php if($minVal != ''){ ?> 
                                    <input type="hidden" name="min_price" value="<?php echo $minVal;?>" /> <?php  }?>
                                         <?php if($maxVal != ''){ ?>
                                    <input type="hidden" name="max_price" value="<?php echo $maxVal;?>" /> <?php  }?>
                                    <?php if($locVal != ''){ ?>
                                    <input type="hidden" name="location" value="<?php echo $locVal;?>" /> <?php  }?>
                                    <?php if($shipVal != ''){ ?>
                                    <input type="hidden" name="shipto" value="<?php echo $shipVal;?>" /> <?php  }?>
                            <input type="submit" class="search_btn" value="Search" />
                            <div id="sugglist"></div>
                            </form>
                        </div>
                        
                    </div>
                    
                    <div class="cart">
                    	
                        <a class="tooltip" title="<?php if($this->lang->line('cart_urshopcart') != '') { echo stripslashes($this->lang->line('cart_urshopcart')); } else echo 'Your Shopping Cart'; ?>" href="cart">
                        	<span id="CartCount"><?php echo $MiniCartViewSet; ?></span>
                            <strong><?php if($this->lang->line('comm_cart') != '') { echo stripslashes($this->lang->line('comm_cart')); } else echo 'Cart'; ?></strong>
                        </a>
                        
                        
                    </div>
                
                </div>
            <?php if($loginCheck!=''){ 
					if($this->session->userdata['shopsy_session_user_confirm'] == 'No') { 
	 				 $this->load->view('site/templates/mail_confirmation');
			   }}?> 
            </div>
        
        
        </header>
        
       