// JavaScript Document

// Jquery Accordian 
jQuery(document).ready(function(){
	
	
	$("#accordion h3:first").addClass("active");
	$("#accordion .accordianbody:not(:first)").hide();

	$("#accordion h3").click(function(){
		$(this).next(".accordianbody").slideToggle("fast")
		$(this).toggleClass("active");
		
	});

 
});

// Jquery Accordian if 2 on one page 
jQuery(document).ready(function(){
	
	
	$("#accordion2 h3:first").addClass("active");
	$("#accordion2 .accordianbody:not(:first)").hide();

	$("#accordion2 h3").click(function(){
		$(this).next(".accordianbody").slideToggle("fast")
		$(this).toggleClass("active");
		
	});

 
});



// div swaps for use when i have a box of inof to switch rather than an image

jQuery(document).ready(function(){
function switchTo(i) {   
$('#switches div').css('font-weight','normal').eq(i).css('font-weight','bold');   
$('#slides div').css('display','none').eq(i).css('display','block'); 
} 
$(document).ready(function(){   
	$('#switches div').mouseover(function(event){     
	switchTo($('#switches div').index(event.target));   
	});   
	switchTo(0); 
}); 

}); 


// div swaps on image
jQuery(document).ready(function(){

$("#newsheadline1").mouseover( function () 
{
  $("#frontnewsimage1").addClass('swap1'); // this function is for mouse over
  $("#frontnewsimage1").removeClass('swap2'); // this function is for mouse over
  $("#frontnewsimage1").removeClass('swap3'); // this function is for mouse over
 $(this).addClass('newshover');
  $("#newsheadline2").removeClass('newshover2');
  $("#newsheadline3").removeClass('newshover3');
});

//$("#newsheadline1").mouseout( function () 
//{
//  $("#frontnewsimage1").removeClass('swap1'); // this function is for mouse over
 
//});

$("#newsheadline2").mouseover( function () 
{
  $("#frontnewsimage1").addClass('swap2'); // this function is for mouse over
  $("#frontnewsimage1").removeClass('swap1'); // this function is for mouse over
  $("#frontnewsimage1").removeClass('swap3'); // this function is for mouse over
 $(this).addClass('newshover2');
  $("#newsheadline1").removeClass('newshover');
  $("#newsheadline3").removeClass('newshover3');
});

//$("#newsheadline2").mouseout( function () 
//{
//  $("#frontnewsimage1").removeClass('swap2'); // this function is for mouse over
 
//});

$("#newsheadline3").mouseover( function () 
{
  $("#frontnewsimage1").addClass('swap3'); // this function is for mouse over
  $("#frontnewsimage1").removeClass('swap1'); // this function is for mouse over
  $("#frontnewsimage1").removeClass('swap2'); // this function is for mouse over
 $(this).addClass('newshover3');
  $("#newsheadline2").removeClass('newshover2');
  $("#newsheadline1").removeClass('newshover');
});

//$("#newsheadline3").mouseout( function () 
//{
//  $("#frontnewsimage1").removeClass('swap3'); // this function is for mouse over
 
//});



});
