/* (c) Victoria JK Lamburn vicky@lilserenity.com */

$(document).ready(function(){

$("#webViolator").fadeIn(1000);

function toggleAtoZStatus(azObject){

	var showAtoZ = function(){
		$("#azBox").slideDown(500);
		$("#azToggle").html('Hide A to Z Index').css('background','url(styles/rsrc/bottomTab_Up.png) no-repeat');
	}

	var hideAtoZ = function(){
		$("#azBox").slideUp(500);
		$("#azToggle").html('Show A to Z Index').css('background','url(styles/rsrc/bottomTab.png) no-repeat');
	}

	switch($(azObject).html()){
		case 'Show A to Z Index':
			showAtoZ(azObject);
			break;
		case 'Hide A to Z Index':
			hideAtoZ(azObject);
			break;
		default:
			break;
	}
	return false;
}

$("a")
.filter("#azToggle")
	.click(function(){
		toggleAtoZStatus(this);
		return false;
	})
.end()

		});
