<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function initMenus() {
	$('ul.leftMenu ul').hide("fast");
	$.each($('ul.leftMenu'), function(){
		$('#' + this.id + '.expandfirst ul:first').fadeIn("slow");
	});
	//$('ul.menu li a').click(
	$('ul.leftMenu li a').click(
		function() {
			var checkElement = $(this).next();
			var parent = this.parentNode.parentNode.id;

			if($('#' + parent).hasClass('noaccordion')) {
				$(this).next().slideToggle('normal');
				return false;
			}
			if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
				if($('#' + parent).hasClass('collapsible')) {
					$('#' + parent + ' ul:visible').slideUp('slow');
				}
				return false;
			}
			if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
				$('#' + parent + ' ul:visible').slideUp('slow');
				checkElement.slideDown('slow');
				return false;
			}
		}
	);
}
$().ready(function() {
	initMenus();
	$('.datepicker').datepicker({ 
		showOn: "both",
		dateFormat: 'mm-dd-yy',
		altFormat: 'mm-dd-yy',
		/*dateFormat: 'yy-mm-dd',*/
		maxDate: '-1D',
		buttonImage: "/scripts/css/img/calendar.gif",
		buttonText: 'Click to show the calendar', 
		buttonImageOnly: true,
		changeMonth: true, 
		changeYear: true, 
		yearRange: new Date().getFullYear()-90 + ":" + new Date().getFullYear() 
	});
	$("#accordion").accordion({ 
		autoHeight: false,
		navigation: true,
		collapsible: true,
		active: false,
		header: 'h2',
		activate: '<?php echo $t; ?>',
		icons: { 'header': 'ui-icon-folder-open', 'headerSelected': 'ui-icon-close' }
	});
	$("#accordion .accordion_box").click(function(event){
		  window.location.hash=this.hash;
	 });	
	 $("a[rel^='prettyPhoto']").prettyPhoto();
	 /*$(".videoPopup").fancybox({
		'padding'			: 0,
		'autoScale'		: false,
		'transitionIn'		: 'none',
		'transitionOut'	: 'none'
	});
	$(".youTube").click(function() {
		$.fancybox({
			'padding'		: 10,
			'autoScale'	: false,
			'transitionIn'	: 'elastic',
			'transitionOut': 'elastic',
			'speedIn'		: 600, 
			'speedOut'	: 200,
			'width'		: 640,
			'height'		: 400,
			'href'		: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'		: 'swf',
			'swf'		: {
			    'wmode'			: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});
	
		return false;
	});*/
	
});
//-->
