$(document).ready(function(){
				$('.sub').find('ul').hide();
				$('.sub').find('ul > li:odd > a').addClass('odd');
				
				$( '.sub' ).mouseenter(function() {
					var id = $(this).attr('id');
					
					if($(this).find('a.'+id+'-activo')) {
						$(this).find('a.'+id+'-activo').addClass('esta-activo');
						$(this).find('a.noactive').removeClass(id+'-activo');
						//alert("esta activo");
					}
					
					$(this).find('ul').css({visibility: "visible", display: ""});
					
					// pinto el boton
					$(this).find('a.noactive').addClass(id+'-active');
					$(this).find('a.noactive').removeClass('noactive');
					
				}).mouseleave(function() {
					var id = $(this).attr('id');
					
					$(this).find('ul').css({visibility: "hidden", display: "none"});
					
					// despinto el boton
					$(this).find('a.'+id+'-active').addClass('noactive');
					$(this).find('a.'+id+'-active').removeClass(id+'-active');
					
					$(this).find('a.esta-activo').addClass(id+'-activo');
				});
				
				$( '.sub > a, #bhome' ).click(function() {
					//return false;
				});
				
				/* login */
				$('#sendForm').click(function() {
					$("#form-login").submit();
					return false;
				});
				$('#logline').click(function() {
					$("#tipologintit").html("N&uacute;mero de movistar:");
					
					$(this).attr('checked', true);
					$('#logtit').attr('checked', false);
					$("#login-linea").show();
					$("#login-titular").hide();
					$("#label-line").addClass("selected");
					$("#label-tit").removeClass("selected");
					//return false;
				});   
				$('#logtit').click(function() {
					$("#tipologintit").html("Tipo y n&uacute;mero de documento:");
					$(this).attr('checked', true);
					$('#logline').attr('checked', false);
					$("#login-linea").hide();
					$("#login-titular").show();
					$("#label-line").removeClass("selected");
					$("#label-tit").addClass("selected");
					//return false;
				});
				$("#label-line").addClass("selected");
				/* login */
				
				/* Accesos a servicios */
				$("#clientesa").click(function() {
					$(this).addClass("aactive");
					$("#clientesn").removeClass("aactive");
					$("#acceso01").css({visibility: "visible", display: ""});
					$("#acceso02").css({visibility: "hidden", display: "none"});
					return false;
				});
				$("#clientesn").click(function() {
					$(this).addClass("aactive");
					$("#clientesa").removeClass("aactive");
					$("#acceso02").css({visibility: "visible", display: ""});
					$("#acceso01").css({visibility: "hidden", display: "none"});
					return false;
				});
				
				
				// tabs servicios
				$("#t01c").show();
				$(".servicio").show();
				$(".servicio > div").show();
				
				$("#stabs > li").hover(function() {
					var id = $(this).attr('id');
					var obj = $(this).attr('id');
					obj = $("#"+obj+"c");
					
					var arr = [ "t01", "t02", "t03", "t04", "t05" ];
					$.each(arr, function() { 
						$('#'+this).removeClass('tactive');
					});
					$(this).addClass('tactive');
					
					var arr1 = [ "t01c", "t02c", "t03c", "t04c", "t05c" ];
					$.each(arr1, function() {  
						//$('#'+this).css({visibility: "hidden", display: "none"});
						$('#'+this).hide();
					});
					
					//obj.css({visibility: "visible", display: ""});
					obj.show();
					
					return false;
				});
								
			});
			
			
//funcion para inser del like de fb
	function setfblikeiframe(layout,show_faces,width,height,action,font,colorscheme,allowTransparency)
		{
			// print the current url.
			var url = window.location.href;
			document.write('<iframe src="http://www.facebook.com/plugins/like.php?href=' + url + '&amp;layout=' + layout + '&amp;show_faces=' + show_faces + '&amp;width=' + width + '&amp;action=' + action + '&amp;font=' + font + '&amp;colorscheme=' + colorscheme + '&amp;height=' + height + '" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:' + width +'px; height:' + height +'px;" allowTransparency="' + allowTransparency + '"></iframe>')	
		};
	
