/* !ROUNDED CORNERS
###############################################################################
	Class: [Presentation]
	Dependencies: [dd.roundies-0.0.2a.min.js]
############################################################################### */
	// Main containers with the border
	DD_roundies.addRule('.section-wrapper', '4px', true);
	// Inner containers with the background
	DD_roundies.addRule('.section', '4px', true);
	
	// Navigation elements
	DD_roundies.addRule('#main-nav', '2px 2px 4px 4px', true);
	DD_roundies.addRule('#main-nav li:first-child', '2px 0 0 4px', true);
	//DD_roundies.addRule('#main-nav li:last-child', '0 2px 4px 0', true);
	
	// Google Maps
	DD_roundies.addRule('#map.section-wrapper', '2px', true);
	DD_roundies.addRule('#map .section', '2px', true);
	DD_roundies.addRule('#results-map.section-wrapper', '2px', true);
	DD_roundies.addRule('#results-map .section', '2px', true);
/* [//ROUNDED CORNERS END] */


/* !SIFR CONFIG
###############################################################################
	Class: [Presentation]
	Dependencies: [sifr.js]
############################################################################### */
	var itcavantgarde = { src: root_site + 'swf/itc-avant-garde.swf' };
	sIFR.activate(itcavantgarde);
	
	sIFR.replace(itcavantgarde, {
		selector: '#main-nav li',
		css: [	'.sIFR-root { color: #155488; cursor: pointer; text-align: center; }',
				'a { color: #155488; text-decoration: none; }',
				'a:hover { color: #155488; }'],
		wmode: "transparent",
		tuneWidth: 10,
		offsetTop: 5,
		tuneHeight: 3,
		thickness: 160
	});
/* [//SIFR CONFIG END] */


/* !TABS
###############################################################################
	Class: [Behavior]
	Dependencies: [jquery-1.3.2.min.js] / [jquery.tools.min.js]
############################################################################### */
	// Perform JavaScript after the document is scriptable. 
/*	var current_tab="";
	$(document).ready(function tabs() {
		// Setup ul.tabs to work as tabs for each div directly under div.panes 
		$("#search ul.tabs").tabs("#search div.panels > div", {
			tabs: 'li',
			initialIndex: 0||tab_selected,
			onClick: function(tabIndex){current_tab=tabIndex;}
		});
		
		$("#sign-in ul.tabs").tabs("#sign-in div.panels > div", {
			tabs: 'li',
			initialIndex: 0||tab_selected
		});
				
	});*/
/* [//TABS END] */


/* !OVERLAYS
###############################################################################
	Class: [Presentation]
	Dependencies: [jquery-1.3.2.min.js] / [jquery.tools.min.js]
############################################################################### */
$(function() {
	setTimeout( function(){$('#exposeMask').bgiframe();}, 3000);
	
	$("#overlay-activities").overlay({
		start: { top: -250 },
		finish: { top: 206 },
		
		fadeInSpeed: 'fast',
		speed: 'fast',
		closeOnClick: false,
		expose: {
			color: '#155488',
			opacity: 0.6,
			loadSpeed: 'fast',
			closeOnClick: false,
			closeOnEsc: false,
			closeSpeed: 'fast',
			maskId: 'exposeMask'
		}
	});
	$("#overlay-conditions").overlay({
		start: { top: -250 },
		finish: { top: 206 },
		
		fadeInSpeed: 'fast',
		speed: 'fast',
		closeOnClick: false,
		expose: {
			color: '#155488',
			opacity: 0.6,
			loadSpeed: 'fast',
			closeOnClick: false,
			closeOnEsc: false,
			closeSpeed: 'fast',
			maskId: 'exposeMask'
		}
	});
});
/* [//OVERLAYS END] */

/* !TOOLTIPS
###############################################################################
	Class: [Presentation]
	Dependencies: [jquery-1.3.2.min.js] / [jquery.tools.min.js]
############################################################################### */
var offset_params='';
var navegador = navigator.appName
if (navegador == "Microsoft Internet Explorer"){
	offset_params=[-9,-3];
	
}else{
	offset_params=[-24,0];
	
}

$(document).ready(function() {	
	$(".sms-btn").tooltip({	
		tip: '#capa_icon',
		offset: offset_params, 
		delay: 2100,
		events: { 
			def: "click,click"
		}
	});
		
});
/* [//TOOLTIPS END] */



/* !INPUT TYPE FILE STYLING
###############################################################################
	Class: [Presentation]
	Dependencies: [jquery-1.3.2.min.js] / [jquery.inputform.js]
############################################################################### */
	/*
	$(document).ready(function() {
	$('input[type=file]').each(function(){
		$(this).addClass('file').addClass('hidden');
			$(this).parent().append($('<div class="fakefile" />').append($('<input type="text" />').attr('id',$(this).attr('id')+'is-fake')).append($('<input type="button" value="Examinar...">')));
			
			$(this).bind('change', function() {
			$('#'+$(this).attr('id')+'is-fake').val($(this).val());;
			});
			$(this).bind('mouseout', function() {
			$('#'+$(this).attr('id')+'is-fake').val($(this).val());;
			});
		});
	});*/
/* [//INPUT TYPE FILE STYLING END] */


/* !TOGGLE VISIBILITY
###############################################################################
	Class: [Behavior]
	Dependencies: None
############################################################################### */
var curDiv = null;

function toggle_visibility(id) {
	if ( curDiv ) { curDiv.style.display = 'none'; }
	var e = document.getElementById(id);
	e.style.display = 'block';
	curDiv = e;
};
/* [//TOGGLE VISIBILITY END] */


/* !CSS ADDONS
###############################################################################
	Class: [Presentation]
	Dependencies: Dependencies: [jquery-1.3.2.min.js]
############################################################################### */
	$('#main-nav li:last-child').addClass(' last-child');
	$('#footer ul li:last-child').addClass(' last-child');
	$("#footer ul li:not(.last-child)").append(" | "); /*CSS "selector:after {content}" property for IE emulation*/
	$('.adsense ul li:last-child').addClass(' last-child');
/* [//CSS ADDONS END] */

