

$(document).ready(function() {

        $("a.fancybox").fancybox({
                'type' : 'image'
        });

        $("a.fancyiframe").fancybox({
                'type'	: 'iframe',
                'width' : '80%',
                'height' : '90%',
                'titleShow' : false
        });


        //youtube
        $("a.fancyyoutube").click(function() {
            $.fancybox({
                    'padding' : 0,
                    'autoScale' : false,
                    'title' : this.title,
                    'overlayOpacity' : '.6',
                    'overlayColor' : '#333',
                    'transitionIn' : 'none',
                    'transitionOut' : 'none',
                    'centerOnScroll' : false,
                    'showCloseButton' : true,
                    'hideOnOverlayClick': false,
                    'href' : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
                    'type' : 'swf',
                    'swf' : {
                    'wmode': 'transparent',
                    'allowfullscreen': 'true'
                    }
            });
            return false;
        });
});
