$(document).ready(function() {
	
	// cycle
	if(jQuery().cycle) { $('#home-banner .cycle-items').cycle({ fx: 'scrollHorz', prev:'#cycle-prev', next:'#cycle-next', timeout:7000, speed:400, pause:1 }); }

	// very fancy
	$(".entry-content .wp-caption a").fancybox({
			'hideOnContentClick' : true,
			'transitionIn' : 'none',
			'transitionOut' : 'none',
			'titleShow' : false
		});

	$('.entry-content .gallery-icon a').attr('rel', 'gallery');
	$(".entry-content .gallery-icon a").fancybox({
			'hideOnContentClick' : true,
			'transitionIn' : 'none',
			'transitionOut' : 'none',
			'titlePosition' : 'over',
			'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
				return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + '</span>'; 
			}
		});

	// faq
	$('.gsmw-faq dt').click(function(){
		var dd = $(this).next();
		if(!dd.is(':animated')) {
			dd.slideToggle();
			$(this).toggleClass('opened');
		}
	});
		
});
