//WSlide Parameters
$(document).ready(function(){
	$("#trabajos").wslide({
		width: 960,
		height: 580,
		autolink: 'workLinks',
		horiz: true,
		duration: 300
	});
});
$(document).ready(function() {
  $("body").append("<div id='ToolTipDiv'></div>");
  $("a[title]").each(function() {
    $(this).hover(function(e) {
      $(this).mousemove(function(e) {
        var tipY = e.pageY + 15;
        var tipX = e.pageX - 10;
        $("#ToolTipDiv").css({'top': tipY, 'left': tipX});
      });
      $("#ToolTipDiv")
        .html($(this).attr('title'))
        .stop(true,true)
        .fadeIn("fast");
      $(this).removeAttr('title');
    }, function() {
      $("#ToolTipDiv")
        .stop(true,true)
        .fadeOut("fast");
      $(this).attr('title', $("#ToolTipDiv").html());
    });
  });
});
$(document).ready(function() {
	$('.scrolling').click(function() {
	   var elementClicked = $(this).attr("href");
	   var destination = $(elementClicked).offset().top;
    $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500 );
	   return false;
	});
});
// Timed Slide
function slideTimer() {
	if($('#workLinks a:last').hasClass('wactive')){
		$('#workLinks a:first').click();
	}else{
		$('#workLinks .wactive').next().click();
	};
};
window.setInterval('slideTimer()', 5000);

