// JavaScript Document
		$(document).ready(function() {
      $("a.single_image").fancybox({
        'hideOnContentClick': true,
    		'transitionIn'	:	'elastic',
    		'transitionOut'	:	'elastic',
    		'speedIn'		:	600,
    		'speedOut'		:	200,
    		'titlePosition' 	: 'over',
    		'titleShow'   : true
      });
    	$("a.group").fancybox({
    	  'hideOnContentClick': true,
    		'transitionIn'	:	'elastic',
    		'transitionOut'	:	'elastic',
    		'speedIn'		:	600,
    		'speedOut'		:	200,
    		'titlePosition' 	: 'over',
    		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">Foto ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' ' + title + '</span>';
		}
    	});
    });

    function bar(url){
      wasOpen  = false;
      win = window.open(url);
      return (typeof(win)=='object')?true:false;
    }
    
        $(window).load(function() {
          $('#slider').nivoSlider({
              animSpeed: 500, // Slide transition speed
              pauseTime: 3000, // How long each slide will show
              startSlide: 0, // Set starting Slide (0 index)
              directionNav: true, // Next and Prev navigation
              directionNavHide: true, // Only show on hover
              controlNav: false, // 1,2,3... navigation
              controlNavThumbs: false, // Use thumbnails for Control Nav
              controlNavThumbsFromRel: false, // Use image rel for thumbs
              controlNavThumbsSearch: '.jpg', // Replace this with...
              controlNavThumbsReplace: '_thumb.jpg', // ...this in thumb Image src
              keyboardNav: true, // Use left and right arrows
              pauseOnHover: true, // Stop animation while hovering
              manualAdvance: false, // Force manual transitions
              captionOpacity: 0.8, // Universal caption opacity
              prevText: 'Prev', // Prev directionNav text
              nextText: 'Next', // Next directionNav text
          });
        s});
