/*  Sitewide Javascript includes, added just before </head>.  */

jQuery(document).ready( function($) {
    // $ now OK to use: $('.title-heading').css('font-weight','900');
});


// Add option to /calendar, enable jQuery UI Theme (included in header-child.php)
var extra_calendar_options = {theme: true};


var extra_calendar_options = {
    theme: true,
    header: {
        left: '',
        center: 'title',
        right: 'prev,next today'
    }
};

jQuery(document).ready(function($) {
	$("#footer li:first-child").addClass("first-item");
	$("#footer li:last-child").addClass("last-item");
	$("#access .menu li:last-child").addClass("last-item");

	$('.gallery-item a').addClass('thickbox');

	$(".event_wrap:odd").addClass("odd-event");


	$('li.menu-item').children('ul.sub-menu').parent().addClass('hasSubMenu');


	$('#tabs a#onsale_link').click(function() {
		$('#news_tab').css('z-index', '5');
		$('#onsale_tab').css('z-index', '10');
		$(this).removeClass('off_tab');
		$(this).siblings().addClass('off_tab');
		return false;
	});

	$('#tabs a#news_link').click(function() {
		$('#onsale_tab').css('z-index', '5');
		$('#news_tab').css('z-index', '10');
		$(this).removeClass('off_tab');
		$(this).siblings().addClass('off_tab');
		return false;
	});


	// rollovers for search and email signup

	$('#mc_signup_submit').mouseover(function() {
		$('#email_signup_nav form').css('background-position', '-247px -129px');
	});

	$('#mc_signup_submit').mouseout(function() {
		$('#email_signup_nav form').css('background-position', '-247px -88px');
	});



	$("#mc_mv_EMAIL").val('signup for email love');
	// for form fields clear on focus...  
	$("#mc_mv_EMAIL").focus(function() {
		if( this.value == 'signup for email love' ) {
			this.value = "";
			}
		}).blur(function() {
			if( !this.value.length ) {
				this.value = 'signup for email love';
			}
	});

			

	// for equal height columns (anything wrapped in  <div class="equal_height">
	function setEqualHeight(columns)
	 {
	 var tallestcolumn = 0;
	 columns.each(
	 function()
	 {
	 currentHeight = $(this).height();
	 if(currentHeight > tallestcolumn)
	 {
	 tallestcolumn  = currentHeight;
	 }
	 }
	 );
	 columns.height(tallestcolumn);
	 }
	$(document).ready(function() {
	 setEqualHeight($(".equal_height  > div"));
	});

	var tabHeight = $('#news_tab').height() + $('#tabs').height() + 40;
	$('#sidebar_tabs').height(tabHeight);

	// stop equal height columns


}); // STOP JQUERY
