// JavaScript Document

// http://flowplayer.org/tools/demos/index.html
// Script used for thumbnail rotation section
$(document).ready(function() {
						   
                   // initialize scrollable together with the circular, mousewheel, autoscroll, and tooltip plugins
				   // initialize the tooltip plugin last
                  $("#wheeled").scrollable({
					  clickable:false,
					  easing: "swing"
				  }).circular().mousewheel().autoscroll({ 
					  steps: 1,                             // rotates 1 image at a time
					  interval: 6000                        // every 6 seconds       
				  }).find("a").tooltip({ 
					  // use this single tooltip element for all trigger elements (styled in scrollable.css)
					  tip: '#tooltip' 
				  });	
				  
				  
				  
				  
			  $('img#scroll_prev').hover(function() {
				  $(this).attr("src","assets/images/scroll_prev_hover.gif");
					  }, function() {
				  $(this).attr("src","assets/images/scroll_prev.gif");
			  });
			  $('img#scroll_next').hover(function() {
				  $(this).attr("src","assets/images/scroll_next_hover.gif");
					  }, function() {
				  $(this).attr("src","assets/images/scroll_next.gif");
			  });			
			
			
			
			
	$('img.no_script').hide();
	$('#slideContainer, #slideNextPrev').show();
        $('#slideContainer').after('<div id="slideNumNav" class="slideNav"></div>').cycle({
		fx:     'fade',
		speed:  'slow',
		pager:  '#slideNumNav',
		next:   '#next',
		prev:   '#prev'
	});			  
				  
				  
				  
    $('#rotator').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});			
	
	
	
		$("#affiliate_offices ul li:even").addClass("even");
		jQuery(".rollover").hover(
			function() {
				this.src = this.src.replace("_on","_off");
			},
			function() {
				this.src = this.src.replace("_off","_on");
			}
		);	
	
				  
				  
	$(".organizer_container").hide();

	$("h4.trigger").toggle(function(){
		$(this).addClass("active"); 
		}, function () {
		$(this).removeClass("active");
	});
	
	$("h4.trigger").click(function(){
		$(this).next(".organizer_container").slideToggle("slow,");
	});				  
				  
				  

    // setup ul.tabs to work as tabs for each div directly under div.panes 
    $("ul.tabs").tabs("div.panes > div"); 

		  
				  
});
