$(document).ready(function(){

		//FAQ Toggle
		$("dd.toggle_container").hide();

			$("dt.trigger").click(function(){
			$(this).toggleClass("active").next().slideToggle("slow");
		});
		
		
		//Fancybox
		/* This is basic - uses default settings */
		$('a#single_image').fancybox();

		/* Using custom settings */
		$('a#inline').fancybox({
		'hideOnContentClick': true
		});

		/* Apply fancybox to multiple items */
		$('a.group').fancybox({
			'transitionIn'	:	'elastic',
			'transitionOut'	:	'elastic',
			'speedIn'		:	600, 
			'speedOut'		:	200, 
			'overlayShow'	:	false
		});
		
		/* HOVER WITH LUPE IMG */
		$('.lupe img').mouseover(function() {
			$(this).stop().fadeTo(300, 0.5);
		});
    $('.lupe img').mouseout(function() {
			$(this).stop().fadeTo(400, 1.0);
		});
		
		$('.fade img').mouseover(function() {
			$(this).stop().fadeTo(300, 0.5);
		});
    $('.fade img').mouseout(function() {
			$(this).stop().fadeTo(400, 1.0);
		});
		
    /* JQuery Back to top */    
    // hide #back-top first
    $("#back-top").hide();
    
    // fade in #back-top
    $(function () {
        $(window).scroll(function () {
            if ($(this).scrollTop() > 100) {
                $('#back-top').fadeIn();
            } else {
                $('#back-top').fadeOut();
            }
        });

        // scroll body to 0px on click
        $('#back-top a').click(function () {
            $('body,html').animate({
                scrollTop: 0
            }, 800);
            return false;
        });
    });

});
