// Custom Fades and UI


	$(document).ready(function() {
			setTimeout(function() {
				// Accordion
				$('#menu5 > li > a.expanded + ul').slideToggle('medium');
				
				$('#menu5 > li > a').click(function() {
					$('#menu5 > li > a.expanded').not(this).toggleClass('expanded').toggleClass('collapsed').parent().find('> ul').slideToggle('medium');
					$(this).toggleClass('expanded').toggleClass('collapsed').parent().find('> ul').slideToggle('medium');
				});
				
			}, 250);
		});
    


$(document).ready(function() {
	
	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.example_menu li ul li:first").addClass("current").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.example_menu li ul li").click(function() {
		
		$("ul.example_menu li ul li").removeClass("current"); //Remove any "active" class
		$(this).addClass("current"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});


});

$(function(){

$('ul.example_menu li ul li a')
	.css( {backgroundPosition: "-10px 5px"} )
	.mouseover(function(){
		$(this).stop().animate(
			{backgroundPosition:"(7px 5px)"},
			{duration:300})
	})
	.mouseout(function(){
		$(this).stop().animate(
			{backgroundPosition:"(-10px 5px)"},
			{duration:300})
	})
})

$(function(){

/*
$('ul.example_menu li ul li a')
	.css( {backgroundPosition: "-10px 0px"} )
	.mouseover(function(){
		$(this).stop().animate(
			{backgroundPosition:"(7px 0px)"},
			{duration:300})
	})
	.mouseout(function(){
		$(this).stop().animate(
			{backgroundPosition:"(-10px 0px)"},
			{duration:300})
	})
*/

$('#header ul li a')
	.css( {backgroundPosition: "-10px 15px"} )
	.mouseover(function(){
		$(this).stop().animate(
			{backgroundPosition:"(7px 15px)"},
			{duration:300})
	})
	.mouseout(function(){
		$(this).stop().animate(
			{backgroundPosition:"(-10px 15px)"},
			{duration:300})
	})
})
$(document).ready(function() {
        $("body").css("display", "none");
        $("body").fadeIn(1000);
			
		$("a.transition").click(function(event){
        event.preventDefault();
        linkLocation = this.href;
        $("body").fadeOut(1000, redirectPage);
    });
 
    function redirectPage() {
        window.location = linkLocation;
    }
});

