var defH = 350;

$(document).ready(function(){
	
	/*$("ul.sf-menu").superfish({
		animation: {opacity:'show',height:'show'},
		autoArrows : false,
		dropShadow: false
	});*/
	
	$('ul.main-menu li a.with-children').click(function(){
		$(this).parent().find('ul').toggle('slow');
		$(this).toggleClass('active');
		return false;
	});
	$('.highlight a.tab').xpTabs({displayMethod:'fadeIn',selectFirst:true});
	
	$("a.fancybox").fancybox({overlay:true, hyperlinkClassToIgnore:'to-ignore'});
});


$(window).load(function(){
	//$('.slide-show').fadeIn();
	//$('.slide-show').cycle();
	//
	$('.date-pick').datePicker().val(new Date().asString()).trigger('change');
	var h = $('.contents-area-body').height();
	if(h<defH) $('.contents-area-body').not('.home').css('height',defH);
});
