
var addthisurl=document.URL;var addthistitle=document.title;var addthis_config={};var addthis_share={url:addthisurl,title:addthistitle};var addthis_pub="homefindercom";var addthis_brand="HomeFinder.com";var addthis_header_color="#ffffff";var addthis_header_background="#7B7B7C";var addthis_options='digg,facebook,myspace,twitter, stumbleupon, more';addthis.button(".share",addthis_config,addthis_share,addthis_pub,addthis_brand,addthis_header_color,addthis_header_background,addthis_options);;(function($){$.ui=$.ui||{};$.extend($.ui,{plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name];}
var tmp=$('<div class="ui-resizable-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
return $.ui.cssCache[name];},disableSelection:function(e){e.unselectable="on";e.onselectstart=function(){return false;};if(e.style){e.style.MozUserSelect="none";}},enableSelection:function(e){e.unselectable="off";e.onselectstart=function(){return true;};if(e.style){e.style.MozUserSelect="";}},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has;}});var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).trigger("remove");return _remove.apply(this,arguments);};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1);};var widgetPrototype={init:function(){},destroy:function(){},getData:function(e,key){return this.options[key];},setData:function(e,key,value){this.options[key]=value;},enable:function(){this.setData(null,'disabled',false);},disable:function(){this.setData(null,'disabled',true);}};$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options,data){var isMethodCall=(typeof options=='string'),args=arguments;if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options](data):undefined);}
return this.each(function(){var instance=$.data(this,name);if(!instance){$.data(this,name,new $[namespace][name](this,options));}else if(isMethodCall){instance[options].apply(instance,$.makeArray(args).slice(1));}});};$[namespace][name]=function(element,options){var self=this;this.options=$.extend({},$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(e,key,value);}).bind('getData.'+name,function(e,key){return self.getData(e,key);}).bind('remove',function(){return self.destroy();});this.init();};$[namespace][name].prototype=$.extend({},widgetPrototype,prototype);};$.widget("ui.mouse",{init:function(){var self=this;this.element.bind('mousedown.mouse',function(){return self.click.apply(self,arguments);}).bind('mouseup.mouse',function(){(self.timer&&clearInterval(self.timer));}).bind('click.mouse',function(){if(self.initialized){self.initialized=false;return false;}});if($.browser.msie){this.unselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}},destroy:function(){this.element.unbind('.mouse').removeData("mouse");($.browser.msie&&this.element.attr('unselectable',this.unselectable));},trigger:function(){return this.click.apply(this,arguments);},click:function(e){if(e.which!=1||$.inArray(e.target.nodeName.toLowerCase(),this.options.dragPrevention||[])!=-1||(this.options.condition&&!this.options.condition.apply(this.options.executor||this,[e,this.element]))){return true;}
var self=this;this.initialized=false;var initialize=function(){self._MP={left:e.pageX,top:e.pageY};$(document).bind('mouseup.mouse',function(){return self.stop.apply(self,arguments);});$(document).bind('mousemove.mouse',function(){return self.drag.apply(self,arguments);});if(!self.initalized&&Math.abs(self._MP.left-e.pageX)>=self.options.distance||Math.abs(self._MP.top-e.pageY)>=self.options.distance){(self.options.start&&self.options.start.call(self.options.executor||self,e,self.element));(self.options.drag&&self.options.drag.call(self.options.executor||self,e,this.element));self.initialized=true;}};if(this.options.delay){if(this.timer){clearInterval(this.timer);}
this.timer=setTimeout(initialize,this.options.delay);}else{initialize();}
return false;},stop:function(e){if(!this.initialized){return $(document).unbind('mouseup.mouse').unbind('mousemove.mouse');}
(this.options.stop&&this.options.stop.call(this.options.executor||this,e,this.element));$(document).unbind('mouseup.mouse').unbind('mousemove.mouse');return false;},drag:function(e){var o=this.options;if($.browser.msie&&!e.button){return this.stop.call(this,e);}
if(!this.initialized&&(Math.abs(this._MP.left-e.pageX)>=o.distance||Math.abs(this._MP.top-e.pageY)>=o.distance)){(o.start&&o.start.call(o.executor||this,e,this.element));this.initialized=true;}else{if(!this.initialized){return false;}}
(o.drag&&o.drag.call(this.options.executor||this,e,this.element));return false;}});})(jQuery);;(function($){$.ui=$.ui||{};$.extend($.ui,{plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name];}
var tmp=$('<div class="ui-resizable-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
return $.ui.cssCache[name];},disableSelection:function(e){e.unselectable="on";e.onselectstart=function(){return false;};if(e.style){e.style.MozUserSelect="none";}},enableSelection:function(e){e.unselectable="off";e.onselectstart=function(){return true;};if(e.style){e.style.MozUserSelect="";}},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has;}});var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).trigger("remove");return _remove.apply(this,arguments);};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1);};var widgetPrototype={init:function(){},destroy:function(){},getData:function(e,key){return this.options[key];},setData:function(e,key,value){this.options[key]=value;},enable:function(){this.setData(null,'disabled',false);},disable:function(){this.setData(null,'disabled',true);}};$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options,data){var isMethodCall=(typeof options=='string'),args=arguments;if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options](data):undefined);}
return this.each(function(){var instance=$.data(this,name);if(!instance){$.data(this,name,new $[namespace][name](this,options));}else if(isMethodCall){instance[options].apply(instance,$.makeArray(args).slice(1));}});};$[namespace][name]=function(element,options){var self=this;this.options=$.extend({},$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(e,key,value);}).bind('getData.'+name,function(e,key){return self.getData(e,key);}).bind('remove',function(){return self.destroy();});this.init();};$[namespace][name].prototype=$.extend({},widgetPrototype,prototype);};$.widget("ui.mouse",{init:function(){var self=this;this.element.bind('mousedown.mouse',function(){return self.click.apply(self,arguments);}).bind('mouseup.mouse',function(){(self.timer&&clearInterval(self.timer));}).bind('click.mouse',function(){if(self.initialized){self.initialized=false;return false;}});if($.browser.msie){this.unselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}},destroy:function(){this.element.unbind('.mouse').removeData("mouse");($.browser.msie&&this.element.attr('unselectable',this.unselectable));},trigger:function(){return this.click.apply(this,arguments);},click:function(e){if(e.which!=1||$.inArray(e.target.nodeName.toLowerCase(),this.options.dragPrevention||[])!=-1||(this.options.condition&&!this.options.condition.apply(this.options.executor||this,[e,this.element]))){return true;}
var self=this;this.initialized=false;var initialize=function(){self._MP={left:e.pageX,top:e.pageY};$(document).bind('mouseup.mouse',function(){return self.stop.apply(self,arguments);});$(document).bind('mousemove.mouse',function(){return self.drag.apply(self,arguments);});if(!self.initalized&&Math.abs(self._MP.left-e.pageX)>=self.options.distance||Math.abs(self._MP.top-e.pageY)>=self.options.distance){(self.options.start&&self.options.start.call(self.options.executor||self,e,self.element));(self.options.drag&&self.options.drag.call(self.options.executor||self,e,this.element));self.initialized=true;}};if(this.options.delay){if(this.timer){clearInterval(this.timer);}
this.timer=setTimeout(initialize,this.options.delay);}else{initialize();}
return false;},stop:function(e){if(!this.initialized){return $(document).unbind('mouseup.mouse').unbind('mousemove.mouse');}
(this.options.stop&&this.options.stop.call(this.options.executor||this,e,this.element));$(document).unbind('mouseup.mouse').unbind('mousemove.mouse');return false;},drag:function(e){var o=this.options;if($.browser.msie&&!e.button){return this.stop.call(this,e);}
if(!this.initialized&&(Math.abs(this._MP.left-e.pageX)>=o.distance||Math.abs(this._MP.top-e.pageY)>=o.distance)){(o.start&&o.start.call(o.executor||this,e,this.element));this.initialized=true;}else{if(!this.initialized){return false;}}
(o.drag&&o.drag.call(this.options.executor||this,e,this.element));return false;}});})(jQuery);;(function($){$.widget("ui.accordion",{init:function(){var options=this.options;if(options.navigation){var current=this.element.find("a").filter(options.navigationFilter);if(current.length){if(current.filter(options.header).length){options.active=current;}else{options.active=current.parent().parent().prev();current.addClass("current");}}}
options.headers=this.element.find(options.header);options.active=findActive(options.headers,options.active);if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");$("<span class='ui-accordion-left'/>").insertBefore(options.headers);$("<span class='ui-accordion-right'/>").appendTo(options.headers);options.headers.addClass("ui-accordion-header").attr("tabindex","0");}
var maxHeight;if(options.fillSpace){maxHeight=this.element.parent().height();options.headers.each(function(){maxHeight-=$(this).outerHeight();});var maxPadding=0;options.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height());}).height(maxHeight-maxPadding);}else if(options.autoHeight){maxHeight=0;options.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight());}).height(maxHeight);}
options.headers.not(options.active||"").next().hide();options.active.parent().andSelf().addClass(options.selectedClass);if(options.event){this.element.bind((options.event)+".accordion",clickHandler);}},activate:function(index){clickHandler.call(this.element[0],{target:findActive(this.options.headers,index)[0]});},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","");}
$.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion");}});function scopeCallback(callback,scope){return function(){return callback.apply(scope,arguments);};};function completed(cancel){if(!$.data(this,"accordion")){return;}
var instance=$.data(this,"accordion");var options=instance.options;options.running=cancel?0:--options.running;if(options.running){return;}
if(options.clearStyle){options.toShow.add(options.toHide).css({height:"",overflow:""});}
$(this).triggerHandler("accordionchange",[options.data],options.change);}
function toggle(toShow,toHide,data,clickedActive,down){var options=$.data(this,"accordion").options;options.toShow=toShow;options.toHide=toHide;options.data=data;var complete=scopeCallback(completed,this);options.running=toHide.size()===0?toShow.size():toHide.size();if(options.animated){if(!options.alwaysOpen&&clickedActive){$.ui.accordion.animations[options.animated]({toShow:jQuery([]),toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight});}else{$.ui.accordion.animations[options.animated]({toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight});}}else{if(!options.alwaysOpen&&clickedActive){toShow.toggle();}else{toHide.hide();toShow.show();}
complete(true);}}
function clickHandler(event){var options=$.data(this,"accordion").options;if(options.disabled){return false;}
if(!event.target&&!options.alwaysOpen){options.active.parent().andSelf().toggleClass(options.selectedClass);var toHide=options.active.next(),data={instance:this,options:options,newHeader:jQuery([]),oldHeader:options.active,newContent:jQuery([]),oldContent:toHide},toShow=(options.active=$([]));toggle.call(this,toShow,toHide,data);return false;}
var clicked=$(event.target);if(clicked.parents(options.header).length){while(!clicked.is(options.header)){clicked=clicked.parent();}}
var clickedActive=clicked[0]==options.active[0];if(options.running||(options.alwaysOpen&&clickedActive)){return false;}
if(!clicked.is(options.header)){return;}
options.active.parent().andSelf().toggleClass(options.selectedClass);if(!clickedActive){clicked.parent().andSelf().addClass(options.selectedClass);}
var toShow=clicked.next(),toHide=options.active.next(),data={instance:this,options:options,newHeader:clicked,oldHeader:options.active,newContent:toShow,oldContent:toHide},down=options.headers.index(options.active[0])>options.headers.index(clicked[0]);options.active=clickedActive?$([]):clicked;toggle.call(this,toShow,toHide,data,clickedActive,down);return false;};function findActive(headers,selector){return selector!=undefined?typeof selector=="number"?headers.filter(":eq("+selector+")"):headers.not(headers.not(selector)):selector===false?$([]):headers.filter(":eq(0)");}
$.extend($.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:'slide',event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase();}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return;}
var hideHeight=options.toHide.height(),showHeight=options.toShow.height(),difference=showHeight/hideHeight;options.toShow.css({height:0,overflow:'hidden'}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step:function(now){var current=(hideHeight-now)*difference;if($.browser.msie||$.browser.opera){current=Math.ceil(current);}
options.toShow.height(current);},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","auto");}
options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"bounceout":"swing",duration:options.down?1000:200});},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700});}}});$.fn.activate=function(index){return this.accordion("activate",index);};})(jQuery);Homescape.Page.pathLowerCase=Homescape.Page.path.toLowerCase();Homescape.Reporting.Channel={primary:'',secondary:'',tertiary:''};Homescape.fn.reportLinkEvents=function(pageName){try{if(pageName===undefined||pageName===''){if(Homescape.Page.name!==undefined&&Homescape.Page.name!==''){pageName=Homescape.Page.name;}else{pageName=document.title;}}
jQuery('a').click(function(){try{var me=jQuery(this);var linkName=pageName;var anchorText=me.text();if(!(anchorText===undefined||anchorText==='')){linkName+=':text='+anchorText;}
var title=me.attr('title');if(!(title===undefined||title==='')){linkName+=':title='+title;}
var anchorId=me.attr('id');var anchorName=me.attr('name');if(!(anchorName===undefined||anchorName==='')){linkName+=':name='+anchorName;}else if(!(anchorId===undefined||anchorId==='')){linkName+=':id='+anchorId;}
var href=me.attr('href');if(!(href===undefined||href==='')){href=href.replace(/\?(.*)/,'');}
jQuery.reportClickEvent({hitbox:false,webtrends:false,omniture:true},{name:linkName,path:href,type:'o'});if(window.location.search.indexOf('_testLinkTracking=true')>-1){jQuery.log('custom click event tracked; link name = "'+linkName+'"');return false;}}catch(e){jQuery.log(e);}});}catch(e){jQuery.log(e);}};jQuery.fn.categoryCheck=function(){jQuery(this).click(function(){var fckeditor=true;var innerIframe=null;var innerIframeObj=null;var articleText='';try{innerIframe=window.frames.wpTextbox1.frames[0].document;innerIframeObj=jQuery(innerIframe);articleText=jQuery("body",innerIframeObj).text();if(articleText.indexOf("Category:")==-1){if(jQuery('#categoryHeader').length===0){jQuery('#bodyContent').prepend("<h5 id=\'categoryHeader\'>A category must be present in order to save.</h5>");return false;}else{return false;}}else{}}catch(e){fckeditor=false;}
if(!fckeditor){articleText=jQuery('#wpTextbox1').val();if(articleText.indexOf("Category:")==-1){if(jQuery('#categoryHeader').length===0){jQuery('#bodyContent').prepend("<h5 id=\'categoryHeader\'>A category must be present in order to save.</h5>");return false;}else{return false;}}else{}}});return this;};jQuery.fn.categoryLink=function(){var fckeditor=true;this.append("<p><a id='wikiAddCategory'>Add Category</a></p>");jQuery('#wikiAddCategory').click(function(){var reply=prompt("Enter the category name.","");var category="[[Category:"+reply+"]]";var innerIframe=null;var innerIframeObj=null;try{innerIframe=window.wpTextbox1.frames[0].document;innerIframeObj=jQuery(innerIframe);jQuery("body",innerIframeObj).append(category);}catch(e){fckeditor=false;}
if(!fckeditor){jQuery('#wpTextbox1').val(jQuery('#wpTextbox1').val()+category);}});return this;};jQuery.fn.hideTextMatches=function(){jQuery("ol > li > small").hide();jQuery("ol > li > br").hide();};jQuery.fn.categoryLinkDisplay=function(){var temp=[];jQuery("#mw-pages li").each(function(i,n){tempStr=jQuery(n).html();var beginning=tempStr.indexOf(">",0);var end=tempStr.indexOf("<",5);var replacement=tempStr.substring(beginning+1,end);var index=replacement.indexOf(":");if(index!=-1){replacement=replacement.substring(index+1);}
var display=tempStr.replace(/>[A-Za-z0-9:?-_ ]*</g,">"+replacement+"<");temp[i]=[];temp[i].push(replacement);temp[i].push(n);temp[i].push(display);});temp=temp.sort();jQuery("#mw-pages h3").each(function(i,n){jQuery(n).hide();});for(var i=0;i<temp.length;i++){var letter=temp[i][0].substring(0,1).toUpperCase();if(jQuery('#h3'+letter).length===0){jQuery("#mw-pages").append("<h3 id=\"h3"+letter+"\">"+letter+"</h3>");jQuery("#mw-pages").append("<ul id=\"ul"+letter+"\"></ul>");}
jQuery("#ul"+letter).append(jQuery(temp[i][1]).html(temp[i][2]));}};jQuery.fn.createArticle=function(namespace){if(namespace===null){namespace="";}else{namespace+=":";}
this.append("<li><a id='wikiAddPage'>Create a New Page</a></li>");jQuery('#wikiAddPage').click(function(){var page_name=prompt("Enter the new pages name:","");if(page_name===null){}else if(page_name.length!==0){page_name=page_name.replace(/ /g,"_");var url=wgScriptPath+"?action=edit&title="+namespace+page_name;window.location=url;}});return this;};jQuery.fn.appendCategoriesToSidebar=function(){var thisRef=this;if(wgTitle=="LandingPage"){var landingPage=[];var order=[];jQuery(".catlinks >span>a").each(function(i,n){if(jQuery(n).html()!==''){if(landingPage[jQuery(n).html()]===null){landingPage[jQuery(n).html()]=jQuery(n).clone();order[i]=jQuery(n).html();}}});order=order.sort();jQuery.each(order,function(i,n){if(n!==null){thisRef.append(jQuery("<li></li>").append(landingPage[n]));}});}else{jQuery(".catlinks >span>a").each(function(i,n){thisRef.append(jQuery("<li></li>").append(jQuery(n).clone()));});}
return this;};jQuery.fn.alterEditCategoryLinks=function(){jQuery(".catlinks > span > a[class='new']").each(function(i,n){jQuery(n).removeClass("new");href=jQuery(n).attr("href");href=href.replace(/_w\/_edit\//,"");jQuery(n).attr({"href":href});});};jQuery.fn.convertLinkToSpan=function(){var anchors=this;jQuery(anchors).each(function(i,n){var span=jQuery('<span> </span>');span.attr("class",jQuery(n).attr("new"));span.text(jQuery(n).text());span.attr("title",jQuery(n).attr("title"));jQuery(n).replaceWith(span);});};jQuery.fn.printLink=function(){var printSpan=this;jQuery(this).click(function(){self.print();});};jQuery.fn.emailAddressChecks=function(){jQuery('input[@name*=ea_send]').click(function(){emailTo=jQuery('textarea[@name*=ea_list]').val();emailTo=emailTo.replace(/ /g,"");jQuery('textarea[@name*=ea_list]').val(emailTo);var patt=new RegExp("[a-zA-Z0-9-._]*@[a-zA-Z0-9-._]*");var emailResult=patt.test(emailTo);var emailToAlert=false;var replyToAlert=false;if(!emailResult){if(jQuery('#blogEmailTo').length===0){jQuery('.EmailArticle').prepend("<p><h5 id='blogEmailTo'>Please enter an email address in the to box</h5></p>");}
emailToAlert=true;}else{jQuery('#blogEmailTo').remove();emailToAlert=false;}
replyTo=jQuery('input[@name=ea_replyTo]').val();var replyResult=patt.test(replyTo);if(!replyResult){if(jQuery('#blogReplyTo').length===0){jQuery('.EmailArticle').prepend("<p><h5 id='blogReplyTo'>Please enter an email address in the Reply To box</h5></p>");}
replyToAlert=true;}else{jQuery('#blogReplyTo').remove();replyToAlert=false;}
if(emailToAlert||replyToAlert){return false;}});return this;};jQuery.fn.forceAuthorLinks=function(){var authorHeaders=this;jQuery(authorHeaders).each(function(i,n){var link=jQuery(' p a',n).attr("href");jQuery('.thumb .thumbinner a',n).removeAttr("href");jQuery('.thumb .thumbinner a',n).attr("href",link);});};jQuery.fn.alterImageLinks=function(){jQuery.log("alter Image Links Function");jQuery(this).click(function(){jQuery('#imageOverlay').parent().parent().remove();var imageTag=jQuery("img",this).attr("src");imageTag="<img src=\""+imageTag+"\"/>";var offset=jQuery(this).offset();var eImgOverlay=jQuery('<div id="imageOverlay"></div>').append(imageTag);eImgOverlay.modal();return false;});};jQuery(document).ready(function(){if(wgTitle=="EmailArticle"){jQuery('h1.firstHeading').text("Email Article");}
jQuery('span.articleShare').click(function(){jQuery('#shareBox').toggle();});if(jQuery('.shareThis')){jQuery('.shareThis').each(function(i){var customAuthor={shareHref:jQuery('<img src="http://images.homescape.com/hf_content/mediawiki-static/icons/share.png"/><A> Share this article</A>'),shareThisLinks:jQuery('.shareThisLinks',this)};jQuery(this).prepend(customAuthor.shareHref);jQuery(this).click(function(){var overlaySelector=".shareThisOverlay";var relatedArticle=jQuery(this).attr('rel');if(relatedArticle!==undefined&&relatedArticle!==''){overlaySelector=overlaySelector+"[rel='"+jQuery(this).attr('rel')+"']";}
jQuery.log('creating overlay for: '+overlaySelector);var overlayOffsetRelThis={left:50,top:jQuery(window).scrollTop()+50};jQuery.log('document.body.scrollTop = '+document.body.scrollTop);jQuery.log('jQuery(window).scrollTop() = '+jQuery(window).scrollTop());jQuery.log('jQuery(this) offset = top: '+overlayOffsetRelThis.top+'; left: '+overlayOffsetRelThis.left);jQuery(overlaySelector).overlay({clickAnywhereToClose:false,showPrintLink:false,showCloseLink:true,name:jQuery(this).attr('rel'),offset:overlayOffsetRelThis});jQuery(overlaySelector).show();return false;});});}
if(jQuery('.userHeader')){jQuery('.userHeader a.internal').click(function(){return false;});}
if((wgAction=="edit"&&(wgNamespaceNumber==100||wgNamespaceNumber==108)&&wgUserName!==null)||(wgAction=="submit"&&(wgNamespaceNumber==100||wgNamespaceNumber==108)&&wgUserName!==null)){jQuery('#editpage-copywarn').categoryLink();jQuery('#wpSave').categoryCheck();}
if(wgPageName=="Special:Search"){jQuery("html").hideTextMatches();}
if(wgCanonicalSpecialPageName=="EmailArticle"){jQuery("html").emailAddressChecks();}
if(wgNamespaceNumber==14){jQuery("html").categoryLinkDisplay();}
jQuery("html").alterEditCategoryLinks();jQuery("#p-Navigation > div > ul").createArticle("Blog");var allowEditLinks=false;for(x in wgUserGroups){if(wgUserGroups[x]=="bureaucrat"||wgUserGroups[x]=="sysop"){allowEditLinks=true;}}
if(!allowEditLinks){jQuery('a.new').convertLinkToSpan();}
jQuery('.trackback a').click(function(){alert('This link should not be clicked.  It should be copy/pasted into your trackback program');return false;});jQuery('.articlePrint').printLink();jQuery('.articleAttribution').forceAuthorLinks();jQuery('#bodyContent img').not('a[href*="User:"] img').click(function(){return false;});jQuery('#commentSubmit').click(function(){jQuery('#commentSubmit').hide();});jQuery('.hoverable').hover(function(){jQuery(this).addClass('hoverOn');if(jQuery.browser.msie){jQuery(this).css('cursor','hand');}else{jQuery(this).css('cursor','pointer');}},function(){jQuery(this).removeClass('hoverOn');jQuery(this).css('cursor','default');});});jQuery(document).ready(function(){var categoryNav=jQuery('#categoryNavigation').accordion({header:"h3.secthed",activate:false,alwaysOpen:false,clearStyle:true,autoHeight:false});var categoryToExpand=jQuery('a:contains("'+jQuery('#catlinks > p > span > a').text()+'")',jQuery('#categoryNavigation')).parent();categoryNav.accordion("activate",categoryToExpand);jQuery("div[class='sectOpen'] > ul > li > a:contains('"+jQuery("h1[class='firstHeading']").text()+"')").addClass('selected');jQuery('#searchform2').homeSearchWidget({autoFocus:false});jQuery('#globalWrapper div#articleCommentsReel div.blogCommentEntry:first').css('border-width','0');if(wgCanonicalNamespace.toLowerCase()=='buying-guide'){Homescape.Page.category=jQuery('#catlinks > p > span > a').text();Homescape.Page.name='buying-guide:article:'+Homescape.Page.category+':'+wgTitle;Homescape.Reporting.Channel.primary='buying-guide';Homescape.Reporting.Channel.secondary='article';Homescape.Reporting.Channel.tertiary=jQuery('#catlinks > p > span > a').text();}else if(wgCanonicalNamespace.toLowerCase()=='special'){var namespace=jQuery.urlParmVal('namespace').toLowerCase();if(namespace===''){namespace='buying-guide';}
Homescape.Reporting.Channel.primary=namespace;if(wgTitle=='LandingPage'){var offset=jQuery.urlParmVal('offset');if(offset!==undefined||offset!==''&&offset!==0){Homescape.Page.name=namespace+':history:offset '+offset;Homescape.Reporting.Channel.secondary='history';}else{Homescape.Page.name=namespace+':landing page';}}else if(wgTitle=='BlogCommentEntry'){Homescape.Page.name=namespace+':comment:'+jQuery.urlParmVal('page');Homescape.Reporting.Channel.secondary='comment';}else if(wgTitle=='Search'){Homescape.Page.name=namespace+':search';}else if(wgTitle=='EmailArticle'){Homescape.Page.name=namespace+':email';Homescape.Reporting.Channel.secondary='email';}}else if(wgCanonicalNamespace.toLowerCase()=='user'){Homescape.Reporting.Channel.primary='buying-guide';Homescape.Reporting.Channel.secondary='author';Homescape.Page.name='buying-guide:author:'+wgTitle;}
Homescape.fn.reportLinkEvents(Homescape.Page.name);if(wgPageName.indexOf("Special:")==-1){jQuery('<div id="adFloater"></div>').insertAfter(jQuery('#bodyContent p:eq(1)')).adCodeAtlas({channel:'buying-guide',position:3,site:'Homescape',adslot:'center',width:300,height:250,pagename:Homescape.Page.name});}
jQuery('#adRightrail_1').adCodeAtlas({displayInline:true,channel:'buying-guide',position:1,site:'Homescape',adslot:'rightrail',width:215,height:25,pagename:Homescape.Page.name});jQuery('#adRightrail_2').adCodeAtlas({channel:'buying-guide',position:2,site:'Homescape',adslot:'rightrail',width:160,height:600,pagename:Homescape.Page.name});});