Cufon.replace('h1');
$(function(){

	$('#nav li:has(ul)').hover(
		function() { $('ul:first', this).css('display', 'block'); },
		function() { $('ul', this).css('display', 'none'); }
	);
	


	$('.slideshow').before('<div id="controls">').cycle({
        fx:     'fade',
        speed:  '1000',
        timeout: 6000,
        pager:  '#controls',
        before: function() { if (window.console) console.log(this.src); }
    });
	$(".tab").click(function(){
     window.location=$(this).find("a").attr("href");
     return false;
	});

	jQuery.getFeed({
        url: 'proxy.php?url=http://sensourceinc.com/blog/feed/',
        success: function(feed) {
            jQuery('#latest').append();
            
            var html = '';
            
            for(var i = 0; i < feed.items.length && i < 1; i++) {
            
                var item = feed.items[i];
                
                html += '<a href="'
                + item.link
                + '">'
                + item.title
                + '</a>';
 
            }
            
            jQuery('#latest').append(html);
        }    
    });
});
