/* Author: 

*/

$(function(){
	
	

	var actual = $("#main").attr("class");       
		//	console.log(actual);	
	
	$("#nav").find("li").each(function() {
		var x = $(this).attr('class');
		//console.log("comparando " + actual + " , " + x);
				if(actual == x) {
			//		console.log(">>> " + actual + " , " + x);
					$(this).addClass("active");
				}
				
			});
			

	$("#nav").find("a.luz").append('<span class="hover"></span>');


	$('#nav li a.luz').hover(function() {
    
		// cosas q suceden cuando hover on
		$('.hover', this).stop().animate({
				'opacity' : 1
		}, 700, 'easeOutSine')
    
	}, function() {
    
		// cosas q suceden en hover out
		$('.hover', this).stop().animate({
				'opacity' : 0
		}, 700, 'easeOutExpo')
    
	});	
	
	
	$('#slider').nivoSlider({
			effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
			slices:1,
			animSpeed:500, //Slide transition speed
			pauseTime:8000,
			startSlide:0, //Set starting Slide (0 index)
			directionNav:true, //Next & Prev
			directionNavHide:true, //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.5, //Universal caption opacity
			beforeChange: function(){},
			afterChange: function(){},
			slideshowEnd: function(){} //Triggers after all slides have been shown
		});
		
		$("a[rel='colorbox'],a[rel='gal-nichos'],a[rel='gal-floreros'],a[rel='gal-osarios'],a[rel='gal-frentes'],a[rel='gal-grabado'],a[rel='instalaciones'],a[rel='recomendaciones'],a[rel='carta'],a[rel='recon']").colorbox({
		current: " ",scrolling:false
		
		});

		
		$("a[rel='video1']").colorbox({
			iframe:true,
			innerWidth:640,
			innerHeight:424,
			href:"http://player.vimeo.com/video/10726125?title=0&amp;byline=0&amp;portrait=0&amp;color=ff3800'",
			scrolling:false
		});
		
		$("a[rel='video2']").colorbox({
			iframe:true,
			innerWidth:640,
			innerHeight:424,
			href:"http://player.vimeo.com/video/11093356?title=0&amp;byline=0&amp;portrait=0&amp;color=ff3800'",
			scrolling:false
			
		});
		
		$("a[rel='video_sistema']").colorbox({
			iframe:true,
			innerWidth:480,
			innerHeight:390,
			href:"http://www.youtube.com/v/41gXrZgkAu0?version=3",
			scrolling:false
		});
		
		
		
		

});
























