$(function() {
	
	var $slide = $('.slide');
	if ($slide.length) {
		$slide.before($('<span id="prev" class="slide-button" />').append('&lt;')).before($('<span id="next" class="slide-button" />').append('&gt;'));
		var api = $slide.scrollable({
			api:	true,
			items:	'.slide-img',
			next:	'#next',
			prev:	'#prev',
			size:	4
		});
	}
    
	jQuery(".entry-content a img").parent().fancybox();
	jQuery(".hentry a img").parent().fancybox();
	
	jQuery("#como-votar").fancybox();
	
	//abre fancybox para o video
	jQuery("a.youtube").click(function() {
		jQuery.fancybox({
	     'padding'             : 0,
	     'autoScale'   : false,
	     'transitionIn'        : 'none',
	     'transitionOut'       : 'none',
	     'title'               : this.title,
	     'width'               : 600,
	     'height'              : 415,
	     'href'                : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
	     'type'                : 'swf',    // <--add a comma here
	     'swf'                 : {'allowfullscreen':'true'} // <-- flashvars here
	     });
	    return false;
	});
	
	jQuery('a.rsswidget').click(function() {
		window.open($(this).attr('href'));
		return false;
	});
	
});
