
var j = jQuery.noConflict();
j(document).ready(function($){
	
	// Add Classes to Nav Elements
    var i = 0;
    $('#navigation ul li').each(function(){
        i++;
        $(this).addClass('item-' + i);
    
    });
    var i = 0;
    $('#footer ul li').each(function(){
        i++;
        $(this).addClass('item-' + i);
    
    });
    $('#navigation ul li img, #footer ul li img').hover(
		function(){
			if ($(this).is(':animated')) {
				$(this).stop().fadeTo(500, 0.01);
			} else {
				$(this).fadeTo(500, 0.01);
			}
		},
		function () {
			if ($(this).is(':animated')) {
				$(this).stop().fadeTo(1000, 1).show();
			} else {
				$(this).fadeTo(1000, 1).show();
			}
		}
	);

    $('#tickets a').hover(
		function(){
			$(this).children('img').hide();
		},
		function () {
			$(this).children('img').show();
		}
	);

	
	// Slideshow
	$('#slideshow').wrap('<div id="slideshow-wrapper"></div>');
	$().slideshow('slideshow');
	
	
	// Fix Volunteer Form
	if ($('body#nobackground').length){
		$('html').before('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
		$('body').attr('id','form').removeClass('miniheader');
		$('#page').append($('#footer'));
		$('form > hr, form > br').remove();
		$('#content').append($('#page + center'));
		$('form center:first').remove();
		$('form').nextAll('br').remove();
	}
    
});
