$(document).ready(function(){
	/* control overflow */
	$(window).resize(function(){
		var isLarger = $(this).width() > 940;
		$(document.body).css('overflow-x', isLarger ? 'hidden' : 'scroll');
		$('#main').css('overflow', isLarger ? 'visible' : 'hidden');
	}).trigger('resize');
	
	
	/* jbtn: opacity */
	$('.jbtn').hover(function(){
		if($(this).is(':animated')) $(this).stop();
		$(this).css('opacity', 0.75);
	}, function(){
		if($(this).is(':animated')) return;
		$(this).animate({opacity: 1});
	});
	
	/*Accordion*/
	$('#accordion').accordion({
		active: 		false,
		alwaysOpen: 	false,
		header: 		'h2.h02int'
	});
	
	//cycle homepage
	$('#banner-item01 ul').cycle({fx: 'fade'  });
}); 
