<?xml version="1.0" encoding="UTF-8"?>
<codes type="array">
  <code>
    <code>&lt;a href=&quot;#top&quot; onclick=&quot;$('html, body').animate({scrollTop:0}, 'slow'); return false;&quot;&gt;top&lt;/a&gt;</code>
    <created-at type="datetime">2009-08-22T15:57:58Z</created-at>
    <description></description>
    <id type="integer">200</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>back to top</title>
    <updated-at type="datetime">2009-08-22T15:57:58Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;html&gt;
&lt;head&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-latest.pack.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
	$(document).ready( function() {
	
		var url = &quot;http://twitter.com/status/user_timeline/RedWolves.json?count=3&amp;callback=?&quot;;
		$.getJSON(url,
        function(data){
			$.each(data, function(i, item) {
				$(&quot;img#profile&quot;).attr(&quot;src&quot;, item.user[&quot;profile_image_url&quot;]); 
				$(&quot;#tweets ul&quot;).append(&quot;&lt;li&gt;&quot; + item.text.linkify() + &quot; &lt;span class='created_at'&gt;&quot; + relative_time(item.created_at) + &quot; via &quot; + item.source + &quot;&lt;/span&gt;&lt;/li&gt;&quot;);
			});
        });
	});
	
	String.prototype.linkify = function() {
		return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&amp;\?\/.=]+/, function(m) {
    return m.link(m);
  });
 }; 
  function relative_time(time_value) {
	  var values = time_value.split(&quot; &quot;);
	  time_value = values[1] + &quot; &quot; + values[2] + &quot;, &quot; + values[5] + &quot; &quot; + values[3];
	  var parsed_date = Date.parse(time_value);
	  var relative_to = (arguments.length &gt; 1) ? arguments[1] : new Date();
	  var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
	  delta = delta + (relative_to.getTimezoneOffset() * 60);
	  
	  var r = '';
	  if (delta &lt; 60) {
	    r = 'a minute ago';
	  } else if(delta &lt; 120) {
	    r = 'couple of minutes ago';
	  } else if(delta &lt; (45*60)) {
	    r = (parseInt(delta / 60)).toString() + ' minutes ago';
	  } else if(delta &lt; (90*60)) {
	    r = 'an hour ago';
	  } else if(delta &lt; (24*60*60)) {
	    r = '' + (parseInt(delta / 3600)).toString() + ' hours ago';
	  } else if(delta &lt; (48*60*60)) {
	    r = '1 day ago';
	  } else {
	    r = (parseInt(delta / 86400)).toString() + ' days ago';
	  }
	  
	  return r;
}
function twitter_callback ()
{
	return true;
}

