$(document).ready(function(){
		drop();
});

function drop(){
	if($('#drop')){
	
		var dropdown = $('#drop');
		var selected = $('#text');
		
		$('.bumb a').click(function(){
			dropdown.slideToggle('slow');
		});
		$('a', dropdown).click(function(){
			textselectat = $(this).text();
			
			dropdown.slideUp('fast');
			selected.html(textselectat);
		
			
			document.comanda.marime.value = $(this).attr('name');
			
			return false;
		});
		dropdown.hover(function(){}, function(){ dropdown.slideUp('fast');});

		

	}
}
$(document).ready(function(){	
	if($('#drop2')){
	
		var dropdown = $('#drop2');
		var selected = $('#text2');
		
		$('.bumb2 a').click(function(){
			dropdown.slideToggle('fast');
		});
		
		$('a', dropdown).click(function(){
		
			textselectat = $(this).text();
			
			dropdown.slideUp('fast');
			selected.html(textselectat);
			
			document.comanda.culoare.value = $(this).attr('name');
			
			return false;
		});
		dropdown.hover(function(){}, function(){ dropdown.slideUp('fast');});
	}
});
$(document).ready(function(){	
	if($('#drop3')){
	
		var dropdown = $('#drop3');
		var selected = $('#text3');
		
		$('.bumb3 a').click(function(){
			dropdown.slideToggle('fast');
		});
		
		$('a', dropdown).click(function(){
		
			textselectat = $(this).text();
			
			dropdown.slideUp('fast');
			selected.html(textselectat);
			
			document.comanda.judet.value = $(this).attr('name');
			
			return false;
		});
		dropdown.hover(function(){}, function(){ dropdown.slideUp('fast');});
	}
	
	
});
$(document).ready(function(){	
	if($('#drop4')){
	
		var dropdown = $('#drop4');
		var selected = $('#text4');
		
		$('.bumb4 a').click(function(){
			dropdown.slideToggle('fast');
		});
		
		$('a', dropdown).click(function(){
		
			textselectat = $(this).text();
			
			dropdown.slideUp('fast');
			selected.html(textselectat);
			
			document.comanda.transport.value = $(this).attr('name');
			
			return false;
		});
		dropdown.hover(function(){}, function(){ dropdown.slideUp('fast');});
	}
	
	
});
$(document).ready(function(){	
	if($('#drop5')){
	
		var dropdown = $('#drop5');
		var selected = $('#text5');
		
		$('.bumb5 a').click(function(){
			dropdown.slideToggle('fast');
		});
		
		$('a', dropdown).click(function(){
		
			textselectat = $(this).text();
			
			dropdown.slideUp('fast');
			selected.html(textselectat);
			
			document.comanda.material.value = $(this).attr('name');
			
			return false;
		});
		dropdown.hover(function(){}, function(){ dropdown.slideUp('fast');});
	}
	
	
});

$(document).ready(function(){	
	numar();
});

function numar(){

	if($('#drop6')){
	
		var dropdown = $('#drop6');
		var selected = $('#text6');
		
		$('.bumb6 a').click(function(){
			dropdown.slideToggle('fast');
		});
		
		$('a', dropdown).click(function(){
		
			textselectat = $(this).text();
			
			dropdown.slideUp('fast');
			selected.html(textselectat);
			
			var values = $(this).attr('name');
			document.comanda.marime_b.value = values;
			
			var get={numar: values, id_produs: id_produs};
			
			$.get("includes/app.php", get, function(data){ 
var dropa = $('#drop');
				dropa.html(data); 
				dropa.unbind('hover');
$('.bumb a').unbind('click');
$('a', dropa).unbind('click');
drop();
			});
			
			return false;
		});
		dropdown.hover(function(){}, function(){ dropdown.slideUp('fast');});
	}
}


