// JavaScript Document

 function formatText(index, panel) {
		  return index + "";
		  //alert('wen');
	    }
    
        $(function () {
        
            $('.anythingSlider').anythingSlider({
                easing: "swing",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 6000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 0,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		startText: "Start",           // Start text
		    /*    stopText: "Stop",*/               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(4);
            });
            
        });

        $(document).ready(function() {


            $('#anythingSlider .playing').click();

            //				alert('entrp');


            $("#colDefault2").mouseover(function() {
                $('#thumbNav #2').click();

                $('#anythingSlider .playing').click();

                $(this).addClass("active");
                $("#colDefault3").removeClass("active");
                $("#colDefault4").removeClass("active");


            });

            $("#colDefault3").mouseover(function() {
                $('#thumbNav #3').click();

                $('#anythingSlider .playing').click();

                $(this).addClass("active");
                $("#colDefault2").removeClass("active");
                $("#colDefault4").removeClass("active");

            });

            $("#colDefault4").mouseover(function() {
                $('#thumbNav #4').click();


                $('#anythingSlider .playing').click();

                $(this).addClass("active");
                $("#colDefault2").removeClass("active");
                $("#colDefault3").removeClass("active");

            });

            $('#service_1').click(function() { location.href = '/Business/Drug_and_Alcohol_Testing.aspx' });
            $('#service_2').click(function() { location.href = '/Business/Applicant_Tracking_Solutions.aspx	' });
            $('#service_3').click(function() { location.href = '/Business/Seasonal_Flu_Shots.aspx' });
            $('#service_4').click(function() { location.href = '/Business/Background_Screening_Solutions.aspx' });
            $('#service_5').click(function() { location.href = '/Business/Environment_Testing_Solutions.aspx' });
            $('#service_6').click(function() { location.href = '/Business/Health_and_Wellness_Programs.aspx' });
            $('#service_7').click(function() { location.href = '/Business/Allied_Health_Schools.aspx' });
            $('#service_8').click(function() { location.href = '/Tests/_49_Tests.aspx' });
            $('#service_9').click(function() { location.href = '/Tests/Employer_Solutions.aspx' });
            $('#service_10').click(function() { location.href = '/Business/Drug_and_Alcohol_Testing.aspx' });

            $('#colDefault2').click(function() { location.href = '/Business.aspx' });
            $('#colDefault3').click(function() { location.href = '/Individuals.aspx' });
            $('#colDefault4').click(function() { location.href = 'http://www.anytest.biz/' });

            $("#btnFindStore").click(function() {
                location.href = "/Facility_Locator.aspx";
            });
        });
		
		function goPage2()
		{

			 $("#colDefault2").addClass("active");
			 $("#colDefault3").removeClass("active");
			 $("#colDefault4").removeClass("active");
		}
		
		function goPage3()
		{

			$("#colDefault3").addClass("active");
			$("#colDefault2").removeClass("active");
			$("#colDefault4").removeClass("active");
		}
		
		function goPage4()
		{
			 $("#colDefault4").addClass("active");
			$("#colDefault2").removeClass("active");
			$("#colDefault3").removeClass("active");
		}
		
		function clearPageStyle()
		{
			 $("#colDefault4").removeClass("active");
			$("#colDefault2").removeClass("active");
			$("#colDefault3").removeClass("active");

}
		
		//****** added by Acidmorph 11May2010  *******/

//highlight_box behaviors

		var currentBox = 1;
		
		function hideBoxes(index) {
			for (i=2;i<=index;i++) {
				$('#service_box_'+i).hide();	
			}
		}

		function showBox(nBox) {
				$('#service_box_'+currentBox).hide();	
				currentBox = nBox;			
				$('#service_box_'+nBox).show();				
		}