&lt;/script&gt;	
&lt;/head&gt;
&lt;body&gt;
	&lt;div id=&quot;tweets&quot;&gt;
		&lt;img id=&quot;profile&quot;&gt;
		&lt;ul&gt;&lt;/ul&gt;
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</code>
    <created-at type="datetime">2009-05-10T18:27:20Z</created-at>
    <description>http://ralphwhitbeck.com/content/binary/twitter-json-jquery.html</description>
    <id type="integer">176</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>jquery twitter</title>
    <updated-at type="datetime">2009-05-10T18:27:20Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;html&gt;
	&lt;head&gt;
        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot;&gt;
			var height = 0;
			var to = null;
			var theAnimation;
			var newsScroller;
			$(document)
			.ready(function(){
				newsScroller = $('#newsScroller');
				
				var curSet = newsScroller
				.prev()
					.addClass('ns')
				.end()
				.wrap('&lt;div&gt;')
				.parent()
					.addClass('ns')
				.end()
				.wrap('&lt;div&gt;')
				.children()
				.slice(0,4)
				.each(function(){
					height += $(this).outerHeight(true);
				});
				
				theAnimation = function(){
					if( !newsScroller.is(':animated') ){
						newsScroller.animate({top:-height},1000,function(){
							height = 0;
							curSet = newsScroller
							.append(curSet)
							.css('top',0)
							.children()
							.slice(0,4)
							.each(function(){
								height += $(this).outerHeight(true);
							});
						});
					}
				};
				
				to = setInterval(theAnimation,4000);
				
				newsScroller.bind('mouseenter',function(){
					clearInterval(to);
				})
				.bind('mouseleave',function(){
					theAnimation();
					to = setInterval(theAnimation,4000);
				});
			});
		&lt;/script&gt;
        &lt;style media=&quot;screen, projector&quot;&gt;
			h3#newsScrollerTitle{
				margin:0;
				padding:0;
				font:bold 14px/1.2 Georgia, &quot;Times New Roman&quot;, Times, serif;
			}
			dl#newsScroller{
				font:normal 11px/1.4 Arial, Helvetica, sans-serif;
				padding:0;
				margin:0;
			}
			dl#newsScroller dt{
				font-weight:bold;
			}
			dl#newsScroller dd{
				padding:0 0 0 11px;
				margin:0;
			}
			dl#newsScroller dd p{
				padding:0;
				margin:0 0 11px 0;
			}
			dl#newsScroller dd + dd{
				padding:0 0 0 22px;
			}
			
			h3#newsScrollerTitle.ns{
				padding:5px 11px;
				border:1px solid #B18C58;
				border-bottom:none;
				background:#beb677;
				width:278px;
			}
			div.ns{
				padding:11px;
				border:1px solid #B18C58;
				border-top:none;
				background:#E8E4B4;
				width:278px;
				height:300px;
				position:relative;
				overflow:hidden;
			}
			div.ns div{
				height:300px;
				overflow:hidden;
			}
			div.ns dl{
				position:relative;
				top:0;
			}
			div.ns dl dt,
			div.ns dl dd{
				position:relative;
			}
		&lt;/style&gt;
    &lt;/head&gt;
    
    &lt;body&gt;
    	&lt;h3 id=&quot;newsScrollerTitle&quot;&gt;Our News&lt;/h3&gt;
    	&lt;dl id=&quot;newsScroller&quot;&gt;
        	&lt;dt&gt;Web Tech November Meetup Presentation&lt;/dt&gt;
            &lt;dd&gt;
                &lt;p&gt;Last night I had the opportunity to speak at the Web Tech 
                November Meetup in Baltimore about jQuery.  I focused mainly 
                on traversing since I believe once you fully grasp some of 
                the built in jQuery traversing methods you can do just about 
                anything using jQuery and do it easily.&lt;/p&gt;
                &lt;p&gt;Preparations&lt;br/&gt;
                I spent about three weeks getting [...]&lt;/p&gt;
			&lt;/dd&gt;
            &lt;dd&gt;Tuesday, November 25th, 2008&lt;/dd&gt;
            &lt;dd&gt;Posted in Presentations, Web Development, jQuery | Edit | No Comments &#194;&#187;&lt;/dd&gt;
            
        	&lt;dt&gt;Slide in tab window using jQuery&lt;/dt&gt;
            &lt;dd&gt;
                &lt;p&gt;Say you want to wanted to put little tabs - you know, the 
                ones like what you get from a lawyer or a realestate again to
                point out important things - off the side of your page so that
                your users can click, bring that tab into view to see what 
                important information you want [...]&lt;/p&gt;
            &lt;/dd&gt;
            &lt;dd&gt;Thursday, November 20th, 2008&lt;/dd&gt;
            &lt;dd&gt;Posted in Tips, Tutorials, Web Development, jQuery | Edit | 5 Comments &#194;&#187;&lt;/dd&gt;
            
        	&lt;dt&gt;Better jQuery Code #2&lt;/dt&gt;
            &lt;dd&gt;
                &lt;p&gt;In a follow up to my Better jQuery Code #1 post I will be
                writing about some other small items that I have found to make
                my code better and more readable.&lt;/p&gt;
                &lt;p&gt;Chaining&lt;br/&gt;
                Chaining is one of the most beautiful and time save pieces of 
                code structure that jQuery brought to the game, the problem is
                is [...]   &lt;/p&gt;         
            &lt;/dd&gt;
            &lt;dd&gt;Sunday, November 16th, 2008&lt;/dd&gt;
            &lt;dd&gt;Posted in Tips, Web Development, jQuery | Edit | 2 Comments &#194;&#187;&lt;/dd&gt;
            
        	&lt;dt&gt;Better jQuery Code #1&lt;/dt&gt;
            &lt;dd&gt;
                &lt;p&gt;I've been wanting to write some jQuery tips for a while now 
                and just never know what to really say until I saw Marc 
                Grabanski's 5 Tips for Better jQuery Code.  Although I have 
                tips, I don't think I have any that are Earth shattering or ones
                that I can rank higher then the other, [...]&lt;/p&gt;            
            &lt;/dd&gt;
            &lt;dd&gt;Saturday, November 15th, 2008&lt;/dd&gt;
            &lt;dd&gt;Posted in Tips, Web Development, jQuery | Edit | 8 Comments &#194;&#187;&lt;/dd&gt;
            
        	&lt;dt&gt;Release of jQuery UI v1.5&lt;/dt&gt;
            &lt;dd&gt;
                &lt;p&gt;Well ladies and gents, it is finally here! Mark June 9th, 2008
                as the day the web got better, jQuery's long awaited release of 
                it's UI library update is here. Flushed with many bug fixes, a bunch
                of really good examples, many new features and a theme builder.&lt;/p&gt;
                When jQuery UI first came out [...]            
            &lt;/dd&gt;
            &lt;dd&gt;Monday, June 9th, 2008&lt;/dd&gt;
            &lt;dd&gt;Posted in jQuery | Edit | 2 Comments &#194;&#187;&lt;/dd&gt;
        &lt;/dl&gt;
    &lt;/body&gt;
