function initMenu()
{$('#nav ul ul').hide();$('#nav ul ul').parent().addClass("expandable");$('.expandable > a').addClass("pullDown");$('#nav li.SelectedTab ul').show();$('#nav li a').click(function()
{var checkElement=$(this).next();if((checkElement.is('ul'))&&(checkElement.is(':visible')))
{$('#nav ul ul:visible').slideUp('normal');$(this).toggleClass("pullUp");return false;}
if((checkElement.is('ul ul'))&&(!checkElement.is(':visible')))
{$('#nav ul ul:visible').slideUp('normal');checkElement.slideDown('normal');$(this).toggleClass("pullUp");return false;}});}
(function(a,b){a.fn.blend=function(f,c){var e=this,d=["backgroundColor","backgroundImage","backgroundRepeat","backgroundAttachment","backgroundPosition","backgroundPositionX","backgroundPositionY","paddingTop","paddingLeft","paddingRight","paddingBottom","width","height"];f=parseInt(f,10)||a.fn.blend.speed;c=c||a.fn.blend.callback;e[0]&&!e.find(".jsblend")[0]&&!(a.browser.mozilla&&parseFloat(a.browser.version)<1.9)&&e.each(function(){var g='<span style="position:absolute;top:0;left:0;display:block"/>',h=this,e,k=h.currentStyle||b.getComputedStyle(h,null),i=a(g),j=a(g);if(h.style.position!=="absolute")h.style.position="relative";for(e=0;d[e];e+=1)if(k[d[e]])j[0].style[d[e]]=i[0].style[d[e]]=k[d[e]];i[0].style.backgroundImage=i[0].style.backgroundColor="";a(h).wrapInner(i).addClass("hover").prepend(j);a(h).bind("mouseenter mouseleave",function(a){a.type==="mouseenter"?j.stop().fadeTo(f,0,function(){c&&typeof c==="function"&&c()}):j.stop().fadeTo(f,1)})});return e};a.fn.blend.speed=400;a.fn.blend.callback=null})(jQuery,this)
var newSection="";var sectionNumber=0;var sectionArray=new Array();var checkScrolling=true;var pageInid=false;$(document).ready(function()
{initMenu();$("a.facebook").blend();$("a.twitter").blend();$("a.vancity").blend();$(".vancity a").blend();$("#registerNow a").blend();if($(".L1_Masterplan").length>0){$.getScript('/Portals/0/skins/docksidegreen/js/hoverintent.js',function(){$(".controls a.docksideVillage").hoverIntent(function(){$("div.docksideVillage").animate({opacity:"show"},"slow");},function(){$("div.docksideVillage").animate({opacity:"hide"},"fast");});$(".controls a.docksideCommon").hoverIntent(function(){$("div.docksideCommon").animate({opacity:"show"},"slow");},function(){$("div.docksideCommon").animate({opacity:"hide"},"fast");});$(".controls a.docksideWharf").hoverIntent(function(){$("div.docksideWharf").animate({opacity:"show"},"slow");},function(){$("div.docksideWharf").animate({opacity:"hide"},"fast");});});}
if($(".L3_Floorplates___Floorplans").length>0){$.getScript('/Portals/0/skins/docksidegreen/js/hoverintent.js');$.getScript('/Portals/0/skins/docksidegreen/js/maphighlight.js',function(){$('.floorplansmap').maphilight();});$("#flowpanes").scrollable({circular:true,mousewheel:true}).navigator({vertical:true,navi:"#flowtabs",naviItem:'a',keyboard:'static',});};$("body").addClass("tree");$("table.standardTable tbody tr:odd").addClass("odd");$(".scroll").each(function(index){if(!index){$(this).addClass("selected")}
var full_url=this.href;var parts=full_url.split("#");sectionArray[index]=parts[1];var TempOffset=$("#"+sectionArray[index]).offset()
this.id="Menu"+parts[1];$(this).click(function(event)
{event.preventDefault();$('.scroll').removeClass('selected');var target=$("#"+ parts[1]);var target_top=target.offset().top-209;if((target[0].nodeName.toLowerCase()=="h1")||(target[0].nodeName.toLowerCase()=="h2")){target_top=target_top- 30;}
$('html, body').animate({scrollTop:target_top},500);$(this).addClass('selected');});});$(window).scroll(function(){if(pageInid){if(checkScrolling){var scrollDist=$(window).scrollTop()+ 210;var heightAdj=$('#'+sectionArray[sectionNumber+1]).height();if((sectionNumber<sectionArray.length-1)&&(($('#'+sectionArray[sectionNumber+1]).offset().top)<=scrollDist)){setNewSection(sectionNumber+1);}
if((sectionNumber>0)&&(($('#'+sectionArray[sectionNumber]).offset().top)>=scrollDist)){setNewSection(sectionNumber-1);}}}else{pageInid=true;if(checkScrolling){var scrollDist=$(window).scrollTop();for(var i=0;i<sectionArray.length;i++){var section=sectionArray[i];if(($('#'+section).offset().top-209)<=scrollDist){sectionNumber=i;}}
setNewSection(sectionNumber);}}});if(typeof _gaq!='undefined')
{var GoGA=true;}
var filetypes=/\.(zip|exe|pdf|doc*|xls*|ppt*|mp3)$/i;$('#dnn_ContentPane a[href]').each(function()
{var href=$(this).attr('href');if((href.match(/^https?\:/i))&&(!href.match(document.domain)))
{$(this).click(function()
{var extLink=href.replace(/^https?\:\/\//i,'');_gaq.push(['_trackEvent','Link','External',extLink]);});$(this).addClass('externalLink');}
else if(href.match(/^mailto\:/i))
{$(this).addClass('emailLink');$(this).click(function()
{var mailLink=href.replace(/^mailto\:/i,'');_gaq.push(['_trackEvent','Link','Email',mailLink]);});}
else if(href.match(filetypes))
{var extension=(/[.]/.exec(href))?/[^.]+$/.exec(href):undefined;$(this).addClass(extension)+"-file";$(this).click(function(extension)
{var filePath=href.replace(/^https?\:\/\/(www.)docksidegreen\.com\//i,'');_gaq.push(['_trackEvent','Link','Download - '+ extension,filePath]);});}});});function setNewSection(n,firsttime){sectionNumber=n;updateSelectedLinks(sectionArray[sectionNumber]);}
function updateSelectedLinks(newActive){$('.scroll').removeClass('selected');$("#Menu"+newActive).addClass('selected');}
