$(document).ready(function(){var links = $("#page-services li a");var linksSelected = $("#page-services li.selected a");var linkHeightExpanded = 63;var linkHeightCollapsed = 51;links.not(linksSelected).css("height", linkHeightCollapsed + "px");links.hover( function(){links.not(this).stop().animate({height:linkHeightCollapsed, opacity:0.3}, 300);$(this).stop().animate({height:linkHeightExpanded, opacity:1}, 300);}, function(){links.not(linksSelected).stop().animate({height:linkHeightCollapsed, opacity:1}, 300);linksSelected.stop().animate({height:linkHeightExpanded, opacity:1}, 300);});var logo = $("#acclaimed-logo");var logoImage = logo.children("img");logo.css("background-image", "url(/site/i/logo-h.jpg)");logoImage.hover( function(){logoImage.stop().fadeTo(200, 0);}, function(){logoImage.stop().fadeTo(400, 1);});var aboutLinks = $("#acclaimed-about a");aboutLinks.hover( function(){aboutLinks.not(this).stop().fadeTo(300, 0.45);$(this).stop().fadeTo(300, 1);}, function(){aboutLinks.not(this).stop().fadeTo(300, 0.65);$(this).stop().fadeTo(300, 0.65);});aboutLinks.fadeTo(300, 0.65);var expandTexts = $("div.expandText");expandTexts.wrapInner('<div class="expandTextBox"></div>');expandTexts.prepend('<a class="expandTextButton" href="javascript:void(null);"><strong></strong></a>');var expandButtons = $("a.expandTextButton");var textboxes = expandButtons.parent().children("div.expandTextBox");textboxes.addClass("closed").hide(0);var strongs = expandButtons.children("strong");strongs.text("Read More...");expandButtons.click(function(e){e.preventDefault();var textbox = $(this).parent().children("div.expandTextBox");var strong = $(this).children("strong");if (textbox.hasClass("moving")){return;}if (textbox.hasClass("closed")){strong.addClass("minus");strong.text("Collapse");textbox.stop().addClass("moving").slideDown(200, function(){$(this).removeClass("closed").removeClass("moving").removeFilter();});}else{strong.removeClass("minus");strong.text("Read More...");textbox.stop().addClass("moving").slideUp(500, function(){$(this).addClass("closed").removeClass("moving").removeFilter();});}});$('a[href="#main"]').click(function(e){e.preventDefault();$('html, body').stop().animate({scrollTop:0}, 'slow');});});var imageViewer = function(){$("body") .css('position', 'relative') .prepend('<div id="picture-spinner"><strong>Loading Picture</strong><img src="/site/i/spinner.gif" alt="..." /><em>Please wait</em></div><div id="picture-expand"><a href="javascript:void(null);"><strong><em>Close</em></strong></a></div>');var spinner = $("#picture-spinner");var expand = $("#picture-expand");var expandClose = expand.children("a");expand.fadeTo(0, 0);spinner.fadeTo(0, 0);var spinnerVisible = false;var largeVisible = false;var spinnerShow = function(){spinner.stop().fadeTo(0, 0, function(){spinner .center() .css("display", "block") .fadeTo(300, 1, function(){spinner.removeFilter();});spinnerVisible = true;});};var spinnerHide = function(){spinnerVisible = false;spinner.stop().fadeTo(300, 0, function(){spinner.css("display", "none");});};var largeShow = function(url){spinnerShow();largeHide();var image = new Image();$(image).load(function(){expandClose.children("img").remove();expandClose.append(image);expand.center();spinnerHide();expand.stop().css("display", "block").fadeTo(300, 1);largeVisible = true;});image.src = url;};var largeHide = function(){largeVisible = false;expand.stop().fadeTo(200, 0, function(){expand.css("display", "none");});};var centerAll = function(){expand.center();spinner.center();};this.showImage = function(url){largeShow(url);};this.closeAll = function(){spinnerHide();largeHide();if (spinnerVisible == false){spinner.css("display", "none");}};expandClose.click(function(){largeHide();});$(window).resize(function(){centerAll();if (largeVisible == false){expand.css("display", "none");}});$(window).scroll(function(){spinnerHide();largeHide();if (spinnerVisible == false){spinner.css("display", "none");}});};