var current = 0;
var _img;
J = jQuery.noConflict();
function initPage(){
	_img = J('#header img');
	_img.each(function(i){
		if (i == 0){
			J(this).css('opacity', 1);
		}
		else {
			J(this).css('opacity', 0);
		}
	});
	current = 0;
	_img.each(function(i){
		J(this).click(function(){
			J(_img.get(current)).fadeTo(500, 0);
			if (++current < _img.length){
				J(_img.get(current)).fadeTo(500, 1);
			}
			else {
				current = 0;
				J(_img.get(current)).fadeTo(500, 1);
			}
		})
	});
}

function initJcycle(){
    J('#imagearea').cycle({
      fx: 'fade',
      speed:500,
      timeout:3500,
      next:'#imagearea',
      pause:1
    });
}
if (window.addEventListener){
	window.addEventListener("load", initJcycle, false);
}
else if (window.attachEvent && !window.opera){
	window.attachEvent("onload", initJcycle);
}