Cufon.replace('#intro h1');
Cufon.replace('h2');

//Menu
$(document).ready(
	function()
	{
		$('#dock').Fisheye(
			{
				maxWidth: 40,
				items: 'a',
				itemsText: 'span',
				container: '.dock-container',
				itemWidth: 48,
				proximity: 40,
				valign: 'bottom',
				halign: 'center'
			}
		)
	}
);
//ColorBox
	$(document).ready(function(){
		//Examples of Global Changes
		$.fn.colorbox.settings.bgOpacity = "0.9";
		$("a[href='/legal']").colorbox({fixedWidth:"80%", fixedHeight:"80%",transition:"elastic",transitionSpeed : 120,
			preloading : false,overlayClose : false});
		$("a[href='/requisitos']").colorbox({fixedWidth:"60%", fixedHeight:"60%",transition:"elastic",transitionSpeed : 120,
			preloading : false,overlayClose : false});
		$("a[href='/formulario']").colorbox({fixedWidth:"59%", fixedHeight:"90%",transition:"elastic",transitionSpeed : 120,
			preloading : false,overlayClose : false});
	});
	
	/*
	 * Url preview script 
	 * powered by jQuery (http://www.jquery.com)
	 * 
	 * written by Alen Grakalic (http://cssglobe.com)
	 * 
	 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
	 *
	 */
	 
	this.screenshotPreview = function(){	
		/* CONFIG */
			
			xOffset = 80;
			yOffset = 15;
			
			// these 2 variable determine popup's distance from the cursor
			// you might want to adjust to get the right result
			
		/* END CONFIG */
		$("a.screenshot").hover(function(e){
			this.t = this.title;
			this.title = "";	
			var c = (this.t != "") ? this.t : "";
			$("body").append("<div id='screenshot'><center><img src='"+ this.rel +"' alt='url preview'/></center>"+ c +"</div>");								 
			$("#screenshot")
				.css("top",(e.pageY - xOffset) + "px")
				.css("left",(e.pageX + yOffset) + "px")
				.fadeIn("fast");						
	    },
		function(){
			this.title = this.t;	
			$("#screenshot").remove();
	    });	
		$("a.screenshot").mousemove(function(e){
			$("#screenshot")
				.css("top",(e.pageY - xOffset) + "px")
				.css("left",(e.pageX + yOffset) + "px");
		});			
	};


	// starting the script on page load
	$(document).ready(function(){
		screenshotPreview();
	});

