jQuery.noConflict();

//Countdown Script
var now = new Date();
var event = new Date("Jul 29 2010 12:00:00"); // ENTER DATE OF NEXT EVENT HERE
var seconds = (event - now) / 1000;
var minutes = seconds / 60;
var hours = minutes / 60;
var days = hours / 24;
ID=window.setTimeout("update();", 1000);
function update() {
	now = new Date();
	seconds = (event - now) / 1000;
	minutes = seconds / 60;
	hours = minutes / 60;
	days = hours / 24;
	var showDays = Math.floor(days);
	var showHours = Math.floor(hours - (showDays*24));
	var showMinutes = Math.floor(minutes - (showHours*60) - (showDays*24*60));
	var showSeconds = Math.floor(seconds - (showMinutes*60) - (showHours*60*60) - (showDays*24*60*60));
	var zeroDays = '';
	if(showDays < 10){zeroDays = '0'};
	var zeroHours = '';
	if(showHours < 10){zeroHours = '0'};
	var zeroMinutes = '';
	if(showMinutes < 10){zeroMinutes = '0'};
	var zeroSeconds = '';
	if(showSeconds < 10){zeroSeconds = '0'};
	jQuery('#days').text(zeroDays + showDays);
	jQuery('#hours').text(zeroHours + showHours);
	jQuery('#minutes').text(zeroMinutes + showMinutes);
	jQuery('#seconds').text(zeroSeconds + showSeconds);
	ID=window.setTimeout("update();",1);
}

// Copyright Date
function date(get) {
	var year=now.getFullYear()
	if(get=="year"){document.write(year);}
}


// IE6 Rollovers
jQuery(document).ready(function(){
	jQuery('#menu LI').hover(
		function(){jQuery(this).addClass(" over");},
		function(){jQuery(this).removeClass(" over");}
	);
	jQuery('#menu LI UL LI').hover(
		function(){jQuery(this).addClass(" over");},
		function(){jQuery(this).removeClass(" over");}
	);
	jQuery('#search_submit').hover(
		function(){jQuery(this).addClass(" over");},
		function(){jQuery(this).removeClass(" over");}
	);
	jQuery('#poll_vote').hover(
		function(){jQuery(this).addClass(" over");},
		function(){jQuery(this).removeClass(" over");}
	);
});


// Slideshow Animation
function slideSwitch() {
    var $active = jQuery('#slideshow LI.active');
    if ( $active.length == 0 ) $active = jQuery('#slideshow LI:last');
    var $next =  $active.next().length ? $active.next()
        : jQuery('#slideshow LI:first');
	var n = $active.next().length;
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
        $active.removeClass('active last-active');
        });
}

jQuery(function() {
    setInterval( "slideSwitch()", 2900);
});
