<?php echo $this->render('module/header.phtml'); ?>

<div class="conBox">
<div class="container widthDiv">
	<div class="row categoryStrap">
		<div class="col-xs-12">
			<?php 
				if( $this->zm == false ){
				if( $this->idCategory > 0 ){
					$Lib_Category = new Lib_Category();
					$dataCategoryParent = $Lib_Category->parentListO($this->idCategory);
					echo "<a href='".@$this->url(array('controller' => 'category', 'action' => 'index'), 'default', true)."'><i class='fa fa-home'></i></a> >> ";
					foreach($dataCategoryParent as $k => $v):
						echo "<a href='".@$this->url(array('controller' => 'category', 'action' => 'index', 'id' => $v['category_id']), 'default', true)."'>".@Lib_Lang::consta(category_name_.$v['category_id']).'</a> >> ';
					endforeach;
				}
				}else{
				if( $this->idCategory > 0 ){
					$Lib_Category = new Lib_Category();
					$dataCategoryParent = $Lib_Category->parentListO($this->idCategory,1);
					echo "<a href='".@$this->url(array('controller' => 'category', 'action' => 'set'), 'default', true)."'><i class='fa fa-home'></i></a> >> ";
					foreach($dataCategoryParent as $k => $v):
						echo "<a href='".@$this->url(array('controller' => 'category', 'action' => 'set', 'id' => $v['category_id']), 'default', true)."'>".@Lib_Lang::consta(category_name_.$v['category_id']).'</a> >> ';
					endforeach;
				}				
				}
			?>
		</div>
	</div>
	
	<div class="row">
		<div class="col-xs-12">
		<table width="100%" id="shopProductTable">
		<tr>
			<td width="70%">
				<h3><?php echo @Lib_Lang::consta(product_name_.$this->rowProduct['product_id']); ?></h3>
			</td>
			<td width="30%">
			
	
<script type="text/javascript" language="javascript">

	$(document).ready(function () {
	
	var s = $('#shopProduct');
	var pos = s.offset()
	
	$(window).scroll(function() {
		st = $(window).scrollTop();
		
		if( st >= pos.top ){
			$('#shopProduct').addClass('shopProductPosition');
		}else{
			$('#shopProduct').removeClass('shopProductPosition');	
		}
		
	});
	
	});

</script>	
			
				<div id="shopProduct" style="text-align:right;width: 338px;"></div>
			</td>
		</tr>
		</table>
		</div>
		<div class="col-xs-12">
		
		
		
		
		
		
		
		
			<div class="configuratorBox">			
				
	
<script type="text/javascript" language="javascript">

	$(document).ready(function () {
	
		var box1 = [<?php $iBox = 0;
				foreach( $this->panelBox as $key => $val ){
					$iBox++;
					if( count($box)!=$iBox ) echo'"'.$val.'",';
					else  echo'"'.$val.'"';
				}
			?>];
		var boxMax1 = <?php echo count($this->panelBox)-1; ?>;

		$(".configuratorDivElement").hide();
		$('[data-field="sizeBox"]').addClass('active');
		$('#sizeBox').show();
	
		$(".configuratorMenuElement").click(function(){			
			$(".configuratorDivElement").hide();
			$(".configuratorMenuElement").removeClass('active');
			$(this).addClass('active');
			var idele = $(this).attr('data-field');
			$("#"+idele).show();	
			$('#nextBoxButton').attr('actual',idele);	
			$('#nextBoxButton').attr('actualid',box1.indexOf(idele));


			$('html, body').animate({
				scrollTop: $("#"+idele).offset().top
			}, 500);
	
		});
	
	});

</script>			

<style>

.changeUnit{
	color: #000;
    padding: 5px;
    border: 1px solid #555;
}

.changeUnitSelected{
	color: #fff;
    font-weight: bold;
	background:#f26522;
}

.unitInputHidden{
	display:none;
}

.elementProductSubType{
	display:block;
}

</style>				

	
<script type="text/javascript" language="javascript">

	$(document).ready(function () {
	
		var defUnit = '<?php if( isset($this->configUnit) ) echo$this->configUnit; else echo'mm'; ?>';
	
		$('.unitInfo').html(defUnit);
		$('.unitElement, .unitInput').attr('unit',defUnit);
		$('.changeUnit[cmd="'+defUnit+'"]').addClass('changeUnitSelected');		
		if( $('.unitElement:first').attr('unit') == 'cm' ){				
			$(".unitElement").each(function(index) {
				$(this).html(parseInt($(this).html())/10);
			});						
			$(".unitInput").each(function(index) {
				$(this).val(parseInt($(this).val())/10);
			});		
		}
		
		
	
		$('.unitInput').change(function(){
			if( $(this).attr('unit') == 'mm' ) $('[name="'+$(this).attr('nF')+'"]').val($(this).val()).change();
			else $('[name="'+$(this).attr('nF')+'"]').val($(this).val()*10).change();
		});
	
		$('.changeUnit').click(function(){
		
			$('.changeUnit').removeClass('changeUnitSelected');
			$(this).addClass('changeUnitSelected');

			$.post( "<?php echo $this->url(array('controller' => 'product', 'action' => 'config'), 'default', true); ?>", {'field':'unit', 'value':$(this).attr('cmd')} );
			
			if( $(this).attr('cmd') != $('.unitElement:first').attr('unit') ){	
			
				$('.unitInfo').html($(this).attr('cmd'));
				$('.unitElement, .unitInput').attr('unit',$(this).attr('cmd'));
			
				if( $(this).attr('cmd') == 'cm' ){
				
					$(".unitElement").each(function(index) {
						$(this).html(parseInt($(this).html())/10);
					});		
				
					$(".unitInput").each(function(index) {
						$(this).val(parseInt($(this).val())/10);
					});		
					
				}else{
				
					$(".unitElement").each(function(index) {
						$(this).html(parseFloat($(this).html())*10);
					});	
				
					$(".unitInput").each(function(index) {
						$(this).val(parseFloat($(this).val())*10);
					});		
					
				}
				
			}
		
		});
	
	});

