<?php
	include("config.php");
	error_reporting(0);
	include("include/functions.php");
	
	if($_REQUEST['command']=='add' && $_REQUEST['productid']>0){
		$pid=$_REQUEST['productid'];
		addtocart($pid,1);
		?><script>window.location="shoppingcart.php";</script><?
		exit();
	}
?>
 <?php 
 	$id=$_REQUEST['id'];
	$select="select * from products where serial='$id'";
	$result=mysql_query($select);
	$row = mysql_fetch_array($result);
	$sub=$row['sub_category'];
	$sub_sub_catvel=$row['sub_sub_cat'];
	$quantity=$row['quantity'];
	?>
<script language="javascript">
	function addtocart(pid){
		document.form1.productid.value=pid;

		document.form1.command.value='add';
		document.form1.submit();
	}
</script>
<form name="form1">
	<input type="hidden" name="productid" />
    <input type="hidden" name="productimage" />
    <input type="hidden" name="command" />
</form>
<script language="javascript">
	function del(pid){
		if(confirm('Do you really mean to delete this item')){
			document.form1.pid.value=pid;
			document.form1.command.value='delete';
			document.form1.submit();
		}
	}
	function clear_cart(){
		if(confirm('This will empty your shopping cart, continue?')){
			document.form1.command.value='clear';
			document.form1.submit();
		}
	}
	function update_cart(){
		document.form1.command.value='update';
		document.form1.submit();
	}
</script>
<!DOCTYPE HTML>
<html>
	<head>
		<title><?php echo $tittle;?></title>
		<link href="css/style.css" rel='stylesheet' type='text/css' />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<script type="application/x-javascript">
		addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
		</script>
		<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>
		<script src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/jquery.easy-ticker.js"></script>
		<script type="text/javascript">
		$(document).ready(function(){
			$('#demo').hide();
			$('.vticker').easyTicker();
		});
		</script>
		<link href="css/megamenu.css" rel="stylesheet" type="text/css" media="all" />
		<script type="text/javascript" src="js/megamenu.js"></script>
		<script>$(document).ready(function(){$(".megamenu").megamenu();});</script>
		<script src="js/menu_jquery.js"></script>
		<link rel="stylesheet" href="css/slippry.css">
		<script src="js/jquery-ui.js" type="text/javascript"></script>
		<script src="js/scripts-f0e4e0c2.js" type="text/javascript"></script>
		<script>
			  jQuery('#jquery-demo').slippry({
			  slippryWrapper: '<div class="sy-box jquery-demo" />', // wrapper to wrap everything, including pager
			  adaptiveHeight: false, // height of the sliders adapts to current slide
			  useCSS: false, // true, false -> fallback to js if no browser support
			  autoHover: false,
			  transition: 'fade'
			});
		</script>
		<script type="text/javascript" src="js/jquery-ui.min.js"></script>
		<link rel="stylesheet" type="text/css" href="css/jquery-ui.css">
		<script type='text/javascript'>//<![CDATA[ 
			$(window).load(function(){
			 $( "#slider-range" ).slider({
			            range: true,
			            min: 0,
			            max: 500,
			            values: [ 100, 400 ],
			            slide: function( event, ui ) {  $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
			            }
			 });
			$( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + " - $" + $( "#slider-range" ).slider( "values", 1 ) );
			
			});//]]>  
		</script>
		<script type="text/javascript" src="js/move-top.js"></script>
		<script type="text/javascript" src="js/easing.js"></script>
		<script type="text/javascript">
			jQuery(document).ready(function($) {
				$(".scroll").click(function(event){		
					event.preventDefault();
					$('html,body').animate({scrollTop:$(this.hash).offset().top},1200);
				});
			});
		</script>
	</head>
	<body>
			<?php include("include/header.php"); ?>
		<div class="content details-page">
			<div class="product-details">
				<div class="wrap">
					<ul class="product-head">
						<li class="active-page">Product Details&nbsp;/&nbsp;<?php echo $row['name'];?></li>
						<div class="clear"> </div>
					</ul>
					<link rel="stylesheet" href="css/etalage.css">
					<script src="js/jquery.etalage.min.js"></script>
				<script>
						jQuery(document).ready(function($){
							$('#etalage').etalage({
								thumb_image_width: 300,
								thumb_image_height: 400,
								source_image_width: 900,
								source_image_height: 1000,
								show_hint: true,
								click_callback: function(image_anchor, instance_id){
			alert('Callback example:\nYou clicked on an image with the anchor: "'+image_anchor+'"\n(in Etalage instance: "'+instance_id+'")');
								}});
							$('.dropdownlist').change(function(){
								etalage_show( $(this).find('option:selected').attr('class') );
							});});
				</script>
                
   <!--<script type="text/javascript">
