$(document).ready(function() {
$().piroBox({
			my_speed: 400, //animation speed
			bg_alpha: 0.1, //background opacity
			slideShow : true, // true == slideshow on, false == slideshow off
			slideSpeed : 4, //slideshow duration in seconds(3 to 6 Recommended)
			close_all : '.piro_close,.piro_overlay'// add class .piro_overlay(with comma)if you want overlay click close piroBox
 
	});	
	
    $("#nav li a ").textShadow({
    	xoffset: "1px",
    	yoffset: "1px",
    	radius:  "1px",
    	opacity: "80"
    });	
	
	$('#slideshowHolder').jqFancyTransitions({
	effect: '', // wave, zipper, curtain
    width: 708, // width of panel
    height: 216, // height of panel
    strips: 20, // number of strips
    delay: 5000, // delay between images in ms
    stripDelay: 50, // delay beetwen strips in ms
    titleOpacity: 0.7, // opacity of title
    titleSpeed: 1000, // speed of title appereance in ms
    position: 'alternate', // top, bottom, alternate, curtain
    direction: 'random', // left, right, alternate, random, fountain, fountainAlternate
    navigation: false, // prev and next navigation buttons
    links: false // show images as links	
	});
	
	function showmenu(){
	$("#menu li").hover(function(){
	$(this).find('ul:first').css({visibility:"visible", display:"none"}).show();
	}, function(){
	$(this).find('ul:first').css({visibility:"hidden"});
	});
	}
	showmenu();
	
	Shadowbox.init({
    handleOversize: "drag",
    modal: true
    });	
    
 jQuery.fn.topLink = function(settings) {
  settings = jQuery.extend({
    min: 1,
    fadeSpeed: 200
  }, settings);
  return this.each(function() {
    //listen for scroll
    var el = $(this);
    el.hide(); //in case the user forgot
    $(window).scroll(function() {
      if($(window).scrollTop() >= settings.min)
      {
        el.fadeIn(settings.fadeSpeed);
      }
      else
      {
        el.fadeOut(settings.fadeSpeed);
      }
    });
  });
};

//usage w/ smoothscroll
$(document).ready(function() {
  //set the link
  $('#top-link').topLink({
    min: 200,
    fadeSpeed: 500
  });
  //smoothscroll
  $('#top-link').click(function(e) {
    e.preventDefault();
    $.scrollTo(0,300);
  });
});
 
});
	function cambiarimagen(foto) {
    $("#myfoto").attr("src","userfiles/images/textos/"+foto);
    } 
