// TVL 2009

// ### Anmeldeformular focus: 
$(function(){
    $('input[type="text"],select').addClass('textfield');
    
    $('input[type="text"],select').focus(function() {
        $(this).removeClass('textfield').addClass('focus');
    })
    
    $('input[type="text"],select').blur(function() {
        $(this).removeClass('focus').addClass('textfield');
    })
    
    $('#anmeldung .haftung input.checkbox').attr('checked', false);
    
    $('#anmeldung .haftung input.checkbox').click(function() {        
           if ($('.haftung input.checkbox').is(':checked'))
           {
            $('#anmeldung .haftung').css('background-color', '#77F000');
           } 
           else
           {
            $('#anmeldung .haftung').css('background-color', '#dfdfdf');
           }                     
           
        });
});

// ### Marathon Einblenden:

$(function(){
   $('select.select').val('1');
   $('.marathon').hide(); 
     
   $('select.select').click(function(){
   switch ($('select.select :selected').text()) {
            case '1':
                $('.marathon').hide('slow');
                $('.marathon input.checkbox').attr('checked', false);
            break;
            
            case '2':
                $('.marathon').hide('slow');
                $('.marathon input.checkbox').attr('checked', false);
            break;
            
            case '3':
                $('.marathon').hide('slow');
                $('.marathon input.checkbox').attr('checked', false);
            break;
            
            case '4':
                $('.marathon').hide('slow');
                $('.marathon input.checkbox').attr('checked', false);
            break;
            
            case '5':
                $('.marathon').hide('slow');
                $('.marathon input.checkbox').attr('checked', false);
            break;
            
            case '6':
                $('.marathon').hide('slow');
                $('.marathon input.checkbox').attr('checked', false);
            break;
            
            case '7':
                $('.marathon').show('slow');
            break;
        } 
    });
});


// ### jQuery Navi Hover Effekt: ###
$(function(){
	$('#nav1 a, #nav2 a, #nav3 a, #nav4 a, #nav5 a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({opacity: 0.0}, {duration:200})
		})
		.mouseout(function(){
			$(this).stop().animate({opacity: 1.0}, {duration:300})
		})

});

// ### jQuery topSubnavi Hover ###

$(document).ready(function() {
        $('#topSubnavi a img').hover(
            function() {
                this.src = this.src.replace('_0.gif','_1.gif');
            },
            function() {
                this.src = this.src.replace('_1.gif','_0.gif');
            }
        );
    });
    
// ### jQuery teaserNavi Hover ###

$(document).ready(function() {
        $('#teaserNavi a img').hover(
            function() {
                this.src = this.src.replace('_0.gif','_1.gif');
            },
            function() {
                this.src = this.src.replace('_1.gif','_0.gif');
            }
        );
    });


// ### easyTooltip ###

$(document).ready(function(){
	$("#wrapper a, #footer a").easyTooltip();	
});






// ### Equalhights - 3 gleiche Spalten auf Startseite ###

/*$(document).ready(function() {
    $(".class").equalHeights(300,500);
}); */






/*
// JavaScript Document
// Rollover ---------------------------------------------------------------------
// Browser
browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion);
if (browser_name == "Netscape" && browser_version >= 3.0) {
	rollover = 'true';
}else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 4.0){
	rollover = 'true';
}else {
	rollover = 'false'; 
}
function rein1(img) {
	if (rollover == 'true') {
		document.images[img].src = document.images[img].src.replace("_0.gif", "_1.gif");
	}
} 
function raus1(img) {
	if (rollover == 'true') {
		document.images[img].src = document.images[img].src.replace("_1.gif", "_0.gif");
	}
}*/


// ### jQuery Navi Hover ###
/*
$(document).ready(function() {
        $('#naviC a img').hover(
            function() {
                this.src = this.src.replace('_0.gif','_1.gif');
            },
            function() {
                this.src = this.src.replace('_1.gif','_0.gif');
            }
        );
    });
*/



// ### Suchfeld ###
function clearField(obj){
	if(obj.value == search_def_str){
	  obj.value = "";
	}
}
function showDefault(obj){
	if(obj.value == ""){
	  obj.value = search_def_str;
	}
}







