Behaviour.addLoadEvent 
(	function()
	{	
		if (document.attachEvent)
		{
			// Suckerfish Hovers
			var sfEls = document.getElementById("navigation").getElementsByTagName("UL")[0].getElementsByTagName("LI");
			for (var i=0; i<sfEls.length; i++) {
				sfEls[i].onmouseover=function() {
					this.className+=" sfhover";
				}
				sfEls[i].onmouseout=function() {
					this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				}
			}
		}
		
	}
);

var Rules = {
    '.extern' : function(el)
	{	el.onclick = function()
		{    this.setAttribute('target','_blank');
		}
	},
	'a.print' : function(el)
	{	el.onclick = function()
		{    this.setAttribute('href','javascript:window.print();');
		}
	}

};

Behaviour.register(Rules);





$(document).ready(function(){

	$('a.popup').fancybox({
			'type': 'iframe',
			'width':820,
			'height':500
	});

	$('.imagemaps_hotspot.image a').fancybox();
	
	$('.imagemaps_hotspot.gallery a.imagemap_group').fancybox();
	
	$('.imagemaps_hotspot.gallery a').not('.imagemap_group').click(function(){
		$(this).next().trigger('click');
		return false;
	});
	
	$('.imagemaps_hotspot.iframe a').each(function(){
		$(this).fancybox({
			'type'				: 'iframe',
			'width':parseInt($(this).css('width')),
			'height':parseInt($(this).css('height')),
			'showNavArrows'		:	true
		});
	});
	
	$('.mouseswap img').hover(function(){
		var mouseover = $(this).attr('rel');
		var src = $(this).attr('src');
		$(this).attr('src',mouseover);
		$(this).attr('rel',src);
	},function(){
		var mouseover = $(this).attr('rel');
		var src = $(this).attr('src');
		$(this).attr('src',mouseover);
		$(this).attr('rel',src);	
	});
	

});
