var elements_d, settings_d, current_d, last_d, manual_meer = 0; 
function changePrice(product_id,value)
 {  			  
	
 var show_price = document.getElementById("price_"+product_id);
  if ((value!="") && (value!="-"))
  {
    var price =parseFloat(attr_price[product_id][value]);
	price_txt = price.toFixed(2);
	show_price.innerHTML =  " &euro; "+price_txt;			
  } 
  else
   {
    show_price.innerHTML = "";			
  }
  
	
 }
 function testSelect(product_id)
 {
   var sl = document.getElementById("select_"+product_id);
   if (sl.value == "-")   return false;
   else return true;
 }

$(document).ready(function() {
	
	$('.guest_content').innerfade({ speed: 'slow', timeout: 10000, type: 'sequence', containerheight: '112px' }); 
	
	$("a[rel=prods]").fancybox({
		
	});
	$(".left_cart_side input").keyup(function() {
		copyValues();
	});
	$('.cat_top_left input').click(function() {
		if(jQuery(this).attr('class')!='exp_link')
		{
		if($('.cat_top_left_hiden').css('display')=='none'){
			$(this).hide();
			$('.cat_top_left_hiden').slideDown();
			
		}
		else
			$('.cat_top_left_hiden').slideUp();
		return false;
		}
	});
	$('.cat_top_left_hiden').click(function() {
		$('.cat_top_left input').fadeIn();
		$('.cat_top_left_hiden').slideUp();
		
	});
	$('.cat_top_right input').click(function() {
		
		if(jQuery(this).attr('class')!='exp_link'){
			
		if($('.cat_top_right_hiden').css('display')=='none'){
			$(this).hide();
			$('.cat_top_right_hiden').slideDown();
		}
		else
			$('.cat_top_right_hiden').slideUp();	
		return false;
		}
	});
	$('.cat_top_right_hiden').click(function() {
		$('.cat_top_right input').fadeIn();
		$('.cat_top_right_hiden').slideUp();
		
	});
	
	$('.thumb_images img').click(function() {
		
		   my_src = $(this).attr('src');
		   my_src = my_src.replace(',95,',',195,');
		   my_src = my_src.replace(',143,',',387,');
		   my_href = $(this).next().attr('href');
		   
		   $("div.main_image img").fadeOut('slow', function() {
			   $("div.main_image a").attr('href',my_href);
			   $("div.main_image img").attr('src',my_src).fadeIn('slow');
			   
		   });
	});
	
	$('.clear_product').click(function(){
		submit_top_form();
	});
	$('.meer_guest').click(function(){
			manual_meer = 1;
			$.innerfade.next(elements_d, settings_d, current_d, last_d);
		return false;
	});
	
});


