$(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;
				});
				
							
				/* 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;locale=es_ES&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>')	
			document.write('<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F%3Fid%3D133703003408892&amp;locale=es_ES&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>')	
		
			
		};

