<!--//--><![CDATA[//>
//<!--
window.addEvent('domready', function() 
{
  $$("a").filter(function(el) {
			return el.href && !el.href.indexOf("http://www.flickr.com/photos/") && el.firstChild && el.firstChild.src;
		}).slimbox({
			loop: true,
			initialWidth: 1024,
			initialHeight: 768,
			overlayOpacity: 0.6,
			overlayFadeDuration: 200,
			resizeDuration: 1000,
			resizeTransition: Fx.Transitions.Elastic.easeOut,
			counterText: "This is image ><strong>{x}</strong> on a total of <strong>{y}</strong> in this fabulous Flickr image gallery",
			previousKeys: [37, 80, 16],
			nextKeys: [39, 78, 17]
		}, function(el) {
			return [el.firstChild.src.replace(/_[mts]\.(\w+)$/, ".$1"),
				(el.title || el.firstChild.alt) + '<br />Visit the <a href="' + el.href + '">Flickr page</a> for this picture.'];
		});
		try {
			_gat._getTracker("UA-760577-1")._trackPageview();
		} catch(e) {}

	var childs = $$('#nav li');
	childs.each(function(el) {
		if(($defined(el.getProperty('id')) == true) && ($defined(el.getFirst()) == true))
		{
			if (el.getProperty('id') == 'L')
			{
				el.getFirst().setStyle('margin-bottom', '5px');
				//el.setStyles('background: url(/images/nav/subbottom1.png) white');
			}
		}
	});

	var childs = $$('#nav ul.child');
	childs.each(function(el) {
		el.setStyle('opacity', 0);
	});

	var list = $$('#nav ul.child');
	list.each(function(el) {

 		//var elFx = el.effect('opacity', {duration: 100, transition:Fx.Transitions.linear, wait: false});

 		el.getParent().addEvents({
 			'mouseenter': function()
 			{
 				var image_name = el.getParent().getStyle('background-image');
 				el.setStyle('opacity', 1);

 				if (image_name.lastIndexOf('/') != -1)
 				{
 					image_name = image_name.substr(image_name.lastIndexOf('/') + 1);
 					image_name = image_name.substr(0, image_name.lastIndexOf('_'));
 				}

 				el.getParent().setStyle('background', 'url(/images/nav/' + image_name + '_on.gif)');
 			},
 			'mouseleave': function()
 			{
 				el.setStyle('opacity', 0);

 				var image_name = el.getParent().getStyle('background-image');
 				if (image_name.lastIndexOf('/') != -1)
 				{
 					image_name = image_name.substr(image_name.lastIndexOf('/') + 1);
 					image_name = image_name.substr(0, image_name.lastIndexOf('_'));
 				}
 				
 				el.getParent().setStyle('background', 'url(/images/nav/' + image_name + '_off.gif)');
 			}
 		});
	});
	
	/*
	var links = $$('.child a');
	links.each(function(element)
	{
		var parent = element.getParent().getParent().getParent();
		var iWidth = (parent.getStyle('width').toInt());
		element.setStyle('width', iWidth+18);
		var fx = new Fx.Styles(element, {duration:700,transition: Fx.Transitions.Bounce.easeOut, wait:false});
		element.getParent().addEvents({
		'mouseenter': function()
			{
			fx.start({'height':30,'line-height': 30,'background-color':'#000099','color':'#FFFFFF','border-bottom-style':'solid'});
			},
		'mouseleave': function()
			{
			fx.start({'height':20,'margin':0,'line-height':20,'margin-left':0,'background-color':'#0066FF','color':'#FFFFFF'});
			}
		});
	});*/
	
});

//-->//<!]]>