<?php echo $header; ?> 
<script type="text/javascript" src="catalog/view/theme/teez/js/cycle.js"></script>
<!-- <script type="text/javascript" src="catalog/view/theme/teez/js/uniform.js"></script> -->
<script type="text/javascript" src="catalog/view/theme/teez/js/custom.js"></script>
<link href="catalog/view/theme/default/template/product/css/previousnext.css" rel="stylesheet" type="text/css"></link>
<script type="text/javascript" src="catalog/view/theme/default/template/product/js/previousnext.js"></script>


        <script language="javascript" type="text/javascript">
            $(function() {
                $("#previousnext_slideshow").previousnext_slideshow({
                    slideshow_time_interval: '2000000',
//                    slideshow_window_background_color: "#ccc",
//                    slideshow_window_padding: '1',
//                    slideshow_window_border_size: '1',
                    	slideshow_window_border_color: '#FFFFFF',
//                    slideshow_button_style: '1',
                    directory: 'images'
                });
            });
        </script>
		
        <script language="javascript" type="text/javascript">
           (function(a){a.uniform={options:{selectClass:"selector",radioClass:"radio",checkboxClass:"checker",fileClass:"uploader",filenameClass:"filename",fileBtnClass:"action",fileDefaultText:"No file selected",fileBtnText:"Choose File",checkedClass:"checked",focusClass:"focus",disabledClass:"disabled",buttonClass:"button",activeClass:"active",hoverClass:"hover",useID:true,idPrefix:"uniform",resetSelector:false,autoHide:true},elements:[]};if(a.browser.msie&&a.browser.version<7){a.support.selectOpacity=false}else{a.support.selectOpacity=true}a.fn.uniform=function(k){k=a.extend(a.uniform.options,k);var d=this;if(k.resetSelector!=false){a(k.resetSelector).mouseup(function(){function l(){a.uniform.update(d)}setTimeout(l,10)})}function j(l){$el=a(l);$el.addClass($el.attr("type"));b(l)}function g(l){a(l).addClass("uniform");b(l)}function i(o){var m=a(o);var p=a("<div>"),l=a("<span>");p.addClass(k.buttonClass);if(k.useID&&m.attr("id")!=""){p.attr("id",k.idPrefix+"-"+m.attr("id"))}var n;if(m.is("a")||m.is("button")){n=m.text()}else{if(m.is(":submit")||m.is(":reset")||m.is("input[type=button]")){n=m.attr("value")}}n=n==""?m.is(":reset")?"Reset":"Submit":n;l.html(n);m.css("opacity",0);m.wrap(p);m.wrap(l);p=m.closest("div");l=m.closest("span");if(m.is(":disabled")){p.addClass(k.disabledClass)}p.bind({"mouseenter.uniform":function(){p.addClass(k.hoverClass)},"mouseleave.uniform":function(){p.removeClass(k.hoverClass);p.removeClass(k.activeClass)},"mousedown.uniform touchbegin.uniform":function(){p.addClass(k.activeClass)},"mouseup.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"click.uniform touchend.uniform":function(r){if(a(r.target).is("span")||a(r.target).is("div")){if(o[0].dispatchEvent){var q=document.createEvent("MouseEvents");q.initEvent("click",true,true);o[0].dispatchEvent(q)}else{o[0].click()}}}});o.bind({"focus.uniform":function(){p.addClass(k.focusClass)},"blur.uniform":function(){p.removeClass(k.focusClass)}});a.uniform.noSelect(p);b(o)}function e(o){var m=a(o);var p=a("<div />"),l=a("<span />");if(!m.css("display")=="none"&&k.autoHide){p.hide()}p.addClass(k.selectClass);if(k.useID&&o.attr("id")!=""){p.attr("id",k.idPrefix+"-"+o.attr("id"))}var n=o.find(":selected:first");if(n.length==0){n=o.find("option:first")}l.html(n.html());o.css("opacity",0);o.wrap(p);o.before(l);p=o.parent("div");l=o.siblings("span");o.bind({"change.uniform":function(){l.text(o.find(":selected").html());p.removeClass(k.activeClass)},"focus.uniform":function(){p.addClass(k.focusClass)},"blur.uniform":function(){p.removeClass(k.focusClass);p.removeClass(k.activeClass)},"mousedown.uniform touchbegin.uniform":function(){p.addClass(k.activeClass)},"mouseup.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"click.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"mouseenter.uniform":function(){p.addClass(k.hoverClass)},"mouseleave.uniform":function(){p.removeClass(k.hoverClass);p.removeClass(k.activeClass)},"keyup.uniform":function(){l.text(o.find(":selected").html())}});if(a(o).attr("disabled")){p.addClass(k.disabledClass)}a.uniform.noSelect(l);b(o)}function f(n){var m=a(n);var o=a("<div />"),l=a("<span />");if(!m.css("display")=="none"&&k.autoHide){o.hide()}o.addClass(k.checkboxClass);if(k.useID&&n.attr("id")!=""){o.attr("id",k.idPrefix+"-"+n.attr("id"))}a(n).wrap(o);a(n).wrap(l);l=n.parent();o=l.parent();a(n).css("opacity",0).bind({"focus.uniform":function(){o.addClass(k.focusClass)},"blur.uniform":function(){o.removeClass(k.focusClass)},"click.uniform touchend.uniform":function(){if(!a(n).attr("checked")){l.removeClass(k.checkedClass)}else{l.addClass(k.checkedClass)}},"mousedown.uniform touchbegin.uniform":function(){o.addClass(k.activeClass)},"mouseup.uniform touchend.uniform":function(){o.removeClass(k.activeClass)},"mouseenter.uniform":function(){o.addClass(k.hoverClass)},"mouseleave.uniform":function(){o.removeClass(k.hoverClass);o.removeClass(k.activeClass)}});if(a(n).attr("checked")){l.addClass(k.checkedClass)}if(a(n).attr("disabled")){o.addClass(k.disabledClass)}b(n)}function c(n){var m=a(n);var o=a("<div />"),l=a("<span />");if(!m.css("display")=="none"&&k.autoHide){o.hide()}o.addClass(k.radioClass);if(k.useID&&n.attr("id")!=""){o.attr("id",k.idPrefix+"-"+n.attr("id"))}a(n).wrap(o);a(n).wrap(l);l=n.parent();o=l.parent();a(n).css("opacity",0).bind({"focus.uniform":function(){o.addClass(k.focusClass)},"blur.uniform":function(){o.removeClass(k.focusClass)},"click.uniform touchend.uniform":function(){if(!a(n).attr("checked")){l.removeClass(k.checkedClass)}else{var p=k.radioClass.split(" ")[0];a("."+p+" span."+k.checkedClass+":has([name='"+a(n).attr("name")+"'])").removeClass(k.checkedClass);l.addClass(k.checkedClass)}},"mousedown.uniform touchend.uniform":function(){if(!a(n).is(":disabled")){o.addClass(k.activeClass)}},"mouseup.uniform touchbegin.uniform":function(){o.removeClass(k.activeClass)},"mouseenter.uniform touchend.uniform":function(){o.addClass(k.hoverClass)},"mouseleave.uniform":function(){o.removeClass(k.hoverClass);o.removeClass(k.activeClass)}});if(a(n).attr("checked")){l.addClass(k.checkedClass)}if(a(n).attr("disabled")){o.addClass(k.disabledClass)}b(n)}function h(q){var o=a(q);var r=a("<div />"),p=a("<span>"+k.fileDefaultText+"</span>"),m=a("<span>"+k.fileBtnText+"</span>");if(!o.css("display")=="none"&&k.autoHide){r.hide()}r.addClass(k.fileClass);p.addClass(k.filenameClass);m.addClass(k.fileBtnClass);if(k.useID&&o.attr("id")!=""){r.attr("id",k.idPrefix+"-"+o.attr("id"))}o.wrap(r);o.after(m);o.after(p);r=o.closest("div");p=o.siblings("."+k.filenameClass);m=o.siblings("."+k.fileBtnClass);if(!o.attr("size")){var l=r.width();o.attr("size",l/10)}var n=function(){var s=o.val();if(s===""){s=k.fileDefaultText}else{s=s.split(/[\/\\]+/);s=s[(s.length-1)]}p.text(s)};n();o.css("opacity",0).bind({"focus.uniform":function(){r.addClass(k.focusClass)},"blur.uniform":function(){r.removeClass(k.focusClass)},"mousedown.uniform":function(){if(!a(q).is(":disabled")){r.addClass(k.activeClass)}},"mouseup.uniform":function(){r.removeClass(k.activeClass)},"mouseenter.uniform":function(){r.addClass(k.hoverClass)},"mouseleave.uniform":function(){r.removeClass(k.hoverClass);r.removeClass(k.activeClass)}});if(a.browser.msie){o.bind("click.uniform.ie7",function(){setTimeout(n,0)})}else{o.bind("change.uniform",n)}if(o.attr("disabled")){r.addClass(k.disabledClass)}a.uniform.noSelect(p);a.uniform.noSelect(m);b(q)}a.uniform.restore=function(l){if(l==undefined){l=a(a.uniform.elements)}a(l).each(function(){if(a(this).is(":checkbox")){a(this).unwrap().unwrap()}else{if(a(this).is("select")){a(this).siblings("span").remove();a(this).unwrap()}else{if(a(this).is(":radio")){a(this).unwrap().unwrap()}else{if(a(this).is(":file")){a(this).siblings("span").remove();a(this).unwrap()}else{if(a(this).is("button, :submit, :reset, a, input[type='button']")){a(this).unwrap().unwrap()}}}}}a(this).unbind(".uniform");a(this).css("opacity","1");var m=a.inArray(a(l),a.uniform.elements);a.uniform.elements.splice(m,1)})};function b(l){l=a(l).get();if(l.length>1){a.each(l,function(m,n){a.uniform.elements.push(n)})}else{a.uniform.elements.push(l)}}a.uniform.noSelect=function(l){function m(){return false}a(l).each(function(){this.onselectstart=this.ondragstart=m;a(this).mousedown(m).css({MozUserSelect:"none"})})};a.uniform.update=function(l){if(l==undefined){l=a(a.uniform.elements)}l=a(l);l.each(function(){var n=a(this);if(n.is("select")){var m=n.siblings("span");var p=n.parent("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.html(n.find(":selected").html());if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":checkbox")){var m=n.closest("span");var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.removeClass(k.checkedClass);if(n.is(":checked")){m.addClass(k.checkedClass)}if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":radio")){var m=n.closest("span");var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.removeClass(k.checkedClass);if(n.is(":checked")){m.addClass(k.checkedClass)}if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":file")){var p=n.parent("div");var o=n.siblings(k.filenameClass);btnTag=n.siblings(k.fileBtnClass);p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);o.text(n.val());if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":submit")||n.is(":reset")||n.is("button")||n.is("a")||l.is("input[type=button]")){var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}}}}}})};return this.each(function(){if(a.support.selectOpacity){var l=a(this);if(l.is("select")){if(l.attr("multiple")!=true){if(l.attr("size")==undefined||l.attr("size")<=1){e(l)}}}else{if(l.is(":checkbox")){f(l)}else{if(l.is(":radio")){c(l)}else{if(l.is(":file")){h(l)}else{if(l.is(":text, :password, input[type='email']")){j(l)}else{if(l.is("textarea")){g(l)}else{if(l.is("a")||l.is(":submit")||l.is(":reset")||l.is("button")||l.is("input[type=button]")){i(l)}}}}}}}}})}})(jQuery);
        </script>
		
		
		
		
