$(document).ready(function() {
    //id
    $("#fancybox").fancybox({
            'transitionIn'	: 'elastic',
            'transitionOut'	: 'elastic',
            'hideOnContentClick': true,
            'centerOnScroll'    : true
    });

    //class
    $("a.fancybox").fancybox({
            'titlePosition'	: 'inside',
            'transitionIn'	: 'elastic',
            'transitionOut'	: 'elastic',
            'opacity'		: true,
            'hideOnContentClick': false,
            'overlayShow'	: true,
            'overlayOpacity'	: 0.8,
            'overlayColor'	: '#333333',
            'titleShow'         : true
    });

    //class
    $("a.iframe").fancybox({
            'width'		: 400,
            'height'		: 300,
            'autoScale'     	: false,
            'transitionIn'	: 'none',
            'transitionOut'	: 'none',
            'type'		: 'iframe',
            'titleShow'         : false
    });

    //class
    $("a.montage").fancybox({
            'width'		: 600,
            'height'		: 750,
            'autoScale'     	: false,
            'transitionIn'	: 'none',
            'transitionOut'	: 'none',
            'type'		: 'iframe',
            'titleShow'         : false
    });

    //movie
    $("a.youtube").click(function() {
        $.fancybox({
            'padding'		: 0,
            'autoScale'		: false,
            'transitionIn'	: 'none',
            'transitionOut'	: 'none',
            'overlayOpacity'	: 0.8,
            'overlayColor'	: '#333333',
            'title'		: this.title,
            'width'		: 680,
            'height'		: 495,
            'href'		: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
            'type'		: 'swf',
            'swf'		: {
                'wmode'             : 'transparent',
                'allowfullscreen'   : 'true'
            }
        });

        return false;
    });


});
