Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/views/product/detail.php_
<div id="plugin_container">
	
<h2 class="main_title"><span>PRODUKT</span> <?php echo $product->title; ?></h2>
<br style="clear: both;"/>

<a href="" class="tab-a on" id="crop-btn">Kadrowanie</a>
<a href="" class="tab-a" id="visualisation-btn">Wizualizacja</a>
<!-- 1cm = 28px dla 72dpi dodałem dla photo left: 78px; //-->
<div id="crop-tab">
<?php
	$sizes = GetImageSize("$product->thumb"); 
	if( $sizes[0] > $sizes[1] ) {
		$orient = "width";
		$orient_top = 0;
		$orient_left = 0;
	} else  {
		$orient = "height";
		$orient_top = 1;
		$orient_left = 0;
	}
		
	
	$width = $sizes[0];
	$height = $sizes[1];
	
	$bleed = (28*5);
	$dst_x = 0;   // X-coordinate of destination point. 
	$dst_y = 0;   // Y --coordinate of destination point. 
	$src_x = $bleed; // Crop Start X position in original image
	$src_y = $bleed; // Crop Srart Y position in original image
	$dst_w = $width-($bleed*2); // Thumb width
	$dst_h = $height-($bleed*2); // Thumb height
	//$src_w = $src_x+$dst_w; // $src_x + $dst_w Crop end X position in original image
	//$src_h = $src_y+$dst_h; // $src_y + $dst_h Crop end Y position in original image
	$src_w = $width-($bleed*2);
	$src_h = $height-($bleed*2);
	
	if( $width > $height) {
	$rateing = round($width/500);
	} else {
	$rateing = round($height/500);
	}
	
	$w_addon = $bleed/$rateing;
	$w_addon_2 = 500+($w_addon*2);
	
	$w_addon = number_format($w_addon, 2, '.', '');
	$w_addon_2 = number_format($w_addon_2, 2, '.', '');

	// Creating an image with true colors having thumb dimensions.( to merge with the original image )
	$dst_image = imagecreatetruecolor($dst_w,$dst_h);
	// Get original image
	$src_image = imagecreatefromjpeg($product->thumb);
	// Cropping 
	imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
	// Saving 
	imagejpeg($dst_image, "crop.jpg");
	
	
	/*
	<img src="/image.php/image-name.jpg?<?php echo $orient; ?>=570&amp;image=/<?php echo $product->thumb; ?>" style="display: inline; position: absolute; top: <?php echo $orient_top; ?>px; left: 0px; z-index: 1; opacity: 0.7; filter: alpha(opacity=70);">
		<div id="photo" style="position: relative; float: left; width: 500px; height: 500px; left: <?php echo $orient_left; ?>px; overflow: hidden;">
			<div id="all_my" >
				<div id="photo-crop" style="position: absolute; width: 500px; height: 500px; top: -400px; left: 0px; z-index: 3;"></div>
				<img id="photo-img" onmousedown="if (event.preventDefault) event.preventDefault()" src="crop.jpg" style="display: inline; <?php echo $orient; ?>: 500px; top: 54px; left: 54px; z-index: 2; opacity: 1; filter: alpha(opacity=100);">
				<!--
				<img id="photo-img" onmousedown="if (event.preventDefault) event.preventDefault()" src="/image.php/image-name.jpg?<?php echo $orient; ?>=500&amp;image=/<?php echo $product->thumb; ?>" style="display: inline; position: absolute; top: 0px; left: 0px;">
				//-->
			</div>
		</div>
			*/