&lt;/html&gt;</code>
    <created-at type="datetime">2009-04-20T01:06:26Z</created-at>
    <description>from http://benjaminsterling.com/blog-news-ticker/</description>
    <id type="integer">171</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>cool newsticker using jquery</title>
    <updated-at type="datetime">2009-04-20T01:06:26Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;script src=&quot;http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;http://ui.jquery.com/latest/ui/effects.core.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready( function() {		
	$(&quot;.link&quot;).mouseover(function() {
		$(this).animate({ color: &quot;#022d3f&quot; }, 1000);
	}).mouseout(function() {
		$(this).animate({ color: &quot;#ccc&quot; }, 1000);
	}) 
&lt;/script&gt;</code>
    <created-at type="datetime">2009-04-17T18:48:58Z</created-at>
    <description></description>
    <id type="integer">166</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>jquery mouseover/mouseout effect in link</title>
    <updated-at type="datetime">2009-04-17T18:48:58Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Demo&lt;/title&gt;

&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
(function ($) {
$.fn.vAlign = function() {
	return this.each(function(i){
	var h = $(this).height();
	var oh = $(this).outerHeight();
	var mt = (h + (oh - h)) / 2;	
	$(this).css(&quot;margin-top&quot;, &quot;-&quot; + mt + &quot;px&quot;);	
	$(this).css(&quot;top&quot;, &quot;50%&quot;);
	$(this).css(&quot;position&quot;, &quot;absolute&quot;);	
	});	
};
})(jQuery);

(function ($) {
$.fn.hAlign = function() {
	return this.each(function(i){
	var w = $(this).width();
	var ow = $(this).outerWidth();	
	var ml = (w + (ow - w)) / 2;	
	$(this).css(&quot;margin-left&quot;, &quot;-&quot; + ml + &quot;px&quot;);
	$(this).css(&quot;left&quot;, &quot;50%&quot;);
	$(this).css(&quot;position&quot;, &quot;absolute&quot;);
	});
};
})(jQuery);

$(document).ready(function() {
	$(&quot;#content&quot;).vAlign();
	$(&quot;#content&quot;).hAlign();
});
&lt;/script&gt;

&lt;style type=&quot;text/css&quot;&gt;
html { background: #fafafa; }

#content
{
background: #fff;
border: 10px solid #eee;
padding: 20px;
color: #666;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 25px;
text-align: justify;
}

#content { width: 400px; }
&lt;/style&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;div id=&quot;content&quot;&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu dui eget nulla condimentum gravida. Vivamus erat leo, ultricies quis, gravida a, fringilla eu, urna. Pellentesque a mauris ac nisl semper egestas. Pellentesque ut elit in pede mattis gravida. Donec ac lectus a nisi suscipit placerat. Maecenas quis ipsum. Pellentesque mattis tellus. Suspendisse sollicitudin accumsan tortor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed metus. Quisque et leo at erat rutrum lobortis. In tempus lectus eget ligula convallis tristique. 
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;</code>
    <created-at type="datetime">2009-02-25T15:21:37Z</created-at>
    <description>from: http://www.nealgrosskopf.com/tech/thread.asp?pid=37</description>
    <id type="integer">154</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>CSS Horizontal And Vertical Align JQuery Plugin</title>
    <updated-at type="datetime">2009-02-25T15:21:37Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.2.6.pack.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.twitter.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
	$(document).ready(function() {
		$(&quot;#twitter&quot;).getTwitter({
			userName: &quot;leozera&quot;,
			numTweets: 5,
			loaderText: &quot;Loading tweets...&quot;,
			slideIn: true,
			showHeading: true,
			headingText: &quot;Latest Tweets&quot;,
			showProfileLink: true
		});
	});
//--&gt;&lt;!]]&gt;
&lt;/script&gt;

&lt;div id=&quot;twitter&quot;&gt;&lt;/div&gt;

</code>
    <created-at type="datetime">2009-01-05T00:18:30Z</created-at>
    <description>from: http://www.tidbits.com.br/download/exemplos/jquery.twitter/jquery.twitter_original.zip</description>
    <id type="integer">145</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>jquery twitter plugin</title>
    <updated-at type="datetime">2009-01-05T00:18:30Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;% form_tag &quot;/login&quot;, :onsubmit =&gt; 'return validate(this)' do %&gt;
    &lt;!-- your form --&gt;
&lt;% end %&gt;

&lt;!-- or --&gt;

&lt;% form_remote_tag :url =&gt; &quot;/login&quot;, :update =&gt; 'temp', :before =&gt; 'if( !validate(this) ) return false' do %&gt;
    &lt;!-- your form --&gt;
&lt;% end %&gt;</code>
    <created-at type="datetime">2008-11-30T21:49:03Z</created-at>
    <description>create your javascript validate function and call in your form</description>
    <id type="integer">124</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>validation client-side with form_tag and form_remote_tag</title>
    <updated-at type="datetime">2008-11-30T21:49:03Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;!--[if IE 6]&gt;
IE 6 is a junkie!
&lt;![endif]--&gt;</code>
    <created-at type="datetime">2008-11-08T20:29:07Z</created-at>
    <description>used here!</description>
    <id type="integer">92</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>ie6 notice</title>
    <updated-at type="datetime">2008-11-08T20:29:07Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;div id=&quot;verticalContainer&quot;&gt;
	This text will always be vertically centered inside the browser window
&lt;/div&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
	function getWindowHeight() {
		var windowHeight = 0;
		if (typeof(window.innerHeight) == 'number') {
			windowHeight = window.innerHeight;
		}
		else {
			if (document.documentElement &amp;&amp; document.documentElement.clientHeight) {
				windowHeight = document.documentElement.clientHeight;
			}
			else {
				if (document.body &amp;&amp; document.body.clientHeight) {
					windowHeight = document.body.clientHeight;
				}
			}
		}
		return windowHeight;
	}

	function setContent() {
		if (document.getElementById) {
			var windowHeight = getWindowHeight();
			if (windowHeight &gt; 0) {
				var contentElement = document.getElementById('verticalContainer');	// Be sure to specify the correct ID
				var contentHeight = contentElement.offsetHeight;
				if (windowHeight - contentHeight &gt; 0) {
					contentElement.style.position = 'relative';
					contentElement.style.top = ((windowHeight / 2) - (contentHeight / 2)) + 'px';
				}
				else {
					contentElement.style.position = 'static';
				}
			}
		}
	}

	window.onresize = function() {
		setContent();
	}

	window.onload = function() {
		setContent();
	}
&lt;/script&gt;</code>
    <created-at type="datetime">2008-11-01T22:29:54Z</created-at>
    <description>source: http://snipplr.com/view/9321/vertically-align-within-browser-window/</description>
    <id type="integer">89</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>vertical align with javascript</title>
    <updated-at type="datetime">2008-11-01T22:29:54Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>&lt;script type=&quot;text/javascript&quot;&gt;
    function clickclear(thisfield, defaulttext) {
        if (thisfield.value == defaulttext) {
            thisfield.value = &quot;&quot;;
        }
    }
    
    function clickrecall(thisfield, defaulttext) {
        if (thisfield.value == &quot;&quot;) {
            thisfield.value = defaulttext;
        }
    }
&lt;/script&gt;

&lt;input id=&quot;search&quot; type=&quot;text&quot; name=&quot;q&quot; value=&quot;search&quot; onclick=&quot;clickclear(this, 'search')&quot; onblur=&quot;clickrecall(this,'search')&quot;/&gt;</code>
    <created-at type="datetime">2008-11-01T22:19:15Z</created-at>
    <description>this's used here!</description>
    <id type="integer">88</id>
    <language-id type="integer">16</language-id>
    <privated type="boolean">false</privated>
    <title>search box onclick clear/unclear</title>
    <updated-at type="datetime">2008-11-01T22:19:15Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
</codes>
