/* Copyright (c) Shareaholic Inc (www.shareaholic.com). All rights reserved. */ typeof SHR4P=="undefined"&&(SHR4P={});if(typeof SHR4P.TB=="undefined")SHR4P.TB={};SHR4P.TB.base_url=typeof SHR4P.debug_enabled!=="undefined"?"//www.spreadaholic.com/":"//www.shareaholic.com/";SHR4P.TB.shr_link=SHR4P.TB.base_url+"api/share/";SHR4P.TB.shr_css=SHR4P.TB.base_url+"media/css/shareaholic-share-button.css";SHR4P.TB.shr_twitter_image=SHR4P.TB.base_url+"media/images/styles/tb/twitter.png";SHR4P.TB.shr_image_arrow_up=SHR4P.TB.base_url+"media/images/styles/tb/arrow_up.png"; SHR4P.TB.shr_image_arrow_down=SHR4P.TB.base_url+"media/images/styles/tb/arrow_down.png";SHR4P.TB.shr_apiKey="e3c665c2eb6785741cea4515633f1d86b";SHR4P.TB.shr_twitter_template="${title} - ${short_link} via @Shareaholic"; if(typeof SHRSB_Globals!="undefined"&&typeof SHRSB_Globals.src!="undefined")SHR4P.TB.shr_css=SHRSB_Globals.src+"/shareaholic-share-button.css",SHR4P.TB.shr_image=SHRSB_Globals.src+"/shareaholic-publishers-mini.png",SHR4P.TB.shr_image_arrow_up=SHRSB_Globals.src+"/arrow_up.png",SHR4P.TB.shr_image_arrow_down=SHRSB_Globals.src+"/arrow_down.png";if(typeof SHRTB_Settings!="undefined"&&typeof SHRTB_Settings.apikey!="undefined")SHR4P.TB.shr_apiKey=SHRTB_Settings.apikey; if(typeof SHRTB_Settings!="undefined"&&typeof SHRTB_Settings.shr_twitter_template!="undefined")SHR4P.TB.shr_twitter_template=SHRTB_Settings.shr_twitter_template;SHR4P.debug=function(a){SHR4P.debug_enabled&&(typeof console!="undefined"&&console?console.log(a):alert(a))};SHR4P.TB.ready=!1;SHR4P.TB.init=!1; var SHR4P_init=function(){SHR4P.debug("SHR4P_init called");if(SHR4P.TB.init)SHR4P.debug("SHR4P_init returning because already loaded");else if(SHR4P.TB.init=!0,SHR4P.TB.jQuery=typeof sb_dont_noConflict!="undefined"&&sb_dont_noConflict?jQuery:jQuery.noConflict(!0),function(a){SHR4P.TB.renderShareButtons=function(){SHR4P.debug("SHR4P.TB.renderShareButtons called");if(typeof SHRTB_Settings=="undefined"||!SHRTB_Settings)window.SHRTB_Settings={};a(".shr-toolbox").each(function(){var c=a(this),e=c.attr("data-shr_form_factor")|| c.attr("shr_form_factor");c.addClass(e+"-head");c.attr("data-shr_link")||c.attr("shr_link");c.attr("data-shr_title")||c.attr("shr_title");c.attr("data-shr_short_link")||c.attr("shr_short_link");c.children("#shareaholic-services").wrapInner("");b(e,c)})};var b=function(b,e){SHR4P.debug("SHR4P.TB.layoutFormFactor called");if(!(typeof b=="undefined"||!b||typeof e=="undefined"||!e)&&b=="shareaholic-top-bar"&&!d){var d=!0,f=SHRTB_Settings.topBarBgColor,h=SHRTB_Settings.topBarBorderColor,d=!1, k=a("document").height()/4||120,j=!1;a("").appendTo("head");var f=a("
"),g= a("
"),h=a("
"),d=a(""),l=a("
");e.wrap(l);l=e.parents("#shareToolBar");l.wrap(g);g=l.parents("#shareToolBarContainer");g.wrap(d);d=g.parents("#shareaholic-bar");f.prependTo(d);h.appendTo(d);f=e.parents("#shareaholic-bar");SHR4P.debug(f);a('
').appendTo(g); a('
').appendTo(g);var m=a("#shareaholic-bar"),i=a("#showHideToolBar");i.click(function(){j=!j;a("#showHideToolBar > div").toggleClass("shareToolBarShowButton shareToolBarHideButton");j?(i.hide(),a("#shareaholic-bar").css("border-bottom-width","0px").removeClass("shareToolBarShadow")):i.css("margin-left","-100%");a("#shareToolBar, #shareToolBarAddv").slideToggle("slow",function(){j||(a("#shareaholic-bar").css("border-bottom-width","1px").addClass("shareToolBarShadow"), a("#shareToolBarHeader").animate({height:"+=5"},{duration:100}).animate({height:"-=5"},{duration:100}),i.attr("title","Click to hide"));var b=a("#showHideToolBar").css("margin-left");j&&b!="0px"&&(i.css("margin-left","0"),i.fadeIn("slow"),i.attr("title","Click to display"))})});a(window).scroll(function(){var b=a(window).scrollTop(),c=m.css("display")=="none";SHR4P.debug("ScrollTop "+b+" ScrollOffset: "+k);b>k?c&&a("#shareaholic-bar,#shareToolBar, #shareToolBarAddv").slideDown("slow",function(){a("#shareToolBarHeader").animate({height:"+=5"}, {duration:100}).animate({height:"-=5"},{duration:100});a("#shareaholic-bar").css("border-bottom-width","1px").addClass("shareToolBarShadow");i.fadeIn("slow");i.attr("title","Click to hide")}):j||(i.hide(),a("#shareaholic-bar").css("border-bottom-width","0px").removeClass("shareToolBarShadow"),a("#shareaholic-bar,#shareToolBar, #shareToolBarAddv, #showHideToolBar").slideUp("slow"))})}}}(SHR4P.TB.jQuery),SHR4P.TB.ready=!0,typeof SHR4P.TB.onready!="undefined")SHR4P.TB.onready()}; SHR4P.TB.load=function(){var a=document.createElement("link");a.rel="stylesheet";a.type="text/css";a.href=SHR4P.TB.shr_css;document.getElementsByTagName("head")[0].appendChild(a);if(typeof jQuery!="undefined"&&jQuery&&(a=jQuery().jquery,SHRSB_Globals.minJQueryVersion<=a)){window.sb_dont_noConflict=!0;SHR4P_init();return}SHR4P.debug("loading jquery");a=document.getElementsByTagName("head")[0];if(typeof a!="undefined"){var b=document.createElement("script");b.src=SHR4P.debug_enabled?"//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.js": "//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";b.type="text/javascript";a.appendChild(b);b.onreadystatechange=function(){if(this.readyState=="complete"||this.readyState=="loaded")SHR4P.debug("jQuery loaded with onreadystatechange, init'ing"),SHR4P_init()};b.onload=SHR4P_init}};SHR4P.TB.onready=function(){/(loaded|complete)/.test(document.readyState)?SHR4P.TB.readyHandler():SHR4P.TB.jQuery(document).ready(function(){SHR4P.TB.readyHandler()})}; SHR4P.TB.readyHandler=function(){SHR4P.TB.renderLikeButtons();SHR4P.TB.renderShareButtons()}; SHR4P.TB.utils={showServiceLet:function(a,b){if(typeof b!="undefined"&&b){if(typeof SHR_config=="undefined"||!SHR_config)window.SHR_config={};window.__shr_service=b;window.__shr_log="true";window.__shr_center=!0;SHR_config.shortener=a.shortener?a.shortener:"google";SHR_config.shortener_key=a.shortener_key?a.shortener_key:"";SHR_config.apikey=a.apikey?a.apikey:SHR4P.TB.shr_apiKey;SHR_config.twitter_template=a.twitter_template?a.twitter_template:"${title} - ${short_link}";SHR_config.link=a.link?a.link: document.location.href;SHR_config.title=a.title?a.title:a.link?"":document.title;SHR_config.short_link=a.short_link?a.short_link:"";if(window.SHR&&window.SHR.Servicelet)SHR.Servicelet.show();else{var c=document,e=c.createElement("script");e.setAttribute("language","javascript");e.id="shr-servicelet";e.setAttribute("src",(a.share_src?a.share_src:"http://www.shareaholic.com")+"/media/js/servicelet.min.js");c.body.appendChild(e)}}},isMobileBrowser:function(){var a=navigator.userAgent||navigator.vendor|| window.opera;return/android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))},getFbShrCnt:function(a,b){a="http://api.ak.facebook.com/restserver.php?v=1.0&method=links.getStats&format=json&urls="+encodeURIComponent(a);SHR4P.TB.jQuery.getJSON(a+"&callback=?",function(a){var e=0;if(a.length>0)e=a[0].total_count,e!=0&&e>1E3&&(e=Math.floor(e/1E3)+"K");b({count:e})})},getTwitShrCnt:function(a,b){a="http://urls.api.twitter.com/1/urls/count.json?url="+encodeURIComponent(a);SHR4P.TB.jQuery.getJSON(a+"&callback=?",function(a){a=a.count;a!=0&&a>1E3&&(a=Math.floor(a/1E3)+"K");b({count:a})})}}; SHR4P.TB.renderLikeButtons=function(){SHR4P.TB.jQuery(".shareaholic-fblike,.shareaholic-fbsend",".shareaholic-like-buttonset").length>0&&setTimeout("SHR4P.TB.fbUtil.addFBConnect()",0);SHR4P.TB.jQuery(".shareaholic-googleplusone",".shareaholic-like-buttonset").length>0&&setTimeout("SHR4P.TB.googPlusOneUtil.addGoogScript()",0);SHR4P.TB.jQuery(".shareaholic-tweetbutton",".shareaholic-like-buttonset").length>0&&setTimeout("SHR4P.TB.twitterUtil.addTwitterScript()",0)}; SHR4P.TB.googPlusOneUtil={addGoogScript:function(){if(SHR4P.TB.jQuery("#googplusonescript").length==0){var a=document.createElement("script");a.async=!0;a.src="https://apis.google.com/js/plusone.js";a.id="googplusonescript";a.text='{"parsetags": "explicit"}';document.getElementsByTagName("head")[0].appendChild(a);a.onreadystatechange=function(){(this.readyState=="complete"||this.readyState=="loaded")&&SHR4P.TB.googPlusOneUtil.renderPlusOnes()};a.onload=SHR4P.TB.googPlusOneUtil.renderPlusOnes}},renderPlusOnes:function(){SHR4P.TB.jQuery(".shareaholic-googleplusone", ".shareaholic-like-buttonset").each(function(){var a=SHR4P.TB.jQuery(this);if((a.attr("data-shr_status")||!1)!="1"){var b=a.attr("data-shr_href")||a.attr("shr_href"),c=a.attr("data-shr_title")||a.attr("shr_title"),e=a.attr("data-shr_size")||a.attr("shr_size"),d=a.attr("data-shr_count")||a.attr("shr_count"),f=a.attr("data-shr_annotation"),h=a.attr("data-shr_width"),k=a.attr("data-shr_expandto"),j=a.attr("data-shr_onstartinteraction"),g=a.attr("data-shr_onendinteraction");if(typeof d=="undefined"|| !d)d="true";if((typeof b=="undefined"||!b)&&(typeof c=="undefined"||!c))b=encodeURIComponent(document.location.href),c=document.title;else{if(typeof b=="undefined"||!b)b=encodeURIComponent(document.location.href);if(typeof c=="undefined"||!c)c=""}if(typeof e=="undefined"||!e)e="standard";if(typeof f=="undefined"||!f)f="inline",f=typeof d!=="undefined"&&d&&d!=="false"?"inline":"none";if(typeof h=="undefined"||!h)h="450px";if(typeof k=="undefined"||!k)k="";if(typeof j=="undefined"||!j)j="";if(typeof g== "undefined"||!g)g="";d="";e=="medium"&&(d="padding-top:1px !important;");a.attr("data-shr_status","1");d=SHR4P.TB.jQuery("
").get(0);a.replaceWith(d);SHR4P.TB.jQuery(d).append("
");d=SHR4P.TB.jQuery(d).find(":first-child").get(0);gapi.plusone.render(d,{size:e,annotation:f,width:h,expandto:k,onstartinteraction:j,onendinteraction:g,href:decodeURIComponent(b),callback:function(a){SHR4P.TB.googPlusOneUtil.trackPlusOneClick(a,c)}})}})}, trackPlusOneClick:function(a,b){a.state=="on"&&SHR4P.TB.jQuery("").attr({src:"http://www.shareaholic.com/api/share/?v=1&apikey="+SHR4P.TB.shr_apiKey+"&apitype=3&service=304&link="+encodeURIComponent(a.href)+(b!==""?"&title="+b:""),width:"1",height:"1"}).appendTo("body")}}; SHR4P.TB.twitterUtil={addTwitterScript:function(){SHR4P.TB.twitterUtil.renderShareaholicTweetButton()},renderShareaholicTweetButton:function(){SHR4P.TB.jQuery(".shareaholic-tweetbutton",".shareaholic-like-buttonset").each(function(){var a=SHR4P.TB.jQuery,b=a(this);if((b.attr("data-shr_status")||!1)!="1"){var c=b.attr("data-shr_href")||b.attr("shr_href"),e=b.attr("data-shr_title")||b.attr("shr_title"),d=b.attr("data-shr_size")||b.attr("shr_size"),f=b.attr("data-shr_count")||b.attr("shr_count"),h=b.attr("data-shr_lang"), k="shr-7",j="shr-generic",g=!0,l=!0;SHR4P.debug(b);if(typeof f=="undefined"||!f)f="horizontal";if((typeof c=="undefined"||!c)&&(typeof e=="undefined"||!e))c=encodeURIComponent(document.location.href),e=document.title;else{if(typeof c=="undefined"||!c)c=encodeURIComponent(document.location.href);if(typeof e=="undefined"||!e)e=""}if(typeof d=="undefined"||!d)d="standard";var m="";d=="medium"&&(m="padding-top:1px !important;");if(typeof h=="undefined"||!h)h="en";switch(f){case "horizontal":l=g=!0;break; case "vertical":g=!0;l=!1;break;case "none":l=g=!1}g&&(k+="-count",j+="-count");g&&l&&(k+="-compact",j+="-compact");if(g){var i=this;if(l)this.style.marginRight="0px",d=document.createElement("div"),i=document.createElement("div"),f=this.parentNode,f.appendChild(i),i.className="shr_compact_div",d.className="shr_compact_tick",d.appendChild(document.createElement("s")),d.appendChild(document.createElement("i")),f.insertBefore(d,i);g&&SHR4P.TB.utils.getTwitShrCnt(c,function(a){i.innerHTML=a.count})}var n= {title:e,link:c,short_link:c,shortener:SHRTB_Settings.shortener?SHRTB_Settings.shortener:"google",shortener_key:SHRTB_Settings.shortener_key?SHRTB_Settings.shortener_key:"",v:1,apitype:1,apikey:SHR4P.TB.shr_apiKey,twitter_template:SHR4P.TB.shr_twitter_template?SHR4P.TB.shr_twitter_template:"${title} - ${short_link}",service:7};[SHR4P.TB.shr_link,a.param(n)].join("?");a(this).before(a('"));b.wrap('
');b.parent().removeClass("shr-7");b.addClass(j);b.addClass(k);SHR4P.debug(b);SHR4P.TB.utils.isMobileBrowser()||b.click(function(a){SHR4P.TB.utils.showServiceLet(n,"twitter");a.preventDefault()});b.attr("data-shr_status","1")}})},trackTweetButtonClick:function(a){a.type="tweet";SHR4P.TB.jQuery("").attr({src:"http://www.shareaholic.com/api/share/?v=1&apikey="+SHR4P.TB.shr_apiKey+ "&apitype=3&service=7&link="+encodeURIComponent(a.target.baseURI)+(a.target.title!==""?"&title="+a.target.title:""),width:"1",height:"1"}).appendTo("body")}}; SHR4P.TB.fbUtil={fbConnectAdd:0,renderFBWidgetCalled:!1,likeButtonsToRender:[],hasFB:function(){return typeof window.FB=="object"&&FB.Event&&typeof FB.Event.subscribe=="function"},addLikeButton:function(a,b){if(SHR4P.TB.fbUtil.hasFBNameSpace()){var c=SHR4P.TB.jQuery('').appendTo(a);typeof window.FB!="undefined"&&FB.XFBML&&FB.XFBML.parse?FB.XFBML.parse(c.get(0)):SHR4P.TB.fbUtil.likeButtonsToRender.push(c.get(0))}else SHR4P.TB.jQuery('').appendTo(a)},renderFBWidgets:function(){if(!SHR4P.TB.fbUtil.renderFBWidgetCalled){setTimeout("SHR4P.TB.fbUtil.renderFBLikeButtons()",0);setTimeout("SHR4P.TB.fbUtil.renderFBSendButtons()",0);for(var a=0;a").get(0); a.replaceWith(c);a=SHR4P.TB.jQuery('').appendTo(c);typeof window.FB!="undefined"&&FB.XFBML&&FB.XFBML.parse&&FB.XFBML.parse(a.get(0))}})},renderFBLikeButtons:function(){SHR4P.TB.jQuery(".shareaholic-fblike",".shareaholic-like-buttonset").each(function(){var a=SHR4P.TB.jQuery(this),b=a.attr("data-shr_href");if(typeof b=="undefined"||!b)b=encodeURIComponent(document.location.href);var c=a.attr("data-shr_layout");if(typeof c=="undefined"||!c)c="button_count"; var e=a.attr("data-shr_showfaces");if(typeof e=="undefined"||!e)e="true";var d=a.attr("data-shr_send");if(typeof d=="undefined"||!d)d="false";var f=a.attr("data-shr_action");if(typeof f=="undefined"||!f||f.toLowerCase()!="recommend"&&f.toLowerCase()!="like")f="like";var h=SHR4P.TB.jQuery("
").get(0);a.replaceWith(h);if(SHR4P.TB.fbUtil.hasFBNameSpace())b=SHR4P.TB.jQuery('').appendTo(h),typeof window.FB!="undefined"&&FB.XFBML&&FB.XFBML.parse&&FB.XFBML.parse(b.get(0));else{a="30";d="60";switch(c){case "button_count":d="90";a="21";break;case "box_count":d="60";a="90";break;default:d="60",a="80"}SHR4P.TB.jQuery('').appendTo(h)}})},addFBConnect:function(){SHR4P.TB.fbUtil.addFBNameSpace();if(!SHR4P.TB.fbUtil.fbConnectAdd)SHR4P.TB.jQuery('
').appendTo("body"),window.fbAsyncInit=function(){FB.init({appId:"207766518608",status:!0,cookie:!0,xfbml:!0});SHR4P.TB.fbUtil.tryAddFBSubscription()},SHR4P.TB.fbUtil.renderFBWidgetHandlerAttached=!0,function(){var a= document.createElement("script");a.async=!0;a.src=document.location.protocol+"//connect.facebook.net/en_US/all.js";a.onload=SHR4P.TB.fbUtil.renderFBWidgets;a.onreadystatechange=function(){(this.readyState=="complete"||this.readyState=="loaded")&&SHR4P.TB.fbUtil.renderFBWidgets()};document.getElementById("fb-root").appendChild(a)}(),SHR4P.TB.fbUtil.fbConnectAdd=1},tryAddFBSubscription:function(){SHR4P.TB.fbUtil.hasFB()&&FB.XFBML&&FB.XFBML.parse?SHR4P.TB.fbUtil.addFBSubscription():setTimeout(SHR4P.TB.fbUtil.tryAddFBSubscription, 500)},addFBSubscription:function(){FB.Event.subscribe("edge.create",function(a){SHR4P.TB.jQuery("").attr({src:"http://www.shareaholic.com/api/share/?v=1&apikey="+SHR4P.TB.shr_apiKey+"&apitype=3&service=303&link="+encodeURIComponent(a),width:"1",height:"1"}).appendTo("body")});FB.Event.subscribe("message.send",function(a){SHR4P.TB.jQuery("").attr({src:"http://www.shareaholic.com/api/share/?v=1&apikey="+SHR4P.TB.shr_apiKey+"&apitype=3&service=305&link="+encodeURIComponent(a),width:"1",height:"1"}).appendTo("body")})}, addFBNameSpace:function(){var a=SHR4P.TB.jQuery(SHR4P.TB.jQuery("html").get(0));if(typeof a.attr("xmlns:fb")=="undefined"&&(!SHR4P.TB.jQuery.browser.msie||SHR4P.TB.jQuery.browser.version>="9.0"))a.attr("xmlns:fb","http://www.facebook.com/2008/fbml"),a.attr("xmlns:og","http://opengraphprotocol.org/schema/")},hasFBNameSpace:function(){return typeof SHR4P.TB.jQuery(SHR4P.TB.jQuery("html").get(0)).attr("xmlns:fb")!="undefined"}};SHR4P.TB.load();