?>
<!-- // left: <?php echo $orient_left; ?>px;  //-->

	<div id="plugin_left" class="plugin_left">
		<div class="crop_image_box">
		<div class="shadow_mask_my"></div>	
		<img id="bg_image_bleed" src="<?php echo $product->thumb; ?>" style="float: left; display: inline; <?php echo $orient; ?>: <?php echo $w_addon_2; ?>px; position: absolute; top: 0px; left: 0px; z-index: 1; ">
		
			<div id="photo" style="float: left; top: <?php echo $w_addon; ?>px; left: <?php echo $w_addon; ?>px;">
			
			<div style="float: left; width: 100%; height: 500px; position: relative">
				<div id="all_my" >
				<div id="photo-crop" style="position: absolute; width: 500px; height: 500px; top: -400px; left: 0px; z-index: 3;"></div>
				
				<img id="photo-img" onmousedown="if (event.preventDefault) event.preventDefault()" src="crop.jpg" style="<?php echo $orient; ?>: 500px; position: absolute; display: block; top: 0px; left: 0px; z-index: 2; opacity: 1; filter: alpha(opacity=100);">
				</div>
			</div>
		</div>	
	
		</div>
		<br style="clear: both;"/><br style="clear: both;"/>
		<div class="item_info">
		<iframe src="//www.facebook.com/plugins/like.php?href=http://<?php echo $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>&amp;width=500&amp;layout=standard&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=35&amp;appId=774621115889326" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:35px;" allowTransparency="true"></iframe>
		
		

		<br style="clear: both;"/>
		<p><strong>ID:</strong> <?php echo $product->id; ?> <strong>Autor</strong>: <?php echo $product->user->username; ?></p>		
		<p><?php echo $product->description; ?></p>
		<a class="button toLeft" style="color: #fff;" href="Artist/show/<?php echo $product->user->id; ?>">Zobacz inne prace tego artysty</a>
		
		<div class="popular-box">
			<img style="position: relative; top: 5px;" src="html/images/happy.png" alt=""/>  Popularność: <?php echo $product->viewed; ?>
		</div>
		
		</div>
	</div>
	
	<div id="plugin_right" class="plugin_right">
	
	<div class="select_types">
	<h2>Wybierz rodzaj produktu:</h2>
		<a href="#" rel="2" class="select_type type2 active_type" >Zdjęcia na płótnie</a><br/>
		<a href="#" rel="1" class="select_type type1" >Fototapety</a><br/>
		<a href="#" rel="3" class="select_type type3" >Plakaty</a>
	</div><br style="clear: both;"/><br style="clear: both;"/>
	<div id="photo-sizes">
		<h2>Wybierz układ obrazu</h2><br style="clear: both;"/><br style="clear: both;"/>
		<script>
			$(window).ready( function() {
				$('.select-size-template').click( function() {
					$('#iCanVisual').val(1);
					$('.config_sizes').show();
					var r = $(this).attr('rel');
					$('.select-size-template').removeClass('active-select-size-template');
					$(this).addClass('active-select-size-template');
					$('.parts_layer').hide();
					$('.parts_'+r).slideDown( "slow", function() {
					
					});
					
					PhotoSize.actualTop = 0; // Zerujemy ustawienia ruchu myszą
					PhotoSize.actualLeft = 0; // Zerujemy ustawienia ruchu myszą
					PhotoSize.setSize($('.parts_'+r).children().children().attr('href').replace('#',''));
					return false;
				});
			});
		</script>
		<a href="#" rel="1" class="select-size-template"><img src="html/plugin/templates/1czesciowy1.jpg" alt=""/></a>
		<a href="#" rel="2" class="select-size-template"><img src="html/plugin/templates/2czesciowy1.jpg" alt=""/></a>
		<a href="#" rel="3" class="select-size-template"><img src="html/plugin/templates/3czesciowy2.jpg" alt=""/></a>
		<a href="#" rel="4" class="select-size-template"><img src="html/plugin/templates/4czesciowy1.jpg" alt=""/></a>
		<a href="#" rel="5" class="select-size-template"><img src="html/plugin/templates/5czesciowy2.jpg" alt=""/></a>
		<div class="layers_p">
			<div class="parts_layer parts_1">
				<div class="template"><a href="#90x60" class="size-template"><img src="html/plugin/templates/1czesciowy1.jpg" alt=""/></a></div>
				<!--<div class="template"><a href="#90x60" class="size-template"><img src="html/plugin/templates/1czesciowy2.jpg" alt=""/></a></div>//-->
			</div>
			<div class="parts_layer parts_2">
				<div class="template"><a href="#60x40,60x40" class="size-template"><img src="html/plugin/templates/2czesciowy1.jpg" alt=""/></a></div>
				<div class="template"><a href="#60x40;60x40" class="size-template"><img src="html/plugin/templates/2czesciowy2.jpg" alt=""/></a></div>
				
				<div class="template"><a href="#40x60,40x60" class="size-template"><img src="html/plugin/templates/2czesciowy1.jpg" alt=""/></a></div>
				<div class="template"><a href="#40x60;40x60" class="size-template"><img src="html/plugin/templates/2czesciowy2.jpg" alt=""/></a></div>
				
			</div>
			<div class="parts_layer parts_3">
				<!--<div class="template"><a href="#40x60,40x60,40x60" class="size-template"><img src="html/plugin/templates/3czesciowy1.jpg" alt=""/></a></div>//-->
				<div class="template"><a href="#40x60,40x60,40x60" class="size-template"><img src="html/plugin/templates/3czesciowy2.jpg" alt=""/></a></div>
				<div class="template"><a href="#40x60,80x120,50x60" class="size-template"><img src="html/plugin/templates/3czesciowy3.jpg" alt=""/></a></div>
			</div>
			<div class="parts_layer parts_4">	
				<div class="template"><a href="#30x80,30x80,30x80,30x80" class="size-template"><img src="html/plugin/templates/4czesciowy1.jpg" alt=""/></a></div>
				<!--<div class="template"><a href="#50x50,50x50;50x50,50x50" class="size-template"><img src="html/plugin/templates/4czesciowy2.jpg" alt=""/></a></div>//-->
				<div class="template"><a href="#30x70,30x80,30x80,30x70" class="size-template"><img src="html/plugin/templates/4czesciowy3.jpg" alt=""/></a></div>
			</div>
			<div class="parts_layer parts_5">
				<div class="template"><a href="#30x60,30x70,30x80,30x70,30x60" class="size-template"><img src="html/plugin/templates/5czesciowy1.jpg" alt=""/></a></div>
				<div class="template"><a href="#30x80,30x80,30x80,30x80,30x80" class="size-template"><img src="html/plugin/templates/5czesciowy2.jpg" alt=""/></a></div>
				<!--<div class="template"><a href="#30x80,30x80,30x80,30x80,30x80" class="size-template"><img src="html/plugin/templates/5czesciowy3.jpg" alt=""/></a></div>//-->
			</div>
		</div>
	</div>
	<?php if( $product->can_own_photo ) : ?>
	<br style="clear: both;"/><br style="clear: both;"/>
	<h2>Masz własne zdjęcie?</h2>
		<div id="own_image_select">
			
			<form action="#" id="file_upload_form2" enctype="multipart/form-data" method="post">
				
				<input type="hidden" value="AA" name="name" id="name">
				<input type="file" name="file_upload2" id="file_upload2">
				<input class="button" type="submit" name="submit" value="Wgraj"/>
			</form>
		</div>
	<?php endif; ?>	
		
	<div class="config_sizes">
	
	<input type="hidden" id="iCanVisual" name="iCanVisual" value="0"/>
	<div class="murals_type">
		<h2>Wybierz rodzaj fototapety</h2>
		<input type="radio" id="paper" name="murals" value="paper" checked />
		<label for="f1">fototapeta papierowa</label><br style="clear: both;"/>
		<input type="radio" id="nonwoven" name="murals" value="nonwoven"/>
		<label for="f1">fototapeta z włókniny</label><br style="clear: both;"/>
		<input type="radio" id="adhesive" name="murals" value="adhesive"/>
		<label for="f1">fototapeta samoprzylepna (fotonaklejka)</label>
		<br style="clear: both;"/>
	</div>
	
	<div class="poster_type">
		<h2>Wybierz rodzaj plakatu</h2>
		<input type="radio" id="polypropylene" name="poster" value="polypropylene" checked />
		<label for="f1">Na papierze polipropylenowym</label><br style="clear: both;"/>
		<input type="radio" id="photo_paper" name="poster" value="photo_paper"/>
		<label for="f1">Na papierze fotograficznym</label><br style="clear: both;"/>
		<br style="clear: both;"/>
	</div>
	
		<h2>Ustaw wymiary:</h2>
		<p>przesuń zdjęcie w odpowiednim kierunku aby wybrać odpowiedni fragment</p>
		<br style="clear: both;"/><br style="clear: both;"/>
		<div id="photo-user-sizes">
			<div class="photo-size"><strong>1</strong> <small>szerokość</small> <input name="width" type="text" class="txt-inp inp-size" value="30"> <small>wysokość</small> <input type="text" name="height" class="txt-inp inp-size" value="60"><div class="hint">Kliknij ENTER aby potwierdzić wymiar</div><a href="" class="remove-icon" title="usuń rozmiar"></a><br>
			<!--
			<div class="fr"><small>wyrównanie</small> <input type="radio" name="dir1" value="0" checked="checked"> środek <input name="dir1" type="radio" value="-1"> góra <input name="dir1" type="radio" value="1"> dół</div><br class="clr">
			<div class="fr"><small>rząd</small> <select class="sel-inp" name="line"><option value="1">1</option></select></div>//-->
			</div>
		
			<div class="photo-size"><strong>2</strong> <small>szerokość</small> <input name="width" type="text" class="txt-inp inp-size" value="30"> <small>wysokość</small> <input type="text" name="height" class="txt-inp inp-size" value="70"><div class="hint" style="left: 735px; top: 755px; display: none;">Kliknij ENTER aby potwierdzić wymiar</div><a href="" class="remove-icon" title="usuń rozmiar"></a><br><div class="fr"><small>wyrównanie</small> <input type="radio" name="dir2" value="0" checked="checked"> środek <input name="dir2" type="radio" value="-1"> góra <input name="dir2" type="radio" value="1"> dół</div><br class="clr"><div class="fr"><small>rząd</small> <select class="sel-inp" name="line"><option value="1">1</option><option value="2">2</option></select></div></div><div class="photo-size"><strong>3</strong> <small>szerokość</small> <input name="width" type="text" class="txt-inp inp-size" value="30"> <small>wysokość</small> <input type="text" name="height" class="txt-inp inp-size" value="80"><div class="hint">Kliknij ENTER aby potwierdzić wymiar</div><a href="" class="remove-icon" title="usuń rozmiar"></a><br><div class="fr"><small>wyrównanie</small> <input type="radio" name="dir3" value="0" checked="checked"> środek <input name="dir3" type="radio" value="-1"> góra <input name="dir3" type="radio" value="1"> dół</div><br class="clr"><div class="fr"><small>rząd</small> <select class="sel-inp" name="line"><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div></div><div class="photo-size"><strong>4</strong> <small>szerokość</small> <input name="width" type="text" class="txt-inp inp-size" value="30"> <small>wysokość</small> <input type="text" name="height" class="txt-inp inp-size" value="70"><div class="hint">Kliknij ENTER aby potwierdzić wymiar</div><a href="" class="remove-icon" title="usuń rozmiar"></a><br><div class="fr"><small>wyrównanie</small> <input type="radio" name="dir4" value="0" checked="checked"> środek <input name="dir4" type="radio" value="-1"> góra <input name="dir4" type="radio" value="1"> dół</div><br class="clr"><div class="fr"><small>rząd</small> <select class="sel-inp" name="line"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option></select></div></div><div class="photo-size"><strong>5</strong> <small>szerokość</small> <input name="width" type="text" class="txt-inp inp-size" value="30"> <small>wysokość</small> <input type="text" name="height" class="txt-inp inp-size" value="60"><div class="hint">Kliknij ENTER aby potwierdzić wymiar</div><a href="" class="remove-icon" title="usuń rozmiar"></a><br><div class="fr"><small>wyrównanie</small> <input type="radio" name="dir5" value="0" checked="checked"> środek <input name="dir5" type="radio" value="-1"> góra <input name="dir5" type="radio" value="1"> dół</div><br class="clr"><div class="fr"><small>rząd</small> <select class="sel-inp" name="line"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select></div></div></div>
		

		<a href="" id="add-size" class="btn2 fr mr20 button toLeft" style="color: #fff;">Dodaj wymiar</a>
	</div>
	
		<br style="clear: both;"/><br style="clear: both;"/>
	
		<a href="#" class="button toLeft visualisation-btn" style="color: #fff;"><strong>Przejdź do wizualizacji, </strong> aby dodać do koszyka</a>
		<p id="iCanVisualInfo" style="display: none;">Proszę najpierw wybrać układ obrazu i nadać mu rozmiar!</p>
		<!--<a href="#" class="button toLeft showCart" rel="<?php echo $product->id; ?>"><strong>KUP</strong> ORYGINAŁ</a>
		<a href="#" class="button toLeft showCart" rel="<?php echo $product->id; ?>"><strong>KUP</strong> WYDRUK</a>///-->
		
	</div>
