$(document).ready(function() {
    $('a[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
});

$(function() {
    $('.rollover').hover(function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    }, function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    });
});

// Execute scrollable
$(function() {	
	
	// initialize scrollable with navigator plugin
	var root = $("div#scroll").scrollable(
		{ items: 'div#scroll-images',circular: true}).autoscroll({ autoplay: true, interval: 7000 } ).navigator({

	// ul.tabs now functions as our navigator
	navi:'div#scroll-nav'
	});
	
	// provide scrollable API for the action buttons
	window.api = root.data("scrollable");

});
