//<script type="text/javascript" src="js/jquery.scrollto.js"></script>
/*
 			<a class="about" name="about"></a>
  			<ul>
            	<li class="m_alyn"><a href="javascript:goTo(1);" title="Alynmedia">Alynmedia</a></li>
                <li class="m_portafolio"><a href="javascript:goTo(2);" title="Portafolio">Portafolio</a></li>
                <li class="m_contactar"><a href="javascript:goTo(3);" title="Contactar">Contactar</a></li>
            </ul>
 */

$(document).ready(function() {
			$("a[rel=knockdownstore]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Imagen ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
			
				$("a[rel=marianavarro]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Imagen ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
				$("a[rel=pcrepar]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Imagen ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
				$("a[rel=restaurabultaco]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Imagen ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
				
			$(window).scroll(function () { 
				if($(window).scrollTop() > 0){
					$(".gotop").fadeIn();
				}else{
					$(".gotop").fadeOut();
				}
			 });
			 $(".gotop").hide();
			 $(".gotop").css("top",$(window).height()-30);
			 $(".gotop").css("left",$(window).width()-150);
		});

function goTo(zone){

	switch(zone)
	{
	case 1:
		$.scrollTo( ".about" , 1900);
	  break;
	case 2:
		$.scrollTo( ".work" , 1900);
	  break;
	case 3:
		$.scrollTo( ".contact" , 1900);
	  break;
	default:
		$.scrollTo( ".header" , 1900);
	 break;
	}
	
}
