$(document).ready(function(){
	$(".baseball-button, .tab").mouseover(function(){
		$(this).find("*").each(function(){$(this).css("cursor","pointer");});
		$(this).addClass("ui-state-hover");
	});

	$(".baseball-button, .tab").mouseout(function(){
		$(this).find("*").each(function(){$(this).css("cursor","default");});
		$(this).removeClass("ui-state-hover");
	});
	$(".baseball-button, .tab").click(function(){
		window.location = $(this).find("a").attr("href");
	});
	$("table").each(function(index,element){$(this).find("tbody").find("tr").each(function(index, element) {
			if (index %2 == 1) {
				$(element).find("td").each(function(index,element){
					$(element).css("background-color", "#cccfbb");
				});
			}
		});
	});
	
	$(".tooltipable").each(function() {
		//alert("creating qtip");
		var cont = $(this).find(".tooltip").html();
		$(this).find(".tooltip").html("");
		/*$(this).qtip({
             content: cont
        });*/
		$(this).qtip({
               content: cont,
               position: {
                  corner: {
                     tooltip: "bottomMiddle", 
                     target: "topLeft"
                  },
				  adjust: {
					x: 5
					}
               },
               style: {
                  border: {
                     width: 5,
                     radius: 10
                  },
                  padding: 10, 
                  textAlign: 'center',
                  tip: true,
                  name: 'green' 
				}
        });
	});
});
