
var original_html=null;var original_class=null;var html_headings={};$(document).ready(function()
{bindMainNav();bindLeftNav();getHTMLContent();original_html=$('#right .wrap').html();original_class=$('#right').attr('class');$('#container #middle #left-nav ul li.back a').bind('click',function(e)
{history.go(-1);});document.title=document.title+' | '+jQuery.trim($('#text-blurb').text());addMap('map');});function getHTMLContent()
{$('#left-nav ul li:not(".small") a:not(:first)').each(function(e)
{var obj_str=$(this).text().toLowerCase();var html_doc=obj_str+'.html';$.ajax
({url:html_doc,cache:false,success:function(html)
{html_headings[obj_str.toString().split('-').join('')]=jQuery.trim($(html).contents().find('#right .wrap').html());}});});}
function bindMainNav()
{$('#left-nav ul li:not(".small") a:not(:first)').bind('mouseover',function(e)
{var rightClass=$(this).text().toLowerCase();$('#right').removeClass().addClass(rightClass);$('#right .wrap').html(html_headings[rightClass.split('-').join('')]);});$('#left-nav ul li:not(".small") a:not(:first)').bind('mouseout',function(e)
{$('#right').removeClass().addClass(original_class);$('#right .wrap').html(original_html);});}
function bindLeftNav()
{$('#left-nav ul li.small a').bind('mouseover',function(e)
{getLowerHeading($(this).text());});$('#left-nav ul li.small a').bind('mouseout',function(e)
{$('#right .wrap').html(original_html);$('#right').removeClass('no-image');});}
function focusContent(str)
{var css={'color':'#1b654f','text-shadow':'0px 0px 1em #FFF'};$('#main-content .column h3').each(function(i)
{if($(this).text()==str)
{$(this).css(css).next('p').css(css);}
if(str=='What can you expect?')
{$(this).parent().parent().find('ul').css(css);}});}
function unFocusContent(str)
{var css={'color':'#FFF','text-shadow':'none'};$('#main-content .column h3').each(function(i)
{$(this).css(css).next('p').css(css);if(str=='What can you expect?')
{$(this).parent().parent().find('ul').css(css);}});}
function getLowerHeading(str)
{$('#main-content .column h3').each(function(i)
{if($(this).text()==str)
{if(str=='What can you expect?')
{var out='<ul>';var length=$(this).parent().parent().find('li').length;$(this).parent().parent().find('li').each(function(i)
{out+='<li>'+$(this).text()+'</li>';if(i==3){out+='</ul><ul>'};});out+='</ul>';$('#right .wrap').html('<h2>'+$(this).text()+'</h2><div>'+out+'</div>');$('#right').addClass('no-image');}
else
{$('#right .wrap').html('<h2>'+$(this).text()+'</h2><h3>'+$(this).next('p').text()+'</h3>');}}});}
function addMap(id)
{if(GBrowserIsCompatible()&&document.getElementById(id)!=null)
{var ll={lat:45.344198,long:-75.709233};var fLatLang=new GLatLng(ll.lat,ll.lang);var g_map=new GMap2(document.getElementById(id));g_map.setCenter(new GLatLng(ll.lat,ll.long),13);g_map.setUIToDefault();var fText='<span style="color: #000;">The Finance Team<br />21 Concourse Gate Suite 16<br />Ottawa, ON<br />';fText+='<a style="color: #000;" target="_blank" href="http://maps.google.com/maps?&daddr='+ll.lat+','+ll.long+'">Get Directions</a></span>';addMarker(g_map,new GLatLng(ll.lat,ll.long),null,fText);}}
function addMarker(map,point,icon,text)
{var marker=new GMarker(point,icon);map.addOverlay(marker);if(typeof(text)!="undefined")
{GEvent.addListener(marker,"click",function()
{marker.openInfoWindowHtml('<div style="white-space:nowrap">'+text+'</div>');});};};