function ocultademassecciones(menos){
	if (menos==0) { $( '#seccion_ppal').show(); } else { $( '#seccion_ppal').hide(); } 
	if (menos==1) { $( '#seccion_film').show(); } else { $( '#seccion_film').hide(); } 
	if (menos==2) { $( '#seccion_tv').show(); } else { $( '#seccion_tv').hide(); } 
	if (menos==3) { $( '#seccion_theatre').show(); } else { $( '#seccion_theatre').hide(); } 
	if (menos==4) { $( '#seccion_bio').show(); } else { $( '#seccion_bio').hide(); } 
	if (menos==5) { $( '#seccion_contact').show(); } else { $( '#seccion_contact').hide(); } 
	

	
}

(function($){	
			$.fn.fullscreenr = function(options) {
				if(options.height === undefined) alert('Please supply the background image height, default values will now be used. These may be very inaccurate.');
				if(options.width === undefined) alert('Please supply the background image width, default values will now be used. These may be very inaccurate.');
				if(options.bgID === undefined) alert('Please supply the background image ID, default #bgimg will now be used.');
				$(document).ready(function() { 
					$('#seccion_ppal').toanchopantalla({ num: '0' });	
					$('#seccion_film').toanchopantalla({ num: '1' });
					$('#seccion_tv').toanchopantalla({ num: '2' });
					$('#seccion_theatre').toanchopantalla({ num: '3' });
					$('#seccion_galeria').toanchopantalla({ num: '4' });
					$('#seccion_bio').toanchopantalla({ num: '5' });
					$('#seccion_contact').toanchopantalla({ num: '6' });
					options = $.extend({}, options,{num: '0'}); 	
					$('#bgimg1').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '1'}); 	
					$('#bgimg2').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '2'}); 	
					$('#bgimg3').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '3'}); 	
					$('#bgimg4').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '4'}); 	
					$('#bgimg5').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '5'}); 	
					$('#bgimg6').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '6'}); 	
					$('#bgimg7').fullscreenrResizer(options);	
					jQuery('#mycarousel').jcarousel();
					//ocultademassecciones(tagactual);
				});
				$(window).bind("resize", function() { 
					$('#seccion_ppal').toanchopantalla({ num: '0' });	
					$('#seccion_film').toanchopantalla({ num: '1' });
					$('#seccion_tv').toanchopantalla({ num: '2' });
					$('#seccion_theatre').toanchopantalla({ num: '3' });
					$('#seccion_galeria').toanchopantalla({ num: '4' });
					$('#seccion_bio').toanchopantalla({ num: '5' });
					$('#seccion_contact').toanchopantalla({ num: '6' });
					options = $.extend({}, options,{num: '0'}); 	
					$('#bgimg1').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '1'}); 	
					$('#bgimg2').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '2'}); 	
					$('#bgimg3').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '3'}); 	
					$('#bgimg4').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '4'}); 	
					$('#bgimg5').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '5'}); 	
					$('#bgimg6').fullscreenrResizer(options);	
					options = $.extend({}, options,{num: '6'}); 	
					$('#bgimg7').fullscreenrResizer(options);	
					//ocultademassecciones(tagactual);
					//var posx=tagactual*$(window).width();
					//$.scrollTo( {top:'0px', left:posx+'px'}, 10 );
				});		
				return this; 		
			};	
			
			$.fn.fullscreenrResizer = function(options) {
				// Set bg size
				var ratio = options.height / options.width;	
				// Get browser window size
				var browserwidth = $(window).width();
				var browserheight = $(window).height();
				// Scale the image
				if ((browserheight/browserwidth) > ratio){
				    $(this).height(browserheight);
				    $(this).width(browserheight / ratio);
				} else {
				    $(this).width(browserwidth);
				    $(this).height(browserwidth * ratio);
				}
				// Center the image
				var ancho =  browserwidth * options.num
				$(this).css('left', ancho);
				$(this).css('top', 0);
				$(this).css('width', browserwidth);
				return this; 		
			};
			
			
			$.fn.toanchopantalla = function(options) {
			
				// Set bg size
				var ratio = options.height / options.width;	
				// Get browser window size
				var browserwidth = $(window).width();
				var browserheight = $(window).height();
				// Scale the image
				if ((browserheight/browserwidth) > ratio){
				    //$(this).height(browserheight);
				    //$(this).width(browserheight / ratio);
				} else {
				    //$(this).width(browserwidth);
				    //$(this).height(browserwidth * ratio);
				}
				// Center the image
				var ancho =  browserwidth * options.num;
				$(this).css('left', ancho);
				$(this).css('top', 0);
				$(this).css('width', browserwidth);
				$(this).css('min-height', browserheight);
				return this; 		
			};

		})(jQuery);
	
