//Jquery Actions

//Homepage Rotating Banners

    function banner_switch(){
        //This function is called on to switch the banners out when the time limit is reached
        shuffle();
        var next =  $('.banner.current').next('.banner').length ? $('.banner.current').next('.banner') : $('#homebanners .banner:first');
        $(next).show();
        $(".current").fadeOut().removeClass("current");
        $(next).addClass("current");
    }
    $(function() {
        //Initial timer setting
        slide = setInterval( "banner_switch()", 5000 );
    });
    function set_new_interval(interval){
        //Simply clears out the old timer interval and restarts it
        clearInterval(slide);
        slide = setInterval("banner_switch()", interval);
    }
    function shuffle(){
        //This function takes every .banner and changes the z-index to 1, hides them, then takes the ".current" banner and brings it above and shows it
        $(".banner").css("z-index", 1).hide();7
        $(".current").css("z-index", 2).show();
    }

//Homepage Rotating Banners End

//Read more text start

$(document).ready(function()
	{
		$("div#hiddentext").hide();
		$("a#readmore").show();
		$("a#readmore").click(function()
			{
				$("div#hiddentext").show();
				$("a#readmore").hide();
			})
	}
);

//Read more text end


//------------------------

//Cufon Headings

//	Cufon.replace('h1');


//print window

function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}

//open popup

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

