function show_gigyaComments(b,d,f,e){var a=new gigya.services.socialize.UserAction();a.setTitle("See my comment on "+f+" at Builder's Local Housing Data #construction #Builder");var c={categoryID:b,streamID:d,containerID:e,userAction:a,cid:"",width:620,context:"CommentsPlugin"};gigya.services.socialize.showCommentsUI(conf,c)}function show_gigyaCommentsForArticles(b,e,f){var d={title:getFormattedTitle($("title").html()),description:$("meta[name=description]").attr("content"),link:$("link[rel=canonical]").attr("href"),action:"Read More"};var a=new gigya.services.socialize.UserAction();a.setTitle(d.title);var c={categoryID:b,streamID:e,containerID:f,userAction:a,cid:"",width:620,context:"CommentsPlugin"};gigya.services.socialize.showCommentsUI(conf,c)}function show_gigyaCommentsCountForArticles(a,c){var b={categoryID:a,streamID:c,callback:writeCommentsCountForArticles};gigya.services.comments.getComments(conf,b)}function writeCommentsCountForArticles(a){if(a.commentCount>0){if(a.commentCount==1){$(".utilities.articleUtilities ul").prepend('<li><a href="#articlecomments">'+a.commentCount+" Comment</a></li>")}else{$(".utilities.articleUtilities ul").prepend('<li><a href="#articlecomments">'+a.commentCount+" Comments</a></li>")}}else{$(".utilities.articleUtilities ul").prepend('<li><a href="#articlecomments">Be the first to comment</a></li>')}}function show_gigyaShareBar(e,c,f){var d={title:e+" Housing Data #"+c,description:$("meta[name=description]").attr("content"),link:$("link[rel=canonical]").attr("href"),action:"Read More"};var a=new gigya.services.socialize.UserAction();a.setUserMessage("This is the user message");a.setTitle(d.title);a.setLinkBack(d.link);a.setDescription(d.description);a.addActionLink(d.action,d.link);var b={containerID:f,shareButtons:"facebook-like,google-plusone,share,twitter,email",userAction:a,context:"ShareBarPlugIn",onError:onError};gigya.services.socialize.showShareBarUI(conf,b)}function onError(a){alert("An error has occured: "+a.errorCode+"; "+a.errorMessage)}function show_gigyaCommentsCount(a,c,d){var b={categoryID:a,streamID:c,callback:writeCommentsCount,context:d};gigya.services.comments.getComments(conf,b)}function writeCommentsCount(a){if(a.commentCount>0){if(a.commentCount==1){$("#"+a.context).html('<a href="#LHDcomments">'+a.commentCount+" Comment</a>")}else{$("#"+a.context).html('<a href="#LHDcomments">'+a.commentCount+" Comments</a>")}}}function show_gigyaShareBarForArticles(b){var d={title:$.trim($("title").html()),description:$("meta[name=description]").attr("content"),link:$("link[rel=canonical]").attr("href"),action:"Read More"};var a=new gigya.services.socialize.UserAction();a.setUserMessage("This is the user message");a.setTitle(d.title);a.setLinkBack(d.link);a.setDescription(d.description);a.addActionLink(d.action,d.link);var c={containerID:b,shareButtons:"share",userAction:a,context:"ShareBarPlugIn",onSendDone:onSendDone,onError:onError};gigya.services.socialize.showShareBarUI(conf,c)}function show_gigyaShareBarForSlideShows(e,c,f){var d={title:f,description:$("meta[name=description]").attr("content"),link:c,action:"Read More"};var a=new gigya.services.socialize.UserAction();a.setUserMessage("This is the user message");a.setTitle(d.title);a.setLinkBack(d.link);a.setDescription(d.description);a.addActionLink(d.action,d.link);var b={containerID:e,shareButtons:"share",userAction:a,context:"ShareBarPlugIn",noButtonBorders:"true",onError:onError};gigya.services.socialize.showShareBarUI(conf,b)}function onSendDone(c){var b=c.providers;var a=s_gi(s_account);a.prop42=b;a.eVar48=b;a.events="event14";a.tl(this,"o",b)}function getFormattedTitle(b){var c=b.substring(0,b.lastIndexOf("-"));var d="";var a=b.split("-");if(b.indexOf("eco-structure Magazine")!=-1){c=c.substring(0,c.lastIndexOf("-"));d=a[a.length-2]+a[a.length-1]}else{d=a[a.length-1]}return"Commented on: "+c+"- #"+getFormattedPublisherName(d)}function getFormattedPublisherName(a){a=jQuery.trim(a).toUpperCase();switch(a){case"BUILDER MAGAZINE":return"builderonline";case"CONCRETE CONSTRUCTION":return"concrete";case"ARCHITECT MAGAZINE":return"architect";case"ECOSTRUCTURE MAGAZINE":return"ecostructure";case"RESIDENTIALARCHITECT MAGAZINE":return"architect";case"PRO AV ONLINE":return"proavonline";case"METALMAG MAGAZINE":return"metalmag";case"ECOHOME MAGAZINE":return"ecohome";case"REMODELING MAGAZINE":return"remodeling";case"MULTIFAMILY EXECUTIVE MAGAZINE":return"multifamily";case"PROSALES ONLINE":return"prosalesonline";case"CUSTOM HOME MAGAZINE":return"customhome";default:return a}}function show_gigyaShareBarForToolBar(b){var d={title:$.trim($("title").html()),description:$("meta[name=description]").attr("content"),link:$("link[rel=canonical]").attr("href"),action:"Read More"};var a=new gigya.services.socialize.UserAction();a.setUserMessage("This is the user message");a.setTitle(d.title);a.setLinkBack(d.link);a.setDescription(d.description);a.addActionLink(d.action,d.link);var c={containerID:b,shareButtons:"Facebook-Like,Google-plusone,Share,Twitter,Email",userAction:a,context:"ShareBarPlugIn",onError:onError,onLoad:onToolBarSharingLoad,operationMode:"multiSelect"};gigya.services.socialize.showShareBarUI(conf,c)}function onToolBarSharingLoad(a){};
