$(document).ready(function() {
	$('a[rel="external"]').click(function(){ this.target = "_blank"; });
	$('.trabajos-all-li').mouseenter(function() { $('.trabajos-all-text', this).fadeIn(200); });
	$('.trabajos-all-li').mouseleave(function() { $('.trabajos-all-text', this).fadeOut(200); });
    $('#slider').nivoSlider({
        effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        slices:12,
        animSpeed:500, //Slide transition speed
        pauseTime:6000,
        startSlide:0, //Set starting Slide (0 index)
        directionNav:true, //Next & Prev
		captionHover:true, // Mouseover para el caption --------- ! IMPORTANT
        directionNavHide:false, //Only show on hover
        controlNav:true, //1,2,3...
        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 & right arrows
        pauseOnHover:true, //Stop animation while hovering
        manualAdvance:false, //Force manual transitions
        captionOpacity:0.8, //Universal caption opacity
        beforeChange: function(){},
        afterChange: function(){},
        slideshowEnd: function(){}, //Triggers after all slides have been shown
        lastSlide: function(){}, //Triggers when last slide is shown
        afterLoad: function(){} //Triggers when slider has loaded
        
    });
    Shadowbox.init({
		players:  ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv'],

		overlayColor: '#000',
		overlayOpacity: 0.8
	});
});

function openShadowbox(content, player, title, width, height){
	Shadowbox.open({ content: content, player: player, title:  title, width:	width, height:	height });
}