</div>	

<div id="visualisation-tab">

	<div id="plugin_left_v" class="plugin_left">
		<div id="imgContainer" >
		<img id="by__S" style="position: absolute; top: 0px; left: 0px; width: 570px; z-index: 799;" src=""/>
		<img id="by__" style="position: absolute; top: 0px; left: 0px; width: 570px; z-index: 800;" src=""/>
			<div id="strips_move" style="z-index: 801; top: 0px; left: 0px; position: absolute;">
				<div id="strips">
					<div id="transPlayStage" style="-webkit-perspective: 445;">
						<img src="/image.php/image-name.jpg?<?php echo $orient; ?>=500&amp;image=/<?php echo $product->thumb; ?>" id="transPlayChanged" style="-webkit-transform: translateX(5px) translateY(47px) translateZ(45px) rotateX(20deg) rotateY(69deg) rotateZ(-47deg); -webkit-transform-origin-x: 37%; -webkit-transform-origin-y: 67%;">
					</div>
				</div>
			</div>
		</div>
	</div>
	<div id="plugin_right_v" class="plugin_right">
	
		<div id="transPlayControls">
			
			<div style="float: left; width: 49%;">
				
			  <label for="transPlayScale">Skala (<span>100</span>)</label>
			  <input id="transPlayScale" type="range" min="0" max="100" default="100">
			  <a href="" onclick="return false;"><img src="html/images/3d.png" alt=""/></a>
			 
			  <!--
			  <label for="transPlayX">Przesuń w poziomie (<span>5</span> px)</label>
			  <input id="transPlayX" type="range" min="-170" max="170" default="0">
			  <label for="transPlayY">Przesuń w pionie (<span>47</span> px)</label>
			  <input id="transPlayY" type="range" min="-170" max="170" default="0">
			  //-->
			  
			  <!--
			  <label for="transPlayZ">Oś Z (<span>45</span> px)</label>
			  <input id="transPlayZ" type="range" min="-400" max="170" default="0">
			  
			   <label for="transPlayPerspective">Perspektywa (<span>445</span> px)</label>
			  <input id="transPlayPerspective" type="range" min="100" max="1000" default="800">
			  //-->
			</div>
			<div style="float: left; width: 49%; margin-left: 5px">
			<!--
			  <label for="transPlayXRot">Obróć w poziomie (<span>20</span> deg)</label>
			  <input id="transPlayXRot" type="range" min="-180" max="180" default="0">
			  <label for="transPlayYRot">Obróć w pionie (<span>69</span> deg)</label>
			  <input id="transPlayYRot" type="range" min="-180" max="180" default="0">
			  <label for="transPlayZRot">Obróć w osi Z (<span>-47</span> deg)</label>
			  <input id="transPlayZRot" type="range" min="-180" max="180" default="0">

			 //-->
			</div>
		</div> 

		<div id="effects_box">
		
		<h2>Wybierz tło <a class="bg_select_show" href="#">zmień</a></h2>
		<div id="bg_select" style="display: none;">
		<?php for( $i=1; $i<=10; $i++ ) :  ?>
		<a href="#" class="change_bg"><img src="uploads/backgrounds/File<?php echo $i; ?>.png" width="80" alt=""/></a>
		<?php endfor; ?>
		<?php foreach( ORM::Factory('item_image')->where('item_id','=', $product->id)->find_all() as $t ) : ?>
			<a href="#" class="change_bg"><img src="<?php echo $t->name; ?>" width="80" alt=""/></a>
		<?php endforeach; ?>
			<br/>
			<a href="#" class="change_bg" >Usuń tło</a>
			<form action="#" id="file_upload_form" enctype="multipart/form-data" method="post">
				<label for="g1">Masz własne tło?</label>
				<input type="hidden" value="AA" name="name" id="name">
				<input type="file" name="file_upload" id="file_upload">
				<input class="button" type="submit" name="submit" value="Wgraj tło"/>
			</form>
		</div>
		
		
		
			
				<label for="f1"><strong>Efekty:</strong> </label>
			<!-- Zapisujemy konfigurację i preferencję użytkownika //-->
				<input type="hidden" id="locationX" name="locationX" value=""/>
				<input type="hidden" id="locationY" name="locationY" value=""/>

				<input type="hidden" id="splits" name="splits" value="0"/>
				<input type="hidden" id="template_id" name="template_id" value=""/>
				<input type="hidden" id="background_image" name="background_image" value=""/>
				<input type="hidden" id="product_type" name="product_type" value="2"/>
				<!--<div id="sizes" style="float: left; width: 100%;"></div>//-->
				
				<input type="radio" name="effect" value="0" checked />
				<label for="f1">Brak</label>
				<input type="radio" id="blackwhite" name="effect" value="blackwhite"/>
				<label for="f1">Czarno-biały</label>
				<input type="radio" id="sepia" name="effect" value="sepia"/>
				<label for="f1">Sepia</label>
			 
				<br style="clear: both;"/>
				<label for="f1"><strong>Odbicie:</strong> </label>
				<input type="radio" name="rotate" value="0" checked />
				<label for="f1">Brak</label>
				<input type="radio" id="rotate_x" name="rotate" value="rotate_x"/>
				<label for="f1">W poziomie</label>
				<input type="radio" id="rotate_y" name="rotate" value="rotate_y"/>
				<label for="f1">W pionie</label>
				<div class="mask_tools">
					<input type="button" class="button toLeft" value="Rysuj maskę" onclick="setMask(); return false;"/>
					<input type="button" class="button toLeft" value="Zatwierdź maskę" onclick="drawMask(); return false;"/>
					<input type="button" class="button toLeft" value="Usuń maskę" onclick="delMask(); return false;"/>
				</div>
				<br style="clear: both;"/>
				
				<div class="frame_tools">
					<label for="f1"><strong>Antyrama</strong>: </label>
					<input type="radio" name="frame" value="0" checked />
					<label for="f1">Brak</label>
					<input type="radio" name="frame" value="1"/>
					<label for="f1">Chcę oprawić w antyramę</label>
				</div>
		


				<div class="price_list">
					<span class="price">Cena samej pracy: <strong><?php echo $price = Model_Order::calculatePrice($product->price, $product->print); ?></strong></span><br style="clear: both;"/>
					<span class="price">Koszt wysyłki: <strong><?php echo $shipping_cost = Model_Order::calculatePrice($product->shipping_cost, 0); ?></strong></span><br style="clear: both;"/>
					<span class="priceBig">Koszt całkowity: <strong id="totalCost"><?php echo Model_Order::calculatePrice($product->price, $product->print, 0)+$shipping_cost; ?><?php echo Model_Order::getCurrencySumbol(); ?></strong></span><br style="clear: both;"/>
					<span class="priceBig">Liczba sztuk: <input type="text" id="amount" name="amount" value="1" style="width: 20px;"/><br style="clear: both;"/>
				</div>
				<br style="clear: both;"/>
				<?php if( $product->print == 1 ) : ?>
				<h2>Opcje dodatkowe</h2><br style="clear: both;"/><br style="clear: both;"/>
				<span class="price"><input type="checkbox" id="price_produce" name="price_produce" value="1"/>Cena wydruku: <strong><?php echo $price_produce = Model_Order::calculatePrice($product->price_produce, $product->print); ?></span></strong><br style="clear: both;"/><br style="clear: both;"/>
				<span class="price"><input type="checkbox" id="price_frame" name="price_frame" value="1"/>Cena za oprawienie: <strong><?php echo $price_frame = Model_Order::calculatePrice($product->price_frame, $product->print); ?></strong></span><br style="clear: both;"/><br style="clear: both;"/>
				<span class="price"><input type="checkbox" id="price_nice_frame" name="price_nice_frame" value="1"/>Cena za ramę ozdobną: <strong><?php echo $price_nice_frame = Model_Order::calculatePrice($product->price_nice_frame, $product->print); ?></strong></span><br style="clear: both;"/>
				<?php endif; ?>

				
				<input type="hidden" id="price_value" name="price_value" value="<?php echo $price; ?>"/>
				<input type="hidden" id="price_total_value" name="price_total_value" value="<?php echo $price+$shipping_cost; ?>"/>
				<input type="hidden" id="price_produce_value" name="price_produce_value" value="<?php echo @$price_produce; ?>"/>
				<input type="hidden" id="price_frame_value" name="price_frame_value" value="<?php echo @$price_frame; ?>"/>
				<input type="hidden" id="price_nice_frame_value" name="price_nice_frame_value" value="<?php echo @$price_nice_frame; ?>"/>
				<input type="hidden" id="photo_own" name="photo_own" value="<?php echo $product->thumb; ?>"/>

				<br style="clear: both;"/>
			
					<!--<a href="#" class="button toLeft showCart" rel="<?php echo $product->id; ?>"><strong>KUP</strong> ORYGINAŁ</a>
				<a href="#" class="button toLeft showCart" rel="<?php echo $product->id; ?>"><strong>KUP</strong> WYDRUK</a>///-->
				<a href="#" class="button toLeft showCart" rel="<?php echo $product->id; ?>" style="color: #fff;"><strong>DO </strong>KOSZYKA</a>
		
				
		</div>
		
		</div>
