// <![CDATA[
	// opacity
	function opacity(element, value) {
		var value_noie = value / 100;
		$(element).css('filter', 'alpha(opacity=' + value + ')');
		$(element).css('-moz-opacity', value_noie);
		$(element).css('-khtml-opacity', value_noie);
		$(element).css('opacity',value_noie);
	}

	// center horizontally
	function centerHoriz(lo_que) {
		var x = parseFloat($(window).width()) / 2 - parseFloat($(lo_que).width()) / 2;
		var y = $(window).scrollTop() + $(window).height() / 2 - parseFloat($(lo_que).height()) / 2;
		x = x + 'px';
		y = y + 'px';
		$(lo_que).css({'left': x, 'top': y});
	}

	// center vertically
	function centerVert(lo_que) {
		var y = $(window).scrollTop() + $(window).height() / 2 - parseFloat($(lo_que).height()) / 2;
		$(lo_que).css({'top': y});
	}

	// image load
	function loadImg(sID, sURL) {
		$(sID).unbind("load");
		$(sID).bind("load", function() { $(this).fadeIn(); } )
		$(sID).stop(true, true).fadeOut("normal", function () { $(sID).attr('src', sURL); } );
	}

	$(document).ready(
		function() {
			
			//menu asociados
			$('.city li a').click(function(event){
				var elem = $(this).next();
				if(elem.is('ul')){
					event.preventDefault();
					$('.city ul.city:visible').not(elem).slideUp();
					//elem.slideToggle();
				}
			});
			$('#menu li a').click(function(event){
				var elem = $(this).next();
				if(elem.is('ul')){
					event.preventDefault();
					$('menu ul.city:visible').not(elem).slideUp();
					elem.slideToggle();
				}
			});

			// no dotted outline for IE in As
			if ($.browser.msie) {
				$('a').focus(
					function() {
						$(this).blur()
					}
				);			
			}
			
		// END DEFAULT //
		
			$('#mainNav li:has(ul)').hover(
				function(e)
				{
					$(this).find('ul').slideDown();
					$(this).addClass("active");
				},
				function(e)
				{
					$(this).find('ul').fadeOut();
					$(this).removeClass("active");
				}
			);
		}
	);

	function addOption(ElementId, Text, Value){
		selectBox = document.getElementById(ElementId);
		try {
			selectBox.add(new Option(Text,Value),null);
		} catch(ex){
			selectBox.add(new Option(Text,Value));
		}
	}

// ]]>
