function slideSwitch(id) {
		    var $active = $('#'+id+' IMG.active');
		
		    if ( $active.length == 0 ) $active = $('#'+id+' IMG:last');
		
		    // use this to pull the images in the order they appear in the markup
		    var $next =  $active.next().length ? $active.next()
		        : $('#'+id+' IMG:first');
		
		    // uncomment the 3 lines below to pull the images in random order
		    
		    // var $sibs  = $active.siblings();
		    // var rndNum = Math.floor(Math.random() * $sibs.length );
		    // var $next  = $( $sibs[ rndNum ] );
		    //http://jonraasch.com/blog/a-simple-jquery-slideshow
		
		    $active.addClass('last-active');
		
		    $next.css({opacity: 0.0})
		        .addClass('active')
		        .animate({opacity: 1.0}, 7900, function() {
		            $active.removeClass('active last-active');
		        });
		}  


	  $(function() {
                $('ul.nav a').bind('click',function(event){
                    var $anchor = $(this);
                    /*
                    if you want to use one of the easing effects:
                    $('html, body').stop().animate({

                        scrollLeft: $($anchor.attr('href')).offset().left
                    }, 1500,'easeInOutExpo');
                    
                    Aca esta la lista de animaciones http://jqueryui.com/demos/effect/easing.html
                     */
                    $('html, body').stop().animate({
                        scrollLeft: $($anchor.attr('href')).offset().left
                    }, 800, 'easeInOutQuad');
                    event.preventDefault();
                });



// Configuración de cajas en forma de hojas, que contienen al menu, logo, banners y contenido.
		  settings = {
			  tl: { radius: 1 },
			  tr: { radius: 40 },
			  bl: { radius: 80 },
			  br: { radius: 1 },
			  antiAlias: true,
			  autoPad: true,
			  validTags: ["div"]
		      }

		  settings2 = {
			  tl: { radius: 1 },
			  tr: { radius: 40 },
			  bl: { radius: 80 },
			  br: { radius: 1 },
			  antiAlias: true,
			  autoPad: true,
			  validTags: ["div"]
		      }

		      
		      
  		  $('.myBox').corner(settings);
		  $('.myBox2').corner(settings2);
		  $('.myBox3').corner(settings2);
// FIN Configuración de Cajas
  		  
  		  $('form.jqtransform').jqTransform({imgPath:'images/jform/'});
//Ejecución de Efectos de Desvanecimiento de los Banners de cada sección 		  
  		  setInterval( "slideSwitch('slideshow')", 8000 );
		  setInterval( "slideSwitch('slideshow2')", 8000 );
		  setInterval( "slideSwitch('slideshow3')", 8000 );
		  setInterval( "slideSwitch('slideshow4')", 8000 );




//FIn Efectos de Desvanecimiento
			
		  //Creditos
		  $(".creditos").bind("click",function(){
              $.Growl.show("WE Biosoluciones<br />Armando Portales : <a style='color:#fff;font-size:11px;' href='http://www.armandoportales.com'>www.armandoportales.com</a> <br /> Manuel Costa : Fotos &quot;W.W.&quot;<br />Ottoniel Arguello C.", {
            	//settings
                  'icon': false,
                  'title': "Cr&eacute;ditos:",
                  'timeout': false
              });
            
            });
		  
		  
			//Blur Links (Prevents Outline)
			$('a').click(function() {
        		this.blur();
        	});
		
			//Hide all item descriptions in the info box
			$("#infobox > div").css("display", "none");
		
			//Call in the info box
			$(".more a").click(function(){
				$("#infobox").animate({bottom: '233px' }, 300);
				$("#fade_bg").fadeIn();
				return false;
			});
			
			//Expand more info button on hover
			$(".more").hover(function(){
				$(this).stop().animate({width: '230px' }, 200).css({'z-index' : '10'}); //Change the width increase caption size
			}, function () {
				$(this).stop().animate({width: '50px' }, 200).css({'z-index' : '1'});
      		});
      		
      		
      		$("ul#topnav li").hover(function() { //Hover over event on list item
			$(this).css({ 'background' : '#1376c9 url(topnav_active.gif) repeat-x'}); //Add background color and image on hovered list item
			$(this).find("span").show(); //Show the subnav
			} , function() { //on hover out...
			$(this).css({ 'background' : 'none'}); //Ditch the background
			$(this).find("span").hide(); //Hide the subnav
			});

			});
		
		$("#formulario").submit(function () {  
		    if($("#email").val().length < 1) {  
			alert("La dirección de correo es obligatoria");  
			return false;  
		    }  
		    return false;  
		});
		
		$("#formulario").submit(function () {  
		    if($("#email").val().indexOf('@', 0) == -1 || $("#email").val().indexOf('.', 0) == -1) {  
			alert("La dirección de correo parece incorrecta");  
			return false;  
		    }  
		    return false;  
		});  
