/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function formatTitle(title, currentArray, currentIndex, currentOpts) {
    return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img alt="fechar" src="/images/x.png" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';
}


$(document).ready(function() {

	/* This is basic - uses default settings */


	 $("a.group").fancybox({
		'SpeedIn'		:	5000,
		'SpeedOut'		:	5000,
                'transitionIn'          : 'elastic',
		'transitionOut'         : 'elastic',
                'pocity'                :true,
                'showCloseButton'	: false,
                'titlePosition' 	: 'inside',
                'titleFormat'		: formatTitle,
                'hideOnContentClick'    :       false,
                'overlayOpacity'        :       0.8,
                'overlayColor'          :       "#000"


        });
       $("a.videos").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'title'			: this.title,
			'width'		: 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'ajax',
                        'overlayOpacity'        : 0.8
			
		});

	return false;
});


});