</div>


<script>
$(document).ready(function() {

  var vP = "";
  if ($.browser.webkit) {
    vP = "-webkit-";
  } else if ($.browser.mozilla) {
    vP = "-moz-";
  } else if ($.browser.opera) {
    vP = "-ms-";
  }
  var transPlayChanged = $('#transPlayChanged'),
    transPlayChanged2 = $("#strips"),
    transPlayStage = $("#transPlayStage"),

    transPlayPerspective = $("#transPlayPerspective"),

    transPlayOriginX = $("#transPlayOriginX"),
    transPlayOriginY = $("#transPlayOriginY"),
	transPlayScale = $('#transPlayScale'),
   // transPlayX = $('#transPlayX'),
  //  transPlayY = $('#transPlayY'),
    transPlayZ = $('#transPlayZ'),

    transPlayXRot = $('#transPlayXRot'),
    transPlayYRot = $('#transPlayYRot'),
    transPlayZRot = $('#transPlayZRot');

  transPlayZ.val(0);
  transPlayPerspective.val(800);

  transPlayChanged.css(vP+"transform","translateX(0px) translateY(0px) translateZ(0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg)");
  
   transPlayChanged2.css(vP+"transform","translateX(0px) translateY(0px) translateZ(0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg)");

  $('#transPlayControls input').change(function () {

      $('label[for="'+$(this).attr("id")+'"] span').html($(this).val());

      transPlayChanged.css(vP+"transform","translateZ("+
        transPlayZ.val()+"px) rotateX("+
        transPlayXRot.val()+"deg) rotateY("+
        transPlayYRot.val()+"deg) rotateZ("+
        transPlayZRot.val()+"deg) scale("+transPlayScale.val()/100+")");
		
		/*
		translateX("+
        transPlayX.val()+"px) translateY("+
        transPlayY.val()+"px) 
		*/
		
		transPlayChanged2.css(vP+"transform","translateZ("+
        transPlayZ.val()+"px) rotateX("+
        transPlayXRot.val()+"deg) rotateY("+
        transPlayYRot.val()+"deg) rotateZ("+
        transPlayZRot.val()+"deg) scale("+transPlayScale.val()/100+")");

      transPlayStage.css(vP+"perspective", transPlayPerspective.val());

  //    transPlayChanged.css(vP+"transform-origin-x", transPlayOriginX.val()+"%");
  //    transPlayChanged.css(vP+"transform-origin-y", transPlayOriginY.val()+"%");
	  
//	  transPlayChanged2.css(vP+"transform-origin-x", transPlayOriginX.val()+"%");
  //    transPlayChanged2.css(vP+"transform-origin-y", transPlayOriginY.val()+"%");
	 
  });
});
</script>
 
