// JavaScript Document

var msecs=4000;
var nextNo = 1;
var photopre="/wp-content/themes/pauline/images/boxing";
var timer=null;


$(document).ready(function($) {
						   
$("#boxingpics").attr("src", photopre+"1.jpg");	
$("#boxingpics").attr("width", 228);
$("#boxingpics").attr("height", 300);							   
timer = setTimeout("goPhotos(2)",msecs);	

blogStuff();

});


function goPhotos(n) {
	clearTimeout(timer);
	newsrc=photopre+n+".jpg";
	$("#boxingpics").css('display','none');
	$("#boxingpics").attr("src", newsrc);		
	$("#boxingpics").fadeIn("slow");
	nextNo=(n==3)? 1 : n+1;
	timer = setTimeout("goPhotos("+nextNo+")",msecs);	
}

function blogStuff() {
	var suburl = location.href.substr(0,39);
	if(suburl=='http://www.paulinedickson.com/archives/') {
	$("body").prepend('<div id="secret">'+suburl+'</div>');
	
		$('#secret').flashembed({
		wmode:"transparent",
		src: "/wp-content/themes/pauline/flash/secret.swf"
		});

	
	}
	
}
