// External link
$(document).ready(function() {
  $('#extlinks a').filter(function() {
	return this.hostname && this.hostname !== location.hostname;
  }).after(' <img src="/images/external-trans.png" alt="External link">');
});


// Precarga images
var i;
var images = new Array("/images/generalBackIndex.gif", "/images/btnIco-trans.png", "/images/footerBack.jpg", "/images/gradientBack.jpg", "/images/menu.jpg", "/images/nProductos-trans.png", "/images/nServicios-trans.png", "/images/bullet-trans.png", "/images/doubleBlack.jpg", "/images/simpleBlack.jpg");
var imagesList = new Array();
for(i in images){
	imagesList[i] = new Image();
	imagesList[i].src = images[i];
}

$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
});


// Tooltip
$(document).ready(function() {
	var tooltipDefaults = {
		className: "tooltip",
		cornerRadius: 5,
		orient: "above",
		width: 105,
		arrowHeight: 7,
		arrowInset: 15,
		region: "#tooltipDemo, #tooltipD2"
	}
	
	$("span[id^='tooltip']").hover(function(){
		$(this).addClass("hover")
	}, function(){
		$(this).removeClass("hover");
	});

	$("#coruna").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "A Coruña",
			align: "center",
			width: 82,
			orient: "below"
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#bilbao").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Bilbao",
			width: 55,
			orient: "below"
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#valladolid").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Valladolid",
			align: "right",
			width: 77,
 			orient: "below"
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#barcelona").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Barcelona",
			align: "right",
			width: 80,
			orient: "below"
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#madrid").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Madrid",
			width: 60,
			orient: "below"
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#valencia").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Valencia",
			width: 71,
			orient: "below"
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#sevilla").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Sevilla",
			width: 57,
			orient: "below"
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#imp1").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Sato GL408e / GL412e",
			width: 180
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#imp2").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Impresora Cab A4+",
			width: 160
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#imp3").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Impresora Datamax Mark II",
			align: "right",
			width: 200
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#imp4").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Impresora Primera LX400",
			align: "right",
			width: 200
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#imp5").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Escáner Láser Compact DS2100N",
			width: 270
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#imp6").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Dolphin&reg; 7850",
			width: 150
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#imp7").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Escáner portátil SR30",
			align: "right",
			width: 180
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#et1").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "MT2000 Series",
			align: "right",
			width: 155
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#et2").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Sato MB200i / MB201i",
			width: 190
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#et3").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Impresora Datamax Clase A",
			width: 220
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#et4").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "VC5090",
			align: "right",
			width: 95
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#et5").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Etiquetadoras manuales Sato Kendo y Judo",
			align: "right",
			width: 350
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#et6").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Etiquetadora 6",
			width: 117
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#et7").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Etiquetadora 7",
			width: 117
		}));
	},
	function() {
		$(this).closeCallout();
	});
	
	$("#soft1").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Software 1",
			width: 90
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#soft2").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Software 2",
			width: 90
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#soft3").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Software 3",
			width: 90
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#rfid1").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "RFiD 1",
			width: 65
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#rfid2").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "RFiD 2",
			width: 65
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#rfid3").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "RFiD 3",
			width: 65
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#rfid4").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "RFiD 4",
			width: 65
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#rfid5").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "RFiD 5",
			width: 65
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#ident1").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Identificadora 1",
			width: 123
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#ident2").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Identificadora 2",
			width: 123
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#ident3").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Identificadora 3",
			width: 123
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#ident4").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Identificadora 4",
			width: 123
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#ident5").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Identificadora 5",
			width: 123
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#ident6").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Identificadora 6",
			width: 123
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#cons1").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Consumible 1",
			width: 110
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#cons2").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Consumible 2",
			width: 110
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#cons3").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Consumible 3",
			width: 110
		}));
	},
	function() {
		$(this).closeCallout();
	});

	$("#cons4").hover(function() {
		$(this).callout($.extend({}, tooltipDefaults, {
			text: "Consumible 4",
			width: 110
		}));
	},
	function() {
		$(this).closeCallout();
	});


});

// jQuery collapse 
/* animatedcollapse.addDiv('impresorasEtiquetas', 'fade=1')
animatedcollapse.addDiv('etiquetadoAutomatico', 'fade=1')
animatedcollapse.addDiv('software', 'fade=1')
animatedcollapse.addDiv('rfid', 'fade=1')
animatedcollapse.addDiv('identificacionCaptura', 'fade=1')
animatedcollapse.addDiv('consumibles', 'fade=1')
animatedcollapse.init()
*/ 

// jQuery fancybox
$(document).ready(function() { 
/*	$("div#productosImgs a").fancybox({
		'hideOnContentClick': true
	}); */
	$("div#prodListImg1 a").fancybox({
		'hideOnContentClick': true
	});
	$("div#prodListImg3 a").fancybox({
		'hideOnContentClick': true
	});
	$("div#prodListImg4 a").fancybox({
		'hideOnContentClick': true
	});
	$("div#prodListImg5 a").fancybox({
		'hideOnContentClick': true
	});
	$("div#prodListImg6 a").fancybox({
		'hideOnContentClick': true
	});
}); 

