 function photo_rotation () {
	
	
	var counter = 0;
	$(".photo-box").hide();
	$("div.photo-slideshow .photo-box:first").show();
	$("div.infographihc_container div.photo-slideshow .photo-box:first").show();
	$("div.photobox-next a").click(function nextclick(){

		$(".photo-box").hide();
//		$(".photo-box").fadeOut("slow").removeClass("selected");
		counter++;
		var nextbox = "#photo-box-"+counter;
		$(nextbox).show();	

	})
	$("div.photobox-previous a").click(function prevclick(){
		$(".photo-box").hide();		
//		$(".photo-box").removeClass("selected");		
		counter = counter-1;
		var prevbox = "#photo-box-"+counter;
		$(prevbox).show();		
//		$(prevbox).addClass("selected");		
	})
	
	
}

 function infographic_rotation () {
	
	
	var counter = 0;
	$(".infographic-box").hide();
	$("div.infographic-slideshow .infographic-box:first").show();
	$("div.infographihc_container div.infographic-slideshow .infographic-box:first").show();
	$("div.infographicbox-next a").click(function nextclick(){

		$(".infographic-box").hide();
//		$(".photo-box").fadeOut("slow").removeClass("selected");
		counter++;
		var nextbox = "#infographic-box-"+counter;
		$(nextbox).show();	

	})
	$("div.infographicbox-previous a").click(function prevclick(){
		$(".infographic-box").hide();		
//		$(".photo-box").removeClass("selected");		
		counter = counter-1;
		var prevbox = "#infographic-box-"+counter;
		$(prevbox).show();		
//		$(prevbox).addClass("selected");		
	})
	
	
}


// BEGIN TEST
function new_photo_rotation () {
        $.jtabber({
            mainLinkTag: ".photo-buttons a", // much like a css selector, you must have a 'title' attribute that links to the div id name
            activeLinkClass: "selected", // class that is applied to the tab once it's clicked
            hiddenContentClass: "photo-box", // the class of the content you are hiding until the tab is clicked
            showDefaultTab: 1, // 1 will open the first tab, 2 will open the second etc.  null will open nothing by default
            showErrors: false, // true/false - if you want errors to be alerted to you
            effect: 'fade', // null, 'slide' or 'fade' - do you want your content to fade in or slide in?
            effectSpeed: 'slow' // 'slow', 'medium' or 'fast' - the speed of the effect
        })

        
/* $(document).ready(function(){
      $.jtabber({
        mainLinkTag: ".photo-buttons a",
        activeLinkClass: "selected",
        hiddenContentClass: "photo-box",
        showDefaultTab: 1,
        showErrors: false,
        effect: \'fade\',
        effectSpeed: \'medium\'
      });
    }); */
    
};



	
function photovideo_load() {
	if (($("#breakout_photo").length > 0)) {var photo_count = 1;} else {var photo_count = 0;};
	if (($("#breakout_video").length > 0)) {var video_count = 1;} else {var video_count = 0;};
	if (($("#breakout_infographic").length > 0)) {var infographic_count = 1;} else {var infographic_count = 0;};
	
	var final_count = photo_count + video_count + infographic_count;
	//alert(final_count);
	if (final_count < 2) {
			$("li#breakout_photo").hide()
			$("li#breakout_infographic").hide()
			$("li#breakout_video").hide()						
	}
	
	// Beg New Infographic Test
	
	//Load for all
	if (($("#breakout_photo").length > 0) && ($("#breakout_video").length > 0) && ($("#breakout_infographic").length > 0)) {

		$(".field_story_video_container").removeClass("hide").addClass("show")
		$(".photo-slideshow").removeClass("show").addClass("hide")
		$(".infographic-slideshow").removeClass("show").addClass("hide")
		
		$("li#breakout_video").removeClass("breakout_inactive").addClass("breakout_active")
		$("li#breakout_photo").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_infographic").removeClass("breakout_active").addClass("breakout_inactive")
			
	}
	
	//Photo  options
	//Only  Photo
	else if (($("#breakout_photo").length > 0) && ($("#breakout_video").length == 0) && ($("#breakout_infographic").length == 0)) {

		$(".field_story_video_container").removeClass("show").addClass("hide")
		$(".photo-slideshow").removeClass("hide").addClass("show")
		$(".infographic-slideshow").removeClass("show").addClass("hide")
		
		$("li#breakout_video").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_photo").removeClass("breakout_inactive").addClass("breakout_active")
		$("li#breakout_infographic").removeClass("breakout_active").addClass("breakout_inactive")
			
	}
	//Photo/Video
	else if (($("#breakout_photo").length > 0) && ($("#breakout_video").length > 0) && ($("#breakout_infographic").length == 0)) {

		$(".field_story_video_container").removeClass("hide").addClass("show")
		$(".photo-slideshow").removeClass("show").addClass("hide")
		$(".infographic-slideshow").removeClass("show").addClass("hide")
		
		$("li#breakout_video").removeClass("breakout_inactive").addClass("breakout_active")
		$("li#breakout_photo").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_infographic").removeClass("breakout_active").addClass("breakout_inactive")
			
	}	
	//Photo/Infographic
	else if (($("#breakout_photo").length > 0) && ($("#breakout_video").length == 0) && ($("#breakout_infographic").length > 0)) {

		$(".field_story_video_container").removeClass("show").addClass("hide")
		$(".photo-slideshow").removeClass("hide").addClass("show")
		$(".infographic-slideshow").removeClass("show").addClass("hide")
		
		$("li#breakout_video").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_infographic").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_photo").removeClass("breakout_inactive").addClass("breakout_active")			
	}		

	//Video  options
	//Only  Video
	else if (($("#breakout_photo").length == 0) && ($("#breakout_video").length > 0) && ($("#breakout_infographic").length == 0)) {

		$(".field_story_video_container").removeClass("hide").addClass("show")
		$(".photo-slideshow").removeClass("show").addClass("hide")
		$(".infographic-slideshow").removeClass("show").addClass("hide")
		
		$("li#breakout_video").removeClass("breakout_inactive").addClass("breakout_active")
		$("li#breakout_photo").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_infographic").removeClass("breakout_active").addClass("breakout_inactive")
			
	}
	
	//Video/Infographic
	else if (($("#breakout_photo").length == 0) && ($("#breakout_video").length > 0) && ($("#breakout_infographic").length > 0)) {

		$(".field_story_video_container").removeClass("hide").addClass("show")
		$(".photo-slideshow").removeClass("show").addClass("hide")
		$(".infographic-slideshow").removeClass("show").addClass("hide")
		
		$("li#breakout_video").removeClass("breakout_inactive").addClass("breakout_active")
		$("li#breakout_photo").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_infographic").removeClass("breakout_active").addClass("breakout_inactive")
			
	}	

	//Infographic  options
	//Only  Infographic
	else if (($("#breakout_photo").length == 0) && ($("#breakout_video").length == 0) && ($("#breakout_infographic").length == 0)) {

		$(".field_story_video_container").removeClass("show").addClass("hide")
		$(".photo-slideshow").removeClass("show").addClass("hide")
		$(".infographic-slideshow").removeClass("hide").addClass("show")
		
		$("li#breakout_video").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_photo").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_infographic").removeClass("breakout_inactive").addClass("breakout_active")
			
	}
	
	
	// End New Infographic Test
	
	
