var fadeout = new Spry.Effect.Fade("inhere",{from:'100%',to:'0%',duration:2000});
var fadein  = new Spry.Effect.Fade("inhere",{from:'0%',to:'100%',duration:2000});
var blind_up = new Spry.Effect.Blind("inhere", {from: '100%', to: '0%'});
var blind_down = new Spry.Effect.Blind("inhere", {from: '0%', to: '100%'});

function divfader(theURL){
	if (theURL.indexOf('#') != -1){} else {
		blind_up=null;
		blind_up = new Spry.Effect.Blind("inhere", {from: Spry.$('inhere').scrollHeight + "px", to: '0%'});
		var fadeobs = {onPostEffect:function(){	blind_up.start();}};
		var blindupobs = {onPostEffect:function(){
							if (theURL == "/dogs/dogs.html") {window.location=theURL + '?category='+category;}
							else if (theURL == "viewdog.html"){window.location='/dogs/'+category + '/' +theURL + '?category='+category;}
							else {window.location=theURL;}
							}};
		fadeout.addObserver(fadeobs);
		blind_up.addObserver(blindupobs);
		fadeout.start();
	}
}

function start_page(){
	document.getElementById('inhere').style.opacity = 0.01;	
	setTimeout('setnewblind();',1000);
}

function setnewblind() {
blind_down=null;
blind_down = new Spry.Effect.Blind("inhere", {from: '0%', to: Spry.$('inhere').scrollHeight + "px"});
var blinddownobs = {onPostEffect:function(){fadein.start();}};
blind_down.addObserver(blinddownobs);
blind_down.start();
}