
willow.ready(function($) {
	//emergency bulletin options
	//DATA TYPES
	//{type:"news",id:11111}
	//{type:"announcement",id:22222}
	//{type:"rss",url:"http://rss.news.yahoo.com/rss/topstories"}
	var bulletinOptions = {
		emButtonPosition: "right",
		emButton: false,
		data: [
			//{type:"news",id:5527}
			{type:"announcement",id:2026}
		]
	};
	//emergency bulletin
	$('#Form1').bulletin(bulletinOptions);
});


window.onload = function(){
	iSwapSetup();
	$("#fader").innerfade({timeout: 8000});
}

function iSwap(el,which){
  el.src=el.getAttribute(which || "origsrc");
}

function iSwapSetup(){
  var x = document.getElementsByTagName("img");
  for (var i=0;i<x.length;i++){
    var oversrc = x[i].getAttribute("oversrc");
    if (!oversrc) continue;
      
    // preload image
    // comment the next two lines to disable image pre-loading
    x[i].oversrc_img = new Image();
    x[i].oversrc_img.src=oversrc;
    // set event handlers
    x[i].onmouseover = new Function("iSwap(this,'oversrc');");
    x[i].onmouseout = new Function("iSwap(this);");
    // save original src
    x[i].setAttribute("origsrc",x[i].src);
  }
}

