function switchSite(dropDown){
	if (dropDown != null)
	{
		var href = dropDown.value;
		if (href == ''){return;}
		window.open(dropDown.value,"","toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=1024,height=768");
	}
} 

function addBookmark()
{
	bookmarkurl = location.href;
	if(document.all){
		var text = document.title;
		text = text.replace(/:/, '');
		text = text.replace(/\*/, '');
		text = text.replace(/\?/, '');
		text = text.replace(/\\/, '');
		text = text.replace(/"/, '');
		text = text.replace(/</, '');
		text = text.replace(/>/, '');
		text = text.replace(/|/, '');
		window.external.AddFavorite(bookmarkurl, text);
	} else
		alert('Su navegador no es compatible con esta función');

}

$(function(){

	$('.gallery a.preview, #content a.preview').lightBox({fixedNavigation:true});

	var $headline = $('#dflt_loading');
	$(document).ajaxSend(function(){
		//$headline.modal({opacity:0, overlayCss: {backgroundColor:"#fff"}});
		$headline.show();
		$headline
			.removeClass('spinner')
			.addClass('spinner');
	});
	$(document).ajaxStop(function(){
		//$.modal.close();						  
		$headline.hide();
		$headline.removeClass('spinner')
	});

	$('#formPhoneGuide').submit(function(e)
	{
		e.preventDefault();
	
		phonekeys = new Array();
		phonekeys = $('#qs').val().split(' ');
	
		if(phonekeys[1] == undefined){ phonekeys[1] = phonekeys[0]; document.phonedir.fo_1.value = 'or'; } else { document.phonedir.fo_1.value = 'and'; }
	
		document.phonedir.fd_0.value=phonekeys[0];
		document.phonedir.fd_1.value=phonekeys[1];
	
		this.submit();

	});
	
	$("a[rel=openNW]").click(function(e)
	{
		var a = $(this);
		e.preventDefault();
		winOpen(a.attr('href'),'NPopup','location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no' + ',' + a.attr('size'));
	});
	
});

jQuery.fn.fdkSubmit = function(options)
{
	var opts = $.extend({}, $.fn.fdkSubmit.defaults, options);
};