</script>	

				
				<div class="configuratorMenu">
					<div class="configuratorMenuElement" data-field="sizeBox"><?php if( $this->ProductFieldnameInfo['product_fieldname_size'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size']; else echo @Lib_Lang::translate(front_configurator_size); ?><div class="configuratorMenuElementZR"><?php echo @Lib_Lang::translate(front_configurator_zr); ?></div></div>
					



				<div class="configuratorDiv">
				
					<div class="configuratorDivElement" id="sizeBox">
					
					<table width="100%">
						<tr>
						<td>
						<h4 style="display:inline-block;"><?php if( $this->ProductFieldnameInfo['product_fieldname_size_top'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size_top']; else echo @Lib_Lang::translate(front_configurator_size); ?></h4>
						<div style="float:right;display:inline-block;padding-top:10px;padding-right:2px;">
							<a href="javascript:void(0);" cmd="mm" class="changeUnit">mm</a> 
							<a href="javascript:void(0);" cmd="cm" class="changeUnit">cm</a>
						</div>
						<table width="100%" class="tr12">
							<tr id="wysokoscHover">
								<td width="100px"><?php if( $this->ProductFieldnameInfo['product_fieldname_size_height'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size_height']; else echo @Lib_Lang::translate(front_configurator_height); ?>:
								<br/><font class="unitElement" unit=""><?php echo$this->rowProduct['product_height_min'];?></font>-<font class="unitElement" unit=""><?php echo$this->rowProduct['product_height_max'];?></font> <font class="unitInfo"></font></td>
								<td width="60px">
								
								<input class="unitInput" type="number" step="1" min="<?php echo$this->rowProduct['product_height_min'];?>" max="<?php echo$this->rowProduct['product_height_max'];?>" name="input_height_view" nF="input_height" style="width:60px;" <?php if( $this->rowProduct['product_height_def_only'] == 1 ) echo' readonly="readonly"'; ?>/>
								
								<input class="unitInputHidden" type="number" step="1" min="<?php echo$this->rowProduct['product_height_min'];?>" max="<?php echo$this->rowProduct['product_height_max'];?>" value="<?php echo isset($this->dataSelect['product_height'])?$this->dataSelect['product_height']:$this->rowProduct['product_height_default'];?>" name="input_height" style="width:60px;" <?php if( $this->rowProduct['product_height_def_only'] == 1 ) echo' readonly="readonly"'; ?>/>
								
								</td>
								<td>
									<div id="product_height">
									

									<script type="text/javascript" language="javascript">
										$(document).ready(function () {											
											$('.changeHeight').click(function(){
												var t = $(this).attr('cmd');
												$('[name="input_height"]').val(t);
												$("#product_height").slider( "value", t );
											//	changeSize();
											});	
										});
									</script>	
									<?php $i=0; foreach ( $this->ProductHeight as $key => $val ): $i++; ?>
										<a href="javascript:void(0);" cmd="<?php echo $val['product_height_value']; ?>" class="changeHeight"><div style="background-color: #ddd;border: 1px solid rgb(85, 85, 85);color: #555;height:19px;width:19px;border-radius:4px;margin-left:<?php $wartosc=($val['product_height_value']-$this->rowProduct['product_height_min'])*226/($this->rowProduct['product_height_max']-$this->rowProduct['product_height_min'])-9-$i; echo$wartosc; ?>px;margin-top:-5px;position:absolute;z-index:9900;"></div></a>
									<?php endforeach; ?>	
									</div>
								</td>
							</tr> 
							<tr id="wysokoscHover2">
								<td colspan="3" style="text-align:right;" class="marginBottomConfig">

									<?php if( $this->ProductFieldnameInfo['product_fieldname_size_heightstand'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size_heightstand']; else echo @Lib_Lang::translate(front_configurator_standard1); ?>
									<?php foreach ( $this->ProductHeight as $key => $val ): ?>
										<a href="javascript:void(0);" cmd="<?php echo $val['product_height_value']; ?>" unit="mm" class="unitElement changeHeight standardSize"><?php echo $val['product_height_value']; ?></a>
									<?php endforeach; ?>	
									
								</td>
							</tr>
							<tr id="szerokoscHover">
								<td width="100px"><?php if( $this->ProductFieldnameInfo['product_fieldname_size_width'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size_width']; else echo @Lib_Lang::translate(front_configurator_width); ?>:
								<br/><font class="unitElement" unit=""><?php echo$this->rowProduct['product_width_min'];?></font>-<font class="unitElement" unit=""><?php echo$this->rowProduct['product_width_max'];?></font> <font class="unitInfo"></font></td>
								<td width="60px">
								
								<input class="unitInput" type="number" step="1" min="<?php echo$this->rowProduct['product_width_min'];?>" max="<?php echo$this->rowProduct['product_width_max'];?>" name="input_width_view" nF="input_width" style="width:60px;" <?php if( $this->rowProduct['product_width_def_only'] == 1 ) echo' readonly="readonly"'; ?>/>
								
								<input class="unitInputHidden" type="number" step="1" min="<?php echo$this->rowProduct['product_width_min'];?>" max="<?php echo$this->rowProduct['product_width_max'];?>" value="<?php echo isset($this->dataSelect['product_width'])?$this->dataSelect['product_width']:$this->rowProduct['product_width_default'];?>" name="input_width" style="width:60px;" <?php if( $this->rowProduct['product_width_def_only'] == 1 ) echo' readonly="readonly"'; ?>/>
								
								</td>
								<td>
									<div id="product_width">
									<script type="text/javascript" language="javascript">
										$(document).ready(function () {	
											$('.changeWidth').click(function(){
												var t = $(this).attr('cmd');
												$('[name="input_width"]').val(t);
												$("#product_width").slider( "value", t );
											//	changeSize();
											});	
										});
									</script>	
									
									<?php $i=0; foreach ( $this->ProductWidth as $key => $val ): $i++; ?>
										<a href="javascript:void(0);" cmd="<?php echo $val['product_width_value']; ?>" class="changeWidth"><div style="background-color: #ddd;border: 1px solid rgb(85, 85, 85);color: #555;height:19px;width:19px;border-radius:4px;margin-left:<?php $wartosc=($val['product_width_value']-$this->rowProduct['product_width_min'])*226/($this->rowProduct['product_width_max']-$this->rowProduct['product_width_min'])-9-$i; echo$wartosc; ?>px;margin-top:-5px;position:absolute;z-index:9900;"></div></a>
									<?php endforeach; ?>	
									</div>
								</td>
							</tr> 
							<tr id="szerokoscHover2">
								<td colspan="3" style="text-align:right;" class="marginBottomConfig">
									<?php if( $this->ProductFieldnameInfo['product_fieldname_size_widthstand'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size_widthstand']; else echo @Lib_Lang::translate(front_configurator_standard2); ?>
									<?php foreach ( $this->ProductWidth as $key => $val ): ?>
										<a href="javascript:void(0);" cmd="<?php echo $val['product_width_value']; ?>" unit="mm" class="unitElement changeWidth standardSize"><?php echo $val['product_width_value']; ?></a>
									<?php endforeach; ?>	
									
								</td>
							</tr>
							<tr id="glebokoscHover">
								<td width="100px"><?php if( $this->ProductFieldnameInfo['product_fieldname_size_depth'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size_depth']; else echo @Lib_Lang::translate(front_configurator_depth); ?>:
								<br/><font class="unitElement" unit=""><?php echo$this->rowProduct['product_depth_min'];?></font>-<font class="unitElement" unit=""><?php echo$this->rowProduct['product_depth_max'];?></font> <font class="unitInfo"></font></td>
								<td width="60px">
								
								<input class="unitInput" type="number" step="1" min="<?php echo$this->rowProduct['product_depth_min'];?>" max="<?php echo$this->rowProduct['product_depth_max'];?>" name="input_depth_view" nF="input_depth" style="depth:60px;" <?php if( $this->rowProduct['product_depth_def_only'] == 1 ) echo' readonly="readonly"'; ?>/>
								
								<input class="unitInputHidden" type="number" step="1" min="<?php echo$this->rowProduct['product_depth_min'];?>" max="<?php echo$this->rowProduct['product_depth_max'];?>" value="<?php echo isset($this->dataSelect['product_depth'])?$this->dataSelect['product_depth']:$this->rowProduct['product_depth_default'];?>" name="input_depth" style="width:60px;" <?php if( $this->rowProduct['product_depth_def_only'] == 1 ) echo' readonly="readonly"'; ?>/>
								
								</td>
								<td>
									<div id="product_depth">
									
									<?php $i=0; foreach ( $this->ProductDepth as $key => $val ): $i++; ?>
										<a href="javascript:void(0);" cmd="<?php echo $val['product_depth_value']; ?>" class="changeDepth"><div style="background-color: #ddd;border: 1px solid rgb(85, 85, 85);color: #555;height:19px;width:19px;border-radius:4px;margin-left:<?php $wartosc=($val['product_depth_value']-$this->rowProduct['product_depth_min'])*226/($this->rowProduct['product_depth_max']-$this->rowProduct['product_depth_min'])-9-$i; echo$wartosc; ?>px;margin-top:-5px;position:absolute;z-index:9900;"></div></a>
									<?php endforeach; ?>	
									</div>
								</td>
							</tr> 
							<tr id="glebokoscHover2">
								<td colspan="3" style="text-align:right;" class="marginBottomConfig">

									<?php if( $this->ProductFieldnameInfo['product_fieldname_size_depthstand'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size_depthstand']; else echo @Lib_Lang::translate(front_configurator_standard3); ?>
									<script type="text/javascript" language="javascript">
										$(document).ready(function () {	
											$('.changeDepth').click(function(){
												var t = $(this).attr('cmd');
												$('[name="input_depth"]').val(t);
												$("#product_depth").slider( "value", t );
											//	changeSize();
											});	
										});
									</script>	
									<?php foreach ( $this->ProductDepth as $key => $val ): ?>
										<a href="javascript:void(0);" cmd="<?php echo $val['product_depth_value']; ?>" unit="mm" class="unitElement changeDepth standardSize"><?php echo $val['product_depth_value']; ?></a>
									<?php endforeach; ?>	
									
								</td>
							</tr>
						</table>
				
				
				
				
				
				
					
				<?php if( $this->rowProduct['product_shelf'] == 1 ){ ?>
				

					<script type="text/javascript" language="javascript">

						$(document).ready(function () {		
						
							function changeShelf(){
								var idProduct = <?php echo$this->idProduct;?>;
								var product_shelfamount = $('[name="input_shelfamount"]').val();
								
								$('a.changeShelfamount > div').css('background-color','#ddd');
								$("a.changeShelfamount[cmd='"+product_shelfamount+"'] > div").css('background-color','none repeat scroll 0 0 rgb(242, 101, 34)');
								
								$('a.changeShelfamount > div').css('display','inline');
								$("a.changeShelfamount[cmd='"+product_shelfamount+"'] > div").css('display','none');
								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_shelfamount: product_shelfamount}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );	
								
							}
						
						
							$(function(){	
								var currentValue = $('[name="input_shelfamount"]');	
								
								<?php if( $this->rowProduct['product_shelfamount_def_only'] == 1 ){
									$valMap = '';
									foreach ( $this->ProductShelfamount as $key => $val ):
										$valMap = $valMap.$val['product_shelfamount_value'].',';
									endforeach;
									echo'var valMap = ['.$valMap.'];';
								} ?>
								
								$("#product_shelfamount").slider({ 
									value: <?php echo isset($this->dataSelect['product_shelfamount'])?$this->dataSelect['product_shelfamount']:$this->rowProduct['product_shelfamount_default'];?>,
									max: <?php echo$this->rowProduct['product_shelfamount_max'];?>,
									min: <?php echo$this->rowProduct['product_shelfamount_min'];?>,
									change: function(event, ui) {
										currentValue.val(ui.value);
										changeShelf();
									}
									<?php if( $this->rowProduct['product_shelfamount_def_only'] == 1 ){
										echo',
											slide: function(event, ui) {
												return $.inArray(ui.value, valMap) != -1;
											}';
									} ?>
								});	
							});
							
							$('[name="input_shelfamount"]').change(function(){
								if( $(this).val() < <?php echo$this->rowProduct['product_shelfamount_min'];?> ){
									$(this).val(<?php echo$this->rowProduct['product_shelfamount_min'];?>);
								}
								if( $(this).val() > <?php echo$this->rowProduct['product_shelfamount_max'];?> ){
									$(this).val(<?php echo$this->rowProduct['product_shelfamount_max'];?>);
								}
								$("#product_shelfamount").slider( "value", $(this).val() );
							});
							
							$('#iloscpolekHover, #iloscpolekHover2').hover(function(){
								$('.wizualizacja').hide();
								$('#ilosc_polek').show();
							});
				
							changeShelf();
						});

					</script>	
					
						<h4><?php if( $this->ProductFieldnameInfo['product_fieldname_shelf_top'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_shelf_top']; else echo @Lib_Lang::translate(front_configurator_shelf); ?></h4>
						<table width="100%" class="tr12">
							<tr id="iloscpolekHover">
								<td width="100px"><?php if( $this->ProductFieldnameInfo['product_fieldname_size_shelf'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size_shelf']; else echo @Lib_Lang::translate(front_configurator_shelfamount); ?>:
								<br/><?php echo$this->rowProduct['product_shelfamount_min'];?>-<?php echo$this->rowProduct['product_shelfamount_max'];?></td>
								<td width="60px"><input type="number" step="1" min="<?php echo$this->rowProduct['product_shelfamount_min'];?>" max="<?php echo$this->rowProduct['product_shelfamount_max'];?>" value="<?php echo isset($this->dataSelect['product_shelfamount'])?$this->dataSelect['product_shelfamount']:$this->rowProduct['product_shelfamount_default'];?>" name="input_shelfamount" style="width:60px;" <?php if( $this->rowProduct['product_shelfamount_def_only'] == 1 ) echo' readonly="readonly"'; ?>/></td>
								<td>
									<div id="product_shelfamount">
									<script type="text/javascript" language="javascript">
										$(document).ready(function () {	
											$('.changeShelfamount').click(function(){
												var t = $(this).attr('cmd');
												$('[name="input_shelfamount"]').val(t);
												$("#product_shelfamount").slider( "value", t );
											//	changeSize();
											});	
										});
									</script>	
									
									
									<?php $i=0; foreach ( $this->ProductShelfamount as $key => $val ): $i++; ?>
										<a href="javascript:void(0);" cmd="<?php echo $val['product_shelfamount_value']; ?>" class="changeShelfamount"><div style="background-color: #ddd;border: 1px solid rgb(85, 85, 85);color: #555;height:19px;width:19px;border-radius:4px;margin-left:<?php $wartosc=($val['product_shelfamount_value']-$this->rowProduct['product_shelfamount_min'])*226/($this->rowProduct['product_shelfamount_max']-$this->rowProduct['product_shelfamount_min'])-9-$i; echo$wartosc; ?>px;margin-top:-5px;position:absolute;z-index:9900;"></div></a>
									<?php endforeach; ?>
									</div>
								</td>
							</tr> 
							<tr id="iloscpolekHover2">
								<td colspan="3" style="text-align:right;" class="marginBottomConfig">

									<?php if( $this->ProductFieldnameInfo['product_fieldname_size_shelfstand'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_size_shelfstand']; else echo @Lib_Lang::translate(front_configurator_standard4); ?>
									
									<?php foreach ( $this->ProductShelfamount as $key => $val ): ?>
										<a href="javascript:void(0);" cmd="<?php echo $val['product_shelfamount_value']; ?>" class="changeShelfamount standardSize"><?php echo $val['product_shelfamount_value']; ?></a>
									<?php endforeach; ?>	
									
								</td>
							</tr>
						</table>
				
				<?php } ?>
				
				
				
				
				
				
				
<?php /* Parametry ABCDE - poczatek */ ?>

<?php echo $this->render('product/index_parametr_inc.phtml'); ?>





	
<?php /* Parametry ABCDE - koniec */ ?>
				
				
				
				
				

						</td>
						<td width="210px" align="center" style="background-color:#fff;">
							
<?php

	$cmd = 'height';
	if( $this->rowProduct['product_'.$cmd.'_img'] ){
?>		
							<div class="wizualizacja" id="wysokosc" style=""><img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/size/<?php echo$this->rowProduct['product_'.$cmd.'_img']; ?>.jpeg" style="width:180px;" /></div>
<?php
	}

?>
							
<?php

	$cmd = 'width';
	if( $this->rowProduct['product_'.$cmd.'_img'] ){
?>							
							<div class="wizualizacja" id="szerokosc" style="display:none;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/size/<?php echo$this->rowProduct['product_'.$cmd.'_img']; ?>.jpeg" style="width:180px;" /></div>
<?php
	}

?>
<?php

	$cmd = 'depth';
	if( $this->rowProduct['product_'.$cmd.'_img'] ){
?>							
							<div class="wizualizacja" id="glebokosc" style="display:none;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/size/<?php echo$this->rowProduct['product_'.$cmd.'_img']; ?>.jpeg" style="width:180px;" /></div>
<?php
	}

?>
<?php

	$cmd = 'shelfamount';
	if( $this->rowProduct['product_'.$cmd.'_img'] ){
?>							
							<div class="wizualizacja" id="ilosc_polek" style="display:none;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/size/<?php echo$this->rowProduct['product_'.$cmd.'_img']; ?>.jpeg" style="width:180px;" /></div>
<?php
	}

?>
<?php

$lit = array('A','B','C','D','E');
foreach( $lit as $key => $L ){
	$cmd = 'wysszer'.$L.'amount';
	if( $this->rowProduct['product_'.$cmd.'_img'] ){
?>							
							<div class="wizualizacja" id="wysszer<?php echo$L;?>" style="display:none;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/size/<?php echo$this->rowProduct['product_'.$cmd.'_img']; ?>.jpeg" style="width:180px;" /></div>
<?php
	}
}
?>
<?php
/*
	$cmd = 'wysszerBamount';
	if( $this->rowProduct['product_'.$cmd.'_img'] ){
?>							
							<div class="wizualizacja" id="wbb" style="display:none;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/size/<?php echo$this->rowProduct['product_'.$cmd.'_img']; ?>.jpeg" style="width:180px;" /></div>
<?php
	}
*/
?>
						
						</td>
						</tr>
					</table>
				
					</div>
				

				</div>



					
					
					
					
					
					
					
					
					
					
					
					
					
					
				<?php if( $this->rowProduct['product_body'] == 1 ){ ?>
					<div class="configuratorMenuElement" data-field="bodyBox"><?php if( $this->ProductFieldnameInfo['product_fieldname_body'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_body']; else echo @Lib_Lang::translate(front_configurator_body); ?><div class="configuratorMenuElementZR"><?php echo @Lib_Lang::translate(front_configurator_zr); ?></div></div>
					
					
					
				<div class="configuratorDiv">
				<?php if( $this->rowProduct['product_body'] == 1 ){ ?>
					<div class="configuratorDivElement" id="bodyBox">
						<h4><?php if( $this->ProductFieldnameInfo['product_fieldname_body'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_body']; else echo @Lib_Lang::translate(front_configurator_body); ?></h4>						
					
					
					<script type="text/javascript" language="javascript">

						$(document).ready(function () {
					
							$(".elementItemBody").click(function(){
								$(".elementItemBody").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemBody").hover(function(){	
								var kids = $(this).children('.elementItemBodyCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemBodyCloud');
								$(kids).hide();
							});
					
							$(".elementItemBody1").click(function(){
								$(".elementItemBody1").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemBody1").hover(function(){	
								var kids = $(this).children('.elementItemBodyCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemBodyCloud');
								$(kids).hide();
							});
					
							$(".elementItemRim").click(function(){
								$(".elementItemRim").removeClass('activ');
								$(this).addClass('activ');	
								
							});
							

	
	function filtrChange(){
		var f = $('[name="bodyType"] option:selected').val();		
		var fl = $('[name="bodyType"] option:selected').attr('filtrlist');
		
		$('.filtrbodytype').hide();
		var res = fl.split(",");
		for ( i = 0; i < res.length; i++ ) {
			$('.filtrbodytype.option'+res[i]).show();
		}
		$('.filtrbodytype.optionall').show();
				
		$('.elementItemBody').hide();
		$('.elementItemBody[cmd*="typ'+f+',"]').show();

		if( f == 0 ){
			$('.obrzezeDiv').show();
		}else{		
			$('.obrzezeDiv').hide();					
		}
	}
	
							filtrChange();
							
							$('[name="bodyType"]').change(function(){
							
								filtrChange();
								
								var idProduct = <?php echo$this->idProduct;?>;
								var product_field = 'body_filtr';
								var product_value = $(this).val();
								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );
							
							});
							
							
							$('.filtrbodytype').click(function(){
								var f = $('[name="bodyType"] option:selected').val();
								var option = $(this).attr('data-field');
								$('.elementItemBody').hide();
								if( option == 'optionall' ){	
									$('.elementItemBody[cmd*="typ'+f+',"]').show();
								}else{
									$('.elementItemBody[cmd*="typ'+f+',"][cmd*="'+option+',"]').show();
								}
							});
							
							
							$('.aFiltrBody2Type').click(function(){
								var v = $(this).attr('c');
								$('[name="bodyType"] option').prop('selected',false);
								$('[name="bodyType"] option[value="'+v+'"]').prop('selected',true);
								
								$('.aFiltrBody2Type').removeClass('selected');
								$(this).addClass('selected');
								
								$('[name="bodyType"]').click();
								$('[name="bodyType"]').change();
							});
							
							
						});

					</script>	
					
					
						<div class="row" style="margin:5px;"><?php echo @Lib_Lang::translate(front_configurator_bodydesc); ?></div>
					
						<div class="row text-right" style="margin:10px;">
							<?php echo @Lib_Lang::translate(front_configurator_bodytypetext); ?>
							<select class="selectFiltrBodyType" name="bodyType" style="width:100%;display:none;">
							<?php foreach ($this->dataTableMapFiltrBody as $key => $val): ?>
								<option filtrlist="<?php echo Lib_Product::mapbody($val); ?>" value="<?php echo$val['map_filtr_body_index']; ?>" <?php if( $this->dataSelect['body_filtr'] == $val['map_filtr_body_index'] ) echo'selected'; ?>><?php echo @Lib_Lang::translate(front_configurator_bodytype.$val['map_filtr_body_index']); ?></option>
							<?php endforeach; ?>
							</select>
							
							<?php foreach ($this->dataTableMapFiltrBody as $key => $val): ?>
								<a class="aFiltrBody2Type <?php if( $this->dataSelect['body_filtr'] == $val['map_filtr_body_index'] )echo'selected'; ?>" c="<?php echo$val['map_filtr_body_index']; ?>"><?php echo @Lib_Lang::translate(front_configurator_bodytype.$val['map_filtr_body_index']); ?></a>
							<?php endforeach; ?>							
						
						</div>
						
						<div class="row" style="text-align:center;background-color:#9bc335;margin:5px;padding:10px;">
						
							<a href="javascript:void(0);" class="filtrbodytype optionall" data-field="optionall"><?php echo @Lib_Lang::translate(front_configurator_body_option_all); ?></a>
						
							<?php for( $i=1; $i<=8; $i++ ){ ?>
							<a href="javascript:void(0);" class="filtrbodytype option<?php echo$i; ?>" data-field="opt<?php echo$i; ?>" c="<?php echo$i; ?>"><?php echo @Lib_Lang::translate(front_configurator_body_option.$i); ?></a>
							<?php } ?>
						
						</div>
					
						<div class="row" style="margin:5px;overflow-y:scroll;max-height:575px;">
						<?php if( count($this->dataBody) > 0 ){ ?>
						<?php foreach ($this->dataBody as $key => $val): ?>
						
						<div class="elementItem elementItemBody<?php if($val['product_body_id']==$this->dataSelect['product_body_id'])echo' activ';?>" cmd="<?php echo Lib_Product::mapproductbody($val);?>" data-field="product_body_id" data-value="<?php echo$val['product_body_id']; ?>">
							<?php if( $val['product_body_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/body/<?php echo$val['product_body_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 95px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 95px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_bodyname_.$val['product_body_id']); ?></center>
							<div class="elementItemBodyCloud" style="display:none;position:absolute;top:250px;left:665px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_body_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/body/<?php echo$val['product_body_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_bodyname_.$val['product_body_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_bodydescription_.$val['product_body_id']); ?>
							</div>
							
							</div>
						</div>
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>	
						</div>

					<?php 
						if(
							$this->rowProduct['product_rim1'] == 1 OR
							$this->rowProduct['product_rim2'] == 1 OR
							$this->rowProduct['product_rim3'] == 1 OR
							$this->rowProduct['product_rim4'] == 1
						){
					?>
						<div class="obrzezeDiv" style="display:none;">
						<div class="row" style="background-color:#ccc;margin:5px;padding:10px;">
							<b><?php echo @Lib_Lang::translate(front_configurator_bodyrimtext); ?></b>						
						</div>						
						<div class="row" style="margin:5px;">
						
						<?php if( $this->rowProduct['product_rim1'] == 1 ){ ?>
							<div class="elementItem elementItemRim<?php if( $this->dataSelect['product_rim_id'] == 1 )echo' activ';?>" data-field="product_rim_id" data-value="1"><?php echo @Lib_Lang::translate(front_configurator_body_rim1); ?></div>
						<?php } ?>
						
						<?php if( $this->rowProduct['product_rim2'] == 1 ){ ?>
							<div class="elementItem elementItemRim<?php if( $this->dataSelect['product_rim_id'] == 2 )echo' activ';?>" data-field="product_rim_id" data-value="2"><?php echo @Lib_Lang::translate(front_configurator_body_rim2); ?></div>
						<?php } ?>
						
						<?php if( $this->rowProduct['product_rim3'] == 1 ){ ?>
							<div class="elementItem elementItemRim<?php if( $this->dataSelect['product_rim_id'] == 3 )echo' activ';?>" data-field="product_rim_id" data-value="3"><?php echo @Lib_Lang::translate(front_configurator_body_rim3); ?></div>
						<?php } ?>
						
						<?php if( $this->rowProduct['product_rim4'] == 1 ){ ?>
							<div class="elementItem elementItemRim<?php if( $this->dataSelect['product_rim_id'] == 4 )echo' activ';?>" data-field="product_rim_id" data-value="4"><?php echo @Lib_Lang::translate(front_configurator_body_rim4); ?></div>
						<?php } ?>
						
						
						</div>
						</div>
					<?php } ?>
					<div class="row" style="background-color:#ccc;margin:5px;padding:10px;display:none;">
						<b><?php echo @Lib_Lang::translate(front_configurator_body2text); ?></b>						
					</div>
					
						<div class="row" style="margin:5px;display:none;">
						<?php if( count($this->dataBody2) > 0 ){ ?>
						<?php foreach ($this->dataBody2 as $key => $val): ?>
						
						<div class="elementItem elementItemBody1<?php if($val['product_body_id']==$this->dataSelect['product_body2_id'])echo' activ';?>" data-field="product_body2_id" data-value="<?php echo$val['product_body_id']; ?>">
							<?php if( $val['product_body_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/body/<?php echo$val['product_body_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 95px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 95px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_bodyname_.$val['product_body_id']); ?></center>
							<div class="elementItemBodyCloud" style="display:none;position:relative;top:-100px;left:95px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_body_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/body/<?php echo$val['product_body_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_bodyname_.$val['product_body_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_bodydescription_.$val['product_body_id']); ?>
							</div>
							
							</div>
						</div>
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>	
						</div>

						
					</div>
				<?php } ?>
				</div>




				
					
					
				<?php } ?>
					
				<?php if( $this->rowProduct['product_front'] == 1 ){ ?>
					<div class="configuratorMenuElement" data-field="frontBox"><?php if( $this->ProductFieldnameInfo['product_fieldname_front'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_front']; else echo @Lib_Lang::translate(front_configurator_front); ?><div class="configuratorMenuElementZR"><?php echo @Lib_Lang::translate(front_configurator_zr); ?></div></div>
					
					
				<div class="configuratorDiv">
				
				
				
				
				
				
				
				
					
				<?php if( $this->rowProduct['product_front'] == 1 ){ ?>
					<div class="configuratorDivElement" id="frontBox">					
						<h4><?php if( $this->ProductFieldnameInfo['product_fieldname_front'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_front']; else echo @Lib_Lang::translate(front_configurator_front); ?></h4>					
					
					
					<script type="text/javascript" language="javascript">

						$(document).ready(function () {
					
							$(".elementItemFront").click(function(){
								$(".elementItemFront").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemFront").hover(function(){	
								var kids = $(this).children('.elementItemFrontCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemFrontCloud');
								$(kids).hide();
							});
							
							if( $('[name="frontType"]').val() == 'no' ){
								$('.frontTypeRemove').hide();
							}else{
								$('.frontTypeRemove').show();							
							}
							
							$('[name="frontType"]').click(function(){							
								if( $(this).val() == 'no' ){
									$('.frontTypeRemove').hide();
								}else{
									$('.frontTypeRemove').show();							
								}								
							});
					
							$(".elementItemRim2").click(function(){
								$(".elementItemRim2").removeClass('activ');
								$(this).addClass('activ');	
								
							});
							

							
								
	function filtrFiltrChange(){
		var f = $('[name="frontType"] option:selected').val();		
		var fl = $('[name="frontType"] option:selected').attr('filtrlist');
		
		$('.filtrfronttype').hide();
		var res = fl.split(",");
		for ( i = 0; i < res.length; i++ ) {
			$('.filtrfronttype.fop'+res[i]).show();
		}
		$('.filtrfronttype.foptionall').show();
				
		$('.elementItemFront').hide();
		$('.elementItemFront[cmd*="fyp'+f+',"]').show();
	

		if( f == 0 || f == 3 ){
			$('div .frontTypeRemove2').show();
		}else{
			$('div .frontTypeRemove2').hide();			
		}	
	}
							
							filtrFiltrChange();
								
							$('[name="frontType"]').change(function(){							
							
								filtrFiltrChange();
								
								
								var idProduct = <?php echo$this->idProduct;?>;
								var product_field = 'front_filtr';
								var product_value = $(this).val();
								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );
							
							});
							
							
							$('.filtrfronttype').click(function(){
								var f = $('[name="frontType"] option:selected').val();
								var option = $(this).attr('data-field');
								$('.elementItemFront').hide();
								if( option == 'foptionall' ){	
									$('.elementItemFront[cmd*="fyp'+f+',"]').show();
								}else{
									$('.elementItemFront[cmd*="fyp'+f+',"][cmd*="'+option+',"]').show();
								}							
							});
							
							
							$('[name="frontType2"]').change(function(){								
								var idProduct = <?php echo$this->idProduct;?>;
								var product_field = 'front_type_2';
								var product_value = $(this).val();								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );							
							});
							
							
							$('[name="client_info"]').change(function(){								
								var idProduct = <?php echo$this->idProduct;?>;
								var product_field = 'client_info';
								var product_value = $(this).val();								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );							
							});
							
							
							$('.aFiltrBodyType').click(function(){
								var v = $(this).attr('c');
								$('[name="frontType"] option').prop('selected',false);
								$('[name="frontType"] option[value="'+v+'"]').prop('selected',true);
								
								$('.aFiltrBodyType').removeClass('selected');
								$(this).addClass('selected');
								
								$('[name="frontType"]').click();
								$('[name="frontType"]').change();
							});
							
							
							
						});

					</script>	
					
					
						<div class="row" style="margin:5px;"><?php echo @Lib_Lang::translate(front_configurator_frontdesc); ?></div>
						
						<div class="row" style="margin:5px;">
						
						<table width="100%">
							<tr>
								<td width="">
							<table width="">
							
							
							<tr>							
							<td width="80px"><?php echo @Lib_Lang::translate(front_configurator_fronttypetext); ?></td>
							<td>
							
							<select class="selectFiltrBodyType" name="frontType" style="width:100%;display:none;">
								<option filtrlist="" value="no" <?php if( $this->dataSelect['front_filtr'] == 'no' )echo'selected'; ?>><?php echo @Lib_Lang::translate(front_configurator_fronttypebd); ?></option>
								
								<?php foreach ($this->dataTableMapFiltrFront as $key => $val): ?>
								<option filtrlist="<?php echo Lib_Product::mapfront($val); ?>" value="<?php echo$val['map_filtr_front_index']; ?>" <?php if( $this->dataSelect['front_filtr'] == $val['map_filtr_front_index'] ) echo'selected'; ?>><?php echo @Lib_Lang::translate(front_configurator_fronttype.$val['map_filtr_front_index']); ?></option>
								<?php endforeach; ?>							
							</select>
							
								<a class="aFiltrBodyType <?php if( $this->dataSelect['front_filtr'] == 'no' )echo'selected'; ?>" c="no"><?php echo @Lib_Lang::translate(front_configurator_fronttypebd); ?></a>
							
								<?php foreach ($this->dataTableMapFiltrFront as $key => $val): ?>
									<a class="aFiltrBodyType <?php if( $this->dataSelect['front_filtr'] == $val['map_filtr_front_index'] )echo'selected'; ?>" c="<?php echo$val['map_filtr_front_index']; ?>"><?php echo @Lib_Lang::translate(front_configurator_fronttype.$val['map_filtr_front_index']); ?></a>
								<?php endforeach; ?>							
							
							</td>
							</tr>
							
							</table>
								
								
								</td>
							</tr>
							<tr>
								<td width="">
									<textarea name="client_info" style="width:100%;" class="frontTypeRemove" placeholder="<?php echo @Lib_Lang::translate(front_configurator_addcolor); ?>"><?php echo$this->dataSelect['client_info']; ?></textarea>
								</td>
							</tr>
						</table>
						
						</div>
						
						
						<div class="row frontTypeRemove" style="text-align:center;background-color:#ccc;margin:5px;padding:10px;">
						
							<a href="javascript:void(0);" class="filtrfronttype foptionall" data-field="foptionall"><?php echo @Lib_Lang::translate(front_configurator_front_option_all); ?></a>
						
							<?php for( $i=1; $i<=15; $i++ ){ ?>
							<a href="javascript:void(0);" class="filtrfronttype fop<?php echo$i; ?>" data-field="fpt<?php echo$i; ?>" c="<?php echo$i; ?>"><?php echo @Lib_Lang::translate(front_configurator_front_option.$i); ?></a>
							<?php } ?>
						
						</div>
					
						<div class="row frontTypeRemove" style="margin:5px;overflow-y:scroll;max-height:575px;">
						<?php if( count($this->dataFront) > 0 ){ ?>
						<?php foreach ($this->dataFront as $key => $val): ?>
						
						<div class="elementItem elementItemFront<?php if($val['product_front_id']==$this->dataSelect['product_front_id'])echo' activ';?>" cmd="<?php echo Lib_Product::mapproductfront($val);?>" data-field="product_front_id" data-value="<?php echo$val['product_front_id']; ?>">
							<?php if( $val['product_front_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/front/<?php echo$val['product_front_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 95px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 95px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_frontname_.$val['product_front_id']); ?></center>
							<div class="elementItemFrontCloud" style="display:none;position:absolute;top:250px;left:665px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_front_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/front/<?php echo$val['product_front_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_frontname_.$val['product_front_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_frontdescription_.$val['product_front_id']); ?>
							</div>
							
							</div>
						</div>
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>						
						</div>
						
					
					<?php 
						if(
							$this->rowProduct['product_rim1'] == 1 OR
							$this->rowProduct['product_rim2'] == 1 OR
							$this->rowProduct['product_rim3'] == 1 OR
							$this->rowProduct['product_rim4'] == 1
						){
					?>
					<div class="frontTypeRemove frontTypeRemove2">
						<div class="row" style="background-color:#ccc;margin:5px;padding:10px;">
							<b><?php echo @Lib_Lang::translate(front_configurator_frontrimtext); ?></b>						
						</div>						
						<div class="row" style="margin:5px;">
						
						<?php if( $this->rowProduct['product_rim1'] == 1 ){ ?>
							<div class="elementItem elementItemRim2<?php if( $this->dataSelect['product_rim2_id'] == 1 )echo' activ';?>" data-field="product_rim2_id" data-value="1"><?php echo @Lib_Lang::translate(front_configurator_front_rim1); ?></div>
						<?php } ?>
						
						<?php if( $this->rowProduct['product_rim2'] == 1 ){ ?>
							<div class="elementItem elementItemRim2<?php if( $this->dataSelect['product_rim2_id'] == 2 )echo' activ';?>" data-field="product_rim2_id" data-value="2"><?php echo @Lib_Lang::translate(front_configurator_front_rim2); ?></div>
						<?php } ?>
						
						<?php if( $this->rowProduct['product_rim3'] == 1 ){ ?>
							<div class="elementItem elementItemRim2<?php if( $this->dataSelect['product_rim2_id'] == 3 )echo' activ';?>" data-field="product_rim2_id" data-value="3"><?php echo @Lib_Lang::translate(front_configurator_front_rim3); ?></div>
						<?php } ?>
						
						<?php if( $this->rowProduct['product_rim4'] == 1 ){ ?>
							<div class="elementItem elementItemRim2<?php if( $this->dataSelect['product_rim2_id'] == 4 )echo' activ';?>" data-field="product_rim2_id" data-value="4"><?php echo @Lib_Lang::translate(front_configurator_front_rim4); ?></div>
						<?php } ?>
						
						
						</div>
					</div>
					<?php } ?>
						
						
						
					
					</div>
				<?php } ?>
				</div>




				
				<?php } ?>
					
				<?php if( $this->rowProduct['product_type'] == 1 ){ ?>
					<div class="configuratorMenuElement" data-field="typeBox"><?php if( $this->ProductFieldnameInfo['product_fieldname_type'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_type']; else echo @Lib_Lang::translate(front_configurator_type); ?><div class="configuratorMenuElementZR"><?php echo @Lib_Lang::translate(front_configurator_zr); ?></div></div>
					
					
				<div class="configuratorDiv">
				
				
				
				
				
				
				
				
				
					
				<?php if( $this->rowProduct['product_type'] == 1 ){ ?>
					<div class="configuratorDivElement" id="typeBox">					
						<h4><?php if( $this->ProductFieldnameInfo['product_fieldname_type'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_type']; else echo @Lib_Lang::translate(front_configurator_type); ?></h4>					
					
					
					<div class="row" style="margin:5px;">
					<script type="text/javascript" language="javascript">

						$(document).ready(function () {
						
							$(".elementProductSubType").hide();
							$("#elementProductSubType<?php echo$this->dataSelect['product_type_id']; ?>").show();
					
							$(".elementItemType").click(function(){
								$(".elementItemType").removeClass('activ');
								$(this).addClass('activ');	
								
								$(".elementProductSubType").hide();
								$("#elementProductSubType"+$(this).attr('data-value')).show();	

								$(".elementItemSubType .activ").click();
							});
					
							$(".elementItemSubType").click(function(){
								$(".elementItemSubType").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemType").hover(function(){	
								var kids = $(this).children('.elementItemTypeCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemTypeCloud');
								$(kids).hide();
							});
					
							$(".elementItemSubType").hover(function(){	
								var kids = $(this).children('.elementItemSubTypeCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemSubTypeCloud');
								$(kids).hide();
							});
						});

					</script>	
					
						<?php if( count($this->dataType) > 0 ){ ?>
						<?php foreach ($this->dataType as $key => $val): ?>
						
						
						
						<div class="elementItem elementItemType<?php if($val['product_type_id']==$this->dataSelect['product_type_id'])echo' activ';?>" data-field="product_type_id" data-value="<?php echo$val['product_type_id']; ?>">
							<?php if( $val['product_type_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/type/<?php echo$val['product_type_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_typename_.$val['product_type_id']); ?></center>
							<div class="elementItemTypeCloud" style="display:none;position:relative;top:-151px;left:145px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_type_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/type/<?php echo$val['product_type_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_typename_.$val['product_type_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_typedescription_.$val['product_type_id']); ?>
							</div>
							
							</div>
						</div>
							
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>	
					</div>
					
					
					
					
						<?php if( count($this->dataType) > 0 ){ ?>
					<hr />
					<div class="row" style="margin:5px;">
						<?php foreach ($this->dataType as $key => $val): ?>
					
						
						
						<div id="elementProductSubType<?php echo$val['product_type_id']; ?>" class="elementProductSubType">
							<?php foreach ($val['pod'] as $keyPod => $valPod): ?>
						
						
						<div class="elementItem elementItemSubType<?php if($valPod['product_type2_id']==$this->dataSelect['product_type2_id'])echo' activ';?>" data-field="product_type2_id" data-value="<?php echo$valPod['product_type2_id']; ?>">
							<?php if( $valPod['product_type2_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/type/<?php echo$valPod['product_type2_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_type2name_.$valPod['product_type2_id']); ?></center>
							<div class="elementItemSubTypeCloud" style="display:none;position:relative;top:-151px;left:145px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $valPod['product_type2_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/type/<?php echo$valPod['product_type2_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_type2name_.$valPod['product_type2_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_type2description_.$valPod['product_type2_id']); ?>
							</div>
							
							</div>
						</div>
						
							<?php endforeach; ?>
						</div>	
					
					
						<?php endforeach; ?>
						</div>	
						<?php } ?>
					
					
					</div>
				<?php } ?>
				</div>




				
				<?php } ?>
					
				<?php if( $this->rowProduct['product_accessories'] == 1 ){ ?>
					<div class="configuratorMenuElement" data-field="accessoriesBox"><?php if( $this->ProductFieldnameInfo['product_fieldname_accessories'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_accessories']; else echo @Lib_Lang::translate(front_configurator_accessories); ?><div class="configuratorMenuElementZR"><?php echo @Lib_Lang::translate(front_configurator_zr); ?></div></div>
					
					
				<div class="configuratorDiv">
				
				
				
				
				
				
					
				<?php if( $this->rowProduct['product_accessories'] == 1 ){ ?>
					<div class="configuratorDivElement" id="accessoriesBox">					
						<h4><?php if( $this->ProductFieldnameInfo['product_fieldname_accessories'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_accessories']; else echo @Lib_Lang::translate(front_configurator_accessories); ?></h4>					
					
					
					<script type="text/javascript" language="javascript">

						$(document).ready(function () {
					
							$(".elementItemAccessories0").click(function(){
								$(".elementItemAccessories0").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemAccessories0").hover(function(){	
								var kids = $(this).children('.elementItemAccessoriesCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemAccessoriesCloud');
								$(kids).hide();
							});
					
							$(".elementItemAccessories1").click(function(){
								$(".elementItemAccessories1").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemAccessories1").hover(function(){	
								var kids = $(this).children('.elementItemAccessoriesCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemAccessoriesCloud');
								$(kids).hide();
							});
					
							$(".elementItemAccessories2").click(function(){
								$(".elementItemAccessories2").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemAccessories2").hover(function(){	
								var kids = $(this).children('.elementItemAccessoriesCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemAccessoriesCloud');
								$(kids).hide();
							});
					
							$(".elementItemAccessories3").click(function(){
								$(".elementItemAccessories3").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemAccessories3").hover(function(){	
								var kids = $(this).children('.elementItemAccessoriesCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemAccessoriesCloud');
								$(kids).hide();
							});
						});

					</script>	
					
					
					
					<?php if( $this->rowProduct['product_accessories_0'] == 1 ){ ?>
				
					<div class="row" style="background-color:#ccc;margin:5px;padding:10px;">
						<b><?php echo @Lib_Lang::translate(front_configurator_accessories1); ?></b>						
					</div>
					
						<div class="row" style="margin:5px;">
						<?php if( count($this->dataAccessories) > 0 ){ ?>
						
						
						<div class="elementItem elementItemAccessories0<?php if($this->dataSelect['product_accessories_id']=='')echo' activ';?>" data-field="product_accessories_id" data-value="">	
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/np.jpg" />
								</div>
							<center><?php echo @Lib_Lang::translate(product_accessoriesname_bp); ?></center>
						</div>
						
						<?php foreach ($this->dataAccessories as $key => $val): ?>
						
						<div class="elementItem elementItemAccessories0<?php if($val['product_accessories_id']==$this->dataSelect['product_accessories_id'])echo' activ';?>" data-field="product_accessories_id" data-value="<?php echo$val['product_accessories_id']; ?>">
							<?php if( $val['product_accessories_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/accessories/<?php echo$val['product_accessories_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_accessoriesname_.$val['product_accessories_id']); ?></center>
							<div class="elementItemAccessoriesCloud" style="display:none;position:relative;top:-151px;left:145px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_accessories_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/accessories/<?php echo$val['product_accessories_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_accessoriesname_.$val['product_accessories_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_accessoriesdescription_.$val['product_accessories_id']); ?>
							</div>
							
							</div>
						</div>
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>	
						</div>
						
					<?php } ?>	
					
					
					
					
					
					
					<?php if( $this->rowProduct['product_accessories_1'] == 1 ){ ?>
					
					<div class="row" style="background-color:#ccc;margin:5px;padding:10px;">
						<b><?php echo @Lib_Lang::translate(front_configurator_accessories2); ?></b>						
					</div>
					
						<div class="row" style="margin:5px;">
						<?php if( count($this->dataAccessories2) > 0 ){ ?>
						
						
						<div class="elementItem elementItemAccessories1<?php if($this->dataSelect['product_accessories_id2']=='')echo' activ';?>" data-field="product_accessories_id2" data-value="">	
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/np.jpg" />
								</div>
							<center><?php echo @Lib_Lang::translate(product_accessoriesname_bp); ?></center>
						</div>
						
						<?php foreach ($this->dataAccessories2 as $key => $val): ?>
						
						<div class="elementItem elementItemAccessories1<?php if($val['product_accessories_id']==$this->dataSelect['product_accessories_id2'])echo' activ';?>" data-field="product_accessories_id2" data-value="<?php echo$val['product_accessories_id']; ?>">
							<?php if( $val['product_accessories_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/accessories/<?php echo$val['product_accessories_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_accessoriesname_.$val['product_accessories_id']); ?></center>
							<div class="elementItemAccessoriesCloud" style="display:none;position:relative;top:-151px;left:145px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_accessories_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/accessories/<?php echo$val['product_accessories_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_accessoriesname_.$val['product_accessories_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_accessoriesdescription_.$val['product_accessories_id']); ?>
							</div>
							
							</div>
						</div>
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>	
						</div>
					
					<?php } ?>
					
					
					
					
					
					
					
					
					<?php if( $this->rowProduct['product_accessories_2'] == 1 ){ ?>
					
					<div class="row" style="background-color:#ccc;margin:5px;padding:10px;">
						<b><?php echo @Lib_Lang::translate(front_configurator_accessories3); ?></b>						
					</div>
					
						<div class="row" style="margin:5px;">
						<?php if( count($this->dataAccessories3) > 0 ){ ?>
						
						
						<div class="elementItem elementItemAccessories2<?php if($this->dataSelect['product_accessories_id3']=='')echo' activ';?>" data-field="product_accessories_id3" data-value="">	
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/np.jpg" />
								</div>
							<center><?php echo @Lib_Lang::translate(product_accessoriesname_bp); ?></center>
						</div>
						
						<?php foreach ($this->dataAccessories3 as $key => $val): ?>
						
						<div class="elementItem elementItemAccessories2<?php if($val['product_accessories_id']==$this->dataSelect['product_accessories_id3'])echo' activ';?>" data-field="product_accessories_id3" data-value="<?php echo$val['product_accessories_id']; ?>">
							<?php if( $val['product_accessories_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/accessories/<?php echo$val['product_accessories_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_accessoriesname_.$val['product_accessories_id']); ?></center>
							<div class="elementItemAccessoriesCloud" style="display:none;position:relative;top:-151px;left:145px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_accessories_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/accessories/<?php echo$val['product_accessories_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_accessoriesname_.$val['product_accessories_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_accessoriesdescription_.$val['product_accessories_id']); ?>
							</div>
							
							</div>
						</div>
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>	
						</div>
						
						<?php } ?>
					
					
					
					
					
					
					
					
					<?php if( $this->rowProduct['product_accessories_3'] == 1 ){ ?>
					
					<div class="row" style="background-color:#ccc;margin:5px;padding:10px;">
						<b><?php echo @Lib_Lang::translate(front_configurator_accessories4); ?></b>						
					</div>
					
						<div class="row" style="margin:5px;">
						<?php if( count($this->dataAccessories4) > 0 ){ ?>
						
						
						<div class="elementItem elementItemAccessories3<?php if($this->dataSelect['product_accessories_id4']=='')echo' activ';?>" data-field="product_accessories_id4" data-value="">	
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/np.jpg" />
								</div>
							<center><?php echo @Lib_Lang::translate(product_accessoriesname_bp); ?></center>
						</div>
						
						<?php foreach ($this->dataAccessories4 as $key => $val): ?>
						
						<div class="elementItem elementItemAccessories3<?php if($val['product_accessories_id']==$this->dataSelect['product_accessories_id4'])echo' activ';?>" data-field="product_accessories_id4" data-value="<?php echo$val['product_accessories_id']; ?>">
							<?php if( $val['product_accessories_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/accessories/<?php echo$val['product_accessories_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_accessoriesname_.$val['product_accessories_id']); ?></center>
							<div class="elementItemAccessoriesCloud" style="display:none;position:relative;top:-151px;left:145px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_accessories_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/accessories/<?php echo$val['product_accessories_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_accessoriesname_.$val['product_accessories_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_accessoriesdescription_.$val['product_accessories_id']); ?>
							</div>
							
							</div>
						</div>
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>	
						</div>
						
						<?php } ?>
						
						
						
						
						
						
						
						
						
						
						
					</div>
				<?php } ?>
				
				</div>




				
				<?php } ?>
					
				<?php if( $this->rowProduct['product_legs'] == 1 ){ ?>
					<div class="configuratorMenuElement" data-field="legsBox"><?php if( $this->ProductFieldnameInfo['product_fieldname_legs'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_legs']; else echo @Lib_Lang::translate(front_configurator_legs); ?><div class="configuratorMenuElementZR"><?php echo @Lib_Lang::translate(front_configurator_zr); ?></div></div>
					
					
				<div class="configuratorDiv">
				
				
				
				
				
				
				
				
					
				<?php if( $this->rowProduct['product_legs'] == 1 ){ ?>
					<div class="configuratorDivElement" id="legsBox">					
						<h4><?php if( $this->ProductFieldnameInfo['product_fieldname_legs'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_legs']; else echo @Lib_Lang::translate(front_configurator_legs); ?></h4>					
					
					<div class="row" style="margin:5px;">
					<script type="text/javascript" language="javascript">

						$(document).ready(function () {
					
							$(".elementItemLegs").click(function(){
								$(".elementItemLegs").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemLegs").hover(function(){	
								var kids = $(this).children('.elementItemLegsCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemLegsCloud');
								$(kids).hide();
							});
						});

					</script>	
					
						<?php if( count($this->dataLegs) > 0 ){ ?>
						<?php foreach ($this->dataLegs as $key => $val): ?>
						
						<div class="elementItem elementItemLegs<?php if($val['product_legs_id']==$this->dataSelect['product_legs_id'])echo' activ';?>" data-field="product_legs_id" data-value="<?php echo$val['product_legs_id']; ?>">
							<?php if( $val['product_legs_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/legs/<?php echo$val['product_legs_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_legsname_.$val['product_legs_id']); ?></center>
							<div class="elementItemLegsCloud" style="display:none;position:relative;top:-151px;left:145px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_legs_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/legs/<?php echo$val['product_legs_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_legsname_.$val['product_legs_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_legsdescription_.$val['product_legs_id']); ?>
							</div>
							
							</div>
						</div>
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>	
					</div>	
					</div>
				<?php } ?>
				</div>




				
				<?php } ?>
					
				<?php if( $this->rowProduct['product_handles'] == 1 ){ ?>
					<div class="configuratorMenuElement" data-field="handlesBox"><?php if( $this->ProductFieldnameInfo['product_fieldname_handles'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_handles']; else echo @Lib_Lang::translate(front_configurator_handles); ?><div class="configuratorMenuElementZR"><?php echo @Lib_Lang::translate(front_configurator_zr); ?></div></div>
					
					
				<div class="configuratorDiv">
				
				
				
				
				
				
					
				<?php if( $this->rowProduct['product_handles'] == 1 ){ ?>
					<div class="configuratorDivElement" id="handlesBox">					
						<h4><?php if( $this->ProductFieldnameInfo['product_fieldname_handles'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_handles']; else echo @Lib_Lang::translate(front_configurator_handles); ?></h4>					
					
					
					
					<div class="row" style="margin:5px;">
					<script type="text/javascript" language="javascript">

						$(document).ready(function () {
					
							$(".elementItemHandles").click(function(){
								$(".elementItemHandles").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemHandles").hover(function(){	
								var kids = $(this).children('.elementItemHandlesCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemHandlesCloud');
								$(kids).hide();
							});
							
							
							$('.filtrhandlestype').click(function(){
								var option = $(this).attr('data-field');
								if( option == 'hoptionall' ){					
									$('div .hand').show();			
								}else{				
									$('div .hand').hide();												
									$('div .'+option).show();	
								}
							});
							
						});

					</script>	
					
					
					
						
						<div class="row" style="text-align:center;background-color:#ccc;margin:5px;padding:10px;">
						
							<a href="javascript:void(0);" class="filtrhandlestype" data-field="hoptionall"><?php echo @Lib_Lang::translate(front_configurator_handles_option_all); ?></a>
						
							<a href="javascript:void(0);" class="filtrhandlestype" data-field="hoption0"><?php echo @Lib_Lang::translate(front_configurator_handles_option1); ?></a>
						
							<a href="javascript:void(0);" class="filtrhandlestype" data-field="hoption1"><?php echo @Lib_Lang::translate(front_configurator_handles_option2); ?></a>
						
							<a href="javascript:void(0);" class="filtrhandlestype" data-field="hoption9"><?php echo @Lib_Lang::translate(front_configurator_handles_option9); ?></a>
						
						</div>
					
					
					
					
						<?php if( count($this->dataHandles) > 0 ){ ?>
						
						
						<div class="elementItem elementItemHandles<?php if($this->dataSelect['product_handles_id']=='')echo' activ';?><?php echo' hand';?>" data-field="product_handles_id" data-value="">	
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/np.jpg" />
								</div>
							<center><?php echo @Lib_Lang::translate(product_accessoriesname_bp); ?></center>
						</div>
						
						<?php foreach ($this->dataHandles as $key => $val): ?>
						
						<div class="elementItem elementItemHandles<?php if($val['product_handles_id']==$this->dataSelect['product_handles_id'])echo' activ';?><?php echo' hand hoption'.$val['product_handles_typehandles'];?>" data-field="product_handles_id" data-value="<?php echo$val['product_handles_id']; ?>">
							<?php if( $val['product_handles_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/handles/<?php echo$val['product_handles_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_handlesname_.$val['product_handles_id']); ?></center>
							<div class="elementItemHandlesCloud" style="display:none;position:relative;top:-151px;left:145px;background-color:#fff;border:3px solid #464646;width:300px;z-index:9999;">
							
							<?php if( $val['product_handles_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/handles/<?php echo$val['product_handles_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_handlesname_.$val['product_handles_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_handlesdescription_.$val['product_handles_id']); ?>
							</div>
							
							</div>
						</div>
						
						<?php endforeach; ?>
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>	
					</div>
					</div>
				<?php } ?>
				</div>




				
				<?php } ?>
					
				<?php if( $this->rowProduct['product_options'] == 1 OR $this->rowProduct['product_options2'] == 1 ){ ?>
					<div class="configuratorMenuElement" data-field="optionsBox"><?php if( $this->ProductFieldnameInfo['product_fieldname_options'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options']; else echo @Lib_Lang::translate(front_configurator_options); ?><div class="configuratorMenuElementZR"><?php echo @Lib_Lang::translate(front_configurator_zr); ?></div></div>
					
					
				<div class="configuratorDiv">
				
				
				
				<div class="configuratorDivElement" id="optionsBox">
				
				
				
				
				
				
					
				<?php if( $this->rowProduct['product_options'] == 1 ){ ?>
					<div>					
						<h4><?php if( $this->ProductFieldnameInfo['product_fieldname_options'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options']; else echo @Lib_Lang::translate(front_configurator_options); ?></h4>					
					
					
					<div class="row" style="margin:5px;">
					<script type="text/javascript" language="javascript">

						$(document).ready(function () {	
					
							$(".elementItemOptions").click(function(){
								$(".elementItemOptions").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemOptions2").click(function(){
								$(".elementItemOptions2").removeClass('activ');
								$(this).addClass('activ');	
								
							});
							
							$('#opti1H').hover(function(){
								$('.wizualizacjaop').hide();
								$('#opti1').show();
							});
							
							$('#opti2H').hover(function(){
								$('.wizualizacjaop').hide();
								$('#opti2').show();
							});
							
							$('#opti3H').hover(function(){
								$('.wizualizacjaop').hide();
								$('#opti3').show();
							});
							
							$('#opti4H').hover(function(){
								$('.wizualizacjaop').hide();
								$('#opti4').show();
							});
							
							$('[name^="product_options_"]').change(function(){
								var idProduct = <?php echo$this->idProduct;?>;
								var pole = $(this).attr('name');
								var value = $(this).val();
								if( value > 150 ){
									$(this).val(150);
									value = 150;
								}
								if( value < 0 ){
									$(this).val(0);
									value = 0;
								}
								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: pole, product_value: value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );								
							});
							
						});

					</script>
					
					<table width="100%">
						<tr>
						<td>
						
						<table width="100%" class="tr12">
							<tr id="opti1H">
								<td width="200px"><?php if( $this->ProductFieldnameInfo['product_fieldname_options1_1'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options1_1']; else echo @Lib_Lang::translate(front_option1); ?></td>
								<td style="text-align:right;"><input style="width:60px;" name="product_options_1" type="number" step="1" min="0" max="150" value="<?php echo$this->dataSelect['product_options_1'];?>" /></td>
							</tr>
							<tr id="opti2H">
								<td width="200px"><?php if( $this->ProductFieldnameInfo['product_fieldname_options1_2'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options1_2']; else echo @Lib_Lang::translate(front_option2); ?></td>
								<td style="text-align:right;"><input style="width:60px;" name="product_options_2" type="number" step="1" min="0" max="150" value="<?php echo$this->dataSelect['product_options_2'];?>" /></td>
							</tr>
							<tr id="opti3H">
								<td width="200px"><?php if( $this->ProductFieldnameInfo['product_fieldname_options1_3'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options1_3']; else echo @Lib_Lang::translate(front_option3); ?></td>
								<td style="text-align:right;"><input style="width:60px;" name="product_options_3" type="number" step="1" min="0" max="150" value="<?php echo$this->dataSelect['product_options_3'];?>" /></td>
							</tr>
							<tr id="opti4H">
								<td width="200px"><?php if( $this->ProductFieldnameInfo['product_fieldname_options1_4'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options1_4']; else echo @Lib_Lang::translate(front_option4); ?></td>
								<td style="text-align:right;"><input style="width:60px;" name="product_options_4" type="number" step="1" min="0" max="150" value="<?php echo$this->dataSelect['product_options_4'];?>" /></td>
							</tr>
						</table>
						
						</td>
						<td width="210px" height="290px" align="center" style="background-color:#fff;">
						
							<?php								
								for( $iJ = 1; $iJ <= 4; $iJ++ ){
								if( $this->rowProduct['product_options_'.$iJ.'_img'] != '' ){
							?>
							<div class="wizualizacjaop" id="opti<?php echo$iJ; ?>" style="display:none;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/options/<?php echo$this->rowProduct['product_options_'.$iJ.'_img']; ?>.jpeg" style="width:140px;" /></div>
							<?php		
								}
								}
							?>
							
							<?php /*
							<div class="wizualizacjaop" id="opti2" style="display:none;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/o2.jpg" style="width:140px;" /></div>
							<div class="wizualizacjaop" id="opti3" style="display:none;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/o3.jpg" style="width:140px;" /></div>
							<div class="wizualizacjaop" id="opti4" style="display:none;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/o4.jpg" style="width:140px;" /></div>
							*/ ?>
						</td>
						</tr>
					</table>
					
					</div>
					</div>
					
				<?php } ?>
					
					
					
					
				<?php if( $this->rowProduct['product_options2'] == 1 ){ ?>
					<div>							
					
					
					<div class="row" style="margin:5px;">
					
					
					
					
					<div style="width:100%;float:left;margin-top:15px;margin-bottom:15px;">
						<div class="elementItem elementItemOptions<?php if($this->dataSelect['product_options_id']==0)echo' activ';?><?php echo' hand';?>" data-field="product_options_id" data-value="0">	
							<?php /* ?>
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/ww0.jpg" />
								</div>
							<?php */ ?>
							<?php if( $this->rowProduct['product_options2_img1'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/options/<?php echo$this->rowProduct['product_options2_img1']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height:135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height:135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php if( $this->ProductFieldnameInfo['product_fieldname_options2_1'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options2_1']; else echo @Lib_Lang::translate(front_optionww0); ?></center>
						</div>					
						
						<div class="elementItem elementItemOptions<?php if($this->dataSelect['product_options_id']==1)echo' activ';?><?php echo' hand';?>" data-field="product_options_id" data-value="1">	
							<?php /* ?>
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/ww1.jpg" />
								</div>
							<?php */ ?>
							<?php if( $this->rowProduct['product_options2_img2'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/options/<?php echo$this->rowProduct['product_options2_img2']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height:135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height:135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php if( $this->ProductFieldnameInfo['product_fieldname_options2_2'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options2_2']; else echo @Lib_Lang::translate(front_optionww1); ?></center>
						</div>	
					</div>
					
					
					<div style="width:100%;float:left;margin-top:15px;margin-bottom:15px;">
						<div class="elementItem elementItemOptions2<?php if($this->dataSelect['product_options_id2']==0)echo' activ';?><?php echo' hand';?>" data-field="product_options_id2" data-value="0">	
							<?php /* ?>
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/pp0.jpg" />
								</div>
							<?php */ ?>
							<?php if( $this->rowProduct['product_options2_img3'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/options/<?php echo$this->rowProduct['product_options2_img3']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height:135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height:135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php if( $this->ProductFieldnameInfo['product_fieldname_options2_3'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options2_3']; else echo @Lib_Lang::translate(front_optionpp1); ?></center>
						</div>					
						
						<div class="elementItem elementItemOptions2<?php if($this->dataSelect['product_options_id2']==1)echo' activ';?><?php echo' hand';?>" data-field="product_options_id2" data-value="1">	
							<?php /* ?>
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/pp1.jpg" />
								</div>
							<?php */ ?>
							<?php if( $this->rowProduct['product_options2_img4'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/options/<?php echo$this->rowProduct['product_options2_img4']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height:135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height:135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php if( $this->ProductFieldnameInfo['product_fieldname_options2_4'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options2_4']; else echo @Lib_Lang::translate(front_optionpp2); ?></center>
						</div>				
						
						<div class="elementItem elementItemOptions2<?php if($this->dataSelect['product_options_id2']==2)echo' activ';?><?php echo' hand';?>" data-field="product_options_id2" data-value="2">
							<?php /* ?>	
								<div style="background-color:#fff;width:100%;height: 135px;margin-bottom:3px;text-align:center;padding-top:15px;">
									<img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/pp2.jpg" />
								</div>
							<?php */ ?>
							<?php if( $this->rowProduct['product_options2_img5'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/options/<?php echo$this->rowProduct['product_options2_img5']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height:135px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height:135px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php if( $this->ProductFieldnameInfo['product_fieldname_options2_5'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_options2_5']; else echo @Lib_Lang::translate(front_optionpp3); ?></center>
						</div>	
					</div>
					
					 
					
					</div>
					</div>
				<?php } ?>
				
				
				
				
				
				</div>
				
				
				
				
				
				
				
				
				
				
				
				
				
				</div>




				
				<?php } ?>
				
				</div>
				
				<div class="configuratorDiv">
				
				
		


					<script type="text/javascript" language="javascript">

						$(document).ready(function () {		
						
						
							$(".elementItem").click(function(){
								var idProduct = <?php echo$this->idProduct;?>;
								var product_field = $(this).attr('data-field');
								var product_value = $(this).attr('data-value');
								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );
								
							});	
						
							function changeSize(){
								var idProduct = <?php echo$this->idProduct;?>;
								var product_height = $('[name="input_height"]').val();
								var product_width = $('[name="input_width"]').val();
								var product_depth = $('[name="input_depth"]').val();
								
								if( $('[name="input_height_view"]').attr('unit') == 'mm' ){
									$('[name="input_height_view"]').val(product_height);
									$('[name="input_height_view"]')
										.attr('step',$('[name="input_height"]').attr('step'))
										.attr('max',$('[name="input_height"]').attr('max'))
										.attr('min',$('[name="input_height"]').attr('min'));
								}else{
									$('[name="input_height_view"]').val(product_height/10);
									$('[name="input_height_view"]')
										.attr('step',$('[name="input_height"]').attr('step')/10)
										.attr('max',$('[name="input_height"]').attr('max')/10)
										.attr('min',$('[name="input_height"]').attr('min')/10);
								}
								
								if( $('[name="input_width_view"]').attr('unit') == 'mm' ){
									$('[name="input_width_view"]').val(product_width);
									$('[name="input_width_view"]')
										.attr('step',$('[name="input_width"]').attr('step'))
										.attr('max',$('[name="input_width"]').attr('max'))
										.attr('min',$('[name="input_width"]').attr('min'));
								}else{
									$('[name="input_width_view"]').val(product_width/10);
									$('[name="input_width_view"]')
										.attr('step',$('[name="input_width"]').attr('step')/10)
										.attr('max',$('[name="input_width"]').attr('max')/10)
										.attr('min',$('[name="input_width"]').attr('min')/10);
								}
								
								if( $('[name="input_depth_view"]').attr('unit') == 'mm' ){
									$('[name="input_depth_view"]').val(product_depth);
									$('[name="input_depth_view"]')
										.attr('step',$('[name="input_depth"]').attr('step'))
										.attr('max',$('[name="input_depth"]').attr('max'))
										.attr('min',$('[name="input_depth"]').attr('min'));
								}else{
									$('[name="input_depth_view"]').val(product_depth/10);
									$('[name="input_depth_view"]')
										.attr('step',$('[name="input_depth"]').attr('step')/10)
										.attr('max',$('[name="input_depth"]').attr('max')/10)
										.attr('min',$('[name="input_depth"]').attr('min')/10);
								}
								
								$('a.changeHeight > div').css('background-color','#ddd');
								$("a.changeHeight[cmd='"+product_height+"'] > div").css('background-color','none repeat scroll 0 0 rgb(242, 101, 34)');
								$('a.changeHeight > div').css('display','inline');
								$("a.changeHeight[cmd='"+product_height+"'] > div").css('display','none');
								
								$('a.changeWidth > div').css('background-color','#ddd');
								$("a.changeWidth[cmd='"+product_width+"'] > div").css('background-color','none repeat scroll 0 0 rgb(242, 101, 34)');
								$('a.changeWidth > div').css('display','inline');
								$("a.changeWidth[cmd='"+product_width+"'] > div").css('display','none');
								
								$('a.changeDepth > div').css('background-color','#ddd');
								$("a.changeDepth[cmd='"+product_depth+"'] > div").css('background-color','none repeat scroll 0 0 rgb(242, 101, 34)');								
								$('a.changeDepth > div').css('display','inline');
								$("a.changeDepth[cmd='"+product_depth+"'] > div").css('display','none');
								
								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_height: product_height, product_width: product_width, product_depth: product_depth}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );	
																
							}
						
						
							$(function(){	
								var currentValue = $('[name="input_height"]');	
								
								<?php if( $this->rowProduct['product_height_def_only'] == 1 ){
									$valMap = '';
									foreach ( $this->ProductHeight as $key => $val ):
										$valMap = $valMap.$val['product_height_value'].',';
									endforeach;
									echo'var valMap = ['.$valMap.'];';
								} ?>
								
								$("#product_height").slider({ 
									value: <?php echo isset($this->dataSelect['product_height'])?$this->dataSelect['product_height']:$this->rowProduct['product_height_default'];?>,
									max: <?php echo$this->rowProduct['product_height_max'];?>,
									min: <?php echo$this->rowProduct['product_height_min'];?>,
									change: function(event, ui) {
										currentValue.val(ui.value);
										changeSize();
									}
									<?php if( $this->rowProduct['product_height_def_only'] == 1 ){
										echo',
											slide: function(event, ui) {
												return $.inArray(ui.value, valMap) != -1;
											}';
									} ?>
								});	
							});
							
							$('[name="input_height"]').change(function(){
								if( $(this).val() < <?php echo$this->rowProduct['product_height_min'];?> ){
									$(this).val(<?php echo$this->rowProduct['product_height_min'];?>);
								}
								if( $(this).val() > <?php echo$this->rowProduct['product_height_max'];?> ){
									$(this).val(<?php echo$this->rowProduct['product_height_max'];?>);
								}
								$("#product_height").slider( "value", $(this).val() );
							});
							
							$(function(){		
								var currentValue = $('[name="input_width"]');
								
								<?php if( $this->rowProduct['product_width_def_only'] == 1 ){
									$valMap = '';
									foreach ( $this->ProductWidth as $key => $val ):
										$valMap = $valMap.$val['product_width_value'].',';
									endforeach;
									echo'var valMap = ['.$valMap.'];';
								} ?>
								
								$("#product_width").slider({ 
									value: <?php echo isset($this->dataSelect['product_width'])?$this->dataSelect['product_width']:$this->rowProduct['product_width_default'];?>,
									max: <?php echo$this->rowProduct['product_width_max'];?>,
									min: <?php echo$this->rowProduct['product_width_min'];?>,
									change: function(event, ui) {
										currentValue.val(ui.value);
										changeSize();
									}
									<?php if( $this->rowProduct['product_width_def_only'] == 1 ){
										echo',
											slide: function(event, ui) {
												return $.inArray(ui.value, valMap) != -1;
											}';
									} ?>
								});	
							});
							
							$('[name="input_width"]').change(function(){
								if( $(this).val() < <?php echo$this->rowProduct['product_width_min'];?> ){
									$(this).val(<?php echo$this->rowProduct['product_width_min'];?>);
								}
								if( $(this).val() > <?php echo$this->rowProduct['product_width_max'];?> ){
									$(this).val(<?php echo$this->rowProduct['product_width_max'];?>);
								}
								$("#product_width").slider( "value", $(this).val() );
							});
							
							$(function(){		
								var currentValue = $('[name="input_depth"]');
								
								<?php if( $this->rowProduct['product_depth_def_only'] == 1 ){
									$valMap = '';
									foreach ( $this->ProductDepth as $key => $val ):
										$valMap = $valMap.$val['product_depth_value'].',';
									endforeach;
									echo'var valMap = ['.$valMap.'];';
								} ?>
								
								$("#product_depth").slider({ 
									value: <?php echo isset($this->dataSelect['product_depth'])?$this->dataSelect['product_depth']:$this->rowProduct['product_depth_default'];?>,
									max: <?php echo$this->rowProduct['product_depth_max'];?>,
									min: <?php echo$this->rowProduct['product_depth_min'];?>,
									change: function(event, ui) {
										currentValue.val(ui.value);
										changeSize();
									}
									<?php if( $this->rowProduct['product_depth_def_only'] == 1 ){
										echo',
											slide: function(event, ui) {
												return $.inArray(ui.value, valMap) != -1;
											}';
									} ?>
								});	
							});
							
							$('[name="input_depth"]').change(function(){
								if( $(this).val() < <?php echo$this->rowProduct['product_depth_min'];?> ){
									$(this).val(<?php echo$this->rowProduct['product_depth_min'];?>);
								}
								if( $(this).val() > <?php echo$this->rowProduct['product_depth_max'];?> ){
									$(this).val(<?php echo$this->rowProduct['product_depth_max'];?>);
								}
								$("#product_depth").slider( "value", $(this).val() );
							});
							
							
							
							$('#wysokoscHover, #wysokoscHover2').hover(function(){
								$('.wizualizacja').hide();
								$('#wysokosc').show();
							});
							
							$('#szerokoscHover, #szerokoscHover2').hover(function(){
								$('.wizualizacja').hide();
								$('#szerokosc').show();
							});
							
							$('#glebokoscHover, #glebokoscHover2').hover(function(){
								$('.wizualizacja').hide();
								$('#glebokosc').show();
							});
							
							
							$('[name="input_depth"], [name="input_height"], [name="input_depth"]').change(function(){
								changeSize();
							});
							
							
							
							
							
							
							
							
							
							changeSize();
							
						});

					</script>	
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				</div>
				
				
				
				<?php
				
					$box = $this->panelBox;
					
					if( count($box) > 1 ){ 
				
				?>			


<script type="text/javascript" language="javascript">
	
	$(document).ready(function () {		
	
		var box = [<?php $iBox = 0;
				foreach( $box as $key => $val ){
					$iBox++;
					if( count($box)!=$iBox ) echo'"'.$val.'",';
					else  echo'"'.$val.'"';
				}
			?>];
		var boxMax = <?php echo count($box)-1; ?>;
		$('#nextBoxButton').attr('actual',box[0]);
		$('#nextBoxButton').attr('actualid',0);
	
		$('#nextBoxButton').click(function(){
		
			var actual = $(this).attr('actual');
			var actualid = parseInt($(this).attr('actualid'));
			
			if( actualid+1 <= boxMax ){
				$('#nextBoxButton').attr('actual',box[actualid+1]);
				$('#nextBoxButton').attr('actualid',actualid+1);
				$(".configuratorDivElement").hide();
				$(".configuratorMenuElement").removeClass('active');
				$("[data-field='"+box[actualid+1]+"']").addClass('active');
				$("#"+box[actualid+1]).show();
				
                $('html, body').animate({
					scrollTop: $(".configuratorBox").offset().top
				}, 500);
			}else{
				
                $('html, body').animate({
					scrollTop: $("#shopProductTable").offset().top
				}, 200, function(){
					$(".priceConf, .amountConf, .addConf").css('color','red');
					$("#shopProduct").effect( "pulsate", {times:1}, 500 );
				
				});			
			}
		
		});
	
	});

</script>		
				<table width="100%"><tr><td>
				<div class="row text-right">
				<br />
				<div id="nextBox">
					<button id="nextBoxButton"><?php echo @Lib_Lang::translate(front_configurator_next); ?></button>
				</div>
				
				</div>
				</td></tr></table>
				<?php
				
					}
					
				?>
				
				
				
				
			</div>
			
			
			
			
			
			
			
			
			
			
			
			
			
			<div class="productBox">
			
			
			
			

<script type="text/javascript" language="javascript">
$(document).ready(function () {

});
</script>


<div class="productPhotoConfiguratorBox">
<?php
	$imgmain = '';
	for( $i = 8; $i >= 1; $i-- ){
	
		/*
		if( $i == 1 ) $ti = '';
		else $ti = '_'.$i;
		*/
		$ti = '_'.$i;

		if( $this->rowProduct['product_image'.$ti] ){
			$imgmain = $this->rowProduct['product_image'.$ti];
		}
	}
?>  
<?php if( $imgmain != '' ){ ?>
	<div class="productPhoto"> <img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/product/<?php echo$imgmain; ?>.jpeg" class="placeholder" style="width:400px;margin:0 auto;" /></div>
<?php } ?>   
					
					
<?php
	for( $i = 1; $i <= 8; $i++ ){
	
	/*
	if( $i == 1 ) $ti = '';
	else $ti = '_'.$i;
	*/
	
	$ti = '_'.$i;
?>					
	<?php if( $this->rowProduct['product_image'.$ti] ){ ?>
		<a href="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/product/<?php echo$this->rowProduct['product_image'.$ti];?>.jpeg" data-lightbox="zdjecia">
			<img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/product/<?php echo$this->rowProduct['product_image'.$ti];?>_w100.jpeg" alt="Thumbnail">
		</a>
	<?php } ?>   
<?php 
	}
?>     




				</div>

				
				<div class="productConfiguratorBox"><?php echo @Lib_Lang::consta(product_description_.$this->rowProduct['product_id']); ?></div>
				<div class="productConfiguratorBox" id="productTable"></div>
			</div>
		
		
		</div>
	</div>
	
	
	


	<div class="row">
		<div class="col-xs-12">

	<?php if( count($this->dataLinked) > 0 ){ ?>	
	
		<h3><?php echo @Lib_Lang::translate(front_configurator_product_linked); ?></h3>
				
		<?php foreach ($this->dataLinked as $key => $val): ?>
		
	<a href="<?php echo @$this->url(array('controller' => 'product', 'action' => 'index', 'id' => $val['product_id'], 'productname' => Lib_Link::getLinkName(@Lib_Lang::consta(product_name_.$val['product_id']))), 'product', true); ?>" class="categoryLink">
		<div class="col-xs-3">
			<div class="boxCategory">
				<div class="row text-center categoryPhoto" <?php if( $val['product_image'] ){ ?>style="background-image: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/product/<?php echo$val['product_image']; ?>.jpeg');"<?php } ?>></div>
				<div class="row text-center" style="padding-left:20px;padding-right:20px;">
				<?php echo @Lib_Lang::consta(product_name_.$val['product_id']); ?>
				</div>
			</div>
		</div>
	</a>
		
		<?php endforeach; ?>	
		
	<?php } ?>		
		
		</div>
	</div>
	
	
</div>
</div>












<?php echo $this->render('module/footer.phtml'); ?>