<script type="text/javascript">
	
	//wymiary produktów
    PhotoSize.minSizeW  = 1;
	PhotoSize.minSizeH  = 1;
	PhotoSize.maxSizeW  = 500;
	PhotoSize.maxSizeH  = 1000;
	PhotoSize.sizeRound = 10;	
	/*
	//ceny produktów
	PhotoSize.priceM2 = 150;	//koszt m2
	PhotoSize.priceMB = 10;	//koszt mb
	PhotoSize.price   = 0;	//koszt stały
	PhotoSize.priceC  = 4;				//koszt kredytu na fotolii
	
	PhotoSize.licenseMargin = 1.4;		//zaokrąglenie licencji na fotolii
	
	PhotoSize.licenseDetails = {"XS":{"dpi":72,"license_name":"XS","ratio":11.070392947,"width":338,"height":355,"dimensions":"338 x 355 (0,1 MP)","dimensions_local":"11,9 cm x 12,5 cm (72 dpi)","phrase":"338 x 355 (0,1 MP), 11,9 cm x 12,5 cm (72 dpi)"},"S":{"dpi":72,"license_name":"S","ratio":5.53519647348,"width":676,"height":710,"dimensions":"676 x 710 (0,5 MP)","dimensions_local":"23,8 cm x 25,0 cm (72 dpi)","phrase":"676 x 710 (0,5 MP), 23,8 cm x 25,0 cm (72 dpi)"},"M":{"dpi":300,"license_name":"M","ratio":2.78212641129,"width":1346,"height":1412,"dimensions":"1346 x 1412 (1,9 MP)","dimensions_local":"11,4 cm x 12,0 cm (300 dpi)","phrase":"1346 x 1412 (1,9 MP), 11,4 cm x 12,0 cm (300 dpi)"},"L":{"dpi":300,"license_name":"L","ratio":1.99366781369,"width":1878,"height":1970,"dimensions":"1878 x 1970 (3,7 MP)","dimensions_local":"15,9 cm x 16,7 cm (300 dpi)","phrase":"1878 x 1970 (3,7 MP), 15,9 cm x 16,7 cm (300 dpi)"},"XL":{"dpi":300,"license_name":"XL","ratio":1,"width":3744,"height":3928,"dimensions":"3744 x 3928 (14,7 MP)","dimensions_local":"31,7 cm x 33,3 cm (300 dpi)","phrase":"3744 x 3928 (14,7 MP), 31,7 cm x 33,3 cm (300 dpi)"},"X":{"dpi":300,"license_name":"X","ratio":1,"width":3744,"height":3928,"dimensions":"3744 x 3928 (14,7 MP)","dimensions_local":"31,7 cm x 33,3 cm (300 dpi)","phrase":"3744 x 3928 (14,7 MP), 31,7 cm x 33,3 cm (300 dpi)"}};
	PhotoSize.licenses       = [{"name":"XS","price":1},{"name":"S","price":3},{"name":"M","price":6},{"name":"L","price":8},{"name":"XL","price":10},{"name":"X","price":50}];
	
	PhotoSize.productsParams = {"9":{"value":[{"param_id":"1","price_reduction":"0","name":"P\u0142\u00f3tno artist-canvas ","value":"","descr":"<p>P\u0142&oacute;tno do wydruk&oacute;w atrystycznych z bardzo dobrym nasyceniem kolor&oacute;w w jako\u015bci foto-realistycznej. Obraz jest wyko\u0144czony w p&oacute;\u0142b\u0142ysku. P\u0142&oacute;tno oprawione jest na krosno malarskie o profilu 35x20mm i naci\u0105gni\u0119te klinami rozporowymi. Jest to obraz gotowy do powieszenia na \u015bcianie.<\/p>","group_id":"9","group_name":"Grubo\u015b\u0107 p\u0142\u00f3tna"}],"name":"Grubo\u015b\u0107 p\u0142\u00f3tna"}};
	*/
	PhotoSize.params.id       = '23673363';
	PhotoSize.params.category = '2';
	PhotoSize.params.type     = 'fotolia';
	PhotoSize.multiple        = 1;
	PhotoSize.proportion      = 0;
	PhotoSize.margins         = 0;
	
	PhotoSize.init();


	//PhotoSize.clearSize();

