// JavaScript Document
var cuerpo,box, leyenda, buscar, submenu, newsletter;
function addObservers() {
	// capturo los id globales que voy a necesitar 
	iniciar();
	// si es IE le hago fix de tamaņo
	sizefix();
	buscar.value = 'Buscar...';
	new Tip('buscador', 'Ingresa la funcion que deseas conoces', {
									 title: 'Buscador',
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: 0.1,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	
	var menuDelay = 0;
	new Tip('cursosPresenciales', 'Encontra un instructor cercano a tu barrio', {
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: menuDelay,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	new Tip('cursosPedido', 'Solicita un presupuesto por un curso personalizado sobre un tema a eleccion', {
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: menuDelay,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	new Tip('cursosOnline', 'Ingresa a nuestro catalogo online', {
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: menuDelay,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	new Tip('cursosEnDVD', 'Compra uno de nuestros cursos en DVD', {
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: menuDelay,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	new Tip('seminarios', 'Informate e inscribite en nuestros seminarios', {
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: menuDelay,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	new Tip('links', 'Sitios amigos', {
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: menuDelay,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	new Tip('menuContactos', 'Contactate con nosotros', {
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: menuDelay,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	new Tip('laborales', 'Tenes algo para ense&ntilde;ar? queres ser profesor?', {
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: menuDelay,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	new Tip('foro', 'Forma parte de la comunidad', {
									 width: 500,
									 border: 6,
									 borderColor: '#cccccc',
									 delay: menuDelay,
									 offset: { x: 15, y: 5 }
									 }
									 ); // id
	/////////////////
	// RECOMENDADO //
	/////////////////
//	$$('ul#menu > li') li') selector> will select all li elements that are direct
//children of ul#menu.
	var imagen = $$('table#recomendado .columnaContenido img');
	//new Effect.Scale(imagen, 150);
	imagen.each( function(e){
						 // new Draggable(e);
						 
	//					 e.observe('click', function(e) { new Effect.Scale(e.bind(), 150); });
				}
	);
	
}
function sizefix() {
	var userAgent = BrowserDetect.browser;
	//alert(userAgent);
	if(userAgent == 'Explorer') {
		leyenda.setStyle({ marginTop: '-5px' });
		submenu.setStyle({ paddingTop: '20px' });
		//news.setStyle({backgroundPosition: '39px -6px'});
	}

}
function iniciar() {
	box = $('box');	
	cuerpo = $('cuerpo');
	leyenda = $('leyenda');
	buscar = $('buscar');
	submenu = $('submenu');
	newsletter = $('news');
}
//Event.observe(window, 'load', addObservers);
document.observe("dom:loaded", addObservers);