/* Author: Camilo A. López B.

*/

jQuery(document).ready(function() {
	
	
	//hace que el video del intro se abra en fancybox
   		
		$("#intro-btn").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'padding'			: 0,
				'margin'			: 0,
				'overlayColor' 		: '#000000',
				'overlayOpacity'	: 0.9,
				'autoScale'			: 'true'
			});

		$("#intro-btn").trigger('click');
	
	  $('#brand').css('display', 'block');
	  $('#brand').animate({
	      opacity: 1,
	      top: '+=35'
	    });
	  
	  			  
	  $("#news #main img").fadeIn(1500);
	  $("li a[href$='pdf']").parent().addClass("pdf");
	  $(".boxerror").fadeIn(1500);
	  
	  
	  $("a[rel=gallery]").fancybox({
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'fade',
				'titlePosition' 	: 'over',
				'padding'			: 0,
				'margin'			: 0,
				'overlayColor' 		: '#000000',
				'overlayOpacity'	: 0.9,
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
			
	jQuery('#gallerycarousel').jcarousel();
	  
	    
});
