// JavaScript Document

	function mycarousel_initCallback(carousel)
	{
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});
	
		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});
	
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};
	
	  function formatText(index, panel) {
  		  return index + "";
  	  };
	
	jQuery(document).ready(function() {
									
									
		jQuery("#div_blog").addClass('active');
		jQuery("#container_announce").hide();
									
		jQuery('#carousel').jcarousel({
			//auto: 2,
			visible: 5,
			wrap: 'circular',
			initCallback: mycarousel_initCallback
		});
		
		jQuery('#carousel a').lightBox();
		
		 jQuery('.anythingSlider').anythingSlider({
            easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
            autoPlay: false,                 // 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: 900,             // 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: "Go",                // Start text
            stopText: "Stop",               // Stop text
            navigationFormatter: formatText // Details at the top of the file on this use (advanced use)
          });
          
          jQuery("#slide-jump").click(function(){
              jQuery('.anythingSlider').anythingSlider(4);
          });
		  
		  jQuery("#div_blog").click(function(){
               jQuery(this).addClass('active');
			   jQuery("#div_announce").removeClass('active');		
			   
			   jQuery("#container_announce").hide();
			   jQuery("#container_blog").show();
          });
		   
		   jQuery("#div_announce").click(function(){
               jQuery(this).addClass('active');
			   jQuery("#div_blog").removeClass('active');	
			   
			   jQuery("#container_announce").show();
			   jQuery("#container_blog").hide();
          });
		  
	});

