// Archivo web.js para luistatto.com | barnacode.com 2009

var IE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false;
if(IE6){

	$(function(){
		
		$("<div>")
			.css({
				'position': 'absolute',
				'top': '0px',
				'left': '0px',
				backgroundColor: 'black',
				'opacity': '0.95',
				'width': '100%',
				'height': $(window).height(),
				zIndex: 5000
			})
			.appendTo("body");
			
		$("<div id='blocker'><img src='img/no-ie6.png' alt='' style='float: left;'/><br /><p style='visibility:visible; color:#000'><strong>Lo sentimos! pero esta web no soporta Internet Explorer 6.</strong><br /><br />Por favor actualice su versi&oacute;n de navegador.</p></div>")
			.css({
				backgroundColor: 'white',
				color:	'black',
				'top': '50%',
				'left': '50%',
				marginLeft: -210,
				marginTop: -100,
				width: 410,
				paddingRight: 10,
				height: 200,
				'position': 'absolute',
				zIndex: 6000
			})
			.appendTo("body");
	});		
}

    var zapfino_extra = {
      src: 'zapfino_extra.swf'
      ,ratios: [7, 1.32, 11, 1.31, 13, 1.24, 14, 1.25, 19, 1.23, 27, 1.2, 34, 1.19, 42, 1.18, 47, 1.17, 48, 1.18, 69, 1.17, 74, 1.16, 75, 1.17, 1.16]
    };
	
    sIFR.replace(zapfino_extra, {
      selector: '#idiomas'
      ,css: [ '.sIFR-root {color:#CCCCCC; font-weight:normal; margin:0px; font-size:28px; display:inline;} em { font-style: bold; color: #660000; leading:-10; kerning:-20;} a:link {color:#CCCCCC; text-decoration:none;} a:hover{color:#FFFFFF;} .active{color:#FF0000; text-decoration:none;} ' ]
	  ,wmode:	'transparent'
      ,selectable: true
	  ,fitExactly:	true
	  ,forceClear:	true
	  ,offsetTop:	0
	  ,tuneHeight:	0
	  ,gridFitType:	'pixel'
    });		
	
    sIFR.replace(zapfino_extra, {
      selector: '#right p'
      ,css: [ '.sIFR-root {color:#CCCCCC; font-weight:normal; margin:-20px; font-size:35px; display:block;} em { font-style: bold; color: #660000; leading:-10; kerning:-20;} a:link {color:#FF0000; text-decoration:none;} a:visited {color:#FF0000; text-decoration:none;} a:hover{color:#FFFFFF;} a:active{color:#FFFFFF;}  .active{color:#FF0000;} ' ]
	  ,wmode:	'transparent'
      ,selectable: true
	  ,fitExactly:	true
	  ,forceClear:	true
	  ,offsetTop:	0
	  ,tuneHeight:	0
	  ,gridFitType:	'pixel'
    });	
	
	 sIFR.replace(zapfino_extra, {
	selector: '#right h1'
      ,css: [ '.sIFR-root {color:#CCCCCC; font-weight:normal;margin:-20px; font-size:55px; display:block; margin-bottom:-35px; line-height:1px;}' ]
	  ,wmode:	'transparent'
      ,selectable: true
	  ,fitExactly:	true
	  ,forceClear:	true
	  ,offsetTop:	0
	  ,tuneHeight:	0
	  ,gridFitType:	'pixel'
    });	



    // You probably want to switch this on, but read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad> first.
    sIFR.useStyleCheck = true;
    sIFR.activate(zapfino_extra);

$(document).ready(function(){
	// ANIMACION MENU LATERAL
	$("#menulat li").css("opacity","0.7");	
	$("#menulat .active").css({"opacity": "1", "margin-left" : "15px"});
	
	$("#menulat li").not("#menulat .active").hover(function(){
		$(this).stop().animate({opacity : 0.85, marginLeft: "10px"}, 'fast');
	}, function () {
		$(this).stop().animate({opacity : 0.7, marginLeft: "0px"}, 'fast');
	});
	
	//
	
	// TOOLTIP INICIALIZACIÓN
	$.tools.addTipEffect("slidedown",   
		 
		// opening animation 
		function() {  
			var opacity = this.getConf().opacity; 
			this.getTip().css({opacity:0}).animate({top: '+=5', opacity:opacity}, 300).show(); 
		},  
		 
		// closing animation 
		function() { 
			this.getTip().animate({top: '+=5', opacity:0}, 300, function() {  
					$(this).hide().animate({top: '+=30'}, 0); 
			}); 
		} 
	);	
	$("#creditos").tooltip({effect: 'slidedown', position: ['top', 'center'], offset: [-40, 0], opacity: 0.7});
	$(".imggal a").tooltip({effect: 'slidedown', position: ['bottom', 'left'], offset: [-50, 15], opacity: 0.85});
	$("a[rel='slides']").colorbox({slideshow:true});
	$("a[rel='iframe']").colorbox({width:"500px", height:"60%", iframe:true});
	$("a[rel='gmap']").colorbox({width:"480px", height:"61%", iframe:true});
	$("a[rel='single']").colorbox();
	$("a[rel='m1']").colorbox();
	$("a[rel='m2']").colorbox();
	$("a[rel='m3']").colorbox();
	$("#n").search();
	$("#nom").Watermark("Nombre");
    $("#ape").Watermark("Apellido");
    $("#mai").Watermark("Email");
    $("#tel").Watermark("Teléfono");

	//$(".colorbox").colorbox();
	
});