// JQuery code all goes in this function
$(document).ready(function(){
	
	// Home page 2011	
	$('.accordion').accordion( { collapsible: true, 'active': false, 'autoHeight': false } );
	
	// top slideshow
	$('#top_slideshow').innerfade({ animationtype: 'slide', speed: 1000, timeout: 4000, type: 'sequence', containerheight: '329px' });
	// YouTube
	$('#you_tube').delay( 500 ).effect('bounce', {times:3,direction:'down',distance:20}, 600).effect('shake', {}, 300);
	$('#you_tube a').hover(function(){
    $(this).animate({paddingLeft: '+=15px'}, 200);
  }, function(){
    $(this).animate({paddingLeft: '-=15px'}, 200);
  });
	// news panels home page
	var headings = $('.news_panel h3'),
			divs = $('.news_panel div');
	divs.hide();
	headings.click(function() {
		$(this).siblings('div').slideUp('slow');
		$(this).next('div').toggle();
	});
	headings.hover(
		function() {
			$(this).addClass('h3_hover');
			$(this).animate({	opacity: 0.6}, 500);
		},
		function() {
			$(this).removeClass('h3_hover');
			$(this).animate({	opacity : 1.0 }, 500);
		}
	);
	$('.np_close').click(function() {
		$(this).parent().fadeOut('slow');		
	});
	// end news panels home page
});


/* 
  ------------------------------------
  PVII Menu CSS Express Drop-Down Menu
  by Project Seven Development
  www.projectseven.com
  ------------------------------------
*/
function topnav_menu(){ //v1.1.0.2 by PVII-www.projectseven.com
 if(navigator.appVersion.indexOf("MSIE")==-1){return;}
 var i,k,g,lg,r=/\s*topnav_hvr/,nn='',c,cs='topnav_hvr',bv='topnav';
 for(i=0;i<10;i++){g=document.getElementById(bv+nn);if(g){
 lg=g.getElementsByTagName("LI");if(lg){for(k=0;k<lg.length;k++){
 lg[k].onmouseover=function(){c=this.className;cl=(c)?c+' '+cs:cs;
 this.className=cl;};lg[k].onmouseout=function(){c=this.className;
 this.className=(c)?c.replace(r,''):'';};}}}nn=i+1;}
}


