document.getElementsByTagName('html')[0].className += ' js';

//IE png fix with background-repeat and background-position
document.write('<!--[if IE 6]><script type="text/javascript">DD_belatedPNG.fix(\'div, span, a\');</script><![endif]-->');

(function($){
    $(document).ready(function(){
        $("#slideshow").after('<ul id="slide-controls"><li id="prev" title="Previous">Prev</li><li id="pause" title="Pause">Pause</li><li id="next" title="Next">Next</li></ul>');
        $('#slideshow').cycle({
            timeout: 5000,
            prev: '#prev',
            next: '#next'
        });
        $('#next').click(function(){
            $('#slideshow').cycle('resume');
        });
        $('#pause').click(function(){
            $('#slideshow').cycle('pause');
        });
    })
})(jQuery);

Cufon.replace(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']);

function externalLinks(){
    if (!document.getElementsByTagName) 
        return;
    var anchors = document.getElementsByTagName("a");
    for (var i = 0; i < anchors.length; i++) {
        var anchor = anchors[i];
        if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
            anchor.target = "_blank";
        }
    }
};
window.onload = externalLinks;
