// JavaScript Setcode fundaments for performance
//Laid Jose Antenor Gomez Jaramillo - Not Remove Copyright - solved for dean.edwards
/*if(document.addEventListener){
	document.addEventListener('DOMContentLoaded',domready,false);
		}
function domready(){
	}
*/

//with Jquery
$(document).ready(function(){
	var myimages=new Array()
	var imgchecker = screen.colorDepth;
	function preloadimages(){
		for (i=0;i<preloadimages.arguments.length;i++){
				myimages[i]=new Image()
				myimages[i].src=preloadimages.arguments[i]
			}
		}
		
	MM_preloadImages('');
	preloadimages('');


function GEBI(id){ return document.getElementById(id);}

//ACTIVACION DEL DROPDOWN	company_info
	$('img#company_info').mouseover(function(){
		this.src='images/bt_company_info_over.gif'; 
		GEBI('drop_company').style.visibility='visible';				
		});
	$('img#company_info').mouseout(function(){
		this.src='images/bt_company_info.gif'; 
		GEBI('drop_company').style.visibility='';
		});
	//EVENTOS ROLLOVER DROPDOWNS drop_company
	$('div#drop_company').mouseover(function(){ 
			GEBI('company_info').src='images/bt_company_info_over.gif'; 
			GEBI('drop_company').style.visibility='visible'; 
		});
	$('div#drop_company').mouseout(function(){ 
			GEBI('company_info').src='images/bt_company_info.gif'; 
			GEBI('drop_company').style.visibility='hidden'; 
		});	
	
	
//ACTIVACION DEL DROPDOWN	services
	$('img#services').mouseover(function(){
		this.src='images/bt_services_over.gif'; 
		GEBI('drop_services').style.visibility='visible';				
		});
	$('img#services').mouseout(function(){
		this.src='images/bt_services.gif'; 
		GEBI('drop_services').style.visibility='';
		});
	//EVENTOS ROLLOVER DROPDOWNS drop_services
	$('div#drop_services').mouseover(function(){ 
			GEBI('services').src='images/bt_services_over.gif'; 
			GEBI('drop_services').style.visibility='visible'; 
		});
	$('div#drop_services').mouseout(function(){ 
			GEBI('services').src='images/bt_services.gif'; 
			GEBI('drop_services').style.visibility='hidden'; 
		});	

	
	
//ACTIVACION DEL DROPDOWN	services
	$('img#portfolio').mouseover(function(){
		this.src='images/bt_portfolio_over.gif'; 
		GEBI('drop_portfolio').style.visibility='visible';				
		});
	$('img#portfolio').mouseout(function(){
		this.src='images/bt_portfolio.gif'; 
		GEBI('drop_portfolio').style.visibility='';
		});
	//EVENTOS ROLLOVER DROPDOWNS drop_services
	$('div#drop_portfolio').mouseover(function(){ 
			GEBI('portfolio').src='images/bt_portfolio_over.gif'; 
			GEBI('drop_portfolio').style.visibility='visible'; 
		});
	$('div#drop_portfolio').mouseout(function(){ 
			GEBI('portfolio').src='images/bt_portfolio.gif'; 
			GEBI('drop_portfolio').style.visibility='hidden'; 
		});	


//ACTIVACION DEL DROPDOWN	news
	$('img#news').mouseover(function(){
		this.src='images/bt_news_over.gif'; 
		GEBI('drop_news').style.visibility='visible';				
		});
	$('img#news').mouseout(function(){
		this.src='images/bt_news.gif'; 
		GEBI('drop_news').style.visibility='';
		});
	//EVENTOS ROLLOVER DROPDOWNS drop_news
	$('div#drop_news').mouseover(function(){ 
			GEBI('news').src='images/bt_news_over.gif'; 
			GEBI('drop_news').style.visibility='visible'; 
		});
	$('div#drop_news').mouseout(function(){ 
			GEBI('news').src='images/bt_news.gif'; 
			GEBI('drop_news').style.visibility='hidden'; 
		});	

//ACTIVACION DEL DROPDOWN	careers
	$('img#careers').mouseover(function(){
		this.src='images/bt_careers_over.gif'; 
		GEBI('drop_careers').style.visibility='visible';				
		});
	$('img#careers').mouseout(function(){
		this.src='images/bt_careers.gif'; 
		GEBI('drop_careers').style.visibility='';
		});
	//EVENTOS ROLLOVER DROPDOWNS drop_careers
	$('div#drop_careers').mouseover(function(){ 
			GEBI('careers').src='images/bt_careers_over.gif'; 
			GEBI('drop_careers').style.visibility='visible'; 
		});
	$('div#drop_careers').mouseout(function(){ 
			GEBI('careers').src='images/bt_careers.gif'; 
			GEBI('drop_careers').style.visibility='hidden'; 
		});	
	

//ACTIVACION DEL DROPDOWN	affiliations
	$('img#affiliations').mouseover(function(){
		this.src='images/bt_affiliations_over.gif'; 
		GEBI('drop_affiliations').style.visibility='visible';				
		});
	$('img#affiliations').mouseout(function(){
		this.src='images/bt_affiliations.gif'; 
		GEBI('drop_affiliations').style.visibility='';
		});
	//EVENTOS ROLLOVER DROPDOWNS drop_affiliations
	$('div#drop_affiliations').mouseover(function(){ 
			GEBI('affiliations').src='images/bt_affiliations_over.gif'; 
			GEBI('drop_affiliations').style.visibility='visible'; 
		});
	$('div#drop_affiliations').mouseout(function(){ 
			GEBI('affiliations').src='images/bt_affiliations.gif'; 
			GEBI('drop_affiliations').style.visibility='hidden'; 
		});	
	
	
//ACTIVACION DEL DROPDOWN	faq
	$('img#faq').mouseover(function(){
		this.src='images/bt_faq_over.gif'; 
		GEBI('drop_faq').style.visibility='visible';				
		});
	$('img#faq').mouseout(function(){
		this.src='images/bt_faq.gif'; 
		GEBI('drop_faq').style.visibility='';
		});
	//EVENTOS ROLLOVER DROPDOWNS drop_faq
	$('div#drop_faq').mouseover(function(){ 
			GEBI('faq').src='images/bt_faq_over.gif'; 
			GEBI('drop_faq').style.visibility='visible'; 
		});
	$('div#drop_faq').mouseout(function(){ 
			GEBI('faq').src='images/bt_faq.gif'; 
			GEBI('drop_faq').style.visibility='hidden'; 
		});	


//ACTIVACION DEL DROPDOWN	contact_us
	$('img#contact_us').mouseover(function(){
		this.src='images/bt_contact_us_over.gif'; 
		GEBI('drop_contact_us').style.visibility='visible';				
		});
	$('img#contact_us').mouseout(function(){
		this.src='images/bt_contact_us.gif'; 
		GEBI('drop_contact_us').style.visibility='';
		});
	//EVENTOS ROLLOVER DROPDOWNS drop_contact_us
	$('div#drop_contact_us').mouseover(function(){ 
			GEBI('contact_us').src='images/bt_contact_us_over.gif'; 
			GEBI('drop_contact_us').style.visibility='visible'; 
		});
	$('div#drop_contact_us').mouseout(function(){ 
			GEBI('contact_us').src='images/bt_contact_us.gif'; 
			GEBI('drop_contact_us').style.visibility='hidden'; 
		});	

//rollover images links
	$('img#home').mouseover(function(){this.src='images/bt_home_over.png'; });
	$('img#home').mouseout(function(){this.src='images/bt_home.png'; });
	
	$('img#login').mouseover(function(){this.src='images/bt_login_over.png'; });
	$('img#login').mouseout(function(){this.src='images/bt_login.png'; });
	
	$('img#employee').mouseover(function(){this.src='images/bt_employee_over.png'; });
	$('img#employee').mouseout(function(){this.src='images/bt_employee.png'; });
	
	$('img#we_are').mouseover(function(){this.src='images/bt_we_are_over.png'; });
	$('img#we_are').mouseout(function(){this.src='images/bt_we_are.png'; });
	
	$('img#go').mouseover(function(){this.src='images/bt_go_over.gif'; });
	$('img#go').mouseout(function(){this.src='images/bt_go.gif'; });
	$('img#go').click(function(){ document.newsletter.submit(); });
	$('img#go').css({cursor:'pointer'});
	
	$('a#bookmark').click(function(){ bookmark() });
	
});


function bookmark()
{
	//for Firefox
	var title = 'Jade Communications';
	var url = 'http://jade-com.com/';
	if (document.all)
	window.external.AddFavorite(url, title);
	else if (window.sidebar)
	window.sidebar.addPanel(title, url, "")
	else if (window.sidebar&&window.sidebar.addPanel)
	window.sidebar.addPanel(title,url,"");
	//for IE	
	if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) 
	{
	var url="http://jade-com.com/"; 
	var titulo="Jade Communications"; 
	window.external.AddFavorite(url,titulo);
	}	
}

