// JavaScript Document


$(document).ready(function () {

// Ketchup
$('#contacto').ketchup({}, {
  '.requerido'    : 'required',              //all fields in the form with the class 'required'
  '.email-valido': 'email' //one field in the form with the id 'fic-username'
});
// Ketchup
$('#sumate').ketchup({}, {
  '.requerido'    : 'required',              //all fields in the form with the class 'required'
  '.email-valido': 'email' //one field in the form with the id 'fic-username'
});

//Nivoslider
$('#slider').nivoSlider({
	directionNav: false
	});
	
//PrettyPhoto	
$("a[rel^='staff']").prettyPhoto();

//Staff hover
$("ul.galeria li").hover(
function () {
$(this).find(".mas").fadeIn("fast");
},
function () {
$(this).find(".mas").fadeOut("fast");
}
);

//Staff linkedin
$("ul.galeria li").hover(
function () {
$(this).find("a.linkedin").fadeIn("fast");
},
function () {
$(this).find("a.linkedin").fadeOut("fast");
}
);

//Servicios Hover
$(".box_servicio").hover(
function () {
$(this).find(".mas").fadeIn("fast");
},
function () {
$(this).find(".mas").fadeOut("fast");
}
);

});

// Galeria de fotos
jQuery(document).ready(function($) {
				// We only want these styles applied when javascript is enabled
				$('div.navigation').css({'width' : '220px', 'float' : 'left','margin-right' : '20px'});
				$('div.content').css('display', 'block').css('float','none');

				// Initially set opacity on thumbs and add
				// additional styling for hover effect on thumbs
				var onMouseOutOpacity = 0.67;
				$('#thumbs ul.thumbs li').opacityrollover({
					mouseOutOpacity:   onMouseOutOpacity,
					mouseOverOpacity:  1.0,
					fadeSpeed:         'fast',
					exemptionSelector: '.selected'
				});
				
				// Initialize Advanced Galleriffic Gallery
				var gallery = $('#thumbs').galleriffic({
					delay:                     2500,
					numThumbs:                 15,
					preloadAhead:              10,
					enableTopPager:            true,
					enableBottomPager:         true,
					maxPagesToShow:            7,
					imageContainerSel:         '#slideshow',
					controlsContainerSel:      '#controls',
					captionContainerSel:       '#caption',
					loadingContainerSel:       '#loading',
					renderSSControls:          false,
					renderNavControls:         false,
					playLinkText:              false,
					pauseLinkText:             false,
					prevLinkText:              '',
					nextLinkText:              '',
					nextPageLinkText:          '&rsaquo;&rsaquo;',
					prevPageLinkText:          '&lsaquo;&lsaquo;',
					enableHistory:             false,
					autoStart:                 false,
					syncTransitions:           true,
					defaultTransitionDuration: 900,
					onSlideChange:             function(prevIndex, nextIndex) {
						// 'this' refers to the gallery, which is an extension of $('#thumbs')
						this.find('ul.thumbs').children()
							.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
							.eq(nextIndex).fadeTo('fast', 1.0);
					},
					onPageTransitionOut:       function(callback) {
						this.fadeTo('fast', 0.0, callback);
					},
					onPageTransitionIn:        function() {
						this.fadeTo('fast', 1.0);
					}
				});
			});
