$(document).ready( function()
{
	$("a.zoom").fancybox({
		'overlayOpacity'		: 0.6,
		'overlayColor'			: '#C6E7FE',
		'overlayShow'			: true,
		'zoomSpeedIn'			: 500,
		'zoomSpeedOut'			: 500,
		'hideOnContentClick'	: false, 
		'centerOnScroll'		: true,
		'padding'				: '0'
	});
	$("a.pop_up").fancybox2({
		'overlayOpacity'		: 0.6,
		'overlayColor'			: '#C6E7FE',
		'overlayShow'			: true,
		'zoomSpeedIn'			: 500,
		'zoomSpeedOut'			: 500,
		'hideOnContentClick'	: false, 
		'centerOnScroll'		: true,
		'padding'				: '0'
	});
	
	$('ul#nav > li').hover(function() {
		$('ul:first', this).show();
		},function(){
			$('ul:first', this).hide();
	});
	
	$('ul#nav li li').hover(function() {
	$('ul:first', this).each(function() {
	  $(this).css('top', $(this).parent().position().top );
	  $(this).css('left', $(this).parent().position().left + $(this).parent().width() );
	  $(this).show();
	});},function(){
	$('ul:first', this).hide();
		});
	
	// segundo nav
	$('ul#nav2 > li').hover(function() {
		$('ul:first', this).show();
		},function(){
			$('ul:first', this).hide();
	});
	
	$('ul#nav2 li li').hover(function() {
	$('ul:first', this).each(function() {
	  $(this).css('top', $(this).parent().position().top );
	  $(this).css('left', $(this).parent().position().left + $(this).parent().width() );
	  $(this).show();
	});},function(){
	$('ul:first', this).hide();
		});
	
	function solomano()
	{
	document.body.style.cursor='hand';
	};

	function soloflecha()
	{
	document.body.style.cursor='default';
	};
	$("#myScroll").mbScrollable({
        width:845,
        elementsInPage:1,
        elementMargin:0,
        height:"auto",
        controls:"#controls",
        slideTimer:600,
        autoscroll:true,
        scrollTimer:4000
      });
	  
	  setTimeout(function(){$("#wrapper").fadeIn();},2000);
});


// wait until document is fully scriptable 
$(document).ready(function() { 
	/*--- wait time ----*/
    $.fn.wait = function(time, type) {
        time = time || 5000;
        type = type || "fx";
        return this.queue(type, function() {
            var self = this;
            setTimeout(function() {
                $(self).dequeue();
            }, time);
        });
    };
    // select #flowplanes and make it scrollable. use circular and navigator plugins 
    var s = $("#flowpanes").scrollable({keyboard: false,size: 1,clickable: false}).circular().navigator({ 
    	
        // select #flowtabs to be used as navigator 
        navi: "#flowtabs",
        // select A tags inside the navigator to work as items (not direct children) 
        naviItem: 'a',  
        // assign "current" class name for the active A tag inside navigator 
        activeClass: 'current'
 
    }).autoscroll({interval:5000});
    

   
});