</script>

<script>
function add_size() {
	var splits = parseInt($('#splits').val());
	splits += 1;
	$('#splits').val(splits);
	$('.molbars').remove();
	var id_template = $('#template_id').val();
			$('#photo_main').picstrips({
				splits: 2, 
				hgutter: '10px', 
				vgutter: '0px', 
				change_size: 1,
				add_splits: splits,
		//		w: w, 
		//		h: h, 
				id_template: id_template, 
				bgcolor: '#FFFFFF' 
			});
	//}
	return false;
}

function delete_size(that) {

			var id_size = $(that).attr('rel');
			var splits = parseInt($('#splits').val());
			if( splits == 1 ) { alert('Nie można usunąć tego wymiaru!'); return false; }
			
			$('#width_'+id_size).remove();
			$('#height_'+id_size).remove();
	
			splits -= 1;
			$('#splits').val(splits);
			
			$('.molbars').remove();
			var id_template = $('#template_id').val();
			
			$('#photo_main').picstrips({
				splits: 2, 
				hgutter: '10px', 
				vgutter: '0px', 
				change_size: 1,
				add_splits: splits,
				id_template: id_template, 
				bgcolor: '#FFFFFF' 
			});
	
			return false;
}

function chan(that) {
	var splits = $('#splits').val();
	
	//for( var i = 0; i < splits; i++ ) {
	//	var w = $('#width_'+i).val();
	//	var h = $('#height_'+i).val();

		$('.molbars').remove();
			var id_template = $('#template_id').val();
			$('#photo_main').picstrips({
				splits: 2, 
				hgutter: '10px', 
				vgutter: '0px', 
				change_size: 1,
				save_size: 1,
				add_splits: splits,
		//		w: w, 
		//		h: h, 
				id_template: id_template, 
				bgcolor: '#FFFFFF' 
			});
	//}
	return false;
}

  $(function() {
		
		$('.bg_select_show').click( function() {
			$('#bg_select').show();
			return false;
		});
		
		$('#crop-btn').click( function() {
			$('.tab-a').removeClass('on');
			$(this).addClass('on');
			$('#visualisation-tab').hide();
			$('#crop-tab').show();
			
			return false;
		});
		
		$('#visualisation-btn, .visualisation-btn').click( function() {
		if( $('#iCanVisual').val() == 1 ) {
			$(window).scrollTop(0);
			$('.tab-a').removeClass('on');
			$('#visualisation-btn').addClass('on');
			$('#crop-tab').hide();
			$('#visualisation-tab').show();
			
			PhotoSize.selectView();
		} else { $('#iCanVisualInfo').show().fadeOut( 4000);  }
			return false;
		});
		
		$('input[name="effect"]').click( function() {
		
			$('#photo_main').removeClass('blackwhite');
			$('#photo_main').removeClass('sepia');
			
			$('#transPlayChanged').removeClass('sepia');
			$('#transPlayChanged').removeClass('blackwhite');
			
			$('.molbars').removeClass('sepia');
			$('.molbars').removeClass('blackwhite');
			if($(this).val() != 0 ) {
				$('#photo_main').addClass($(this).val());
				$('#transPlayChanged').addClass($(this).val());
				$('.molbars').addClass($(this).val());
			}
		});
		
		$('input[name="rotate"]').click( function() {
		
			$('#photo_main').removeClass('rotate_x');
			$('#photo_main').removeClass('rotate_y');
			
			$('.molbars').removeClass('rotate_x');
			$('.molbars').removeClass('rotate_y');
			
			if($(this).val() != 0 ) {
				$('#photo_main').addClass($(this).val());
				$('.molbars').addClass($(this).val());
			}
		});
	
		$('.change_bg').click( function() {
			var bg_img = $(this).children('img').attr('src');
			$('#imgContainer').css('background-image', 'url('+bg_img+')');
			$('#background_image').val(bg_img);
			
			if( bg_img == "" ) {
			
			$('#by__').attr('src', '');
			$('#by__S').attr('src', '');
			} else {
			

			
			$('#by__').attr('src', bg_img);
			$('#by__S').attr('src', bg_img.replace(".png","_S.png"));
		
			}
			
			//$('#photo span.back').css('background-image', 'url('+bg_img+')');
			return false;
		});
		
		
$( "#by__" ).mousedown(function() {
		$('#by__').css('z-index', 800);
		$('#strips_move').css('z-index', 801);
	});

	$( "#strips_move" ).draggable({
      start: function() {
        $('#by__').css('z-index', 801);
		$(this).css('z-index', 800);
      },
      drag: function(event, ui) {
        //    $("#locationX").val($("#strips").css('left'));
        //   $("#locationY").val($("#strips").css('top'));
      },
      stop: function() {
       $('#by__').css('z-index', 801);
		$(this).css('z-index', 800);
      }
    });
  });
