// Initialize JavaScript 68f5272 89e9642 6b063671 daf4c74efd
// MT2Portugalia
// -------------------------------------------------------
// CSS Hax
// -------------------------------------------------------

$("#navbar ul li:last").addClass('noborder');
$(".sb-ranking tr:even").addClass('odd');
$(".sb-ranking tr:odd").addClass('even');

// -------------------------------------------------------
// Fading
// -------------------------------------------------------

var fadeDuration = 300;

$('.screenshots').hover(function() {
  $(this).animate({ opacity: '1.00' }, fadeDuration);
}, function() {
  $(this).animate({ opacity: '0.7' }, fadeDuration);  
});

$('#header #logo img,#sbvid').hover(function() {
  $(this).animate({ opacity: '0.85' }, fadeDuration);
}, function() {
  $(this).animate({ opacity: '1.0' }, fadeDuration);  
});

// -------------------------------------------------------
// FancyBox
// -------------------------------------------------------

$("#sbvid").fancybox({
	'overlayColor' : '#000',
	'width'				: '85%',
	'height'			: '85%',
	'autoScale'			: true,
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'type'				: 'iframe'
});

$("a[rel=screenshots]").fancybox({
	'overlayColor' : '#000',
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'titlePosition' 	: 'over',
	'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">Imaginea ' + (currentIndex + 1) + ' din ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
	}
});