<?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
 <!-- <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div> -->
  
  <div class="product-info">
  <h1 style="border-bottom: 1px solid gray;"><?php echo $heading_title; ?></h1>
  
  <!--
  <?php if ($price) { ?>
		<div class="price" style="text-align: end;margin-right: 285px;margin-bottom: 15px;">
		<?php //echo $text_price; ?>
      	<?php if (!$special) { ?>
        		<?php echo $price; ?>
        <?php } else { ?>
      	  <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
        <?php } ?>
        <br />
        <?php if ($tax) { ?>
        <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br />
        <?php } ?>  
        <?php if ($points) { ?>
        <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span> <br />
        <?php } ?>
        <?php if ($discounts) { ?>
        <br />
        <div class="discount">
          <?php foreach ($discounts as $discount) { ?>
          <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
          <?php } ?>
        </div>
        <?php } ?>
      </div>
  <?php } ?>
  
  -->
  
  	<div class="price" style="margin-left:530px;margin-bottom: 15px;">	
    	<div id="newprice"><?php echo   substr($price,0,-3); ?>	</div>
    	<div id="newproductprice" value=''></div>
    	<div id="newproductimage" value=''></div>
    	<div id="optionname" value="<?php //echo $prdoptionname ; ?>"></div>

	</div>
    <!--
  <?php if ($images) : //Product Thumbnails ?>
    <div class="thumbs">
    	<?php if(count($images) > 4): ?>
            <ul class="thumbBtns">
                <li><a href="javascript:void(0);" class="up">up</a></li>
                <li><a href="javascript:void(0);" class="down">down</a></li>
            </ul>
    	<?php endif; ?>
        <div class="thumbWrap">
                <?php $i=0; foreach ($images as $image) : ?>
					<?php $i++; ?>
                    <div><a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="fancybox" rel="fancybox">
						<img id="<?php echo "relImage". $i ; ?>" src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" /></a>
					</div>
                <?php endforeach; ?>
        </div>
    </div>
    <?php endif; ?>
    -->
    <?php if ($thumb || $images) { ?>
    <div class="left">
      <?php if ($thumb) { ?>
        <div id="previousnext_slideshow" class="image previousnext_slideshow"><ul><li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" style="z-index:0" class="cloud-zoom" id='zoom1' rel="adjustX: 4, adjustY:-4, zoomHeight:200, tint:'#000000',tintOpacity:0.2, zoomWidth:200">
			<img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image1"/></a></li>
			 	<li><a href="#" title="#"><img src="<?php echo 'http://www.tresorjewellery.com.au/image/' . str_replace(".png.jpg", "1.png.jpg",$realImage); ?>" alt="image2" id="image2"  /></a></li>
                <li><a href="#" title="#"><img src="<?php echo 'http://www.tresorjewellery.com.au/image/' . str_replace(".png.jpg", "3.png.jpg",$realImage); ?>" alt="image3" id="image3"  /></a></li>
                <li><a href="#" title="#"><img src="<?php echo 'http://www.tresorjewellery.com.au/image/' . str_replace(".png.jpg", "4.png.jpg",$realImage); ?>" alt="image4" id="image4"  /></a></li>
                <li><a href="#" title="#"><img src="<?php echo 'http://www.tresorjewellery.com.au/image/' . str_replace(".png.jpg", "5.png.jpg",$realImage); ?>" alt="image5" id="image5"  /></a></li>
                <li><a href="#" title="#"><img src="<?php echo 'http://www.tresorjewellery.com.au/image/' . str_replace(".png.jpg", "2.png.jpg",$realImage); ?>" alt="image6" id="image6"  /></a></li>
                <li><a href="#" title="#"><img src="<?php echo 'http://www.tresorjewellery.com.au/image/' . str_replace(".png.jpg", "1.png.jpg",$realImage); ?>" alt="image7" id="image7"  /></a></li>
			</ul>
			<ul class="slideshow_nav"><li class="slideshow_nav_previous"></li><li class="slideshow_nav_next"></li></ul>
		</div>
      <?php } ?>
	  </div>

    <?php } ?>
    <div class="right">
      <!--<div class="description">
        <?php if ($manufacturer) { ?>
        <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br />
        <?php } ?>
        <span><?php echo $text_model; ?></span> <?php echo $model; ?><br />
        <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br />
        <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div
      <?php if ($price) { ?>
      <div class="price"><?php echo $text_price; ?>
        <?php if (!$special) { ?>
        <?php echo $price; ?>
        <?php } else { ?>
        <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
        <?php } ?>
        <br />
        <?php if ($tax) { ?>
        <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br />
        <?php } ?>
        <?php if ($points) { ?>
        <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span> <br />
        <?php } ?>
        <?php if ($discounts) { ?>
        <br />
        <div class="discount">
          <?php foreach ($discounts as $discount) { ?>
          <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
          <?php } ?>
        </div>
        <?php } ?>
      </div>
      <?php } ?> -->
		
	  
    <div style="margin-left: 270px;margin-top: -45px !important; border: 0px solid #BBBBBB;min-height: 32px;width:244px">
	
		 <?php if ($metals or $gemstones )   { ?>
		 	
		 <a class="hide1">Customize</a>
		 <a class="hide1" style="display: none" id="donehide">Done Customizing</a>
         <?php } ?>
		
	
	
	<div  id="tab1">
	  <div id="accordion1" style="margin-top: 11px;display: none; "class="hide" >
		<?php foreach ($metals as $metal) { ?>
		<h3><a href="#"><?php echo ($metal['metal']==1?'Primary Metal':'Other Metals'); ?></a><img id="metalImage<?php echo $metal['metal']; ?>"  class="boxside" src="<?php echo 'image/'.$metal['metalBoxImage']; ?>" /></h3>
		<div>				
			<div class="boxnew" id="metalinfobox<?php echo $metal['metal']; ?>">
				<!-- <span class="short-body"><strong><?php echo $text_birthstone; ?></strong> <br><?php echo $text_anniversary; ?></span>  -->
                <?php echo $metal['metalBoxContent']; ?>

			</div>		
			<?php foreach ($metal['metal_available'] as $metal_available) { ?>
				<a class="image-change" style="margin-right: 10px; margin-bottom:10px;text-decoration: none;">	
					<img height="32" width="26" class="newimm" src="<?php echo 'image/'.$metal_available['image']; ?>" alt="<?php echo 'image/'.$metal_available['metal_image']; ?>" id="<?php echo 'M-'.$metal['metal'].'-'.$metal_available['product_metalavail_id'] ; ?>"   longdesc="<?php echo  htmlspecialchars($metal_available['imgdescription']); ?>" title="<?php echo $metal_available['metalName']; ?>"  data-2="M"  data-1="<?php echo $metal_available['metalDescContent']; ?>"  lang="<?php echo $metal['metal']; ?>" />
					
				</a>
			<?php } ?>		
		
	<h3 style="margin-left: 90px; width: 105px;margin-top: 20px;height: 28px; background: none repeat scroll 0 0 #5EB1D9;border: 1px solid;border-radius:0px;"><a href="#" style="margin-top:-2px;color:white;margin-left:-2px;font-size: 14px;">Continue</a></h3>
		
		</div>
		<?php } ?>
		<?php foreach ($gemstones as $gemstone) { ?>
		<h3><a href="#"><?php echo ($gemstone['gem']==1?'Center Gemstone':'Accent Gemstone ' . ($gemstone['gem']-1) ); ?></a><img id="gemImage<?php echo $gemstone['gem']; ?>"  height="20" width="20"  class="boxside" src="<?php echo 'image/'.$gemstone['gemBoxImage']; ?>" /></h3>
		<div>
			<div class="boxnew"  id="geminfobox<?php echo $gemstone['gem']; ?>">
				<!--<div class="short-title"><?php echo $text_amethyst; ?></div>
				<span class="short-body"><strong><?php echo $text_birthstone; ?></strong> February<br><strong><?php echo $text_anniversary; ?></strong> 6th</span>
                -->
                <?php echo $gemstone['gemBoxContent']; ?>
			</div>
			<?php foreach ($gemstone['gemstone_available'] as $gemstone_available) { ?>
				<a class="image-change" style="margin-right: 10px; margin-bottom:10px;text-decoration: none;">
                    <img height="32" width="32" class="newimm" src="<?php echo 'image/'.$gemstone_available['image1']; ?>" alt="<?php echo 'image/'.$gemstone_available['image']; ?>"  data-2="G" data-1="<?php echo $gemstone_available['gemDescContent']; ?>" id="<?php echo 'G-'.$gemstone['gem'].'-'.$gemstone_available['product_gemavail_id'] ; ?>" longdesc="<?php echo  htmlspecialchars($gemstone_available['imgdescription']); ?>" title="<?php echo $gemstone_available['gemName']; ?>"  lang="<?php echo $gemstone['gem']; ?>" /> 
				</a>
			<?php } ?>      
            <h3 style="margin-left: 90px; width: 105px;margin-top: 20px;height: 28px; background: none repeat scroll 0 0 #5EB1D9;border: 1px solid;border-radius:0px;"><a href="#" style="margin-top:-2px;color:white;margin-left:-2px;font-size: 14px;">Continue</a></h3>
		</div>
		<?php } ?>
	  </div>
	</div>
	</div>
	  <?php if ($options) { ?>
      <div class="options">
        <h2><?php echo $text_option; ?></h2>
        <br />
        <?php foreach ($options as $option) { ?>
        <?php if ($option['type'] == 'select') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <select name="option[<?php echo $option['product_option_id']; ?>]">
            <option value=""><?php echo $text_select; ?></option>
            <?php foreach ($option['option_value'] as $option_value) { ?>
            <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
            </option>
            <?php } ?>
          </select>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'radio') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <?php foreach ($option['option_value'] as $option_value) { ?>
          <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
          <br />
          <?php } ?>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'checkbox') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <?php foreach ($option['option_value'] as $option_value) { ?>
          <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
          <br />
          <?php } ?>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'image') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
            <table class="option-image">
              <?php foreach ($option['option_value'] as $option_value) { ?>
              <tr>
                <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td>
                <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td>
                <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
                    <?php if ($option_value['price']) { ?>
                    (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
                    <?php } ?>
                  </label></td>
              </tr>
              <?php } ?>
            </table>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'text') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'textarea') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'file') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <a id="button-option-<?php echo $option['product_option_id']; ?>" class="button"><span><?php echo $button_upload; ?></span></a>
          <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'date') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'datetime') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'time') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" />
        </div>
        <br />
        <?php } ?>
        <?php } ?>
      </div>
      <?php } ?>
	  
	  
      <div style="margin-left: 270px;margin-top: 17px; ">
        <div><!--<?php echo $text_qty; ?>
          <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />-->
          <input type="hidden" name="quantity" size="2" value="<?php echo $minimum; ?>" />
          <input type="hidden" name="product_id" id="product_id" size="12" value="<?php echo $product_id; ?>" />
          &nbsp;<a id="button-cart" class="button1"><img src="catalog/view/theme/default/image/addtocart.png"/></a></div><br>
       <!-- <div><span>&nbsp;&nbsp;&nbsp;<?php echo $text_or; ?>&nbsp;&nbsp;&nbsp;</span></div><br>-->
        <div><a id="button-cart" class="button1" onclick="addToWishList('<?php echo $product_id; ?>');" ><img src="catalog/view/theme/default/image/addtowishlist.png"/></a></div>
        <?php if ($minimum > 1) { ?>
        <div class="minimum"><?php echo $text_minimum; ?></div>
        <?php } ?>
      </div>
      <?php if ($review_status) { ?>
      <div class="share"> 
          <!-- Start Shareaholic Sexy Bookmark HTML-->
<div class="shr_class shareaholic-show-on-load" style="margin-left: px;"> 

</div>
<!-- End Shareaholic Sexy Bookmark HTML -->
<!-- Start Shareaholic Sexy Bookmark settings -->
<script type="text/javascript">
var SHRSB_Settings = {"shr_class":{"src":"http://www.tresorjewellery.com.au/image/share/","link":"","service":"5,7,309,74,313","apikey":"0747414f47c2b684cf5480c36b2478689","localize":true,"shortener":"bitly","shortener_key":"","designer_toolTips":true,"tip_bg_color":"black","tip_text_color":"white","twitter_template":"${title} - ${short_link} via @Shareaholic"}};
var SHRSB_Globals = {"perfoption":"1"};
</script>
<!-- End Shareaholic Sexy Bookmark settings -->
<!-- Start Shareaholic Sexy Bookmark script -->
<script type="text/javascript">
(function() {
var sb = document.createElement("script"); sb.type = "text/javascript";sb.async = true;
sb.src = ("https:" == document.location.protocol ? "https://dtym7iokkjlif.cloudfront.net" : "http://cdn.shareaholic.com") + "/media/js/jquery.shareaholic-publishers-sb.min.js";
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(sb, s);
})();
</script>

<!-- End Shareaholic Sexy Bookmark script --> 
        </div>
      
      <?php } ?>
    </div>
  </div>
  <div style="text-align: center;">
  <?php echo $content_bottom; ?>
  </div>
  <div id="tabs1" class="htabs" style="margin-top:7px;">
	<a href="#tab-details" style="font-family:calibri;"><?php echo $tab_details; ?></a>
	<a href="#tab-certification" style="font-family:calibri;"><?php echo $tab_certification; ?></a>
	<a href="#tab-designer" style="font-family:calibri;"><?php echo $tab_designer; ?></a>
	<a href="#tab-shipping" style="font-family:calibri;"><?php echo $tab_shipping; ?></a>
	<a href="#tab-faq" style="font-family:calibri;"><?php echo $tab_faq; ?></a>
	<?php if ($review_status) { ?>
    <a href="#tab-review" style="font-family:calibri;"><?php echo $tab_review; ?></a>
    <?php } ?>
  </div>
    <div id="tab-details" class="tab-content">
		<table width="100%">
			<tr>
				<td width="25%" style="vertical-align:top;">
					<b style="color:#828282;"> ABOUT THE DESIGN </b><br><br>
					<hr style="margin-top:-14px;color:#828282;" />

					<!-- <b><?php echo $aboutdesign['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($description); ?>		
					
				</td>
				<td width="25%" style="vertical-align:top;">
					<b style="color:#828282;"> METAL </b><br><br>
					<hr style="margin-top:-14px;color:#828282;" />
					<!--
                    Primary Metal: 9k Rose Gold <br>
					Weight:  3.2 gms (approx.) <br><br> 
					Other Metal: 18YG <br>
					Weight:  0.2 gms (approx.) <br>
					Other Metal: 18YG <br>
					Weight:  0.2 gms (approx.)
                    -->
                    <?php foreach ($metals as $metal) { ?>
                    	<div id="metalDescContent<?php echo $metal['metal']; ?>"><?php echo ($metal['metal']==1?'Primary Metal : ':'Other Metals : ');   echo $metal['metalName'].'<br />Weight : ' . round($metal['metalWeight'],2) . ' gm<br /><br />';  ?></div>
                    <?php } ?>
				</td>
				<td width="25%" style="vertical-align:top;">
					<b style="color:#828282;"> GEMSTONE </b><br><br>
					<hr style="margin-top:-14px;color:#828282;" />
                    
                    <!--
					Centre: Amethyst (details) <br> 
					Quality: Natural AAA <br>
					Size:      5 x 2 <br>
					Shape:  Pear <br>
					Weight: 2.1 carats (approx.) <br>
					Setting: Pave <br>
                    <br>
					Accent1: Diamond  <br>
					Clarity:  SI1     Colour: GH  <br>          
					Size:      5mm <br>
					Shape:  Round <br>
					Weight: 2.1 carats (approx.) <br>
					Setting: Prong 
                    -->
					<?php foreach ($gemstones as $gemstone) { ?>
                   	 
                    	<?php if($gemstone['gem']==3){ echo '</td><td width="25%"  style="vertical-align:top;"><br><br><hr style="margin-top:-14px;" />' ; } ?> 
                    
                    	<div id="gemDescContent<?php echo $gemstone['gem']; ?>"><?php echo ($gemstone['gem']==1?'Center Gemstone : ':'Accent Gemstone : ' );   echo $gemstone['gemName'].'<br />Quality : ' . $gemstone['gemQuality'] .'<br />Size : ' . $gemstone['gemSize'] .'<br />Shape : ' . $gemstone['gemShape'] .'<br />Total Weight : ' . $gemstone['gemWeight'] .' carats<br />Count : ' . $gemstone['gemCount'] .' pc<br />Setting : ' . $gemstone['gemSetting'] . '<br /><br />';  ?></div>
                    
                    
                    <?php } ?>
				
                    
                    <!--
					Accent2: Diamond <br>
					Clarity:  SI1     Colour: GH     <br>        
					Size:      5mm <br>
					Shape:  Round <br>
					Weight: 2.1 carats (approx.) <br>
					Setting: Prong <br><br>
					Accent3: Diamond  <br>
					Clarity:  SI1     Colour: GH    <br>         
					Size:      5mm <br>
					Shape:  Round <br>
					Weight: 2.1 carats (approx.) <br>
					Setting: Prong
                    -->
				</td>
			</tr>
		</table>
    </div>
  
  <div id="tab-certification" class="tab-content">
		<table width="100%">
			<tr>
				<td width="50%" style="vertical-align:top;">
					<?php if ($informations) { ?>		
					<?php foreach ($informations as $information) { ?>		
					<!-- <b><?php echo $information['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($information['description']); ?>		
					<?php } ?>	
					<?php } ?>
				</td>
				
				<td width="50%" style="vertical-align:top;">
					<?php if ($certifiyinformations) { ?>		
					<?php foreach ($certifiyinformations as $certifiyinformation) { ?>		
					<!-- <b><?php echo $certifiyinformation['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($certifiyinformation['description']); ?>		
					<?php } ?>	
					<?php } ?>
				</td>
			</tr>
		</table>
  </div>
  
  <div id="tab-designer" class="tab-content">
					<?php if ($designers) { ?>		
					<?php foreach ($designers as $designer) { ?>		
					<!-- <b><?php echo $designer['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($designer['description']); ?>		
					<?php } ?>	
					<?php } ?>
  </div>
  
  <div id="tab-shipping" class="tab-content">
		<table width="100%">
			<tr>
				<td width="50%" style="vertical-align:top;">
					<?php if ($shipping1s) { ?>		
					<?php foreach ($shipping1s as $shipping1) { ?>		
					<!-- <b><?php echo $shipping1['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($shipping1['description']); ?>		
					<?php } ?>	
					<?php } ?>
				</td>
				<td width="50%" style="vertical-align:top;">
					<?php if ($shipping3s) { ?>		
					<?php foreach ($shipping3s as $shipping3) { ?>		
					<!-- <b><?php echo $shipping3['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($shipping3['description']); ?>		
					<?php } ?>	
					<?php } ?>
				</td>
			</tr> 
			<tr>
				<td width="50%" style="vertical-align:top;">
					<?php if ($shipping2s) { ?>		
					<?php foreach ($shipping2s as $shipping2) { ?>		
					<!-- <b><?php echo $shipping2['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($shipping2['description']); ?>		
					<?php } ?>	
					<?php } ?>
				</td>
				<td width="50%" style="vertical-align:top;">
					<?php if ($shipping4s) { ?>		
					<?php foreach ($shipping4s as $shipping4) { ?>		
					<!-- <b><?php echo $shipping4['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($shipping4['description']); ?>		
					<?php } ?>	
					<?php } ?>
				</td>
			</tr>
		</table>
    </div>
  
	<div id="tab-faq" class="tab-content">
		<table width="100%">
			<tr>
				<td width="50%" style="vertical-align:top;">
					<?php if ($getfaqs) { ?>		
					<?php foreach ($getfaqs as $getfaq) { ?>		
					<!-- <b><?php echo $getfaq['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($getfaq['description']); ?>		
					<?php } ?>	
					<?php } ?>
				</td>
				<td width="50%" style="vertical-align:top;">
					<?php if ($getcontactnews) { ?>		
					<?php foreach ($getcontactnews as $getcontactnew) { ?>		
					<!-- <b><?php echo $getcontactnew['title']; ?></b> <br> --->		
					<?php echo html_entity_decode($getcontactnew['description']); ?>		
					<?php } ?>	
					<?php } ?>
				</td>
			</tr>
		</table>
	</div>
	
<?php if ($review_status) { ?>
  <div id="tab-review" class="tab-content">
    <div id="review"></div>
    <h2 id="review-title"><?php echo $text_write; ?></h2>
    <b><?php echo $entry_name; ?></b><br />
    <input type="text" name="name" value="" />
    <br />
    <br />
    <b><?php echo $entry_review; ?></b>
    <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea>
    <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
    <br />
    <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span>&nbsp;
    <input type="radio" name="rating" value="1" />
    &nbsp;
    <input type="radio" name="rating" value="2" />
    &nbsp;
    <input type="radio" name="rating" value="3" />
    &nbsp;
    <input type="radio" name="rating" value="4" />
    &nbsp;
    <input type="radio" name="rating" value="5" />
    &nbsp; <span><?php echo $entry_good; ?></span><br />
    <br />
    <b><?php echo $entry_captcha; ?></b><br />
    <input type="text" name="captcha" value="" />
    <br />
    <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br />
    <br />
    <div class="buttons">
      <div class="right"><a id="button-review" class="button"><span><?php echo $button_continue; ?></span></a></div>
    </div>
  </div>
  <?php } ?> 



  <?php if ($tags) { ?>
  <div class="tags"><b><?php echo $text_tags; ?></b>
    <?php foreach ($tags as $tag) { ?>
    <a href="<?php echo $tag['href']; ?>"><?php echo $tag['tag']; ?></a>,
    <?php } ?>
  </div>
  <?php } ?>
  </div>
<script type="text/javascript"><!--
$('.fancybox').fancybox({cyclic: true});
//--></script> 
<script type="text/javascript"><!--
$('#donehide').bind('click', function() {
	//metal_number= $(this).find("img").attr('id') ;
	newproductprice= $('#newproductprice').attr('value');
	newproductimage= $('#newproductimage').attr('value'); 
	optionname= $('#optionname').attr('value'); 
	$.ajax({
		url: 'index.php?route=product/product/newproduct&product_id=<?php echo $product_id; ?>',
		type: 'post',
		dataType: 'json',		
		data: 'newproductimage='+ encodeURIComponent(newproductimage) + '&newproductprice=' + encodeURIComponent(newproductprice) + '&optionname=' + encodeURIComponent(optionname),  
		success: function (json) {
			//alert(json['product_id'] );
			$('#product_id').attr('value', json['product_id'] );
		}
	});
});
//--></script> 
<script type="text/javascript"><!--

  metalinfo='';
  geminfo='';

  $(".image-change").mouseenter(function() {
	if($(this).find("img").attr('data-2') == 'M' ){
		metalelement='metalinfobox' + $(this).find("img").attr('lang');
  		metalinfo=$('#'+metalelement).html();
		$('#'+metalelement).html( $(this).find("img").attr('longdesc') );
	}else{
  		gemelement='geminfobox' + $(this).find("img").attr('lang');  
  		geminfo=$('#'+gemelement).html();  
		$('#'+gemelement).html( $(this).find("img").attr('longdesc') );
	}
  }).mouseleave(function() {
	if($(this).find("img").attr('title') == 'M' ){
  		$('#'+metalelement).html(metalinfo);
	}else{
		$('#'+gemelement).html(geminfo);
	}
  });

$('.image-change').bind('click', function() {
//$('#notification').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo 'Applying... Please Wait!'; ?></div>');
$('#notification').after('<div id="fancybox-loading" style="display: block; "><div style="top: -200px; "></div></div>');
	
	selItem=$(this).find("img").attr('data-2');
	if(selItem=='M'){
		metalelement='metalImage' + $(this).find("img").attr('lang');		
		metal= $(this).find("img").attr('lang');
		$('#'+metalelement).attr('src', $(this).find("img").attr('src') );
		$('#metalDescContent'+metal).html($(this).find("img").attr('data-1'));
	}else{
		gemelement='gemImage' + $(this).find("img").attr('lang');
		gem= $(this).find("img").attr('lang');
		$('#'+gemelement).attr('src', $(this).find("img").attr('src') );
		$('#gemDescContent'+gem).html($(this).find("img").attr('data-1'));
	}
	x= $(this).find("img").attr('alt') ;
	metal_number= $(this).find("img").attr('id') ;
	//alert(x);
	$.ajax({
		url: 'index.php?route=product/product/imagechange&product_id=<?php echo $product_id; ?>',
		type: 'post',
		dataType: 'json',		
		data: 'myimg='+ encodeURIComponent(x) + '&metal_number=' + encodeURIComponent(metal_number),   
		success: function (json) {
			$('#image1').attr('src', json['newimage'] );
			$('#newproductprice').attr('value', json['prdcost'] );
			$('#newproductimage').attr('value', json['newimage'] );
			$('#optionname').attr('value', json['optionname'] );
			
			view1=json['newimage'].replace(".jpg", "1.jpg");
			view2=json['newimage'].replace(".jpg", "3.jpg");
			view3=json['newimage'].replace(".jpg", "4.jpg");
			view4=json['newimage'].replace(".jpg", "5.jpg");
			view5=json['newimage'].replace(".jpg", "2.jpg");
			view6=json['newimage'].replace(".jpg", "1.jpg");
			
			$('#image2').attr('src', view1 );
			$('#image3').attr('src', view2 );
			$('#image4').attr('src', view3 );
			$('#image5').attr('src', view4 );
			$('#image6').attr('src', view5 );
			$('#image7').attr('src', view6 );


//			$('#relImage1').attr('src', view1 );

	//		$('#image1').attr('src', json['newimage'] );
			$('#newprice').html( json['product_cost'] ); 

//			alert(json['newimage']);
//			alert($('#image1').attr('src'));
//			$('#image').html('<div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="fancybox" rel="fancybox"><img src="'+ json['newimage'] +'" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image1" /></a>');
				$('.attention').remove();
				$('#fancybox-loading').remove();
		}
	});
});
//--></script> 
<script type="text/javascript"><!--
$('#button-cart').bind('click', function() {
	$('#donehide').trigger('click');
	$.ajax({
		url: 'index.php?route=checkout/cart/update',
		type: 'post',
		data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
		dataType: 'json',
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
			
			if (json['error']) {
				if (json['error']['warning']) {
					$('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
				
					$('.warning').fadeIn('slow');
				}
				
				for (i in json['error']) {
					$('#option-' + i).after('<span class="error">' + json['error'][i] + '</span>');
				}
			}	 
						
			if (json['success']) {
				$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
					
				$('.success').fadeIn('slow');
					
				$('#cart_total').html(json['total']);
				
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
			}	
		}
	});
});
//--></script>
<?php if ($options) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script>
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'file') { ?>
<script type="text/javascript"><!--
new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', {
	action: 'index.php?route=product/product/upload',
	name: 'file',
	autoSubmit: true,
	responseType: 'json',
	onSubmit: function(file, extension) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
	},
	onComplete: function(file, json) {
		$('.error').remove();
		
		if (json.success) {
			alert(json.success);
			
			$('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json.file);
		}
		
		if (json.error) {
			$('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json.error + '</span>');
		}
		
		$('.loading').remove();	
	}
});
//--></script>
<?php } ?>
<?php } ?>
<?php } ?>
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
	$('#review').slideUp('slow');
		
	$('#review').load(this.href);
	
	$('#review').slideDown('slow');
	
	return false;
});			

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');

$('#button-review').bind('click', function() {
	$.ajax({
		type: 'POST',
		url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
		dataType: 'json',
		data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
		beforeSend: function() {
			$('.success, .warning').remove();
			$('#button-review').attr('disabled', true);
			$('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
		},
		complete: function() {
			$('#button-review').attr('disabled', false);
			$('.attention').remove();
		},
		success: function(data) {
			if (data.error) {
				$('#review-title').after('<div class="warning">' + data.error + '</div>');
			}
			
			if (data.success) {
				$('#review-title').after('<div class="success">' + data.success + '</div>');
								
				$('input[name=\'name\']').val('');
				$('textarea[name=\'text\']').val('');
				$('input[name=\'rating\']:checked').attr('checked', '');
				$('input[name=\'captcha\']').val('');
			}
		}
	});
});
//--></script> 
<script type="text/javascript">
			$(function(){
				// Accordion
				$("#accordion").accordion({ header: "h3"  });
				$("#accordion1").accordion({ header: "h3" });
			});
		</script>
  <script type="text/javascript">
  $(document).ready(function(){
    
    $('#tabs3 a').tabs();	
  });
  </script>
<script type="text/javascript"><!--
$('#tabs a').tabs();
$('#tabs1 a').tabs();
//--></script> 
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script> 
<script type="text/javascript"><!--
if ($.browser.msie && $.browser.version == 6) {
	$('.date, .datetime, .time').bgIframe();
}

$('.date').datepicker({dateFormat: 'yy-mm-dd'});
$('.datetime').datetimepicker({
	dateFormat: 'yy-mm-dd',
	timeFormat: 'h:m'
});
$('.time').timepicker({timeFormat: 'h:m'});
//--></script> 
<style>


.hide1 {
	background: none repeat scroll 0 0 #5EB1D9;
    border: 1px solid #3593C0;
    border-radius: 2px 2px 2px 2px;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-block;
    font-size: 15px;
    font-weight: bold;
    line-height: 16px;
    margin: 0 0 -10px;
    overflow: visible;
    padding: 7px 21px 3px;
    position: relative;
    text-decoration: none;
    text-shadow: 0 -1px #4B8EAE;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
	text-align: left;height: 20px;
	width: 200px;
}

.hide1:hover {
	background: none repeat scroll 0 0 #48A0CB;
    border-color: #2883AF;
    color: #FFFFFF;
}
.show_hide1 {
	background: none repeat scroll 0 0 #F6F6F6;
    border: 1px solid #BBBBBB;
    border-radius: 2px 2px 2px 2px;
    color: #9D4242;
    cursor: pointer;
    display: inline-block;
    line-height: 16px;
    
    overflow: visible;
    padding: 7px 21px 3px;
    position: relative;
    text-decoration: none;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
	text-align: left;height: 20px;
	width: 200px;
	margin-bottom: -10px;
}

.show_hide1:hover {
	background: none repeat scroll 0 0 #DDF3FE;
    border-color: #BBBBBB;
    color: #9D4242;
}

</style>
<script type="text/javascript">
function replace( hide, show ) {
  document.getElementById(hide).style.display="none";
  document.getElementById(show).style.display="block";
}

</script>
<script language="javascript">
    function divHideShow(divToHideOrShow) 
    {
        var div = document.getElementById(divToHideOrShow);

        if (div.style.display == "block") 
        {

            div.style.display = "none";
        }
        else 
        {

            div.style.display = "block";
        }

        
    }         
</script>
<script>
$(".hide1").click(function () {
      $(".hide").slideToggle("slow");
    });
$(".hide1").click(function () {
$(".hide1").toggle();
});
</script>
<?php echo $footer; ?> 