function GetPos(id){
	var i = GetId(id);
	var iReturnValue = 0;
	while(i != null ) {
		iReturnValue += i.offsetTop;
		i = i.offsetParent;
	}
	return iReturnValue;
}

$(document).ready(function(){

	
	$('#m_products div a').hover(function(){
		//alert($(this).attr('rel'));
		$('#iprev').attr('src','/gfx/categories-menu/'+$(this).attr('rel'));
		//alert('/gfx/categories-menu/'+$(this).attr('rel'));
	});
	$('.similar').hover(function(){
		$(this).children('div').stop().animate({'opacity' : 1, 'top' : '+=5px'},500);
		
		
		
		
	},function(){
		$(this).children('div').stop().animate({'opacity' : 0, 'top' : '-=5px'},500);
		
		
		
	});		

	$('.thumb').live('click', function() {
			var thumb_src = $(this).attr("src");
			var thumb_id = $(this).attr("id");
			var big_src  = thumb_src.replace('_80.jpg','_440.jpg');
			
			$("#big").fadeOut(500, function () {
            GetId('big').src = big_src;
			$("#big").fadeIn('slow');

			
			
			
          });




			
			
		});							   
						   
	// Password Enter submit form
	$("#pop_password").keypress(function(e){
		if(e.keyCode==13){
			pop_form.form.submit();
		}
	});	
				


});


function RemoveItem(id){
	var c = GetId('cart');
	var r = GetId('i'+id);
	c.removeChild(r);
	
	
	
}

function deleteRow(i){
    document.getElementById('cart').deleteRow(i)
}