</script>


 <script>
 var click_down = 0;
 
 function delMask() {
	$('#strips canvas').remove();
	$('#photo_main').show();
	click_down=0;
 }
 
 $(window).ready( function() {
	$('.select_type').click( function() {
		var my_template_reset = '100x100';
		
		var type = $(this).attr('rel');
		$('#product_type').val(type);
		$('.select_type').removeClass('active_type');
		
		if( type == 1 ) { // Fototapety maska lub nakladanie się obrazków w tle - obrazek z transaprentmyn tłem
			
			$('#iCanVisual').val(1);
			PhotoSize.actualTop = 0; // Zerujemy ustawienia ruchu myszą
			PhotoSize.actualLeft = 0; // Zerujemy ustawienia ruchu myszą
			PhotoSize.setSize(my_template_reset.replace('#',''));
			
			$('#photo-sizes').hide();
			$('.config_sizes').show();
			$('.mask_tools').show();
			$('.frame_tools').hide();
			$('.murals_type').show();
			$('.poster_type').hide();
			
			$(this).addClass('active_type');
		} else if( type == 2 ) { // Zdjęcia na płótnie - szablon
			$('#iCanVisual').val(1);
			$('.murals_type').hide();
			$('#photo-sizes').show();
			$('.mask_tools').hide();
			$('.frame_tools').hide();
			$('.poster_type').hide();
			$(this).addClass('active_type');
		} else if( type == 3 ) { // Plakaty -> nakladanie obrazka na tło... z antyramą lub bez..
			$('#iCanVisual').val(1);
			$('.poster_type').show();
			$('.config_sizes').show();
			PhotoSize.actualTop = 0; // Zerujemy ustawienia ruchu myszą
			PhotoSize.actualLeft = 0; // Zerujemy ustawienia ruchu myszą
			PhotoSize.setSize(my_template_reset.replace('#',''));
			
			$('.murals_type').hide();
			$('#photo-sizes').hide();
			$('.mask_tools').hide();
			//$('.config_sizes').show();
			$('.frame_tools').show();
			$(this).addClass('active_type');
		}
		
		return false;
		
	});
 });
 
 function setMask() {				
	$('#photo_main').hide();			
	$('#strips').prepend('<canvas id="carl" width="500" height="500">');
	
	var canvas = document.getElementById("carl");
	if( !canvas.getContext) alert('Brak obsługi Canvas');

			var ctx = canvas.getContext('2d');
			
			var img = document.createElement('IMG');
		
	
$('#strips').click( function(e) {
		
click_down++;
//alert(click_down);
		var parentOffset = $(this).parent().offset();
		posX = e.pageX-parentOffset.left;
		posY = e.pageY-parentOffset.top;
//		alert(posX+','+posY);
	
			
//img.onload = function() {
		//ctx.save();
		if( click_down == 1 ) {
			ctx.beginPath();
			ctx.moveTo(posX,posY);
		} else {
		//	ctx.lineTo(100,30);
			ctx.lineTo(posX,posY);
		//	ctx.lineTo(200,60);
			
			
			ctx.stroke();
			//ctx.clip();
		}	
		
			//ctx.drawImage(img, 0, 0);
			
			
		//ctx.restore();
//}
//img.src = 't.jpg';
});

}
 
 function drawMask() {						
	//$('#strips').prepend('<canvas id="carl" width="500" height="500">');
	var canvas = document.getElementById("carl");
	if( !canvas.getContext) alert('Brak obsługi Canvas');

	var ctx = canvas.getContext('2d');		
	var img = document.createElement('IMG');
			
	img.onload = function() {
		
		ctx.stroke();
		ctx.closePath();
		ctx.clip();
		ctx.drawImage(img, 0, 0);
		ctx.restore();
	}
	img.src = 't.jpg';
}

