$(document).ready(function()
{
	//handle several events of the manipulated selectbox
	$('.jLookSelectWrapper li').hover(function(){
		$(this).addClass('li_hover');		
		},
		function(){
		$(this).removeClass('li_hover');				
	});

	$('.jLookSelectWrapper span').text('Seleccione ...');				

	$('.jLookSelectWrapper ul li').click(function(){
		
		$('#selectvalue').attr('value', $(this).text());
		var index = parseInt( $(this).attr('id') );
		$(this).parent().parent().parent().parent().parent().find('span').text($(this).text());
		$(this).parent().parent().parent().parent().parent().find('.jLookSelectOpen').click();
		
		$(this).parent().parent().parent().parent().parent().find('select').find('option').each( function(){
			$(this).attr("selected" , "");
		});
		
		$(this).parent().parent().parent().parent().parent().find('select').find('option').eq(index).attr("selected" , "selected");
		
	});
});