function showstate(str)
{
	var cat=document.getElementById("cat").value;
	var sub=document.getElementById("sub").value;
	
if (str=="")
{
document.getElementById("txtHint").innerHTML="";

return;
}
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHintstate").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","loadData.php?q="+str+"&cat="+cat+"&sub="+sub,true);
xmlhttp.send();
}
function showcity(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHintcity").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","city_ajax.php?q="+str,true);
xmlhttp.send();
}
</script>-->               
                
                
                
                
				<div class="details-left">
					<div class="details-left-slider" style="margin-right:10px;">
                   
					   <!-- <ul id="etalage">
                        <li>
								<img class="etalage_source_image" src="CryoM@dmin/<?php echo $row['small_jpg'];?>"/>
                               
							</li>
						</ul>-->
                         <img src="CryoM@dmin/<?php echo $row['small_jpg'];?>" style="width:100%;border:1px groove #CCC;border-radius:10px"/>
					</div>
					<div class="details-left-info">
						<div class="details-right-head">
						<h1><?php echo $row['name'];?></h1>
						<ul class="pro-rate">
							<li><a class="product-rate" href="#"> <label> </label></a> <span> </span></li>
						</ul>
<p class="product-detail-info"><?php echo $cat=$row['category'];?></p><input type="hidden" name="cat" value="<?php echo $cat=$row['category'];?>" id="cat">
                        
                        <!--<p class="product-detail-info"><?php echo $sub;?>&nbsp;/&nbsp;<? echo $sub_sub_catvel; ?></p><input type="hidden" name="sub" value="<?php echo $sub;?>" id="sub">-->
                        
						<h3><?php echo $row['description'];?></h3>
                        
						<div class="product-more-details">
                        <table width="90%" style="line-height:50px;">
                        <tr>
                        <td><label style="color:#000;font-weight:bold;background:#090;padding:10px;color:#FFF;"><?php echo $corrrency; ?>&nbsp;<?php echo  $row['price']; ?></label></td>
                        <td><?php if($quantity<=0){?>
								<div style="color:#F00;">Out of stock</div>
                                <?php } else { ?>
                                <div>In stock Qty :<?php echo $quantity;?></div>
                                <?php } ?></td>
                        </tr>
                        <tr>
                        <td> <?
								$sel_shippingcost=mysql_query("select * from `picture` where `id`='9'");
                                $arrayshippingcost=mysql_fetch_array($sel_shippingcost);?>
                                <div>Shipping Cost&nbsp;(Per Qty)&nbsp;:&nbsp;<span style="font-size:20px;"><?php echo $corrrency; ?>&nbsp;<? echo $arrayshippingcost['image']; ?></span></div></td>
                        <td></td>
                        </tr>
                        </table>
								<div class="clear"> </div>
							<!--<ul class="product-colors">
								<h3>available Colors ::</h3>
								<li><a class="color1" href="#"><span> </span></a></li>
								<li><a class="color2" href="#"><span> </span></a></li>
								<li><a class="color3" href="#"><span> </span></a></li>
								<li><a class="color4" href="#"><span> </span></a></li>
								<li><a class="color5" href="#"><span> </span></a></li>
								<li><a class="color6" href="#"><span> </span></a></li>
								<li><a class="color7" href="#"><span> </span></a></li>
								<li><a class="color8" href="#"><span> </span></a></li>
								<div class="clear"> </div>
							</ul>-->
							<!--<ul class="prosuct-qty">
								<span>Quantity:</span>
								<select>
									<option>1</option>
									<option>2</option>
									<option>3</option>
									<option>4</option>
									<option>5</option>
									<option>6</option>
								</select>
							</ul>-->

                            
                            <input type="hidden" value="<? echo $sub_sub_catvel; ?>" name="sub_sub_cat">
                            
                           <?php /*?><select style="width:200px;" name="" onChange="showstate(this.value)">
                           <option value="<?php echo $row['sub_sub_cat'];?>"><?php echo $row['sub_sub_cat'];?></option>
                           <?php
						   $set=mysql_query("select * from sub_sub_category where cat='$cat' and sub_cat='$sub'");
						   while($fet=mysql_fetch_array($set))
						   {
						   ?>
                           <option value="<?php echo $fet['sub_sub_cat'];?>"><?php echo $fet['sub_sub_cat'];?></option>
                           <?php } ?>
                           </select><?php */?>
                           
                           
                            <div id="txtHintstate"> <?php 
							 $quantity=$row['quantity'];
							 if($quantity<=0)
							 {
							 ?>
							 <a href="#" onclick="return confirm('Out Of Stock')"><img src="images/Shop-Now-button.png" width="150" title="Shop Now"/></a>
                             <?php } else { ?>  
                             <a href="#" onclick="addtocart(<?php echo $id; ?>)"><img src="images/Shop-Now-button.png" width="150" title="Shop Now"/></a>
                             <?php } ?>  
                             </div>
							<ul class="product-share">
								<h3>Product ID : <?php echo $row['product_id'];?></h3><br>
                                
                                <h3>Also Share On</h3>
								<ul>
									<li><a class="share-face" href="#"><span> </span> </a></li>
									<li><a class="share-twitter" href="#"><span> </span> </a></li>
									<li><a class="share-google" href="#"><span> </span> </a></li>
									<li><a class="share-rss" href="#"><span> </span> </a></li>
									<div class="clear"> </div>
								</ul>
							</ul>
						</div>
					</div>
					</div>
					<div class="clear"> </div>
				</div>
				<div class="details-right">
					<!--<a href="#">SEE MORE</a>-->
				</div>
				<div class="clear"> </div>
			</div>
			<!----product-rewies---->
			<div class="product-reviwes">
				<div class="wrap">
				<!--vertical Tabs-script-->
				<!---responsive-tabs---->
					<script src="js/easyResponsiveTabs.js" type="text/javascript"></script>
					<script type="text/javascript">
						$(document).ready(function () {
							 $('#horizontalTab').easyResponsiveTabs({
									type: 'default', //Types: default, vertical, accordion           
									width: 'auto', //auto or any width like 600px
									fit: true,   // 100% fit in a container
									closed: 'accordion', // Start closed if in accordion view
									activate: function(event) { // Callback function if tab is switched
									var $tab = $(this);
									var $info = $('#tabInfo');
									var $name = $('span', $info);
										$name.text($tab.text());
										$info.show();
									}
								});
													
							 $('#verticalTab').easyResponsiveTabs({
									type: 'vertical',
									width: 'auto',
									fit: true
								 });
						 });
					</script>
				<!---//responsive-tabs---->
				<!--//vertical Tabs-script-->
				<!--vertical Tabs-->
        		<div id="verticalTab">
		           
		            <div class="resp-tabs-container vertical-tabs" id="dettt">
		                <div>
		                	<h3> Details</h3>
		                    <p><?php echo $row['details'];?></p>
		                </div>
		            </div>
       		</div>
       		<div class="clear"> </div>
       		<!--- start-similar-products--->
       		<div class="similar-products">
       			
       			<div class="similar-products-right">
       				<!-- start content_slider -->
       				<!--- start-rate---->
							<script src="js/jstarbox.js"></script>
							<link rel="stylesheet" href="css/jstarbox.css" type="text/css" media="screen" charset="utf-8" />
							<script type="text/javascript">
								jQuery(function() {
									jQuery('.starbox').each(function() {
										var starbox = jQuery(this);
										starbox.starbox({
											average: starbox.attr('data-start-value'),
											changeable: starbox.hasClass('unchangeable') ? false : starbox.hasClass('clickonce') ? 'once' : true,
											ghosting: starbox.hasClass('ghosting'),
											autoUpdateAverage: starbox.hasClass('autoupdate'),
											buttons: starbox.hasClass('smooth') ? false : starbox.attr('data-button-count') || 5,
											stars: starbox.attr('data-star-count') || 5
										}).bind('starbox-value-changed', function(event, value) {
											if(starbox.hasClass('random')) {
												var val = Math.random();
												starbox.next().text(' '+val);
												return val;
											} 
										})
									});
								});
							</script>
							<!---//End-rate---->
					       <!--<div id="owl-demo" class="owl-carousel">
                           <?php 
		$qur="select * from products where sub_category='$subcat' limit 3"; 

		$result = mysql_query($qur);
		while ($row_section = mysql_fetch_array($result)) 
			{
				
				$id= $row_section['serial'];
				$small_jpg= $row_section['small_jpg'];
				 $name= $row_section['name'];
	             $description=$row_section['description'];
                 $price= $row_section['price'];
				 $proid= $row_section['product_id'];
				 		
			  ?>
                           
				                <div class="item" onclick="location.href='details.php?id=<?php echo $id;?>';">
				                	<div class="product-grid fade sproduct-grid">
										<div class="product-pic">
											<a href="#"><img src="CryoM@dmin/<?php echo $small_jpg; ?>" title="product-name" width="300" height="200" /></a>
											<p>
											<a href="#"><?=$name;?></a>
											<span><?=$description;?></span>
											</p>
										</div>
										<div class="product-info">
											<div class="product-info-cust">
												<a href="details.php?id=<?php echo $id; ?>" class="details">Details</a>
											</div>
											<div class="product-info-price">
												<a href="#">Rs. <?=$price;?></a>
											</div>
											<div class="clear"> </div>
										</div>
										<div class="more-product-info">
											<span> </span>
										</div>
									</div>
				                </div>
                              
				             <?php } ?>  
				              
			              </div>-->
				<!----//End-img-cursual---->
       			</div>
       			<div class="clear"> </div>
       		</div>
       		<!--- //End-similar-products--->
			</div>
			</div>
			<div class="clear"> </div>
			<!--//vertical Tabs-->
			<!----//product-rewies---->
			<!---//End-product-details--->
			</div>
		</div>
		<!---- start-bottom-grids---->
<?php include("include/footer.php"); ?>
		
<style>
@media (min-width :800px) {
#dettt{ margin-top:-170px;}	
	
}

</style>      
        
        
        
        
        