
$(document).ready(function() {
	
    var spt_current = 0;
    var spt_total = 5;
    
    var spt_headline = new Array();
    var spt_url = new Array();
    var spt_graphic = new Array();
    var spt_content = new Array();
    
    var t;
    var rotate_speed = 7000;
    
    $("#spotlight_0_clk").addClass("spotlight_clickable_over");
		
		spt_headline[0] = "SPRIworks Automated Fragment Library Systems";
		spt_url[0] = "http://www.spriworks.com";
		spt_graphic[0] = "/images/spotlight/FLS2.jpg";
		spt_content[0] = "<p>The SPRIworks Fragment Library Systems for the Illumina Genome Analyzer and&nbsp;Roche 454 GS FLX DNA Sequencer save time and increase efficiency by automating the construction of DNA&nbsp;libraries.</p><p>&nbsp;</p>";
        
        		spt_headline[1] = "Solutions for Sequencing Plant Genomes";
		spt_url[1] = "http://www.beckmangenomics.com/plant/";
		spt_graphic[1] = "/images/spotlight/plant.jpg";
		spt_content[1] = "<p>Beckman Coulter Genomics has worked extensively with customers in the agriculture industry to help unravel the&nbsp;secrets of numerous plant genomes.</p>";
        
        		spt_headline[2] = "Ease the Strain of Microbial Sequencing";
		spt_url[2] = "http://www.beckmangenomics.com/bacteria/";
		spt_graphic[2] = "/images/spotlight/microbial.jpg";
		spt_content[2] = "<p>Whether surveying the unique properties of a strain collection, engineering new strains, analyzing emerging pathogens, testing the stability of production strains or sampling the environment for novel microbes and genetic content, Beckman Coulter Genomics offers proven solutions that will enhance your research program.</p>";
        
        		spt_headline[3] = "Advalytix Now Part of Beckman Coulter Genomics";
		spt_url[3] = "http://www.advalytix.com/";
		spt_graphic[3] = "/images/spotlight/adv.jpg";
		spt_content[3] = "<p>The Advalytix product group of Beckman Coulter Genomics offers two unique product lines for life science research: The AmpliGrid platform for molecular analysis of single cells and 1&micro;L assays, and the Booster line of small volume non-invasive mixing solutions.</p>";
        
        		spt_headline[4] = "Tailored Solutions for Gene Expression Analysis";
		spt_url[4] = "/expression/";
		spt_graphic[4] = "/images/spotlight/expression.jpg";
		spt_content[4] = "<p>Beckman Coulter&nbsp;Genomics aligns with your research and development requirements&nbsp;to provide a complete integrated solution, from study design to final&nbsp;reporting. Featuring best-in-class technologies and proven expertise,&nbsp;the focus is on matching our technology and capabilities to your needs.</p>";
        
        

	$("#spotlight_headline").hover(function() {
    	cancelRotation();
	}, function() {
    	cancelRotation();
    	t = setTimeout(function(){ changeSpotlight(); }, (rotate_speed * .75)); 
	});
    
    $("#spotlight_graphic").hover(function() {
    	cancelRotation();
	}, function() {
    	cancelRotation();
    	t = setTimeout(function(){ changeSpotlight(); }, (rotate_speed * .75)); 
	});
     
    $("#spotlight_content").hover(function() {
    	cancelRotation();
	}, function() {
    	cancelRotation();
    	t = setTimeout(function(){ changeSpotlight(); }, (rotate_speed * .75)); 
	});

	$(".spotlight_clickable").hover(function() {
    	cancelRotation();
	}, function() {
    	cancelRotation();
    	t = setTimeout(function(){ changeSpotlight(); }, (rotate_speed * .75)); 
	});
    
 
    
    function cancelRotation() {
    	if (t) { clearTimeout(t); }
    }
    
    
    
	$(".spotlight_clickable").click(function() {
    		cancelRotation();
            
    		t = $(this).attr("id");
			tmp = t.split("_");
			which = tmp[1];
         
             if (which >= 0) {
        	spt_current = which - 1 ;
         } else { 
       		spt_current = spt_total - 1;
         } 
        
       changeSpotlight();
    
    });

 
    
	function changeSpotlight() {
    	cancelRotation();
 
 		spt_current++;
		if (spt_current >= spt_total) { spt_current = 0; }
 
    	$("#spotlight_headline").html(spt_headline[spt_current]);
    	$("#spotlight_content").html(spt_content[spt_current]);
		$("#spotlight_graphic").attr("src", spt_graphic[spt_current]);
    	$(".spotlight_url").attr("href", spt_url[spt_current]);

		$(".spotlight_clickable").removeClass("spotlight_clickable_over");
        $("#spotlight_"+spt_current+"_clk").addClass("spotlight_clickable_over");
        
        t = setTimeout(function(){ changeSpotlight(); }, rotate_speed); 
        
    }
 
		t = setTimeout(function(){ changeSpotlight(); }, rotate_speed); 

});
