	$(document).ready(function(){
		
		function gup( name ){
			var regexS = "[\\?&]"+name+"=([^&#]*)";
			var regex = new RegExp ( regexS );
			var tmpURL = window.location.href;
			var results = regex.exec( tmpURL );
			if( results == null )
				return"";
			else
				return results[1];
		}
		var accion = gup( 'tipo' );	
		if(accion==1){
			$.facebox('<div style="padding:20px; width:350px; display:block; overflow:hidden; background-color:#ececec;"><span class="txtAlerta"><b>Gracias por completar tu información.</b><br/>Te invitamos a que sigas recorriendo nuestro sitio...</span></div>');					
		}
		var idioma = gup( 'lang' );
		if(idioma==2){
			$('.en').hide();
			$('.es').show();
			$('.trabajar').css("background-image", "url(images/trabajarButtonEN.jpg)");
			$('#tituloClientes').hide();
			$('#tituloClientesEN').show();
		}
		else{
			$('.en').show();
			$('.es').hide();
			$('#tituloClientes').show();
			$('#tituloClientesEN').hide();
			
		}
				
		$('.pie').animate({height: "110"}, 300);	
		$('a[rel*=facebox]').facebox({
		  loading_image : 'facebox/loading.gif',
		  close_image   : 'facebox/closelabel.gif'
		}) 
		$(".maskCliente").hover( 
		  function () { 
			$(this).find('.alpha').addClass('none'); 
		  }, 
		  function () { 
			$(this).find('.alpha').removeClass('none'); 
		  } 
		);
		$(".backtip").hide();
		$(".bottomClientes ul li").hover( 
		  function () { 
			$(this).find('.backtip').fadeIn("fast");
		  }, 
		  function () { 
			$(this).find('.backtip').fadeOut();
		  } 
		);
		$(".pie").show();
		$(".buttonOpen").hide();	
		$('.buttonOpen').click(function() {
			$(".buttonOpen").hide();
			$(".buttonClose").show();
			$('.pie').animate({height: "110"}, 300);
			$('.pie').css("margin-bottom", "40px");
			$('html, body').animate({scrollTop: 1200}, 500);
			if ($.browser.msie && $.browser.version < 7){//ie6
				$('html, body').animate({scrollTop: 1200}, 500);
			}
			return false;
		});
		$('.buttonClose').click(function() {
			$(".buttonOpen").show();
			$(".buttonClose").hide();
			$('.pie').animate({height: "0"}, 300);
			$('.pie').css("margin-bottom", "0px");
		});
	});
