$(document).ready(function() {

	//When page loads...
	$(".tab1_content").hide(); //Hide all content
	$("ul.tabs1 li:first").addClass("selected").show(); //Activate first tab
	$(".tab1_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs1 li").click(function() {

		$("ul.tabs1 li").removeClass("selected"); //Remove any "selected" class
		$(this).addClass("selected"); //Add "selected" class to selected tab
		$(".tab1_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

});
$(document).ready(function() {

	//When page loads...
	$(".tab2_content").hide(); //Hide all content
	$("ul.tabs2 li:first").addClass("selected").show(); //Activate first tab
	$(".tab2_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs2 li").click(function() {

		$("ul.tabs2 li").removeClass("selected"); //Remove any "selected" class
		$(this).addClass("selected"); //Add "selected" class to selected tab
		$(".tab2_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

});
$(document).ready(function() {

	//When page loads...
	$(".tab3_content").hide(); //Hide all content
	$("ul.tabs3 li:first").addClass("selected").show(); //Activate first tab
	$(".tab3_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs3 li").click(function() {

		$("ul.tabs3 li").removeClass("selected"); //Remove any "selected" class
		$(this).addClass("selected"); //Add "selected" class to selected tab
		$(".tab3_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

});
$(document).ready(function() {

	//When page loads...
	$(".tab4_content").hide(); //Hide all content
	$("ul.tabs4 li:first").addClass("selected").show(); //Activate first tab
	$(".tab4_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs4 li").click(function() {

		$("ul.tabs4 li").removeClass("selected"); //Remove any "selected" class
		$(this).addClass("selected"); //Add "selected" class to selected tab
		$(".tab4_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

});

this.tipp = function() {    
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 10; // y distance from mouse       
    
    $(".tipp").unbind().hover(    
        function(e) {
            this.t = this.title;
            this.title = ''; 
            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
            
            $('body').append( '<p id="tipp"><img id="tippArrow" />' + this.t + '</p>' );
                        
            $('p#tipp #tippArrow').attr("src", '../templates/spartav3/jscript/tipp_arrow.png');
            $('p#tipp').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");
            
        },
        function() {
            this.title = this.t;
            $("p#tipp").fadeOut("slow").remove();
        }
    ).mousemove(
        function(e) {
            this.top = (e.pageY + yOffset);
            this.left = (e.pageX + xOffset);
                         
            $("p#tipp").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};

jQuery(document).ready(function($){tipp();}) 
