/* EBL HP Slideshow | 2011 */

<!-- SLIDESHOW -->
$(document).ready(function() {
    $('#hero').cycle({
        fx:     'fade',
        speed:  400,
        timeout: 5000,
	pause: 1,
        pager:  '#nav',
        pagerAnchorBuilder: function(idx, slide) {
            return '<a href="#"></a>';
        },
	before: onBefore
	});

	function onBefore() {
		$('#caption').html($(this).find('img').attr('alt'));
	}
});

<!-- TOOLTIP -->
function simple_tooltip(target_items, name){
 $(target_items).each(function(i){
		$("body").append("<div class='"+name+"' id='"+name+i+"'></div>");
		var my_tooltip = $("#"+name+i);
		
		$(this).mouseover(function(){
				my_tooltip.css({opacity:1, display:"none"}).fadeIn(100);
		}).mousemove(function(kmouse){
				my_tooltip.css({left:kmouse.pageX-45, top:kmouse.pageY-55});
		}).mouseout(function(){
				my_tooltip.fadeOut(100);				  
		});
	});
}
$(document).ready(function(){
	 simple_tooltip("#hero","tooltip");
});
