/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();/*
 * In-Field Label jQuery Plugin
 * http://fuelyourcoding.com/scripts/infield.html
 *
 * Copyright (c) 2009 Doug Neiner
 * Dual licensed under the MIT and GPL licenses.
 * Uses the same license as jQuery, see:
 * http://docs.jquery.com/License
 *
 * @version 0.1
 */
(function($){$.InFieldLabels=function(b,c,d){var f=this;f.$label=$(b);f.label=b;f.$field=$(c);f.field=c;f.$label.data("InFieldLabels",f);f.showing=true;f.init=function(){f.options=$.extend({},$.InFieldLabels.defaultOptions,d);if(f.$field.val()!=""){f.$label.hide();f.showing=false};f.$field.focus(function(){f.fadeOnFocus()}).blur(function(){f.checkForEmpty(true)}).bind('keydown.infieldlabel',function(e){f.hideOnChange(e)}).change(function(e){f.checkForEmpty()}).bind('onPropertyChange',function(){f.checkForEmpty()})};f.fadeOnFocus=function(){if(f.showing){f.setOpacity(f.options.fadeOpacity)}};f.setOpacity=function(a){f.$label.stop().animate({opacity:a},f.options.fadeDuration);f.showing=(a>0.0)};f.checkForEmpty=function(a){if(f.$field.val()==""){f.prepForShow();f.setOpacity(a?1.0:f.options.fadeOpacity)}else{f.setOpacity(0.0)}};f.prepForShow=function(e){if(!f.showing){f.$label.css({opacity:0.0}).show();f.$field.bind('keydown.infieldlabel',function(e){f.hideOnChange(e)})}};f.hideOnChange=function(e){if((e.keyCode==16)||(e.keyCode==9))return;if(f.showing){f.$label.hide();f.showing=false};f.$field.unbind('keydown.infieldlabel')};f.init()};$.InFieldLabels.defaultOptions={fadeOpacity:0.5,fadeDuration:300};$.fn.inFieldLabels=function(c){return this.each(function(){var a=$(this).attr('for');if(!a)return;var b=$("input#"+a+"[type='text'],"+"input#"+a+"[type='password'],"+"textarea#"+a);if(b.length==0)return;(new $.InFieldLabels(this,b[0],c))})}})(jQuery);(function($){
	$.fn.recentTwitterByHash = function(hash, callback) {
				
		if(!this.length) return this;
		
		var $base = $(this[0]);
		var url = "http://search.twitter.com/search.json?callback=?";
		
		// Request Twitter API
		$.getJSON( url, { count: 10, q: "#" + hash }, 
			function(data){
				$base.empty();
				if(data && data.results && data.results.length >= 1){
					try {
						for(var i = 0; i < data.results.length; i++){
							var item = data.results[i];


												
							var $tweet = $("<p></p>").text(item.text);
							$tweet.html(
								$tweet.html()
									.replace(/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi,'<a href="$1">$1</a>')
									.replace(/(^|\s)#(\w+)/g,'$1<a href="http://search.twitter.com/search?q=%23$2">#$2</a>')
									.replace(/(^|\s)@(\w+)/g,'$1<a href="http://twitter.com/$2">@$2</a>')
								);
							
							var $credit = $("<p class='credit'><span>by </span></p>");
							$credit.append($("<a></a>").attr({
								'class':'tweeter',
								href: 'http://twitter.com/' + item.from_user + '/',
								target: '_blank'}).text(item.from_user).append($('<img>').attr({
									src: item.profile_image_url,
									width: "16",
									height: "16"
								})));
								
							$credit.prepend($("<a></a>").attr({
								'class': 'time',
								href: 'http://twitter.com/' + item.from_user + '/status/' + item.id + '/',
								target: '_blank'}).text(DateHelper.time_ago_in_words_with_parsing(item.created_at) + ' '));
								
							
							var $li = $("<li class='tweet'></li>").append($tweet).append($credit);
							$base.append($li);
						}
						$base.height('auto');
					
					} catch (e) {
						// Just in case
					};
					
					if(typeof(callback) == "function") callback();
				};
			});
			
		return this; // Don't break the chain
	};
	
	// Adapted from code provided by 37Signals on their Signal vs. Noise blog.
// Added support for Twitter date parsing.

// Call DateHelper.time_ago_in_words_with_parsing(twitter_date_as_string) to use.

DateHelper = window.DateHelper = {
  date_parse_from_twitter: function(str){
  	var date = new Date(str);
  	return date;
  },

  time_ago_in_words_with_parsing: function(from) {
	
    var date = this.date_parse_from_twitter(from); 
	if(!date) return "";
    return this.time_ago_in_words(date);
  },
  
  time_ago_in_words: function(from) {
    return this.distance_of_time_in_words(new Date, from);
  },

  distance_of_time_in_words: function(to, from) {

    var distance_in_seconds = ((to - from) / 1000);
    var distance_in_minutes = Math.floor(distance_in_seconds / 60.0);

    if (distance_in_minutes == 0) { return 'less than a minute ago'; };
    if (distance_in_minutes == 1) { return 'a minute ago'; };
    if (distance_in_minutes < 45) { return distance_in_minutes + ' minutes ago'; };
    if (distance_in_minutes < 90) { return 'about 1 hour ago'; };
    if (distance_in_minutes < 1440) { return 'about ' + Math.floor(distance_in_minutes / 60) + ' hours ago'; };
    if (distance_in_minutes < 2880) { return '1 day ago'; };
    if (distance_in_minutes < 43200) { return Math.floor(distance_in_minutes / 1440) + ' days ago'; };
    if (distance_in_minutes < 86400) { return 'about 1 month ago'; };
    if (distance_in_minutes < 525960) { return Math.floor(distance_in_minutes / 43200) + ' months ago'; };
    if (distance_in_minutes < 1051199) { return 'about 1 year ago'; };
    return 'over ' + Math.floor(distance_in_minutes / 525960) + ' years ago';
  }
};

})(jQuery);(function($) {
    $.Jookie = {
        Data: {},
        Debug: function(a) {
            Debug(a)
        },
        Delete: function(a) {
            Delete(a)
        },
        Get: function(a, b) {
            return Get(a, b)
        },
        Initialise: function(a, b) {
            Initialise(a, b)
        },
        Set: function(a, b, c) {
            Set(a, b, c)
        },
        Unset: function(a, b) {
            Unset(a, b)
        }
    };
    function Debug(sName) {
        var lsRegExp = /\+/g;
        var sJSON = unescape(String(Extract(sName)).replace(lsRegExp, " "));
        alert("Name: " + sName + "\nLifespan: " + $.Jookie.Data[sName].iLifespan + " minutes\nCookie Existed Prior to Init: " + $.Jookie.Data[sName].bMadeEarlier + "\n\n" + sJSON)
    };
    function Delete(sName) {
        delete $.Jookie.Data[sName];
        document.cookie = (sName + "=; expires=" + (new Date(1990, 6, 3)).toGMTString() + "; path=/")
    };
    function Extract(sName) {
        var vValue = null;
        var aContents = document.cookie.split(';');
        sName += "=";
        for (var iIndex in aContents) {
            var sString = aContents[iIndex];
            while (sString.charAt(0) == " ") {
                sString = sString.substring(1, sString.length)
            };
            if (sString.indexOf(sName) == 0) {
                vValue = sString.substring(sName.length, sString.length);
                break
            }
        };
        return vValue
    };
    function Get(sName, sVariableName) {
        return $.Jookie.Data[sName].oValues[sVariableName]
    };
    function Initialise(sName, iLifespanInMinutes) {
        if (typeof $.Jookie.Data[sName] == "undefined") {
            var oRetrievedValues = {};
            var bCookieExists = false;
            var vCookieValue = Extract(sName);
            if (vCookieValue !== null) {
                oRetrievedValues = JSON.parse(unescape(String(vCookieValue).replace(/\+/g, " ")));
                bCookieExists = true
            };
            $.Jookie.Data[sName] = {
                iLifespan: iLifespanInMinutes,
                bMadeEarlier: bCookieExists,
                oValues: oRetrievedValues
            };
            Save(sName)
        }
    };
    function Save(sName) {
        var sExpires = "";
        if ($.Jookie.Data[sName].iLifespan > 0) {
            var dtDate = new Date();
            dtDate.setMinutes(dtDate.getMinutes() + $.Jookie.Data[sName].iLifespan);
            sExpires = ("; expires=" + dtDate.toGMTString())
        };
        document.cookie = (sName + "=" + escape(JSON.stringify($.Jookie.Data[sName].oValues)) + sExpires + "; path=/; domain=.loveyourhelpdesk.com")
    };
    function Set(sName, sVariableName, vValue) {
        $.Jookie.Data[sName].oValues[sVariableName] = vValue;
        Save(sName)
    };
    function Unset(sName, sVariableName) {
        delete $.Jookie.Data[sName].oValues[sVariableName];
        Save(sName)
    }
})(jQuery);
if (!this.JSON) {
    JSON = function() {
        function f(n) {
            return n < 10 ? '0' + n: n
        };
        Date.prototype.toJSON = function(key) {
            return this.getUTCFullYear() + '-' + f(this.getUTCMonth() + 1) + '-' + f(this.getUTCDate()) + 'T' + f(this.getUTCHours()) + ':' + f(this.getUTCMinutes()) + ':' + f(this.getUTCSeconds()) + 'Z'
        };
        var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        escapeable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        gap,
        indent,
        meta = {
            '\b': '\\b',
            '\t': '\\t',
            '\n': '\\n',
            '\f': '\\f',
            '\r': '\\r',
            '"': '\\"',
            '\\': '\\\\'
        },
        rep;
        function quote(string) {
            escapeable.lastIndex = 0;
            return escapeable.test(string) ? '"' + string.replace(escapeable,
            function(a) {
                var c = meta[a];
                if (typeof c === 'string') {
                    return c
                }
                return '\\u' + ('0000' + ( + (a.charCodeAt(0))).toString(16)).slice( - 4)
            }) + '"': '"' + string + '"'
        };
        function str(key, holder) {
            var i,
            k,
            v,
            length,
            mind = gap,
            partial,
            value = holder[key];
            if (value && typeof value === 'object' && typeof value.toJSON === 'function') {
                value = value.toJSON(key)
            };
            if (typeof rep === 'function') {
                value = rep.call(holder, key, value)
            };
            switch (typeof value) {
            case 'string':
                return quote(value);
            case 'number':
                return isFinite(value) ? String(value) : 'null';
            case 'boolean':
            case 'null':
                return String(value);
            case 'object':
                if (!value) {
                    return 'null'
                }
                gap += indent;
                partial = [];
                if (typeof value.length === 'number' && !(value.propertyIsEnumerable('length'))) {
                    length = value.length;
                    for (i = 0; i < length; i += 1) {
                        partial[i] = str(i, value) || 'null'
                    };
                    v = partial.length === 0 ? '[]': gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']': '[' + partial.join(',') + ']';
                    gap = mind;
                    return v
                };
                if (rep && typeof rep === 'object') {
                    length = rep.length;
                    for (i = 0; i < length; i += 1) {
                        k = rep[i];
                        if (typeof k === 'string') {
                            v = str(k, value, rep);
                            if (v) {
                                partial.push(quote(k) + (gap ? ': ': ':') + v)
                            }
                        }
                    }
                } else {
                    for (k in value) {
                        if (Object.hasOwnProperty.call(value, k)) {
                            v = str(k, value, rep);
                            if (v) {
                                partial.push(quote(k) + (gap ? ': ': ':') + v)
                            }
                        }
                    }
                };
                v = partial.length === 0 ? '{}': gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}': '{' + partial.join(',') + '}';
                gap = mind;
                return v
            }
        };
        return {
            stringify: function(value, replacer, space) {
                var i;
                gap = '';
                indent = '';
                if (typeof space === 'number') {
                    for (i = 0; i < space; i += 1) {
                        indent += ' '
                    }
                } else if (typeof space === 'string') {
                    indent = space
                };
                rep = replacer;
                if (replacer && typeof replacer !== 'function' && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {
                    throw new Error('JSON.stringify')
                };
                return str('', {
                    '': value
                })
            },
            parse: function(text, reviver) {
                var j;
                function walk(holder, key) {
                    var k,
                    v,
                    value = holder[key];
                    if (value && typeof value === 'object') {
                        for (k in value) {
                            if (Object.hasOwnProperty.call(value, k)) {
                                v = walk(value, k);
                                if (v !== undefined) {
                                    value[k] = v
                                } else {
                                    delete value[k]
                                }
                            }
                        }
                    };
                    return reviver.call(holder, key, value)
                };
                cx.lastIndex = 0;
                if (cx.test(text)) {
                    text = text.replace(cx,
                    function(a) {
                        return '\\u' + ('0000' + ( + (a.charCodeAt(0))).toString(16)).slice( - 4)
                    })
                };
                if (/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
                    j = eval('(' + text + ')');
                    return typeof reviver === 'function' ? walk({
                        '': j
                    },
                    '') : j
                };
                throw new SyntaxError('JSON.parse')
            }
        }
    } ()
};/*
    anythingSlider v1.2
    
    By Chris Coyier: http://css-tricks.com
    with major improvements by Doug Neiner: http://pixelgraphics.us/
    based on work by Remy Sharp: http://jqueryfordesigners.com/


	To use the navigationFormatter function, you must have a function that
	accepts two paramaters, and returns a string of HTML text.
	
	index = integer index (1 based);
	panel = jQuery wrapped LI item this tab references
	@return = Must return a string of HTML/Text
	
	navigationFormatter: function(index, panel){
		return index + " Panel"; // This would have each tab with the text 'X Panel' where X = index
	}
*/

(function($){
	
    $.anythingSlider = function(el, options){
        // To avoid scope issues, use 'base' instead of 'this'
        // to reference this class from internal events and functions.
        var base = this;
        
        // Access to jQuery and DOM versions of element
        base.$el = $(el);
        base.el = el; 

		// Set up a few defaults
        base.currentPage = 1;
		base.timer = null;
		base.playing = false;

        // Add a reverse reference to the DOM object
        base.$el.data("AnythingSlider", base);
        
        base.init = function(){
            base.options = $.extend({},$.anythingSlider.defaults, options);
			
			// Cache existing DOM elements for later 
			base.$wrapper = base.$el.find('> div').css('overflow', 'hidden');
            base.$slider  = base.$wrapper.find('> ul');
            base.$items   = base.$slider.find('> li');
            base.$single  = base.$items.filter(':first');

			if(base.$items.length < 2) return;

			// Build the navigation if needed
			if(base.options.buildNavigation) base.buildNavigation();
        
        	// Get the details
            base.singleWidth = base.$single.outerWidth();
            base.pages = base.$items.length;

            // Top and tail the list with 'visible' number of items, top has the last section, and tail has the first
			// This supports the "infinite" scrolling
			base.$items.filter(':first').before(base.$items.filter(':last').clone().addClass('cloned'));
            base.$items.filter(':last' ).after(base.$items.filter(':first').clone().addClass('cloned'));

			// We just added two items, time to re-cache the list
            base.$items = base.$slider.find('> li'); // reselect
            
			// Setup our forward/backward navigation
			base.buildNextBackButtons();
		
			// If autoPlay functionality is included, then initialize the settings
			if(base.options.autoPlay) {
				base.playing = !base.options.startStopped; // Sets the playing variable to false if startStopped is true
				base.buildAutoPlay();
			};
			
			// If pauseOnHover then add hover effects
			if(base.options.pauseOnHover) {
				base.$el.hover(function(){
					base.clearTimer();
				}, function(){
					base.startStop(base.playing);
				});
			}
			
			// If a hash can not be used to trigger the plugin, then go to page 1
			if((base.options.hashTags == true && !base.gotoHash()) || base.options.hashTags == false){
				base.setCurrentPage(1);
			};
        };

		base.gotoPage = function(page, autoplay){
			// When autoplay isn't passed, we stop the timer
			if(autoplay !== true) autoplay = false;
			if(!autoplay) base.startStop(false);
			
			if(typeof(page) == "undefined" || page == null) {
				page = 1;
				base.setCurrentPage(1);
			};
			
			// Just check for bounds
			if(page > base.pages + 1) page = base.pages;
			if(page < 0 ) page = 1;

			var dir = page < base.currentPage ? -1 : 1,
                n = Math.abs(base.currentPage - page),
                left = base.singleWidth * dir * n;
			
			base.$wrapper.filter(':not(:animated)').animate({
                scrollLeft : '+=' + left
            }, base.options.animationTime, base.options.easing, function () {
                if (page == 0) {
                    base.$wrapper.scrollLeft(base.singleWidth * base.pages);
					page = base.pages;
                } else if (page > base.pages) {
                    base.$wrapper.scrollLeft(base.singleWidth);
                    // reset back to start position
                    page = 1;
                };
				base.setCurrentPage(page);
				
            });
		};
		
		base.setCurrentPage = function(page, move){
			// Set visual
			if(base.options.buildNavigation){
				base.$nav.find('.cur').removeClass('cur');
				$(base.$navLinks[page - 1]).addClass('cur');	
			};
			
			// Only change left if move does not equal false
			if(move !== false) base.$wrapper.scrollLeft(base.singleWidth * page);

			// Update local variable
			base.currentPage = page;
		};
		
		base.goForward = function(autoplay){
			if(autoplay !== true) autoplay = false;
			base.gotoPage(base.currentPage + 1, autoplay);
		};
		
		base.goBack = function(autoplay){
			if(autoplay !== true) autoplay = false;
			base.gotoPage(base.currentPage - 1, autoplay);
		};
		
		// This method tries to find a hash that matches panel-X
		// If found, it tries to find a matching item
		// If that is found as well, then that item starts visible
		base.gotoHash = function(){
			if(/^#?panel-\d+$/.test(window.location.hash)){
				var index = parseInt(window.location.hash.substr(7));
				var $item = base.$items.filter(':eq(' + index + ')');
				if($item.length != 0){
					base.setCurrentPage(index);
					return true;
				};
			};
			return false; // A item wasn't found;
		};
        
		// Creates the numbered navigation links
		base.buildNavigation = function(){
			base.$nav = $("<div id='thumbNav'></div>").appendTo(base.$el);
			base.$items.each(function(i,el){
				var index = i + 1;
				var $a = $("<a href='#'></a>");
				
				// If a formatter function is present, use it
				if( typeof(base.options.navigationFormatter) == "function"){
					$a.html(base.options.navigationFormatter(index, $(this)));
				} else {
					$a.text(index);
				}
				$a.click(function(e){
                    base.gotoPage(index);
                    
                    if (base.options.hashTags)
						base.setHash('panel-' + index);
						
                    e.preventDefault();
				});
				base.$nav.append($a);
			});
			base.$navLinks = base.$nav.find('> a');
		};
		
		
		// Creates the Forward/Backward buttons
		base.buildNextBackButtons = function(){
			var $forward = $('<a class="arrow forward">&gt;</a>'),
				$back    = $('<a class="arrow back">&lt;</a>');
				
            // Bind to the forward and back buttons
            $back.click(function(e){
                base.goBack(true);
				e.preventDefault();
            });

            $forward.click(function(e){
                base.goForward(true);
				e.preventDefault();
            });

			// Append elements to page
			base.$wrapper.after($back).after($forward);
		};
		
		// Creates the Start/Stop button
		base.buildAutoPlay = function(){

			base.$startStop = $("<a href='#' id='start-stop'></a>").html(base.playing ? base.options.stopText :  base.options.startText);
			base.$el.append(base.$startStop);            
            base.$startStop.click(function(e){
				base.startStop(!base.playing);
				e.preventDefault();
            });

			// Use the same setting, but trigger the start;
			base.startStop(base.playing);
		};
		
		// Handles stopping and playing the slideshow
		// Pass startStop(false) to stop and startStop(true) to play
		base.startStop = function(playing){
			if(playing !== true) playing = false; // Default if not supplied is false
			
			// Update variable
			base.playing = playing;
			
			// Toggle playing and text
			if(base.options.autoPlay) base.$startStop.toggleClass("playing", playing).html( playing ? base.options.stopText : base.options.startText );
			
			if(playing){
				base.clearTimer(); // Just in case this was triggered twice in a row
				base.timer = window.setInterval(function(){
					base.goForward(true);
				}, base.options.delay);
			} else {
				base.clearTimer();
			};
		};
		
		base.clearTimer = function(){
			// Clear the timer only if it is set
			if(base.timer) window.clearInterval(base.timer);
		};
		
		// Taken from AJAXY jquery.history Plugin
		base.setHash = function ( hash ) {
			// Write hash
			if ( typeof window.location.hash !== 'undefined' ) {
				if ( window.location.hash !== hash ) {
					window.location.hash = hash;
				};
			} else if ( location.hash !== hash ) {
				location.hash = hash;
			};
			
			// Done
			return hash;
		};
		// <-- End AJAXY code


		// Trigger the initialization
        base.init();
    };

	
    $.anythingSlider.defaults = {
        easing: "swing",                // Anything other than "linear" or "swing" requires the easing plugin
        autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not
        startStopped: false,            // If autoPlay is on, this can force it to start stopped
        delay: 3000,                    // How long between slide transitions in AutoPlay mode
        animationTime: 600,             // How long the slide transition takes
        hashTags: true,                 // Should links change the hashtag in the URL?
        buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		startText: "Start",             // Start text
		stopText: "Stop",               // Stop text
		navigationFormatter: null,       // Details at the top of the file on this use (advanced use)
		stopOnNextBack: true
    };
	

    $.fn.anythingSlider = function(options){
		if(typeof(options) == "object"){
		    return this.each(function(i){			
				(new $.anythingSlider(this, options));

	            // This plugin supports multiple instances, but only one can support hash-tag support
				// This disables hash-tags on all items but the first one
				options.hashTags = false;
	        });	
		} else if (typeof(options) == "number") {

			return this.each(function(i){
				var anySlide = $(this).data('AnythingSlider');
				if(anySlide){
					anySlide.gotoPage(options);
				}
			});
		}
    };

	
})(jQuery);jQuery(function($) {
    var $radios = $("input[type=radio]").each(function() {
        var $radio = $(this).hide(),
        $label = $("label[for=" + this.id + "]"),
        $style = $("<span class='radio'></span>").insertAfter($radio);
        var update = function(e) {
            $radios.removeAttr('checked');
            $('.radio-checked').removeClass('radio-checked');
            $radio.attr('checked', 'checked');
            $style.addClass("radio-checked");
            return false
        };
        $style.click(update);
        $radio.change(update).click(update);
        $label.click(update)
    });
    $radios.filter(':checked').click();
    var $vote = $("#vote").click(function(e) {
        if ($radios.filter(':checked').length) {}
        e.preventDefault()
    })
});;(function($) {
    $(document).ready(function() {
        var $scope = $("#poll"),
        $results = $scope.find("#poll-results"),
        $result_rows = $results.find("ul li:lt(6)"),
        $total_votes = $results.find("ul li:eq(6) em"),
        $result_actions = $results.find("div.actions"),
        $thank_you = $scope.find("#thank-you-vote"),
        $poll_form = $scope.find("#poll-form"),
        $poll = $scope.find("#poll-animator"),
        max_width = 100;
        $scope.find("#vote").click(function(e) {
            e.preventDefault();
            var vote = $scope.find("input[type=radio]:checked").val() || 0;
            if (vote < 1 || vote > 6) return;
            $.post('/poll/vote.php', {
                poll_id: 3,
                poll: vote
            },
            function(data) {
                var success = handle_response(data);
                if (success === true) {
                    $result_actions.hide();
                    $thank_you.show();
                    $.Jookie.Data['lyhd'] = undefined;
                    $.Jookie.Initialise('lyhd', 60 * 24 * 90);
                    draw_poll_results(data.results);
                    show_results()
                } else if (success == "taken") {
                    $result_actions.hide();
                    show_results()
                }
            },
            "json")
        });
        var handle_response = function(data) {
            switch (data.status) {
            case "invalid_poll_id":
                alert('Sorry, that poll doesn\'t exist!');
                break;
            case "taken":
                alert('Sorry, you can only vote once per poll!');
                break;
            case "db":
                alert('Sorry, an error occurred that kept your vote from counting. Please try again in a few minutes');
                break;
            case "out_of_range":
                alert('Are you trying to break the system?');
                break;
            case "invalid":
                alert('Woah, something was missing from that request!');
                break;
            case "success":
                return true
            };
            return data.status
        };
        var draw_poll_results = function(results) {
            var total = results['total'],
            votes = results['votes'],
            max = 0;
            for (var i = 1; i <= 6; i++) {
                if (results[i + ""] > max) max = results[i + ""]
            };
            max = Math.round((max / total) * 100);
            $result_rows.each(function(i, el) {
                var $this = $(this),
                $bar = $this.find('strong'),
                $count = $bar.find('> em');
                var value = results[(i + 1) + ""],
                percent = Math.round((value / total) * 100),
                w_percent = Math.round((percent / max) * 100);
                $bar.css('width', (w_percent == 0 ? '1px': w_percent + '%'));
                $count.text(percent + '%')
            });
            $total_votes.text(votes)
        };
        var show_results = function() {
            animate_poll_switch($results, $poll_form)
        };
        var show_poll = function() {
            animate_poll_switch($poll_form, $results)
        };
        var animate_poll_switch = function($to, $from) {
            var height = $poll.height();
            $poll.height(height);
            if ($to.is(':visible')) return;
            $to.css({
                display: 'block',
                opacity: 0.0
            });
            var new_height = $to.outerHeight();
            $to.css({
                display: 'none',
                opacity: 1.0
            });
            $from.fadeOut(300,
            function() {
                $to.fadeIn(300);
                $poll.animate({
                    height: new_height
                },
                300)
            })
        };
        $("#view-results").click(function(e) {
            e.preventDefault();
            show_results()
        });
        $("#vote-now").click(function(e) {
            e.preventDefault();
            show_poll()
        });
        $.Jookie.Initialise('lyhd', 60 * 24 * 90);
        var cookie = $.Jookie.Get('lyhd', 'polls_taken') || [];
        if (cookie.length) {
            if ($.inArray(3, cookie) != -1) {
                $result_actions.hide();
                show_results()
            }
        } else {
            $.Jookie.Set('lyhd', 'polls_taken', []);
            $.Jookie.Set('lyhd', 'poll_votes', {})
        }
    })
})(jQuery);;(function($) {
    $(document).ready(function() {
        $("#tweets").recentTwitterByHash('LoveYourHelpDesk',
        function() {
            enable_slider()
        });
        var enable_slider = function() {
            $('.anythingSlider').anythingSlider({
                easing: "swing",
                autoPlay: true,
                startStopped: false,
                delay: 5000,
                animationTime: 800,
                hashTags: false,
                buildNavigation: false,
                pauseOnHover: true,
                startText: "Start",
                stopText: "Stop",
                navigationFormatter: null
            })
        }
    })
})(jQuery); ;(function($) {
    $(document).ready(function() {
        var loaded_once = false,
        $ob = $("#overlay, #banner-dialog");
        $("#banners a").click(function(e) {
            e.preventDefault();
            if (window.IS_IE_6) {
                $("html, body").scrollTop(0)
            }
            $("embed, object").hide();
            $ob.show();
            if (!loaded_once) {
                $("#banner-replacement").load('/banners/banners.html div.wrapper',
                function() {
                    $(this).removeClass('loading');
                    loaded_once = true
                })
            }
        });
        $("#banner-dialog .close-div a").click(function(e) {
            $ob.hide();
            $("embed, object").show();
            e.preventDefault()
        });
        var $form = $("#dialog form");
        $("#dialog label").inFieldLabels();
        var $od = $("#overlay, #dialog");
        $("#join a").click(function(e) {
            if (window.IS_IE_6) {
                $("html, body").scrollTop(0)
            }
            $("embed, object").hide();
            $od.show();
            $("#name").focus();
            e.preventDefault()
        });
        $form.submit(function(e) {
            e.preventDefault();
            $("#send").click()
        });
        $("#send").click(function(e) {
            e.preventDefault();
            var $name = $form.find("#name"),
            $email = $form.find("#email"),
            $address1 = $form.find("#address1"),
            $address2 = $form.find("#address2"),
            $city = $form.find("#city"),
            $state = $form.find("#state"),
            $zip = $form.find("#zip");
            var error = false;
            $.each([$name, $email, $address1, $city, $state, $zip],
            function() {
                if (this.val() == "") {
                    alert("All fields except 'Address 2' are required");
                    this.focus();
                    error = true;
                    return false
                }
            });
            if (error) return;
            if (! (/^\d{5}(\-\d{4})?$/.test($zip.val()))) {
                alert("You must enter a valid zip code");
                $zip.focus();
                return
            }
            if (! (/^.+@.+\..+$/.test($email.val()))) {
                alert("You must enter a valid email address");
                $email.focus();
                return
            }
            $.post('/form/form.php', {
                name: $name.val(),
                email: $email.val(),
                address1: $address1.val(),
                address2: $address2.val(),
                city: $city.val(),
                state: $state.val(),
                zip: $zip.val()
            },
            function(data) {
                if (data && data.status && data.status == "success") {
                    alert('Thanks for joining the revolution! You will receive an email confirmation of your request.');
                    $name.val('').blur();
                    $email.val('').blur();
                    $address1.val('').blur();
                    $address2.val('').blur();
                    $city.val('').blur();
                    $state.val('').blur();
                    $zip.val('').blur();
                    $("embed, object").show();
                    $od.hide()
                } else {
                    if (data && data.status) {
                        if (data.status == "missing_fields") {
                            alert("All fields except 'Address 2' are required")
                        } else {
                            alert("An error has occured. Sorry for any inconvenience. Please try again in a few mintues.")
                        }
                    } else {
                        alert('Something went wrong with your submission. Please try again in a few minutes.')
                    }
                }
            },
            'json')
        });
        $("#dialog-cancel").click(function(e) {
            $("embed, object").show();
            $od.hide();
            e.preventDefault()
        })
    })
})(jQuery);