$(document).ready(function(){
	$("div#news:visible").hide();
	slowhigh();
});

$(document).ready(function(){
	$("#reveal_pulse").click(function(){
		var theClassName = document.getElementById('controller_holder').className;
		switch(theClassName) {
			case "opened":
				$("div#news:visible").slideUp("slow");
				document.getElementById('controller_holder').className = "closed";
			break;
			case "closed":
				$("div#news:hidden").slideDown("slow");
				document.getElementById('controller_holder').className = "opened";
			break;
		}
	});
	$("#reveal_controller").click(function(){
		var theClassName = document.getElementById('controller_holder').className;
		switch(theClassName) {
			case "opened":
				$("div#news:visible").slideUp("slow");
				document.getElementById('controller_holder').className = "closed";
			break;
			case "closed":
				$("div#news:hidden").slideDown("slow");
				document.getElementById('controller_holder').className = "opened";
			break;
		}
	});
});

/***********************************************
* Gradual Highlight image script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var baseopacity=30
//Higher is Slower
var speed=70

function slowhigh(){
	var which2 = document.getElementById('reveal_pulse')
	imgobj=which2
	browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : typeof which2.style.Opacity=="string"? "mac" : "";
	instantset(baseopacity)
	highlighting=setInterval("jellyfish(imgobj)",speed)
}

function slowlow(){
	var which2 = document.getElementById('reveal_pulse')
	cleartimer()
	instantset(baseopacity)
}

function instantset(degree){
	if (browserdetect=="mozilla")
		imgobj.style.MozOpacity=degree/100
	else if (browserdetect=="ie")
		imgobj.filters.alpha.opacity=degree
	else if (browserdetect=="mac")
		imgobj.style.opacity=degree/100
}

function cleartimer(){
	if (window.highlighting) clearInterval(highlighting)
}

function jellyfish(cur2){
	if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
		cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 1)
	else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
		cur2.filters.alpha.opacity+=10
	else if (browserdetect=="mac" && cur2.style.opacity<1)
		cur2.style.opacity=Math.min(parseFloat(cur2.style.opacity)+0.1, 1)
	else if (window.highlighting){
		clearInterval(highlighting);
		cur3=cur2
		highlighting=setInterval("jellyfishmore(cur3)",speed);
	}
}

function jellyfishmore(cur2){
	if (browserdetect=="mozilla" && cur2.style.MozOpacity>0)
		cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)-0.1)
	else if (browserdetect=="ie" && cur2.filters.alpha.opacity>0)
		cur2.filters.alpha.opacity-=10
	else if (browserdetect=="mac" && cur2.style.opacity>0)
		cur2.style.opacity=Math.min(parseFloat(cur2.style.opacity)-0.1)
	else if (window.highlighting){
		 clearInterval(highlighting)
		 cur3=cur2
		 highlighting=setInterval("jellyfish(cur3)",speed);
	}
}