// JavaScript Document
$(document).ready(function(){

	// Parametros configuracion colorbox (hay algun parametro que hace que falle)			
	/*
	$.fn.colorbox.settings.transition = "elastic";
	$.fn.colorbox.settings.speed = 500;
	$.fn.colorbox.settings.maxWidth = "false";
	$.fn.colorbox.settings.maxHeight = "false";
	//$.fn.colorbox.settings.resize = true;
	$.fn.colorbox.settings.opacity = 0.8;
	//$.fn.colorbox.settings.preloading = true;
	$.fn.colorbox.settings.current = "  {current} de {total}";
	$.fn.colorbox.settings.previous = "previus";
	$.fn.colorbox.settings.next = "next";
	$.fn.colorbox.settings.close = "cerrar";
	$.fn.colorbox.settings.overlayClose = true;
	$.fn.colorbox.settings.slideshow = true;
	$.fn.colorbox.settings.slideshowAuto = true;
	$.fn.colorbox.settings.slideshowSpeed = 5000;
	$.fn.colorbox.settings.slideshowStart =  "start";
	$.fn.colorbox.settings.slideshowStop = "stop";
	*/
	$.fn.colorbox.settings.current = "  {current} de {total}";
	$.fn.colorbox.settings.slideshow = true;
	$.fn.colorbox.settings.slideshowAuto = true;
	$.fn.colorbox.settings.slideshowSpeed = 5000;
	// Esto es para poder abrir todas las galerias de lightbox con colorbox
	$("a[rel*=lightbox]").colorbox();
			  	
			
	//Examples of how to assign the ColorBox event to elements
	/*
	$("a[rel='example1']").colorbox();
	$("a[rel='example2']").colorbox({transition:"fade"});
	$("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
	$("a[rel='example4']").colorbox({slideshow:true});
	$(".single").colorbox({}, function(){
		alert('Howdy, this is an example callback.');
	});
	$(".colorbox").colorbox();
	$(".youtube").colorbox({iframe:true, width:650, height:550});
	$(".iframe").colorbox({width:"80%", height:"80%", iframe:true});
	$(".inline").colorbox({width:"50%", inline:true, href:"#inline_example1"});
	*/
	$(".promo").colorbox({iframe:true, width:960, height:560});
	$(".modal").colorbox({iframe:true, width:860, height:560});
	$(".showflickr").colorbox({iframe:true, width:900, height:680});
	
	//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;
	});
				
	// LLamadas qtip
	// By suppling no content attribute, the library uses each elements title attribute by default
	
	$('a.mensaje').qtip({ //#qtip-calamorcha a[href][title]
	  //title: 'Texto title',
	  content: {
		 text: false // Use each elements title attribute
	  },
	  //style: 'cream' // Give it some style
	  style: { 
			  width: 300,
			  padding: 5,
			  background: '#FFFFFF',
			  color: 'black',
			  //size: '14px',
			  textAlign: 'center',
			  border: {
				 width: 0,
				 radius: 2,
				 color: '#A2D959'
			  },
			  tip: 'bottomRight',
			  name: 'dark' // Inherit the rest of the attributes from the preset dark style
		},
		position: {
   			target: 'mouse',
   			adjust: { mouse: true },
			corner: {
				target: 'topLeft',
				tooltip: 'bottomRight'
			}
		}
	});
	
	$('a.promo').qtip({
	  content: {
		 text: false // Use each elements title attribute
	  },
	  //style: 'cream' // Give it some style
	  style: { 
			  width: 220,
			  padding: 5,
			  background: '#F9F5EA',
			  color: '444444',
			  textAlign: 'center',
			  border: {
				 width: 8,
				 radius: 10,
				 color: '#a1ab0c'
			  },
			  tip: 'bottomMiddle',
			  name: 'dark' // Inherit the rest of the attributes from the preset dark style
		},
		position: {
   			target: 'mouse',
   			adjust: { mouse: true },
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		}
	});
	
	// NOTE: You can even omit all options and simply replace the regular title tooltips like so:
	// $('#content a[href]').qtip();
});

