<!--
/***
Simple jQuery Slideshow Script
Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc. Please link out to me if you like it :)
***/
var $tyty = "";
var $busy = false;
var $current = "";
var $rotateTime = 5000;	// Time the script waits before changing image in milliseconds
var $fadeTime = 1000;	// Time it takes to fade the images in milliseconds
function slideSwitch( $test ) {
if ( $busy )
return;
var $active = $('#slideshow IMG.active');
var $activeNav = $("#navi"+$active.attr('id'));
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
// use this to pull the images in the order they appear in the markup
var $next = $active.next().length ? $active.next() : $('#slideshow IMG:first');
var $nextNav = $("#navi"+$next.attr('id'));
// var $sibs = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next = $( $sibs[ rndNum ] );
$active.addClass('last-active');
$activeNav.removeClass('active');
$nextNav.addClass('active');
$busy = true;
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, $fadeTime, function() {
$active.removeClass('active last-active');
$busy = false;
});
}
function goto( $test ) {
if ( $busy )
return;
var $active = $('#slideshow IMG.active');
var $activeNav = $("#navi"+$active.attr('id'));
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
// use this to pull the images in the order they appear in the markup
var $next = $('#slide'+$test);
var $nextNav = $("#navi"+$next.attr('id'));
if ( $next.attr('id') == $active.attr('id') )
return;
// var $sibs = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next = $( $sibs[ rndNum ] );
$active.addClass('last-active');
$activeNav.removeClass('active');
$nextNav.addClass('active');
clearInterval($tyty);
$tyty = setInterval( "slideSwitch()", 2000 );
$busy = true;
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, $fadeTime, function() {
$active.removeClass('active last-active');
$busy = false;
});
}
var $tyty2 = "";
var $rotateTime2 = 2000;	// Time the script waits before changing image in milliseconds
var $fadeTime2 = 500;	// Time it takes to fade the images in milliseconds
/** Phil changes start here! **/
jQuery(document).ready(function() {
var list = jQuery("div[id^='slideshow2']");
jQuery.each(list, function() {
var aHref = jQuery(this).children('a:first');
setInterval(function() {
var activeImg = aHref.children('img.active');
if ( activeImg.length == 0 ) activeImg = aHref.children('img:last');
var nextImg = activeImg.next().length ? activeImg.next() : aHref.children('img:first');
//activeImg.addClass('last-active');
nextImg.css({opacity: 0.0}).addClass('active').animate({opacity: 1.0}, 500, function() { activeImg.removeClass('active'); });
}, 6000);
});
});
/** Phil changes end here! **/
/*
function slideSwitch2( $test ) {
var $active = $('#slideshow2 IMG.active');
if ( $active.length == 0 ) $active = $('#slideshow2 IMG:last');
// use this to pull the images in the order they appear in the markup
var $next = $active.next().length ? $active.next() : $('#slideshow2 IMG:first');
// var $sibs = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next = $( $sibs[ rndNum ] );
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, $fadeTime2, function() {
$active.removeClass('active last-active');
});
}
*/
function popup( link, width, height, frameName ) {
if ( frameName == "" )
window.open( link, link, 'width='+width+',height='+height+',status=no,scrollbars=yes' );
else
window.open( link, frameName, 'width='+width+',height='+height+',status=no,scrollbars=yes' );
}
-->
