﻿Cufon.replace("article h1 div",{hover:true,fontFamily:"bickham"});Cufon.replace("#ibeHeaderLabel",{hover:true,fontFamily:"Helvetica"});$(document).ready(function(){if($.browser.msie){$("#mainNav ul li a").hover(function(){$(this).addClass("background")},function(){$(this).removeClass("background")})}else{}var a=0;$(".widgetPhotoGallery").each(function(){$(this).append("<ul style='padding: 0;'></ul>").addClass("shadowBoxGallery").attr({id:"gallery"+a});$(this).find(".galleryImgThumb").each(function(){var d=$(this).css("backgroundImage");var d=d.replace("url(","").replace(")","");var c=$(this).attr("href");var b=$(this).attr("title");$("#gallery"+a+" ul").append("<li class='shadowBoxThumbs'><a title='"+b+"' href="+c+" rel='shadowbox[gallery"+a+"]'><img src="+d+" /></a></li>")});a+=1});$(".shadowBoxThumbs").css({"list-style-type":"none",display:"inline"});$(".galleryImgFullShell, .imgDescriptionShell, .imgPreviousNextShell, .imgThumbnailsOuterShell").remove();$("article .imageWidget").each(function(){var c=$(this).find("img").attr("src");var b=c.replace("c-","");$(this).append("<a href='"+b+"' rel='shadowbox[gal]'></a>");$(this).find("img").appendTo($(this).find("a"))});Shadowbox.setup();$("#submitButton").attr("value","Submit");$("#clientEmail").insertAfter($("span.tel:last"))});var animatedcollapse={divholders:{},divgroups:{},lastactiveingroup:{},preloadimages:[],show:function(a){if(typeof a=="object"){for(var b=0;b<a.length;b++){this.showhide(a[b],"show")}}else{this.showhide(a,"show")}},hide:function(a){if(typeof a=="object"){for(var b=0;b<a.length;b++){this.showhide(a[b],"hide")}}else{this.showhide(a,"hide")}},toggle:function(a){if(typeof a=="object"){a=a[0]}this.showhide(a,"toggle")},addDiv:function(b,a){this.divholders[b]=({id:b,$divref:null,attrs:a});this.divholders[b].getAttr=function(d){var c=new RegExp(d+"=([^,]+)","i");return(c.test(this.attrs)&&parseInt(RegExp.$1)!=0)?RegExp.$1:null};this.currentid=b;return this},showhide:function(c,b){var a=this.divholders[c].$divref;if(this.divholders[c]&&a.length==1){var d=this.divgroups[a.attr("groupname")];if(a.attr("groupname")&&d.count>1&&(b=="show"||b=="toggle"&&a.css("display")=="none")){if(d.lastactivedivid&&d.lastactivedivid!=c){this.slideengine(d.lastactivedivid,"hide")}this.slideengine(c,"show");d.lastactivedivid=c}else{this.slideengine(c,b)}}},slideengine:function(e,c){var a=this.divholders[e].$divref;var b=this.divholders[e].$togglerimage;if(this.divholders[e]&&a.length==1){var d={height:c};if(a.attr("fade")){d.opacity=c}a.animate(d,a.attr("speed")?parseInt(a.attr("speed")):500,function(){if(b){b.attr("src",(a.css("display")=="none")?b.data("srcs").closed:b.data("srcs").open)}if(animatedcollapse.ontoggle){try{animatedcollapse.ontoggle(jQuery,a.get(0),a.css("display"))}catch(f){alert('An error exists inside your "ontoggle" function:\n\n'+f+"\n\nAborting execution of function.")}}});return false}},generatemap:function(){var b={};for(var a=0;a<arguments.length;a++){if(arguments[a][1]!=null){b[arguments[a][0]]=arguments[a][1]}}return b},init:function(){var a=this;jQuery(document).ready(function(b){animatedcollapse.ontoggle=animatedcollapse.ontoggle||null;var f=animatedcollapse.urlparamselect();var e=a.getCookie("acopendivids");var d=a.getCookie("acgroupswithpersist");if(e!=null){e=(e=="nada")?[]:e.split(",")}d=(d==null||d=="nada")?[]:d.split(",");jQuery.each(a.divholders,function(){this.$divref=b("#"+this.id);if((this.getAttr("persist")||jQuery.inArray(this.getAttr("group"),d)!=-1)&&e!=null){var g=(jQuery.inArray(this.id,e)!=-1)?"block":"none"}else{var g=this.getAttr("hide")?"none":null}if(f[0]=="all"||jQuery.inArray(this.id,f)!=-1){g="block"}else{if(f[0]=="none"){g="none"}}this.$divref.css(a.generatemap(["height",this.getAttr("height")],["display",g]));this.$divref.attr(a.generatemap(["groupname",this.getAttr("group")],["fade",this.getAttr("fade")],["speed",this.getAttr("speed")]));if(this.getAttr("group")){var h=a.divgroups[this.getAttr("group")]||(a.divgroups[this.getAttr("group")]={});h.count=(h.count||0)+1;if(jQuery.inArray(this.id,f)!=-1){h.lastactivedivid=this.id;h.overridepersist=1}if(!h.lastactivedivid&&this.$divref.css("display")!="none"||g=="block"&&typeof h.overridepersist=="undefined"){h.lastactivedivid=this.id}this.$divref.css({display:"none"})}});jQuery.each(a.divgroups,function(){if(this.lastactivedivid&&f[0]!="none"){a.divholders[this.lastactivedivid].$divref.show()}});if(animatedcollapse.ontoggle){jQuery.each(a.divholders,function(){animatedcollapse.ontoggle(jQuery,this.$divref.get(0),this.$divref.css("display"))})}var c=b("a[rel]").filter('[rel^="collapse["], [rel^="expand["], [rel^="toggle["]');c.each(function(){this._divids=this.getAttribute("rel").replace(/(^\w+)|(\s+)/g,"").replace(/[\[\]']/g,"");if(this.getElementsByTagName("img").length==1&&a.divholders[this._divids]){animatedcollapse.preloadimage(this.getAttribute("data-openimage"),this.getAttribute("data-closedimage"));$togglerimage=b(this).find("img").eq(0).data("srcs",{open:this.getAttribute("data-openimage"),closed:this.getAttribute("data-closedimage")});a.divholders[this._divids].$togglerimage=b(this).find("img").eq(0);a.divholders[this._divids].$togglerimage.attr("src",(a.divholders[this._divids].$divref.css("display")=="none")?$togglerimage.data("srcs").closed:$togglerimage.data("srcs").open)}b(this).click(function(){var h=this.getAttribute("rel");var g=(this._divids=="")?[]:this._divids.split(",");if(g.length>0){animatedcollapse[/expand/i.test(h)?"show":/collapse/i.test(h)?"hide":"toggle"](g);return false}})});b(window).bind("unload",function(){a.uninit()})})},uninit:function(){var b="",a="";jQuery.each(this.divholders,function(){if(this.$divref.css("display")!="none"){b+=this.id+","}if(this.getAttr("group")&&this.getAttr("persist")){a+=this.getAttr("group")+","}});b=(b=="")?"nada":b.replace(/,$/,"");a=(a=="")?"nada":a.replace(/,$/,"");this.setCookie("acopendivids",b);this.setCookie("acgroupswithpersist",a)},getCookie:function(a){var b=new RegExp(a+"=[^;]*","i");if(document.cookie.match(b)){return document.cookie.match(b)[0].split("=")[1]}return null},setCookie:function(c,d,a){if(typeof a!="undefined"){var b=new Date();b.setDate(b.getDate()+a);document.cookie=c+"="+d+"; path=/; expires="+b.toGMTString()}else{document.cookie=c+"="+d+"; path=/"}},urlparamselect:function(){window.location.search.match(/expanddiv=([\w\-_,]+)/i);return(RegExp.$1!="")?RegExp.$1.split(","):[]},preloadimage:function(){var b=this.preloadimages;for(var a=0;a<arguments.length;a++){if(arguments[a]&&arguments[a].length>0){b[b.length]=new Image();b[b.length-1].src=arguments[a]}}}};$(document).ready(function(){$("#side ul#mainNav ul li#pageid10690 a").attr({onClick:"window.open(this.href, '', 'scrollbars,width=725,height=510'); return false"})});
