		$(document).ready(function(){

// tamaņos fijos videos
			if($(".modo_mediateca").length>0){ $(".modo_mediateca").colorbox({iframe:true, innerWidth:512, innerHeight:375});}
			if($(".modo_video").length>0){$(".modo_video").colorbox({iframe:true, innerWidth:676, innerHeight:380, rel:'nofollow'});}
			if($(".modo_video600X338").length>0){$(".modo_video600X338").colorbox({iframe:true, innerWidth:600, innerHeight:338});}
			
// tamaņos fijos otros			
			if($(".modo_widget").length>0){$(".modo_widget").colorbox({iframe:true, innerWidth:840, innerHeight:520});}
			
// tamaņos adaptables			
			if($("a[rel='modo_estandard']").length>0){$("a[rel='modo_estandard']").colorbox();}

			
			
			if($(".agrupado").length>0){
				Array.prototype.in_array=function(){
					for(var j in this){
						if(this[j]==arguments[0]){
							return true;
						}
					}
					return false;    
				} 
				
				var arr = $('.agrupado');
				var arr_group = [];
				arr.each(function(index, val){
					grupo = $(this).attr('rel');
					if(!arr_group.in_array(grupo)){ 
						arr_group.push(grupo);
						//$("a[rel='grupo']").colorbox({rel:'grupo'});
						$("a[rel='"+grupo+"']").colorbox({rel:grupo});
					}
				});				
			}
			
			if($("a[rel='modo_slideshow']").length>0){$("a[rel='modo_slideshow']").colorbox({slideshow:true});}
			if($(".modo_navegador").length>0){$(".modo_navegador").colorbox({width:"80%", height:"80%", iframe:true});}
			if($(".modo_inline").length>0){$(".modo_inline").colorbox({width:"50%", inline:true, href:"#inline_hrml"});}
			if($(".modo_alertas").length>0){
				$(".modo_alertas").colorbox({
					onOpen:function(){ alert('onOpen: colorbox is about to open'); },
					onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
					onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
					onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
					onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
				});
			}
			

			//Example of preserving a JavaScript event for inline calls.
			$("#click").click(function(){ 
				$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
				return false;
			});
		});
		
		
		