/*	if (($("#breakout_photo").length > 0) && $("#breakout_video").length == 0) {
		$(".photo-slideshow").removeClass("hide").addClass("show")
		$(".photo-box").hide();
		$(".photo-box:first").show();
		$(".field_story_video_container").removeClass("show").addClass("hide")
		$("li#breakout_photo").hide()
	}
		
	else if (($("#breakout_video").length > 0) && $("#breakout_photo").length > 0) {
		$(".field_story_video_container").removeClass("hide").addClass("show")
		$(".photo-slideshow").removeClass("show").addClass("hide")
		$("li#breakout_video").removeClass("breakout_inactive").addClass("breakout_active")
		$("li#breakout_photo").removeClass("breakout_active").addClass("breakout_inactive")
	}
	else if (($("#breakout_video").length > 0) && $("#breakout_photo").length == 0) {
		$(".field_story_video_container").removeClass("hide").addClass("show")
		$(".photo-slideshow").removeClass("show").addClass("hide")
		$("#breakout_video").hide()
	}*/
			
	
}
function photovideo_toggle(){
	$("li#breakout_photo").click(function photovideo_photoclick(){
		$(".field_story_video_container").removeClass("show").addClass("hide")
		$(".photo-slideshow").removeClass("hide").addClass("show")
		$("li#breakout_photo").addClass("breakout_active").removeClass("breakout_inactive")
		$("li#breakout_video").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_infographic").removeClass("breakout_active").addClass("breakout_inactive")
		$(".infographic-slideshow").removeClass("show").addClass("hide")
	})

	$("li#breakout_infographic").click(function photovideo_infographicclick(){
		$(".field_story_video_container").removeClass("show").addClass("hide")
		$(".infographic-slideshow").removeClass("hide").addClass("show")
		$("li#breakout_infographic").addClass("breakout_active").removeClass("breakout_inactive")
		$(".photo-slideshow").removeClass("show").addClass("hide")
		$("li#breakout_photo").addClass("breakout_inactive").removeClass("breakout_active")
		$("li#breakout_video").removeClass("breakout_active").addClass("breakout_inactive")
	})
		
	$("li#breakout_video").click(function photovideo_videoclick(){
		$(".photo-slideshow").removeClass("show").addClass("hide")
		$(".field_story_video_container").removeClass("hide").addClass("show")
		$("li#breakout_video").removeClass("breakout_inactive").addClass("breakout_active")
		$("li#breakout_photo").removeClass("breakout_active").addClass("breakout_inactive")
		$("li#breakout_infographic").removeClass("breakout_active").addClass("breakout_inactive")
		$(".infographic-slideshow").removeClass("show").addClass("hide")
	})
	
}	





