<?xml version="1.0" encoding="UTF-8"?>
<codes type="array">
  <code>
    <code>$('a.popup').live('click', function(){
	newwindow=window.open($(this).attr('href'),'','height=200,width=150');
	if (window.focus) {newwindow.focus()}
	return false;
});</code>
    <created-at type="datetime">2009-12-16T00:12:50Z</created-at>
    <description></description>
    <id type="integer">210</id>
    <language-id type="integer">19</language-id>
    <privated type="boolean">false</privated>
    <title>clean way to open a popup window</title>
    <updated-at type="datetime">2009-12-16T00:12:50Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>$('h1') // elementos h1
$('#meuID') // elementos com id &quot;meuID&quot;
$('.minhaClasse') // elementos definidos com a classe &quot;minhaClasse&quot;
$('[width]') // elementos que possuem o atributo width definido
$('[width=500]') // elementos que possuem o atributo width definido como 500
$('img[width=300]') // imagens que possuem largura = 300
$('img[src$=png]') // imagens com final png
$('a[href^=http://localhost]') // links que comecem com http://localhost
$('a[href$=pdf]') // links com final pdf
$('a[href*=www]') // links que cont&#233;m www
$(':empty') // elementos vazio
$('div:empty') // elementos div vazios
$(':has(p)') // todos elementos que tenham um par&#225;grafo
$('div:has(a)'); // elementos div que possuem link
$(&quot;p:contains('dinei')&quot;) // par&#225;grafos que cont&#233;m a palavra &quot;dinei&quot;
$(&quot;p:eq(0)&quot;) // seleciona o primeiro elemento p</code>
    <created-at type="datetime">2009-11-25T22:45:07Z</created-at>
    <description>http://docs.jQuery.com/DOM/Traversing/Selectors</description>
    <id type="integer">207</id>
    <language-id type="integer">19</language-id>
    <privated type="boolean">false</privated>
    <title>seletores do jquery</title>
    <updated-at type="datetime">2009-11-25T22:45:07Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <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>		$(document).ready(function() {
			$('dd').toggle();
			$('dt').click(function() {$(this).next('dd').toggle('slideDown');});
		});</code>
    <created-at type="datetime">2009-08-22T15:29:33Z</created-at>
    <description></description>
    <id type="integer">195</id>
    <language-id type="integer">19</language-id>
    <privated type="boolean">false</privated>
    <title>hide/show dl list with jquery</title>
    <updated-at type="datetime">2009-08-22T15:29:33Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>/* IE6 - pseudo class :hover */ 
$(document).ready(function(){ 
	if(jQuery.browser.msie &amp;&amp; jQuery.browser.version&lt;7){ 
		$('[class*=&quot;bla&quot;]').hover( 
		function () { 
			$(this).addClass('hover'); 
		}, 
		function () { 
			$(this).removeClass('hover'); 
		} 
		); 
	} 
});</code>
    <created-at type="datetime">2009-08-10T20:42:45Z</created-at>
    <description></description>
    <id type="integer">190</id>
    <language-id type="integer">19</language-id>
    <privated type="boolean">false</privated>
    <title>hover for ie 6</title>
    <updated-at type="datetime">2009-08-10T20:42:45Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>(function ($) {
// VERTICALLY ALIGN FUNCTION
$.fn.vAlign = function() {
	return this.each(function(i){
	var ah = $(this).height();
	var ph = $(this).parent().height();
	var mh = (ph - ah) / 2;
	$(this).css('margin-top', mh);
	});
};
})(jQuery);

// $('#mydiv').vAlign();</code>
    <created-at type="datetime">2009-08-07T20:13:04Z</created-at>
    <description>http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/</description>
    <id type="integer">189</id>
    <language-id type="integer">19</language-id>
    <privated type="boolean">false</privated>
    <title>vertical align plugin for jquery</title>
    <updated-at type="datetime">2009-08-07T20:13:04Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>jQuery.fn.fadeSliderToggle = function(settings) {
 	 settings = jQuery.extend({
		speed:500,
		easing : &quot;swing&quot;
	}, settings)
	
	caller = this
 	if($(caller).css(&quot;display&quot;) == &quot;none&quot;){
 		$(caller).animate({
 			opacity: 1,
 			height: 'toggle'
 		}, settings.speed, settings.easing);
	}else{
		$(caller).animate({
 			opacity: 0,
 			height: 'toggle'
 		}, settings.speed, settings.easing);
	}
};

// use: $('#my_div').fadeSliderToggle();</code>
    <created-at type="datetime">2009-07-12T16:38:01Z</created-at>
    <description>from: http://www.position-absolute.com/articles/jquery-fade-and-slide-toggle-plugin/</description>
    <id type="integer">185</id>
    <language-id type="integer">19</language-id>
    <privated type="boolean">false</privated>
    <title>jquery fade and slide toggle plugin</title>
    <updated-at type="datetime">2009-07-12T16:38:01Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code>$(document).ready(function() { jQuery.fn.each( function(i) { console.log(i); }); });</code>
    <created-at type="datetime">2009-06-21T21:05:02Z</created-at>
    <description></description>
    <id type="integer">179</id>
    <language-id type="integer">19</language-id>
    <privated type="boolean">false</privated>
    <title>list all jquery function with firebug</title>
    <updated-at type="datetime">2009-06-21T21:05:02Z</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>
</codes>
