// JavaScript Documentfunction ctrlNave(section){	$('#B'+section).addClass('current');	$('#M'+section).show();	if(subsection && subsection!=''){		if(subsection=='la_paste' || subsection=='la_moreneta' || subsection=='catering_montserrat'){			subsection='presentacion';		}		$('#M'+section).find('#B'+subsection).addClass('current');	}}function gallery_on(menu, path, receptor, first_pic, num_pic){		this.menu=menu;		this.path=path;		this.receptor=receptor;		this.num_pic=num_pic;				$('.'+menu).find('li').bind('click',function() {			id_list=$(this).attr('id');			var id=$(this).find('img').attr('id');			gallery_pic(id_list,id, path,receptor);		});				gallery_pic(1, first_pic, path,receptor);}function gallery_pic(id_list, id, path, receptor){	this.id_list=id_list;		$('#Bgal_prev').unbind('click');	$('#Bgal_next').unbind('click');	$('#'+receptor).hide();	$('#Floader').show();		$('.'+menu).find('.current').removeClass('current');	$('.'+menu).find('#'+id_list).addClass('current');		pic=path+id+'norm.jpg';	$('#'+receptor).attr('src', pic);		$(function () {		$('#'+receptor).bind('load',function(){			$('#'+receptor).unbind('load');			$('#Floader').hide();			$('#'+receptor).fadeIn(200);			adj_bot();		 }).error(function () {        }).attr('src', pic);	 });} function adj_bot(){	 if(this.num_pic>1){		fotoW=$('#'+receptor).width();		fotoH=$('#'+receptor).height();					var botW=fotoW/2;		var botH=fotoH;		var marge=($('.'+receptor).width()-fotoW)/2;		var margeR=marge+botW;						$('#Bgal_prev').show();		$('#Bgal_prev').css({'width': botW+'px', 'height': botH+'px', 'margin-left': marge+'px'});			$('#Bgal_next').show();		$('#Bgal_next').css({'width': botW+'px', 'height': botH+'px', 'margin-left': margeR+'px'});					pic_nave_on();	}}function pic_nave_on(){	$('#Bgal_prev').bind('click',function() {		$('#Bgal_prev').hide();		$('#Bgal_prev').unbind('click');		check_galleryPrev();	});	$('#Bgal_next').bind('click',function() {		$('#Bgal_next').hide();		$('#Bgal_prev').unbind('click');		$('#Bgal_next').unbind('click');		check_galleryNext();	});}	 function check_galleryNext(){		if(this.id_list<this.num_pic){			this.id_list++;		}		else{			this.id_list=1;		}		load_galleryPic(this.id_list);}	 function check_galleryPrev(){		if(this.id_list>1){			this.id_list--;		}		else{			this.id_list=this.num_pic;		}		load_galleryPic(this.id_list);}function load_galleryPic(id_list){		var pic_slct=$('.'+this.menu).find('li#'+id_list);		var id=$(pic_slct).find('img').attr('id');		gallery_pic(id_list, id, this.path, this.receptor);}
