$(document).ready(function(){

	$('#pics li a').click(function(e){

		e.preventDefault();

		$('#photo').hide().fadeOut("slow").html('<img src="'+$(this).attr("href")+'" /><br/><p>'+$(this).attr("title")+'</p>').fadeIn("slow");

	});

});

$(function() {

	var showCurrent = function () {

		if(/\d{1,4}/.test(window.location.href.split('=')[1])) {

			var $current = $('li.page-item-'+window.location.href.split('=')[1]);

			if($current) {

				$current.find('a').first().css({'font-weight':'bold', 'color':'#000'});

				$current.parents("ul,li").show();

				$current.children("ul,li").show();

			}

		}

	}

	showCurrent();

	$('#menu').hover(function () {},function () {

		$('.page_item > .children').hide("fast", 'showCurrent');

	});/*

	$('.page_item').hover(function() {

		var that = this;

		$('.page_item').not($(this).parents('li,ul')).not(this).find('.children').hide("fast", function () {

			$(that).find('.children').first().show("fast");

		});

		return false;

	});*/

});
