$(document).ready(function() {
	//navigation function	
		ddsmoothmenu.init({
		mainmenuid: "link",
		orientation: 'h', 
		classname: 'top-navigation',	
		contentsource: "markup"
	})
	$('#navigation a').stop().animate({'marginBottom':'-60px'},1000);
	$('#navigation > li').hover(
		function() {
			$('a',$(this)).stop().animate({'marginBottom':'-0px'},200);
		},
		function () {
			$('a',$(this)).stop().animate({'marginBottom':'-60px'},200);
		}
	);
	jQuery('#mycarousel-1').jcarousel({							  
		start:1,
		//animation:5000,
		//scroll: 1,
        //auto: true,
       wrap: 'circular'
       //initCallback: mycarousel_initCallback
    });	
	$("#homeslider").zAccordion({
		startingSlide:0,
		timeout: 5000,
		speed:600,
		slideWidth: 783,
		width: 940,
		height: 240
	});
	
	$(".newsticker-jcarousellite").jCarouselLite({
		vertical: true,
		hoverPause:true,
		visible: 1,
		auto:true,
		speed:3000
	});
	
	$('.jcarousel-skin-tango li').hover(
		function() {			
			$('.read-more',$(this)).fadeIn().show();
			//$('.read-more',$(this)).stop().hide().fadeIn();
		},
		function () {
			$('.read-more',$(this)).hide();
		}
	);
	
	$(".req-pdf").colorbox();
	
	jQuery('#slideshow').fadeSlideShow({
		width:234, // width of your slideshow
		height:60, // height of your slideshow
		speed: 2500, // speed of the transition effect
		interval:5000 // interval time between image change
	});
});

var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}

if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
