<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bavotasan.com &#187; Javascript</title>
	<atom:link href="http://bavotasan.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://bavotasan.com</link>
	<description>by c.bavota</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:42:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Enqueueing a Script After wp_head()</title>
		<link>http://bavotasan.com/2011/enqueueing-a-script-after-wp_head/</link>
		<comments>http://bavotasan.com/2011/enqueueing-a-script-after-wp_head/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 15:47:35 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[$wp_scripts]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp_enqueue_script()]]></category>
		<category><![CDATA[wp_head()]]></category>
		<category><![CDATA[wp_register_script()]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=3306</guid>
		<description><![CDATA[I was working on a feature for Arturo to add (or enqueue) a script only if a certain function was used on a page. The problem was, that you can&#8217;t use wp_enqueue_script() after wp_head() since you can&#8217;t hook into an action that has already completed. It took some digging around to figure this one out [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://bavotasan.com/wp-content/uploads/2011/03/js_bg.jpg" alt="" title="js_bg" width="550" height="200" class="aligncenter size-full wp-image-3314" />I was working on a feature for <a href="http://themes.bavotasan.com/our-themes/premium-themes/arturo/">Arturo</a> to add (or enqueue) a script only if a certain function was used on a page. The problem was, that you can&#8217;t use <code>wp_enqueue_script()</code> after <code>wp_head()</code> since you can&#8217;t hook into an action that has already completed. It took some digging around to figure this one out so I thought it would be best to share it.</p>
<h3>The power of $wp_scripts</h3>
<p>There really isn&#8217;t that much power to <code>$wp_scripts</code> but I thought that would make for a good section title. <code>$wp_scripts</code> is a global variable that contains all the script information that will be added to your page. Of course, you can&#8217;t add a script to your header after the header has already run, so this will only work when you need to add a script to your footer. There is a lot going on with <code>$wp_scripts</code> but for our purposes, we only want to hook into the part that contains the info for the scripts that will appear in the footer.</p>
<p>First things first, let register our script in the functions.php file:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> our_script_init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$template_url</span> <span style="color: #339933;">=</span> get_template_directory_uri<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   wp_register_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'our_script_js'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$template_url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/js/our_script.js'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'jquery'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>		
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'our_script_init'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p>For more info on <code>wp_register_script()</code> check out the <a href="http://codex.wordpress.org/Function_Reference/wp_register_script">CODEX</a>.</p>
<p>Now that our script is registered, we can create a function that will hook into <code>$wp_scripts</code> and add our script only if the function is being used.</p>
<p>Here is our simple function:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> simple_function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_scripts</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$wp_scripts</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">in_footer</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'our_script_js'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></td></tr></table></div>

<p>Of course, you can add a lot more to the function, but for the sake of just using it to add the script, It is really that simple. Now, when you use <code>simple_function()</code> on a page, the script that we registered will be added to the footer script queue. </p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2011/enqueueing-a-script-after-wp_head/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a Copyright Notice to Copied Text</title>
		<link>http://bavotasan.com/2010/add-a-copyright-notice-to-copied-text/</link>
		<comments>http://bavotasan.com/2010/add-a-copyright-notice-to-copied-text/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 19:17:47 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[clipboard]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[getSelection]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[paste]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=2943</guid>
		<description><![CDATA[I was checking out the CBC website and I noticed that if you copy and paste any text from the site a reference link appears at the bottom, indicating the source. I thought that was kind of neat and tried to figure out how to do it. Turns out, they use a service called Tynt. [...]]]></description>
			<content:encoded><![CDATA[<p>I was checking out the <a href="http://cbc.ca/">CBC</a> website and I noticed that if you copy and paste any text from the site a reference link appears at the bottom, indicating the source. I thought that was kind of neat and tried to figure out how to do it. Turns out, they use a service called <a href="http://www.tynt.com/">Tynt</a>. That&#8217;s cool and all, but I wanted to see if I could make it happen using JavaScript. All I needed my function to do was grab the copied selection, tack on a copyright notice and then add the two to the clipboard. </p>
<p>It took a lot of messing around and I was finally able to put something together that worked in most browsers. Sorry IE people, this one won&#8217;t work for you, though if anyone figures out a fix for IE let me know. Then the function will work for all major browsers.</p>
<p>Here is the JavaScript:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">function</span> addLink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> body_element <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> selection<span style="color: #339933;">;</span>
	selection <span style="color: #339933;">=</span> window.<span style="color: #660066;">getSelection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> pagelink <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;br /&gt;&lt;br /&gt; Read more at: &lt;a href='&quot;</span><span style="color: #339933;">+</span>document.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'&gt;&quot;</span><span style="color: #339933;">+</span>document.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt;&lt;br /&gt;Copyright &amp;copy; c.bavota&quot;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// change this if you want</span>
	<span style="color: #003366; font-weight: bold;">var</span> copytext <span style="color: #339933;">=</span> selection <span style="color: #339933;">+</span> pagelink<span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> newdiv <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	newdiv.<span style="color: #660066;">style</span>.<span style="color: #660066;">position</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'absolute'</span><span style="color: #339933;">;</span>
	newdiv.<span style="color: #660066;">style</span>.<span style="color: #660066;">left</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'-99999px'</span><span style="color: #339933;">;</span>
	body_element.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>newdiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	newdiv.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> copytext<span style="color: #339933;">;</span>
	selection.<span style="color: #660066;">selectAllChildren</span><span style="color: #009900;">&#40;</span>newdiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	window.<span style="color: #660066;">setTimeout</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		body_element.<span style="color: #660066;">removeChild</span><span style="color: #009900;">&#40;</span>newdiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
document.<span style="color: #660066;">oncopy</span> <span style="color: #339933;">=</span> addLink<span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Just add this between your page&#8217;s head tags, and change the copyright notice to whatever you want. </p>
<h3>Demo</h3>
<p>To test it out, copy something from the paragraph below and paste it into your favorite text editor.</p>
<div id="testp" style="padding: 10px; background: #eee; border: 1px solid #ccc; font-size: 12px; line-height: 16px;">
Aenean vel massa tellus. Aliquam imperdiet ante a justo luctus et bibendum erat porta. Morbi varius, erat et cursus ornare, elit augue bibendum leo, sed imperdiet nulla risus ut ipsum. Maecenas laoreet neque vitae magna porta sed euismod urna ornare. Nulla facilisi. Maecenas congue ligula eu arcu rhoncus volutpat. Etiam pretium pulvinar sapien, et ultrices augue euismod sagittis. Pellentesque sodales, velit tempor pharetra ultricies, lacus odio mattis ligula, vel sollicitudin erat nisl sed nisi. Pellentesque vestibulum suscipit libero, sit amet scelerisque purus aliquam vulputate. Etiam semper mauris ac felis convallis volutpat dictum ante placerat. Proin tempus elementum nisl ac eleifend. In hac habitasse platea dictumst. Duis et neque at mi lacinia luctus non ut neque. Praesent mollis metus at quam ornare bibendum. Cras augue tortor, tempor vitae adipiscing at, pulvinar vel massa. Curabitur et orci massa, sit amet malesuada diam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis vitae orci id lectus convallis tempus vel quis mauris.
</div>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/add-a-copyright-notice-to-copied-text/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>A Basic jQuery Slideshow</title>
		<link>http://bavotasan.com/2010/a-basic-jquery-slideshow/</link>
		<comments>http://bavotasan.com/2010/a-basic-jquery-slideshow/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 14:34:42 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[content slider]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[Slideshow]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=2875</guid>
		<description><![CDATA[Most sites you will visit nowadays will have some sort of slideshow or content slider. Check out Themes by bavotasan.com and you will see my Sliderota jQuery plugin in action. I was visiting a site recently that had a very basic slideshow and I wanted to try to recreated it. It wasn&#8217;t anything fancy, just [...]]]></description>
			<content:encoded><![CDATA[<p>Most sites you will visit nowadays will have some sort of slideshow or content slider. Check out <a href="http://themes.bavotasan.com/">Themes by bavotasan.com</a> and you will see my <a href="http://bavotasan.com/downloads/sliderota-jquery-plugin/">Sliderota jQuery plugin</a> in action. I was visiting a site recently that had a very basic slideshow and I wanted to try to recreated it. It wasn&#8217;t anything fancy, just two controls that would switch between image/text slides. It took some jQuery, CSS and HTML to get it all working.</p>
<p>First, let&#8217;s put together some HTML.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;slideshow&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;controls&quot;</span><span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;javascript:void(0)&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;prev&quot;</span><span style="color: #339933;">&gt;&amp;</span>laquo<span style="color: #339933;">;&lt;/</span>a<span style="color: #339933;">&gt;</span> <span style="color: #339933;">&lt;</span>span id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;num&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;</span> of <span style="color: #339933;">&lt;</span>span id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;total&quot;</span><span style="color: #339933;">&gt;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;javascript:void(0)&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;next&quot;</span><span style="color: #339933;">&gt;&amp;</span>raquo<span style="color: #339933;">;&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;img1.jpg&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;387&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;258&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">/&gt;</span>
    <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Phasellus in ligula enim<span style="color: #339933;">,</span> at pellentesque eros<span style="color: #339933;">.</span> Sed vehicula<span style="color: #339933;">,</span> diam vitae scelerisque consectetur<span style="color: #339933;">,</span> urna lectus fermentum dui<span style="color: #339933;">,</span> ac dictum tellus ligula at turpis<span style="color: #339933;">.</span> Integer feugiat dictum augue<span style="color: #339933;">,</span> cursus ultrices nibh iaculis et<span style="color: #339933;">.</span> Duis vitae diam et magna bibendum dictum<span style="color: #339933;">.</span> <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;img2.jpg&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;387&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;258&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">/&gt;</span>
    <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Fusce libero quam<span style="color: #339933;">,</span> sollicitudin vel interdum nec<span style="color: #339933;">,</span> porttitor eu lectus<span style="color: #339933;">.</span> Quisque non rhoncus nunc<span style="color: #339933;">.</span> Aliquam mi mi<span style="color: #339933;">,</span> fermentum non feugiat vel<span style="color: #339933;">,</span> semper eu erat<span style="color: #339933;">.</span> In tempus pharetra feugiat<span style="color: #339933;">.</span> <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;img3.jpg&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;387&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;258&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">/&gt;</span>
    <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Aliquam at semper nisi<span style="color: #339933;">.</span> Donec at vulputate velit<span style="color: #339933;">.</span> Donec eros risus<span style="color: #339933;">,</span> aliquam at laoreet sit amet<span style="color: #339933;">,</span> tempor at erat<span style="color: #339933;">.</span> Lorem ipsum dolor sit amet<span style="color: #339933;">,</span> consectetur adipiscing elit<span style="color: #339933;">.</span> Curabitur ultricies mi in nisl venenatis molestie<span style="color: #339933;">.&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;img4.jpg&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;387&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;258&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">/&gt;</span>
    <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>In eleifend consequat dolor ut vestibulum<span style="color: #339933;">.</span> Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas<span style="color: #339933;">.</span> Nulla facilisi<span style="color: #339933;">.</span> <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Each slide is a list item that contains an image and a paragraph. Let&#8217;s style it to get it looking the way we want.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#slideshow</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">600px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">280px</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #cc00cc;">#slideshow</span> ul <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
		<span style="color: #00AA00;">&#125;</span>
&nbsp;
		<span style="color: #cc00cc;">#slideshow</span> ul li <span style="color: #00AA00;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
			<span style="color: #00AA00;">&#125;</span>
&nbsp;
			<span style="color: #cc00cc;">#slideshow</span> ul li<span style="color: #6666ff;">.current</span> <span style="color: #00AA00;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
				<span style="color: #00AA00;">&#125;</span>
&nbsp;
		<span style="color: #cc00cc;">#slideshow</span> li img <span style="color: #00AA00;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
			<span style="color: #00AA00;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #cc00cc;">#slideshow</span> <span style="color: #cc00cc;">#controls</span> <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>	
		<span style="color: #00AA00;">&#125;</span></pre></div></td></tr></table></div>

<p>Our CSS will add some simple styles. It will also make sure that our unordered list has a relative position so that all of our list items can be aligned directly on top of one another. That will give the illusion that we are switching between slides, when really all we are doing is making one slide display while all the other slides are hidden. That will be done with a little bit of  jQuery.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> len <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#slideshow li&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#slideshow #total&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>len<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#slideshow li:eq(0)&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;current&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#slideshow li&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rel'</span><span style="color: #339933;">,</span> x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		x<span style="color: #339933;">++</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#next&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> current <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#slideshow .current&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> next <span style="color: #339933;">=</span> parseFloat<span style="color: #009900;">&#40;</span>current.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>next<span style="color: #339933;">==</span>len<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#num&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>parseFloat<span style="color: #009900;">&#40;</span>next<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		current.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#slideshow li&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span>next<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>									
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#prev&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> current <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#slideshow .current&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> prev <span style="color: #339933;">=</span> parseFloat<span style="color: #009900;">&#40;</span>current.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>prev<span style="color: #339933;">&lt;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#num&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>parseFloat<span style="color: #009900;">&#40;</span>prev<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		current.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#slideshow li&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span>prev<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>									
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>					
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span></pre></div></td></tr></table></div>

<p>This code will count the number of list items and display that number in our counter. It will also cycle through each list item and give it a reference number, which is how we can control which slide will appear. Next, it sets up our controls to scroll forward and backward through the slides.</p>
<p>Put it all together and you get this:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;!</span>DOCTYPE html <span style="color: #000000; font-weight: bold;">PUBLIC</span> <span style="color: #0000ff;">&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span> <span style="color: #0000ff;">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>html xmlns<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>meta http<span style="color: #339933;">-</span>equiv<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Content-Type&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/html; charset=UTF-8&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>A Basic Slideshow<span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>style type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/css&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #666666; font-style: italic;">#slideshow {
</span>	border<span style="color: #339933;">:</span> 1px solid <span style="color: #666666; font-style: italic;">#ccc;
</span>	padding<span style="color: #339933;">:</span> 10px<span style="color: #339933;">;</span>
	width<span style="color: #339933;">:</span> 600px<span style="color: #339933;">;</span>
	height<span style="color: #339933;">:</span> 280px<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">#slideshow ul {
</span>		position<span style="color: #339933;">:</span> relative<span style="color: #339933;">;</span>
		list<span style="color: #339933;">-</span>style<span style="color: #339933;">:</span> none<span style="color: #339933;">;</span>
		padding<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		margin<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">#slideshow ul li {
</span>			position<span style="color: #339933;">:</span> absolute<span style="color: #339933;">;</span>
			top<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
			left<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
			display<span style="color: #339933;">:</span> none<span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">#slideshow ul li.current {
</span>				display<span style="color: #339933;">:</span> block<span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">#slideshow li img {
</span>			float<span style="color: #339933;">:</span> left<span style="color: #339933;">;</span>
			margin<span style="color: #339933;">-</span>right<span style="color: #339933;">:</span> 20px<span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #666666; font-style: italic;">#slideshow #controls {
</span>		width<span style="color: #339933;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">%;</span>
		text<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> right<span style="color: #339933;">;</span>	
		<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;slideshow&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;controls&quot;</span><span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;javascript:void(0)&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;prev&quot;</span><span style="color: #339933;">&gt;&amp;</span>laquo<span style="color: #339933;">;&lt;/</span>a<span style="color: #339933;">&gt;</span> <span style="color: #339933;">&lt;</span>span id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;num&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;</span> of <span style="color: #339933;">&lt;</span>span id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;total&quot;</span><span style="color: #339933;">&gt;&lt;/</span>span<span style="color: #339933;">&gt;</span> <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;javascript:void(0)&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;next&quot;</span><span style="color: #339933;">&gt;&amp;</span>raquo<span style="color: #339933;">;&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;img1.jpg&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;387&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;258&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">/&gt;</span>
    <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Phasellus in ligula enim<span style="color: #339933;">,</span> at pellentesque eros<span style="color: #339933;">.</span> Sed vehicula<span style="color: #339933;">,</span> diam vitae scelerisque consectetur<span style="color: #339933;">,</span> urna lectus fermentum dui<span style="color: #339933;">,</span> ac dictum tellus ligula at turpis<span style="color: #339933;">.</span> Integer feugiat dictum augue<span style="color: #339933;">,</span> cursus ultrices nibh iaculis et<span style="color: #339933;">.</span> Duis vitae diam et magna bibendum dictum<span style="color: #339933;">.</span> <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;img2.jpg&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;387&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;258&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">/&gt;</span>
    <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Fusce libero quam<span style="color: #339933;">,</span> sollicitudin vel interdum nec<span style="color: #339933;">,</span> porttitor eu lectus<span style="color: #339933;">.</span> Quisque non rhoncus nunc<span style="color: #339933;">.</span> Aliquam mi mi<span style="color: #339933;">,</span> fermentum non feugiat vel<span style="color: #339933;">,</span> semper eu erat<span style="color: #339933;">.</span> In tempus pharetra feugiat<span style="color: #339933;">.</span> <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;img3.jpg&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;387&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;258&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">/&gt;</span>
    <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Aliquam at semper nisi<span style="color: #339933;">.</span> Donec at vulputate velit<span style="color: #339933;">.</span> Donec eros risus<span style="color: #339933;">,</span> aliquam at laoreet sit amet<span style="color: #339933;">,</span> tempor at erat<span style="color: #339933;">.</span> Lorem ipsum dolor sit amet<span style="color: #339933;">,</span> consectetur adipiscing elit<span style="color: #339933;">.</span> Curabitur ultricies mi in nisl venenatis molestie<span style="color: #339933;">.&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;img4.jpg&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;387&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;258&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">/&gt;</span>
    <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>In eleifend consequat dolor ut vestibulum<span style="color: #339933;">.</span> Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas<span style="color: #339933;">.</span> Nulla facilisi<span style="color: #339933;">.</span> <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> len <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#slideshow li&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>length<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#slideshow #total&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>text<span style="color: #009900;">&#40;</span>len<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#slideshow li:eq(0)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>addClass<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;current&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#slideshow li&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #990000;">each</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rel'</span><span style="color: #339933;">,</span> x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		x<span style="color: #339933;">++</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#next&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>click<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #990000;">current</span> <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#slideshow .current&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #990000;">next</span> <span style="color: #339933;">=</span> parseFloat<span style="color: #009900;">&#40;</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">next</span><span style="color: #339933;">==</span>len<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#num&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>text<span style="color: #009900;">&#40;</span>parseFloat<span style="color: #009900;">&#40;</span><span style="color: #990000;">next</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">current</span><span style="color: #339933;">.</span>removeClass<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#slideshow li&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #990000;">each</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #990000;">next</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>addClass<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>									
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#prev&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>click<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #990000;">current</span> <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#slideshow .current&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #990000;">prev</span> <span style="color: #339933;">=</span> parseFloat<span style="color: #009900;">&#40;</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>prev<span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#num&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>text<span style="color: #009900;">&#40;</span>parseFloat<span style="color: #009900;">&#40;</span><span style="color: #990000;">prev</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">current</span><span style="color: #339933;">.</span>removeClass<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#slideshow li&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #990000;">each</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #990000;">prev</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>addClass<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'current'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>									
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>					
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Here is a demo:</p>
<div id="slideshow">
<div id="controls"><a href="javascript:void(0)" id="prev">&laquo;</a> <span id="num">1</span> of <span id="total"></span> <a href="javascript:void(0)" id="next">&raquo;</a></div>
<ul>
<li>
	<img src="http://bavotasan.com/wp-content/uploads/2010/09/img1.jpg" width="387" height="258" alt="" /></p>
<p>Phasellus in ligula enim, at pellentesque eros. Sed vehicula, diam vitae scelerisque consectetur, urna lectus fermentum dui, ac dictum tellus ligula at turpis. Integer feugiat dictum augue, cursus ultrices nibh iaculis et. Duis vitae diam et magna bibendum dictum. </p>
</li>
<li>
	<img src="http://bavotasan.com/wp-content/uploads/2010/09/img2.jpg" width="387" height="258" alt="" /></p>
<p>Fusce libero quam, sollicitudin vel interdum nec, porttitor eu lectus. Quisque non rhoncus nunc. Aliquam mi mi, fermentum non feugiat vel, semper eu erat. In tempus pharetra feugiat. </p>
</li>
<li>
	<img src="http://bavotasan.com/wp-content/uploads/2010/09/img3.jpg" width="387" height="258" alt="" /></p>
<p>Aliquam at semper nisi. Donec at vulputate velit. Donec eros risus, aliquam at laoreet sit amet, tempor at erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ultricies mi in nisl venenatis molestie.</p>
</li>
<li>
	<img src="http://bavotasan.com/wp-content/uploads/2010/09/img4.jpg" width="387" height="258" alt="" /></p>
<p>In eleifend consequat dolor ut vestibulum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla facilisi. </p>
</li>
</ul>
</div>
<p><script type="text/javascript">
(function($) {
	var len = $("#slideshow li").length;
	var x = 0;
	$("#slideshow #total").text(len);
	$("#slideshow li:eq(0)").addClass("current");
	$("#slideshow li").each(function() {
		$(this).attr('rel', x);
		x++
	});	
	$("#next").click(function() {
		var current = $("#slideshow .current");
		var next = parseFloat(current.attr('rel'))+1;
		if(next==len) {
			return false;
		}
		$("#num").text(parseFloat(next)+1);
		current.removeClass('current');
		$("#slideshow li").each(function() {
			if($(this).attr('rel')==next) {
				$(this).addClass('current');
			}
		});									
	});
	$("#prev").click(function() {
		var current = $("#slideshow .current");
		var prev = parseFloat(current.attr('rel'))-1;
		if(prev<0) {
			return false;
		}
		$("#num").text(parseFloat(prev)+1);
		current.removeClass('current');
		$("#slideshow li").each(function() {
			if($(this).attr('rel')==prev) {
				$(this).addClass('current');
			}
		});									
	});					
})(jQuery)
</script></p>
<div class="imgprov">
Slideshow images provided by <a href="http://www.pixmac.com#cbavota">Pixmac</a>.
</div>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/a-basic-jquery-slideshow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Optimization Tips to Speed Up Your Site</title>
		<link>http://bavotasan.com/2010/optimization-tips-speed-up-site/</link>
		<comments>http://bavotasan.com/2010/optimization-tips-speed-up-site/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 21:14:56 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=2682</guid>
		<description><![CDATA[Ever since Google announced that a site&#8217;s speed would be a major factor in its ranking, I have really been paying attention to how my site performs. I guess I should have been doing it anyway, but I am the type of person that sometimes needs a kick in the butt to realize what he [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since <a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html">Google announced</a> that a site&#8217;s speed would be a major factor in its ranking, I have really been paying attention to how my site performs. I guess I should have been doing it anyway, but I am the type of person that sometimes needs a kick in the butt to realize what he should be doing. Now I keep an eye on my site and constantly monitor how it&#8217;s performing. That&#8217;s the only way to stay on top of things and guarantee that your visitors have a positive experience on your site.</p>
<p>Many things factor in to how your site performs, including the speed of your server, the amount of traffic on your site, how your site is coded, if your site is static or dynamic, and the list goes on. If your site has not been optimized then you are really doing yourself a disservice, especially now that your page rank might rely on it.</p>
<p>If you have a WordPress site, there are some great plugins to help you out. I like to use <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a> to get things started. It is pretty easy to set up and works exceptionally well. Plus, the customer support is top notch, so if you have any issues you can just contact the author.</p>
<p>If you don&#8217;t use WordPress, you can still follow some of the steps below to get your site performing at its best.</p>
<p>First, let&#8217;s take a look at some free tools that are available online that can analyze your site and let you know exactly where the problems lie:</p>
<h3>Pingdom Tools</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2010/08/pingdomtools.jpg" alt="Pingdom Tools" title="pingdomtools" width="550" height="160" class="alignleft size-full wp-image-2681" /><br />
Pingdom Tools will give you a breakdown of all the files that your site needs to load to render a page, and whether or not any of them is problematic. It can also save your tests so you can compare your site&#8217;s statistics against one another on different occasions.<br />
<a href="http://tools.pingdom.com/">http://tools.pingdom.com/</a></p>
<h3>Web Page Test</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2010/08/webpagetest.jpg" alt="Web Page Test" title="webpagetest" width="550" height="160" class="alignleft size-full wp-image-2686" /><br />
Web Page Test provides a similar service to Pingdom Tools, but the results are a lot more elaborate. The test takes a bit longer but it&#8217;s well worth the wait. Your site will be graded on 6 different aspects of its performance: KeepAlive Enabled, Compress Text, Compress Images, Cache Static Content, Combine CSS/JS Files and Use of CDN. Once you are graded, you will also see why your site might have failed each test.<br />
<a href="http://www.webpagetest.org/">http://www.webpagetest.org/</a></p>
<h3>Firebug &#038; YSlow</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2010/08/firebug.jpg" alt="Firebug for Firefox" title="firebug" width="550" height="160" class="alignleft size-full wp-image-2687" /><br />
If you have a Web site and you&#8217;re not aware of Firebug, you need to become aware of it immediately. It&#8217;s an amazing developer tool for Firefox that can make your life a hell of a lot easier. It offers tools such as an element inspector, CSS editor, and  process console. To get your site optimized, install YSlow from Yahoo and you will have all the tools you need to test your site and find its weaknesses.<br />
<a href="http://getfirebug.com/">http://getfirebug.com/</a><br />
<a href="http://developer.yahoo.com/yslow/">http://developer.yahoo.com/yslow/</a></p>
<p>Once you&#8217;ve tested your site and you know what the problems are, you can start to make a few changes to help increase your site&#8217;s performance, which will in turn give your visitors a better experience and show search engines that you mean business.</p>
<p>You probably already know these tips, but just in case you don&#8217;t, pay attention because they are the basis of how you can optimize your site:</p>
<h3>Optimize Images for the Web</h3>
<p>If you plan on uploading an image to your site, make sure you&#8217;re not uploading the original 5 x 7 that has a resolution of 300dpi. Why? Because it&#8217;s such a large file that it will definitely slow down your site, if not crash it. That&#8217;s why all images must be optimized for the Web. If you have Photoshop, or any image editing software, you&#8217;ll have the option to export your image for the Web. </p>
<p>What does that mean? Well, first of all, you should probably aim for 72dpi, which is pretty much the Web standard. That will help bring your file size down. You should also save your photos as JPGs with a quality of around 50-60%, and your graphics as GIFs with a color range dependent on the graphic itself. If your image has a transparent background which doesn&#8217;t look too good as a transparent GIF, then you might want to make it a transparent PNG. That does increase the size of the file, so keep that in mind.</p>
<p>If you want to really get fancy, you can put together a CSS sprite so that all of your graphics and images are merged together into one file. This brings down the number of elements that your site has to load, but it does require a bit more effort in regards to the CSS used. Here is a CSS sprite I use on <a href="http://bavotasan.com">bavotasan.com</a>:</p>
<p><img src="http://bavotasan.com/wp-content/themes/bavotasan-2010/images/sprite_bavotasan.png" alt="CSS Sprite or bavotasan.com" width="336" height="225" class="aligncenter"  /></p>
<p>If you don&#8217;t have any desktop software to optimize your images, you can always take advantage of <a href="http://www.smushit.com/ysmush.it/">Yahoo&#8217;s Smush.it</a>, which allows you to upload an image file and have it optimized and returned to you. If you have YSlow installed, then you also have Smush.it included on the tools tab.</p>
<h3>Put CSS at the Top &#038; JavaScript at the Bottom</h3>
<p>Placing your CSS at the top of your site makes sense, because you want to have your elements styled before they start to render. Placing JavaScript at the bottom also makes a lot of sense because you need your elements to render before they can be manipulated by your JavaScript. This has become a standard and should always be the way these files are included in your site.</p>
<h3>Reduce the Number of HTTP Requests</h3>
<p>An HTTP request occurs every time your site fetches a file that is required to render the page. So every image, every JS file and pretty much every element on your Web page requires an HTTP request. That&#8217;s why CSS sprites are a great idea. They reduce the number of times your site needs to fetch an image. Another great idea is combining your CSS files and your JavaScript files into one. So grab all of your site&#8217;s CSS (you can view it using Firebug), create one file and include it in your header. Same goes for your JavaScript files, but make sure you place the JS elements in the proper order or else they won&#8217;t work, eg. jQuery needs to load before you use any actual jQuery. And be sure to stick your JS file in your footer.</p>
<p>If you don&#8217;t plan on making any changes to your CSS or JS, you can even minify the files to make them as small as possible. There are many online resources to do this, but you also have everything you need if you already installed Firebug and YSlow. If you take a look at <a href="http://jquery.com/">http://jquery.com/</a>, you can see the difference between the minified version (24kb) and the development version (155kb). That&#8217;s a big difference.</p>
<h3>The Hard Stuff</h3>
<p>This is where things start to get a little more complicated. The following tips require a bit of knowledge of coding, or at least a willingness to attempt to do some things that you might not really understand.</p>
<h3>Configure your ETags</h3>
<p>According to <a href="http://en.wikipedia.org/wiki/HTTP_ETag">Wikipedia</a>, an ETag, or entity tag, &#8220;<em>is one of several mechanisms that HTTP provides for cache validation, and which allows a client to make conditional requests.</em>&#8221; If you don&#8217;t plan on using them, which most likely you won&#8217;t, then you need to remove them completely by adding the following to your <code>.htaccess</code> file.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;">FileETag none</pre></div></td></tr></table></div>

<p>If you don&#8217;t have an <code>.htaccess</code> file in your site&#8217;s root directory, then create one and upload it because you&#8217;re going to have to make a few modifications to it to get your site optimized.</p>
<h3>Add Expires Headers</h3>
<p>Expires headers will let everyone know that certain elements can be cached by the browser so they won&#8217;t need to be reloaded every time a visitor hits your site. Static elements should have a far future expiration date and dynamic elements need to be configured according to how you plan on using them. The following will add an expiration date of one month to all your image, CSS and JS files.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Expire images header
</span>ExpiresActive On
ExpiresDefault A0
ExpiresByType image<span style="color: #339933;">/</span>gif A2592000
ExpiresByType image<span style="color: #339933;">/</span>png A2592000
ExpiresByType image<span style="color: #339933;">/</span>jpg A2592000
ExpiresByType image<span style="color: #339933;">/</span>jpeg A2592000
ExpiresByType image<span style="color: #339933;">/</span>ico A2592000
ExpiresByType text<span style="color: #339933;">/</span>css A2592000
ExpiresByType text<span style="color: #339933;">/</span>javascript A2592000</pre></div></td></tr></table></div>

<p>A2592000 (60*60*24*30) is a timestamp that equals one month. Remember, if you plan on modifying any files that have been cached with a future expiration date, you  need to rename them or else visitors will not see the changes until they clear their browser cache or the old files expire.</p>
<h3>Compress Components</h3>
<p>Compressing things always ends up making them smaller and load faster, so implementing some form of compression on your components is a must. This optimization step might not work for you if your server does not have either mod_deflate or mod_gzip installed as part of Apache. You should contact your service provider and inquire about this to find out which of the following codes you should use.</p>
<p>mod_deflate:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>FilesMatch <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>.(js|css|html|htm|php|xml)$&quot;</span><span style="color: #339933;">&gt;</span>
SetOutputFilter DEFLATE
<span style="color: #339933;">&lt;/</span>FilesMatch<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>mod_gzip</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>IfModule mod_gzip<span style="color: #339933;">.</span>c<span style="color: #339933;">&gt;</span>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include <span style="color: #990000;">file</span> \<span style="color: #339933;">.</span><span style="color: #009900;">&#40;</span>html?<span style="color: #339933;">|</span>txt<span style="color: #339933;">|</span>css<span style="color: #339933;">|</span>js<span style="color: #339933;">|</span>php<span style="color: #339933;">|</span>pl<span style="color: #009900;">&#41;</span>$
mod_gzip_item_include handler ^cgi<span style="color: #339933;">-</span>script$
mod_gzip_item_include mime ^text<span style="color: #339933;">/.*</span>
mod_gzip_item_include mime ^application<span style="color: #339933;">/</span>x<span style="color: #339933;">-</span>javascript<span style="color: #339933;">.*</span>
mod_gzip_item_exclude mime ^image<span style="color: #339933;">/.*</span>
mod_gzip_item_exclude rspheader ^Content<span style="color: #339933;">-</span>Encoding<span style="color: #339933;">:.*</span>gzip<span style="color: #339933;">.*</span>
<span style="color: #339933;">&lt;/</span>IfModule<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<h3>Content Delivery Network</h3>
<p>It&#8217;s a little hard to believe, but the closer your visitor is to your server&#8217;s location, the faster they will receive your site elements. That&#8217;s where a CDN can come in handy. They provide multiple server locations for your site elements that will be accessed accordingly depending on where you visitors are located. This has been known to improve your site&#8217;s response time by up to 20%. The only problem, is it might cost you an arm and a leg to get it up and running. There are many CDNs popping up that are not as expensive as others, but to tell you the truth, this might not be a viable option unless your site is really bringing in the money, which in turn would make it worth having a CDN on your side.</p>
<h3>Conclusion</h3>
<p>When it comes down to it, running a successful Web site requires a lot of attention to certain things that you might never have considered. Being aware of optimization tools and techniques will definitely help you improve your site&#8217;s performance. Most importantly, it will get your site ready to be indexed by Google, Yahoo and many other search engines that rely on speed as a ranking factor.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/optimization-tips-speed-up-site/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>10 Great jQuery Plugins for Web Developers</title>
		<link>http://bavotasan.com/2009/10-great-jquery-plugins-for-web-developers/</link>
		<comments>http://bavotasan.com/2009/10-great-jquery-plugins-for-web-developers/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 16:17:37 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[amount]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[dfc]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[hundred times]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[javascript libraries]]></category>
		<category><![CDATA[jqTransform]]></category>
		<category><![CDATA[Love]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[response]]></category>
		<category><![CDATA[type]]></category>
		<category><![CDATA[web developers]]></category>
		<category><![CDATA[WordPress themes]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1081</guid>
		<description><![CDATA[I started working with Javascript quite a few years ago and have always had a love/hate relationship with it. Sure, you can do a lot of cool things with it, but sometimes the amount of code you have to write to perform a simple function is a little bit tedious. There are quite a few [...]]]></description>
			<content:encoded><![CDATA[<p>I started working with Javascript quite a few years ago and have always had a love/hate relationship with it. Sure, you can do a lot of cool things with it, but sometimes the amount of code you have to write to perform a simple function is a little bit tedious. There are quite a few Javascript libraries out there that really simplify the coding process and add tons more functionality. So far, my fave is <a href="http://jquery.com">jQuery</a>.<br />
<span id="more-1081"></span><br />
I have really only scratched the surface with <a href="http://jquery.com">jQuery</a> but I am quickly learning all the tricks and loving every minute of it. I have implemented a few simple <a href="http://jquery.com">jQuery</a> scripts to bavotasan.com recently and the response has been pretty great so I thought it would be a good idea to share some of the plugins I have been using with the rest of you.</p>
<p>Here is a list of 10 jQuery plugins that all web developers should take a look at.</p>
<div class="sections">
<h3>Uploadify</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/uploadify.png" alt="uploadify" title="uploadify" width="550" height="161" class="alignleft size-full wp-image-1083" /><br />
Uploadify is a great looking and easy to use multiple or single file uploader developed by Ronnie Garcia and Travis Nickels. A lot of my clients have requested a simple uploader with a progress bar and Uploadify is always the first solution I present them with.<br />
<a href="http://www.uploadify.com/">Website</a> | <a href="http://www.uploadify.com/demo/">Demo</a>
</div>
<div class="sections">
<h3>ScrollTo</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/scrollto.png" alt="scrollto" title="scrollto" width="550" height="161" class="alignleft size-full wp-image-1087" /><br />
I have implemented this one into Stationery, my latest WordPress theme, and you can also see it in action on bavotasan.com by clicking on the <em>Back to Top</em> link in the footer. Be sure to check out developer Ariel Flesler&#8217;s site for some cool examples of his plugin.<br />
<a href="http://flesler.blogspot.com/2007/10/jqueryscrollto.html">Website</a> | <a href="http://demos.flesler.com/jquery/scrollTo/">Demo</a>
</div>
<div class="sections">
<h3>Suckerfish</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/suckerfish.png" alt="suckerfish" title="suckerfish" width="550" height="161" class="alignleft size-full wp-image-1090" /><br />
There is nothing more simple than a dropdown menu, but Patrick Griffiths and Dan Webb&#8217;s Suckerfish plugin makes it even easier, as well as cross-browser compatible.<br />
<a href="http://www.alistapart.com/articles/dropdowns">Website</a> | <a href="http://www.htmldog.com/articles/suckerfish/example/">Demo</a>
</div>
<div class="sections">
<h3>jqTransform</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/jqtransform.png" alt="jqtransform" title="jqtransform" width="550" height="161" class="alignleft size-full wp-image-1093" /><br />
If you have downloaded any of my WordPress themes lately, you would have noticed a very elegant design for the admin option pages. That is all thanks to DFC Engineering&#8217;s jqTransform plugin. It takes plain forms and re-skins them to make them look a hundred times nicer and more professional.<br />
<a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/">Website</a> | <a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/">Demo</a>
</div>
<div class="sections">
<h3>jCarousel</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/jcarousel.png" alt="jcarousel" title="jcarousel" width="550" height="161" class="alignleft size-full wp-image-1096" /><br />
Carousels are great tools for adding interactivity and displaying items without taking up a lot of space. You have probably come across implementations of Jan Sorgalla&#8217;s jCarousel plugin on many online stores and portfolio sites.<br />
<a href="http://sorgalla.com/jcarousel/">Website</a> | <a href="http://sorgalla.com/projects/jcarousel/examples/static_simple.html">Demo</a>
</div>
<div class="sections">
<h3>Galleria</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/galeria.png" alt="galeria" title="galeria" width="550" height="161" class="alignleft size-full wp-image-1100" /><br />
There are more jQuery slideshow plugins than there are days in September and a lot of them are awesome. One of the nicest and more straightforward I have come across is Devkick&#8217;s Galleria plugin.<br />
<a href="http://devkick.com/lab/galleria/">Website</a> | <a href="http://devkick.com/lab/galleria/demo_01.htm">Demo</a>
</div>
<div class="sections">
<h3>Tabs</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/tabs.png" alt="tabs" title="tabs" width="550" height="161" class="alignleft size-full wp-image-1104" /><br />
The Tabs plugin was created by Klaus Hartl and is now part of the jQuery User Interface API. Tons of sites use Tabs or similar interfaces to switch between content without reloading the page.<br />
<a href="http://docs.jquery.com/UI/Tabs">Website</a> | <a href="http://stilbuero.de/jquery/tabs_3/">Demo</a>
</div>
<div class="sections">
<h3>jCrop</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/jcrop.png" alt="jcrop" title="jcrop" width="550" height="161" class="alignleft size-full wp-image-1105" /><br />
If you are building a site where users can upload an image for whatever reason, it always makes sense to allow them to crop the image to their liking, or to the size you specify. Deep Liquid&#8217;s jCrop plugin is cross-browser compatible and offers tons of cool options to customize it to work however you need it to.<br />
<a href="http://deepliquid.com/content/Jcrop.html">Website</a> | <a href="http://deepliquid.com/projects/Jcrop/demos.php?demo=live_crop">Demo</a>
</div>
<div class="sections">
<h3>qTip</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/qtip.png" alt="qtip" title="qtip" width="550" height="161" class="alignleft size-full wp-image-1108" /><br />
Tooltips can be used in many different ways and they can really improve on user interaction. There are a few tooltip plugins out there but I like Craig Thompson&#8217;s qTip the best. It offers endless possibilities and is simple to use.<br />
<a href="http://craigsworks.com/projects/qtip/">Website</a> | <a href="http://craigsworks.com/projects/qtip/demos/">Demo</a>
</div>
<div class="sections">
<h3>jScrollPane</h3>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/09/scrollpane.png" alt="scrollpane" title="scrollpane" width="550" height="161" class="alignleft size-full wp-image-1109" /><br />
Why rely on different browsers to determine the type of scroll bar that appears on your site when you can select the type of scroll bar that best suits your site&#8217;s design. Kevin Luck&#8217;s jScrollPane plugin is a great way to customize a website&#8217;s scroll bar.<br />
<a href="http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html">Website</a> | <a href="http://www.kelvinluck.com/assets/jquery/jScrollPane/basic.html">Demo</a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/10-great-jquery-plugins-for-web-developers/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Creating a Mouseover Fade Effect with jQuery</title>
		<link>http://bavotasan.com/2009/creating-a-jquery-mouseover-fade-effect/</link>
		<comments>http://bavotasan.com/2009/creating-a-jquery-mouseover-fade-effect/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 15:44:42 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[animate]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[Creating]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[document]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[Grab]]></category>
		<category><![CDATA[head tags]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[img]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mouseover]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[possibilities]]></category>
		<category><![CDATA[use]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=779</guid>
		<description><![CDATA[My last little jQuery tutorial was an alternative to using CSS to create an image change on a mouseover. Now I want to take that one step further and add a fade effect. For my example, I am going to make a black and white image fade into a color image. To achieve this effect [...]]]></description>
			<content:encoded><![CDATA[<p>My last little jQuery tutorial was an alternative to using CSS to create an image change on a mouseover. Now I want to take that one step further and add a fade effect. For my example, I am going to make a black and white image fade into a color image. To achieve this effect I am going to introduce the <a href="http://docs.jquery.com/Effects/animate">animate function</a>. There are tons of possibilities in regards to jQuery&#8217;s animate function, but for this tutorial, I&#8217;m going to keep it simple by just using it to do one thing.<br />
<span id="more-779"></span><br />
First things first, download <a href="http://jquery.com/">jQuery</a>. Grab the Production minified version off of their site. Next, get two images. I used the following.</p>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/08/cbavota-bw.jpg" alt="cbavota-bw" title="cbavota-bw" width="150" height="122" class="alignleft size-full wp-image-781" /><img src="http://bavotasan.com/wp-content/uploads/2009/08/cbavota.jpg" alt="cbavota" title="cbavota" width="150" height="122" class="alignleft size-full wp-image-782" /></p>
<hr style="clear:both;border:0;" />
<p>Add the jQuery script between your head tags.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">'text/javascript'</span> src<span style="color: #339933;">=</span><span style="color: #0000ff;">'http://yoursite.com/jquery.js'</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Here is the function.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">&gt;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;img.a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span>
<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;opacity&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;opacity&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;1&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Here is the CSS.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;">&lt;style<span style="color: #00AA00;">&gt;</span>
&nbsp;
div<span style="color: #6666ff;">.fadehover</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
img<span style="color: #6666ff;">.a</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">10</span><span style="color: #00AA00;">;</span>
        <span style="color: #00AA00;">&#125;</span>
&nbsp;
img<span style="color: #6666ff;">.b</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></div></td></tr></table></div>

<p>And here is the body code.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fadehover&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;cbavota-bw.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;a&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;cbavota.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;b&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>All together you got something that looks like this.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;!</span>DOCTYPE html <span style="color: #000000; font-weight: bold;">PUBLIC</span> <span style="color: #0000ff;">&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span> <span style="color: #0000ff;">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>html xmlns<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>meta http<span style="color: #339933;">-</span>equiv<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Content-Type&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/html; charset=UTF-8&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>jQuery Hover Effect<span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">'text/javascript'</span> src<span style="color: #339933;">=</span><span style="color: #0000ff;">'jquery.js'</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">'text/javascript'</span><span style="color: #339933;">&gt;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>ready<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;img.a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>hover<span style="color: #009900;">&#40;</span>
<span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>stop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>animate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;opacity&quot;</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>stop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>animate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;opacity&quot;</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;1&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
<span style="color: #339933;">&lt;</span>style<span style="color: #339933;">&gt;</span>
div<span style="color: #339933;">.</span>fadehover <span style="color: #009900;">&#123;</span>
	position<span style="color: #339933;">:</span> relative<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
img<span style="color: #339933;">.</span>a <span style="color: #009900;">&#123;</span>
	position<span style="color: #339933;">:</span> absolute<span style="color: #339933;">;</span>
	left<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	top<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        z<span style="color: #339933;">-</span>index<span style="color: #339933;">:</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
img<span style="color: #339933;">.</span>b <span style="color: #009900;">&#123;</span>
	position<span style="color: #339933;">:</span> absolute<span style="color: #339933;">;</span>
	left<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	top<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fadehover&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;cbavota-bw.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;a&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;cbavota.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;b&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Test it out below:</p>
<p><script>
jQuery(document).ready(function(){
	jQuery(".a").hover(
	function() {
		jQuery(this).stop().animate({"opacity": "0"}, "slow");
	},
	function() {
		jQuery(this).stop().animate({"opacity": "1"}, "slow");
	});
});
</script></p>
<div class="fadehover"><img src="http://bavotasan.com/wp-content/uploads/2009/08/cbavota-bw.jpg" alt="" class="a" /><img src="http://bavotasan.com/wp-content/uploads/2009/08/cbavota.jpg" alt="" class="b" /></div>
<p>NOTE: If you are using jQuery with WordPress, you need to replace all the dollar signs ($) with the word jQuery due to other Javascript libraries that use the dollar sign.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/creating-a-jquery-mouseover-fade-effect/feed/</wfw:commentRss>
		<slash:comments>200</slash:comments>
		</item>
		<item>
		<title>A Simple Mouseover Hover Effect with jQuery</title>
		<link>http://bavotasan.com/2009/a-simple-mouseover-hover-effect-with-jquery/</link>
		<comments>http://bavotasan.com/2009/a-simple-mouseover-hover-effect-with-jquery/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 16:03:27 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[javascript libraries]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mouseover]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=725</guid>
		<description><![CDATA[JavaScript is pretty useful but it does demand a lot of coding. Luckily for all of us, there are libraries out there that make it extremely easy to use the power of JavaScript with a lot less code. I have been having a lot of fun with jQuery latetly and wanted to share a quick [...]]]></description>
			<content:encoded><![CDATA[<p>JavaScript is pretty useful but it does demand a lot of coding. Luckily for all of us, there are libraries out there that make it extremely easy to use the power of JavaScript with a lot less code. I have been having a lot of fun with <a href="http://jquery.com/">jQuery</a> latetly and wanted to share a quick and easy tutorial on how to create a mouseover hover effect.</p>
<p>A similar effect can be easily accomplished using CSS and the :hover selector, but if you are new to jQuery, this tutorial is a good starting off point to familiarize yourself with how it works.</p>
<p>First you need to download <a href="http://jquery.com/">jQuery</a>. Grab the Production minified version off of their site. <span id="more-725"></span>You will also need two images. I used the two below. I named them button.png and button-hover.png. </p>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/07/bavota-bw.png" alt="bavota-bw" title="bavota-bw" width="89" height="97" class="alignleft nobox size-full wp-image-728" style="border:0;" /><img src="http://bavotasan.com/wp-content/uploads/2009/07/bavota.png" alt="bavota" title="bavota" width="89" height="97" class="nobox alignleft size-full wp-image-727" style="border:0;" /></p>
<div style="clear:both;"></div>
<p>Now we can start to create the effect.</p>
<p>To make it all work, we first need to add the jQuery library script between the &lt;head&gt; tags.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">'text/javascript'</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">'http://yoursite.com/jquery.js'</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Now lets create the function that will make it all work.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script  type<span style="color: #339933;">=</span><span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">&gt;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.button&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;src&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;button-hover.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;src&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;button.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Last but not least, we need to add our image to the page.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;button.png&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;My button&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;button&quot;</span> <span style="color: #339933;">/&gt;</span></pre></div></td></tr></table></div>

<p>The one thing you need to make sure is that the classname in the jQuery function (.button) matches the classname of the image tag (button).</p>
<p>With everything in place you should have a file that looks like this.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;!</span>DOCTYPE html <span style="color: #000000; font-weight: bold;">PUBLIC</span> <span style="color: #0000ff;">&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span> <span style="color: #0000ff;">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>html xmlns<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>meta http<span style="color: #339933;">-</span>equiv<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Content-Type&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/html; charset=UTF-8&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>jQuery Hover Effect<span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">'text/javascript'</span> src<span style="color: #339933;">=</span><span style="color: #0000ff;">'http://yoursite.com/jquery.js'</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">'text/javascript'</span><span style="color: #339933;">&gt;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>ready<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;.button&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>hover<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;src&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;button-hover.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;src&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;button.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;button.png&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;My button&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;button&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Try out the effect below.<br />
<script type='text/javascript'>
jQuery(document).ready(function(){
	jQuery(".mydemobutton").hover(function() {
		jQuery(this).attr("src","http://bavotasan.com/wp-content/uploads/2009/07/bavota.png");		
			}, function() {
		jQuery(this).attr("src","http://bavotasan.com/wp-content/uploads/2009/07/bavota-bw.png");		
	});	
});
</script><br />
<img src="http://bavotasan.com/wp-content/uploads/2009/07/bavota-bw.png" alt="bavota-bw" title="bavota-bw" class="mydemobutton" /></p>
<p>NOTE: If you are using jQuery with WordPress, you need to replace all the dollar signs ($) with the word jQuery due to other Javascript libraries that use the dollar sign.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/a-simple-mouseover-hover-effect-with-jquery/feed/</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>Free Syntax Highlighter from Google</title>
		<link>http://bavotasan.com/2008/free-syntax-highlighter-from-google/</link>
		<comments>http://bavotasan.com/2008/free-syntax-highlighter-from-google/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 18:57:31 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[highlighter]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[piece]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[Syntax Highlighter]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[way]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=54</guid>
		<description><![CDATA[I have been searching around for a way to highlight the code in my posts to make it easier for people who visit my site to differentiate between the text and the code. At first I was using the &#60;blockquote&#62; tag with some CSS to make things look the way I wanted to, but then [...]]]></description>
			<content:encoded><![CDATA[<p><a class="highslide" href="http://bavotasan.com/wp-content/uploads/2008/11/googlesyntax.jpg"><img src="http://bavotasan.com/wp-content/uploads/2008/11/googlesyntax-200x150.jpg" alt="" title="googlesyntax" width="200" height="150" class="alignright size-thumbnail wp-image-2287" /></a>I have been searching around for a way to highlight the code in my posts to make it easier for people who visit my site to differentiate between the text and the code. At first I was using the &lt;blockquote&gt; tag with some CSS to make things look the way I wanted to, but then I stumbled upon a great piece of JavaScript offered by Google that goes that extra step to make your code snippets look awesome.<br />
<span id="more-54"></span><br />
It called a Syntax Highlighter and you can download it by going to <a href="http://code.google.com/p/syntaxhighlighter/">http://code.google.com/p/syntaxhighlighter/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2008/free-syntax-highlighter-from-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

