$(document).ready (function () {
	
	
	
	
	tm.init();
	
	
	
	
	
	
	});









var tm = {
	init:function (){
		$('.start-tap').each (function () {
			$(this)
				.children('.tap-image')
				.children('img')
				.animate({'opacity':0},0)
			})
			.hover (tm.showFBimage, tm.hideFBimage)
			.click(tm.onClick);
	},
	
	
	showFBimage:function () {
		$(this)
			.children('.tap-image')
			.children('img')
			.stop()
			.animate({'opacity':1},500);
	},
	
	
	hideFBimage:function () {
		$(this)
			.children('.tap-image')
			.children('img')
			.stop()
			.animate({'opacity':0},1000);		
	},
	
	onClick:function () {
		window.location.href = $(this).attr('page');
	}
	
}





/*****************************
	WARENKORP FUNCTIONS 
******************************/

var pcount = 1;

function add_product () {
	pcount ++;
	var str = '<div class="product" id="p'+pcount+'"> <table width="100%" border="0"><tr><td width="9%"><input type="text"  class="input"  style="width:40px"/></td><td width="10%"><select class="input"><option value="1">Strück</option> <option value="2">Faß</option> <option value="2">Kiste</option></select></td><td width="74%"><input type="text"  class="input"  style="width:100%"/></td><td width="7%" align="center" valign="middle"><a style="cursor:pointer;" onclick="remove_product(\'p'+pcount+'\');"><img src="images/shop-remove.png" align="Produkt entfernen" border="0"/></a></td></tr></table></div>';
	$('#procuts').append(str);
	$('#p'+pcount).slideDown('middel');
}


function remove_product (id) {
	
	$('#'+id).slideUp('middle',function () {
		$(this).remove();
		});
	
	
}



