jQuery.noConflict();

jQuery(document).ready(function() {
 	
 	//var theSlider = jQuery('.anythingSlider');
 	
    //sweet sweet cycle plugin
    jQuery('#slides').cycle({
        fx: 'scrollLeft',
        speed: 900,
        timeout: 5000,
        pause: 1,
        pauseOnPagerHover: 1,
        pager: '#slidenav',
        pagerAnchorBuilder: function(idx, slide){
            return '<a id="'+idx+'" href="#">'+slide.id+'</a>';
        },
        before: function(currSlideElement, nextSlideElement, options, forwardFlag){
            switch(nextSlideElement.id)
            {
                case 'patients':
                    //theSlider.addClass("pat");
                    //theSlider.removeClass("res");
                    //theSlider.removeClass("tec");
                    jQuery('#homebanner').animate({
                        backgroundColor: "#125C9D"
                    }, 500 );
                    break;
                case 'research':
                    //theSlider.addClass("res");
                    //theSlider.removeClass("pat");
                    //theSlider.removeClass("tec");
                    jQuery('#homebanner').animate({
                        backgroundColor: "#733695"
                    }, 500 );
                    break;
                case 'technology':
                    //theSlider.addClass("tec");
                    //theSlider.removeClass("pat");
                    //theSlider.removeClass("res");
                    jQuery('#homebanner').animate({
                        backgroundColor: "#855B0F"
                    }, 500 );
            }
        }
    });


    /* Cycle animation from the spotlight section */

    jQuery('#news').cycle({
        fx: 'fade',
		cleartype: 0,
        random: 1,
        pause: 1,
        speedIn: 1000,
        speedOut: 500,
        delay: 4000
    });


//sweet sweet cycle plugin
/*
 jQuery('#slides').cycle({ 
      fx: 'scrollLeft', 
      speed: 800, 
      timeout: 4000, 
      before: function(currSlideElement, nextSlideElement, options, forwardFlag){ 
      switch(nextSlideElement.id)
        {
        case 'patients':

          jQuery('.anythingSlider').addClass("pat");
          jQuery('.anythingSlider').removeClass("res");
          jQuery('.anythingSlider').removeClass("tec");
          jQuery('#homebanner').animate({backgroundColor: "#125C9D" }, 500 );
        break;
         case 'research':

        jQuery('.anythingSlider').addClass("res");
        jQuery('.anythingSlider').removeClass("pat");
        jQuery('.anythingSlider').removeClass("tec");
        jQuery('#homebanner').animate({backgroundColor: "#733695" }, 500 );
        break;  
        case 'technology':
        jQuery('.anythingSlider').addClass("tec");
        jQuery('#homebanner').animate({backgroundColor: "#855B0F" }, 500 );
        }
      },
      pause: 1,
      pager: '#slidenav',
      pagerAnchorBuilder: function(idx, slide){
        return '<a href="#">'+slide.id+'</a>';
      }
      
 });

*/

  
//this is the button for the bottom box animations

/*
  $("ul.lower-content div").hover(
      function () {
        $(this).css({'z-index' : '10'});
        $(this).addClass("hover").stop().animate({
    			top: '50%',
    			left: '50%',
    			width: '180px',
    			height: '235px'
    		}, 200);
      }, 
      function () {
        $(this).css({'z-index' : '0'});
    	$(this).removeClass("hover").stop().animate({
    			top: '0',
    			left: '0',
    			width: '170px',
    	    height: '225px' 
    		}, 400);
      }
    );
*/


}); /* this is the document ready end */