</script>
<script>
	$(window).ready( function() {
		$('#showCart, .showCart').click( function() {
			$(window).scrollTop(0);
				var id_product = $(this).attr('rel');
				
				$.ajax({
				  type: "POST",
				  url: "Order/add_cart/"+id_product,
				  data: { 
							id: id_product, 
							price_produce: $('#price_produce').val(),
							price_frame: $('#price_frame').val(),
							price_nice_frame: $('#price_nice_frame').val(),
							price_value: $('#price_value').val(),
							total_price_value: $('#price_total_value').val(),
							data_boxes: PhotoSize._data,
							actualTop: PhotoSize.actualTop,
							actualLeft: PhotoSize.actualLeft,
							rotate: $('input[name="rotate"]').val(),
							effect: $('input[name="effect"]').val(),
							product_type: $('#product_type').val(),
							transPlayScale: $('#transPlayScale').val(),
							transPlayZ: $('#transPlayZ').val(),
							transPlayPerspective: $('#transPlayPerspective').val(),
							transPlayXRot: $('#transPlayXRot').val(),
							transPlayYRot: $('#transPlayYRot').val(),
							transPlayZRot: $('#transPlayZRot').val(),
							photo_own: $('#photo_own').val(),
							amount: $('#amount').val()
						}
				}).done(function(data) {
						var cart_val = parseInt($('.cart_ico').text());
						cart_val = cart_val+1;
						$('.cart_ico').html(cart_val);
						Cufon.refresh();
						$('#cart_content').html(data);
						$('#popup').show();
						$('#overlay').show();
				});
					
				return false;
		});
			
		$('#price_produce').click( function() {
			if( $(this).is(':checked') ) {
				var totalCost = parseFloat($('#price_total_value').val())+parseFloat($('#price_produce_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			} else {
				var totalCost = parseFloat($('#price_total_value').val())-parseFloat($('#price_produce_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			}
		});
		$('#price_frame').click( function() {
			if( $(this).is(':checked') ) {
				var totalCost = parseFloat($('#price_total_value').val())+parseFloat($('#price_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			} else {
				var totalCost = parseFloat($('#price_total_value').val())-parseFloat($('#price_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			}
		});
		$('#price_nice_frame').click( function() {
	
			if( $(this).is(':checked') ) {
				var totalCost = parseFloat($('#price_total_value').val())+parseFloat($('#price_nice_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			} else {
				var totalCost = parseFloat($('#price_total_value').val())-parseFloat($('#price_nice_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			}
		});
		$('#amount').keyup( function() {
			var amount = $(this).val();
			if( amount == "" ) amount = 1;
			
			var ptv = $('#price_value').val();
			ptv = ptv.replace(",", ".");
			var totalCost = parseFloat(ptv)*parseInt(amount);
			
			$('#totalCost').html(totalCost);
			$('#price_total_value').val(totalCost);
			
			if( $(this).is(':checked') ) {
				var totalCost = parseFloat($('#price_total_value').val())+parseFloat($('#price_nice_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			} else {
				var totalCost = parseFloat($('#price_total_value').val())-parseFloat($('#price_nice_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			}
			
			if( $(this).is(':checked') ) {
				var totalCost = parseFloat($('#price_total_value').val())+parseFloat($('#price_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			} else {
				var totalCost = parseFloat($('#price_total_value').val())-parseFloat($('#price_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			}
			
			if( $(this).is(':checked') ) {
				var totalCost = parseFloat($('#price_total_value').val())+parseFloat($('#price_produce_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			} else {
				var totalCost = parseFloat($('#price_total_value').val())-parseFloat($('#price_produce_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			}
			
			
			
		});
	});
</script>
<script type="text/javascript" src="/html/plugin/script.js"></script>	
		
<?php /*
<h2><span>WYBRANY PRODUKT</span> <?php echo $product->title; ?></h2>
<br style="clear: both;"/>
<div class="col40">
	<a href="#"><img src="/image.php/image-name.jpg?width=270&amp;height=270&amp;cropratio=1:1&amp;image=/<?php echo $product->thumb; ?>" alt=""/></a>
	<br/>
	<p><?php echo $product->description; ?></p>
</div>
<div class="parametrs col60">
	<h6>Parametry produktu</h6>
	<div class="col40">
		<legend>Efekt:</legend><br/>
		<input type="checkbox" name="x" value="1"/> <label for="f1">Brak</label><br style="clear: both;"/>
		<input type="checkbox" name="x" value="1"/> <label for="f1">Czarno-biały</label><br style="clear: both;"/>
		<input type="checkbox" name="x" value="1"/> <label for="f1">Sepia</label>
	</div>
	<div class="col40">
		<legend>Odbicie:</legend><br/>
		<input type="checkbox" name="x" value="1"/> <label for="f1">poziome</label><br style="clear: both;"/>
		<input type="checkbox" name="x" value="1"/> <label for="f1">pionowe</label><br style="clear: both;"/>
		<input type="checkbox" name="x" value="1"/> <label for="f1">poziome i pionowe</label>
	</div>
	<br style="clear: both;"/><br style="clear: both;"/>
	<span class="price">Cena samej pracy: <strong><?php echo $price = Model_Order::calculatePrice($product->price, $product->print); ?></strong></span><br style="clear: both;"/>
	<span class="price">Koszt wysyłki: <strong><?php echo $shipping_cost = Model_Order::calculatePrice($product->shipping_cost, 0); ?></strong></span><br style="clear: both;"/>
	<span class="priceBig">Koszt całkowity: <strong id="totalCost"><?php echo Model_Order::calculatePrice($product->price, $product->print, 0)+$shipping_cost; ?><?php echo Model_Order::getCurrencySumbol(); ?></strong></span><br style="clear: both;"/>
	<br style="clear: both;"/>
	<?php if( $product->print == 1 ) : ?>
	<legend>Opcje dodatkowe</legend><br/>
	<span class="price"><input type="checkbox" id="price_produce" name="price_produce" value="1"/>Cena wydruku: <strong><?php echo $price_produce = Model_Order::calculatePrice($product->price_produce, $product->print); ?></span></strong><br style="clear: both;"/>
	<span class="price"><input type="checkbox" id="price_frame" name="price_frame" value="1"/>Cena za oprawienie: <strong><?php echo $price_frame = Model_Order::calculatePrice($product->price_frame, $product->print); ?></strong></span><br style="clear: both;"/>
	<span class="price"><input type="checkbox" id="price_nice_frame" name="price_nice_frame" value="1"/>Cena za ramę ozdobną: <strong><?php echo $price_nice_frame = Model_Order::calculatePrice($product->price_nice_frame, $product->print); ?></strong></span><br style="clear: both;"/>
	<?php endif; ?>
	<a href="#" class="button toLeft showCart" rel="<?php echo $product->id; ?>"><strong>DO</strong> KOSZYKA</a>
	<a href="#" class="button toLeft showCart" rel="<?php echo $product->id; ?>"><strong>KUP</strong> ORYGINAŁ</a>
	<a href="#" class="button toLeft showCart" rel="<?php echo $product->id; ?>"><strong>KUP</strong> WYDRUK</a>
	<a class="button toLeft" href="Artist/show/<?php echo $product->user->id; ?>">Zobacz inne prace tego artysty</a>
	
	<input type="hidden" id="price_value" name="price_value" value="<?php echo $price; ?>"/>
	<input type="hidden" id="price_total_value" name="price_total_value" value="<?php echo $price+$shipping_cost; ?>"/>
	<input type="hidden" id="price_produce_value" name="price_produce_value" value="<?php echo @$price_produce; ?>"/>
	<input type="hidden" id="price_frame_value" name="price_frame_value" value="<?php echo @$price_frame; ?>"/>
	<input type="hidden" id="price_nice_frame_value" name="price_nice_frame_value" value="<?php echo @$price_nice_frame; ?>"/>

</div>
<script>
	$(window).ready( function() {
		$('#showCart, .showCart').click( function() {
			$(window).scrollTop(0);
				var id_product = $(this).attr('rel');
				
				$.ajax({
				  type: "POST",
				  url: "Order/add_cart/"+id_product,
				  data: { id: id_product, price_total_value: $('#price_total_value').val() }
				}).done(function(data) {
						$('#cart_content').html(data);
						$('#popup').show();
						$('#overlay').show();
				});
					
				return false;
		});
			
		$('#price_produce').click( function() {
			if( $(this).is(':checked') ) {
				var totalCost = parseFloat($('#price_total_value').val())+parseFloat($('#price_produce_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			} else {
				var totalCost = parseFloat($('#price_total_value').val())-parseFloat($('#price_produce_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			}
		});
		$('#price_frame').click( function() {
			if( $(this).is(':checked') ) {
				var totalCost = parseFloat($('#price_total_value').val())+parseFloat($('#price_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			} else {
				var totalCost = parseFloat($('#price_total_value').val())-parseFloat($('#price_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			}
		});
		$('#price_nice_frame').click( function() {
			if( $(this).is(':checked') ) {
				var totalCost = parseFloat($('#price_total_value').val())+parseFloat($('#price_nice_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			} else {
				var totalCost = parseFloat($('#price_total_value').val())-parseFloat($('#price_nice_frame_value').val());
				$('#totalCost').html(totalCost);
				$('#price_total_value').val(totalCost);
			}
		});
	});
</script>
*/ ?>