<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>README.mdwn</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -9,6 +9,7 @@
 	    logoutText:          'Sign Out',
 	    registerText:        'Sign Up',
 	    editProfileText:     '%u',
+            linkClass: 'button',
             mode: 'mtos',
             isPreview: false,
 	    returnToURL: null, 
@@ -35,22 +36,23 @@
 	function _insertText(obj) {
 	  var phrase = compileGreetingText();
 	  obj.empty().append( jQuery(&quot;&lt;div&gt;&quot; + phrase + &quot;&lt;/div&gt;&quot;) );
-	  obj.children().children('a.button.login').click(    function() { return settings.onSignInClick($(this)); });
-	  obj.children().children('a.button.logout').click(   function() { return settings.onSignOutClick.call($(this)); });
-	  obj.children().children('a.button.register').click( function() { return settings.onSignUpClick.call($(this)); });
+	  obj.children().children('a.login').click(    function() { return settings.onSignInClick($(this)); });
+	  obj.children().children('a.logout').click(   function() { return settings.onSignOutClick.call($(this)); });
+	  obj.children().children('a.register').click( function() { return settings.onSignUpClick.call($(this)); });
 	};
 	function _signIn() {
 	    var url = mt.links.signIn;
+            if (url.match(/\?/)) { url += '&amp;'; } else { url += '?'; }
 	    if (settings.isPreview) {
 		if ( mt.entry &amp;&amp; mt.entry.id ) {
-		    url += '&amp;entry_id=' + mt.entry.id;
+		    url += 'entry_id=' + mt.entry.id;
 		} else {
-		    url += '&amp;return_url=' + settings.returnToURL;
+		    url += 'return_url=' + settings.returnToURL;
 		}
 	    } else {
 	      var doc_url = document.URL;
 	      doc_url = doc_url.replace(/#.+/, '');
-	      url += '&amp;return_url=' + encodeURIComponent(doc_url);
+	      url += 'return_url=' + encodeURIComponent(doc_url);
 	    }
 	    $.fn.movabletype.clearUser();
 	    location.href = url;
@@ -61,7 +63,7 @@
 	    doc_url = doc_url.replace(/#.+/, '');
 	    // TODO - error check: signouturl not set?
 	    var url = mt.links.signOut;
-	    if (url.match(/\?/)) { url += '&amp;'; } else { url += '?'; }
+            if (url.match(/\?/)) { url += '&amp;'; } else { url += '?'; }
 	    if (settings.isPreview) {
 	      if ( mt.entry &amp;&amp; mt.entry.id ) {
 		url += 'entry_id=' + mt.entry.id;
@@ -79,22 +81,24 @@
 	    return false;
 	};
 	function _onSignUpClick(e) {
-	    $.fn.movabletype.clearUser();
-	    var doc_url = document.URL;
-	    doc_url = doc_url.replace(/#.+/, '');
-	    // TODO - error check: signupurl not set?
-	    var url = mt.links.signUp;
-	    if (url.match(/\?/)) { url += '&amp;'; } else { url += '?'; }
-	    if (settings.isPreview) {
-		if ( mt.entry &amp;&amp; mt.entry.id ) {
-		  url += 'entry_id=' + mt.entry.id;
+	    try {
+		$.fn.movabletype.clearUser();
+		var doc_url = document.URL;
+		doc_url = doc_url.replace(/#.+/, '');
+		// TODO - error check: signupurl not set?
+		var url = mt.links.signUp;
+                if (url.match(/\?/)) { url += '&amp;'; } else { url += '?'; }
+		if (settings.isPreview) {
+		    if ( mt.entry &amp;&amp; mt.entry.id ) {
+			url += 'entry_id=' + mt.entry.id;
+		    } else {
+			url += 'return_url=' + settings.returnToURL;
+		    }
 		} else {
-		  url += 'return_url=' + settings.returnToURL;
+		    url += 'return_url=' + encodeURIComponent(doc_url);
 		}
-	    } else {
-		url += 'return_url=' + encodeURIComponent(doc_url);
-	    }
-	    location.href = url;
+		location.href = url;
+	    } catch(x) { alert(x.message); };
 	    return false;
 	};
 	function _onSignInClick(e) {
@@ -122,27 +126,27 @@
 		    phrase = settings.noPermissionText;
 		    //'You do not have permission to comment on this blog. (&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;return mtSignOutOnClick();&quot;&gt;sign out&lt;/a&gt;)';
 		} else {
-		    if ( u.is_author ) {
-		      if (mt.links.editProfile) {
-			profile_link = '&lt;a href=&quot;'+mt.links.editProfile;
-		      } else if (settings.mode == &quot;mtpro&quot;) {
-			profile_link = '&lt;a href=&quot;'+mt.blog.community.script+'?__mode=edit&amp;blog_id=' + mt.blog.id;
-		      } else {
-			profile_link = '&lt;a href=&quot;'+mt.blog.comments.script+'?__mode=edit_profile&amp;blog_id=' + mt.blog.id;
-		      }
-		      if (mt.entry &amp;&amp; mt.entry.id)
-			profile_link += '&amp;entry_id=' + mt.entry.id;
-		      if (settings.returnToURL)
-			profile_link += '&amp;return_to=' + encodeURI(settings.returnToURL);
-		      profile_link += '&quot;&gt;' + settings.editProfileText + '&lt;/a&gt;';
+		  if ( u.is_author ) {
+		    if (mt.links.editProfile) {
+		      profile_link = '&lt;a href=&quot;'+mt.links.editProfile;
+		    } else if (settings.mode == &quot;mtpro&quot;) {
+		      profile_link = '&lt;a href=&quot;'+mt.blog.community.script+'?__mode=edit&amp;blog_id=' + mt.blog.id;
 		    } else {
-			// registered user, but not a user with posting rights
-			if (u.url)
-			    profile_link = '&lt;a href=&quot;' + u.url + '&quot;&gt;' + u.name + '&lt;/a&gt;';
-			else
-			    profile_link = u.name;
+		      profile_link = '&lt;a href=&quot;'+mt.blog.comments.script+'?__mode=edit_profile&amp;blog_id=' + mt.blog.id;
 		    }
-		    phrase = settings.loggedInMessage;
+		    if (mt.entry &amp;&amp; mt.entry.id)
+		      profile_link += '&amp;entry_id=' + mt.entry.id;
+		    if (settings.returnToURL)
+		      profile_link += '&amp;return_to=' + encodeURI(settings.returnToURL);
+		    profile_link += '&quot;&gt;' + settings.editProfileText + '&lt;/a&gt;';
+		  } else {
+		    // registered user, but not a user with posting rights
+		    if (u.url)
+		      profile_link = '&lt;a href=&quot;' + u.url + '&quot;&gt;' + u.name + '&lt;/a&gt;';
+		    else
+		      profile_link = u.name;
+		  }
+		  phrase = settings.loggedInMessage;
 		}
 	    } else {
 		// TODO - this obviously does that same thing. 
@@ -152,9 +156,9 @@
 		    phrase = settings.loggedOutMessage;
 		}
 	    }
-	    var login_link    = '&lt;a class=&quot;login button&quot; href=&quot;javascript:void(0)&quot;&gt;' + settings.loginText + '&lt;/a&gt;';
-	    var logout_link   = '&lt;a class=&quot;logout button&quot; href=&quot;javascript:void(0)&quot;&gt;' + settings.logoutText + '&lt;/a&gt;';
-	    var register_link = '&lt;a class=&quot;register button&quot; href=&quot;javascript:void(0)&quot;&gt;' + settings.registerText + '&lt;/a&gt;';
+	    var login_link    = '&lt;a class=&quot;login '+settings.linkClass+'&quot; href=&quot;javascript:void(0)&quot;&gt;' + settings.loginText + '&lt;/a&gt;';
+	    var logout_link   = '&lt;a class=&quot;logout '+settings.linkClass+'&quot; href=&quot;javascript:void(0)&quot;&gt;' + settings.logoutText + '&lt;/a&gt;';
+	    var register_link = '&lt;a class=&quot;register '+settings.linkClass+'&quot; href=&quot;javascript:void(0)&quot;&gt;' + settings.registerText + '&lt;/a&gt;';
 
 	    phrase = phrase.replace(/\%p/,profile_link);
 	    phrase = phrase.replace(/\%i/,login_link);</diff>
      <filename>jquery.mtgreeting.js</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>README.txt</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>7fc821b890f32f8da9970b70a02442385ced6794</id>
    </parent>
  </parents>
  <author>
    <name>Byrne Reese</name>
    <email>byrne@majordojo.com</email>
  </author>
  <url>http://github.com/byrnereese/jquery-mtgreet/commit/647ad46a4703eafef74a174db97e3c6684c81304</url>
  <id>647ad46a4703eafef74a174db97e3c6684c81304</id>
  <committed-date>2009-06-15T00:07:19-07:00</committed-date>
  <authored-date>2009-06-15T00:07:19-07:00</authored-date>
  <message>* Added linkClass for determining what additional class should be assigned to the links generated by MT.
* Fixed bug with IE6 and the sign up link generated
* Renamed README to use markdown file extension for better reading on github</message>
  <tree>6b741bc89f9d22d58340fe6fb1e640fe370b7726</tree>
  <committer>
    <name>Byrne Reese</name>
    <email>byrne@majordojo.com</email>
  </committer>
</commit>
