
$(document).ready(function(){
		$('.counteven:odd').addClass('even');
		
		var left_hp = $('.ContentColumn2_homepage').height();
		var right_hp = $('.ContentColumn3_homepage').height();
		
		if (left_hp >= right_hp ) {
			
	    $('.homepage_line').css({ "margin":"4px 0 0 4px","background-color":"#EC1C24", "height":left_hp+194 });
		}
		else {
		  $('.homepage_line').css({ "margin":"4px 0 0 4px","background-color":"#EC1C24", "height":right_hp });
		}
		

		var left_hp_old = $('.ContentColumn2').height();
		var right_hp_old = $('.ContentColumn3').height();
		
		if (left_hp_old >= right_hp_old ) {
			
	    $('.homepage_line').css({ "margin":"4px 0 0 4px","background-color":"#EC1C24", "height":left_hp_old });
		}
		else {
		  $('.homepage_line').css({ "margin":"4px 0 0 4px","background-color":"#EC1C24", "height":right_hp_old });
		}		
		
		var left = $('#leftborder').height();
		var right = $('#rightborder').height();

		if (left <= right ) {
			$('#rightborder').addClass("borderleft");
	  
		}
		else {
			$('#leftborder').addClass("borderright");
		}

	
					
	$('.hoverimage').hover(
		function(){
		  
			var thisItem = $(this);
			if (thisItem.is("img")) {
				thisItem.attr("src", thisItem.attr("src").replace(/.gif/, "_active.gif"));
			}else if (thisItem.is("a")){
			 alert(thisItem.attr("src"));
			  thisItem.children().children().attr("src", thisItem.children().children().attr("src").replace(/.gif/, "_active.gif"));
			}
		},
	  	function(){
			var thisItem = $(this);
			if (thisItem.is("img")) {
				thisItem.attr("src", thisItem.attr("src").replace(/_active.gif/, ".gif"));
			}else if (thisItem.is("a")){
			thisItem.children().children().attr("src", thisItem.children().children().attr("src").replace(/_active.gif/, ".gif"));
			}
		}
	);

	$('.hoverimagepng').hover(
		function(){
		  
			var thisItem = $(this);
			if (thisItem.is("img")) {
				thisItem.attr("src", thisItem.attr("src").replace(/.png/, "_active.gif"));
			}else if (thisItem.is("a")){
			 alert(thisItem.attr("src"));
			  thisItem.children().children().attr("src", thisItem.children().children().attr("src").replace(/.png/, "_active.gif"));
			}
		},
	  	function(){
			var thisItem = $(this);
			if (thisItem.is("img")) {
				thisItem.attr("src", thisItem.attr("src").replace(/_active.gif/, ".png"));
			}else if (thisItem.is("a")){
			thisItem.children().children().attr("src", thisItem.children().children().attr("src").replace(/_active.gif/, ".png"));
			}
		}
	);
	$('.hoverletter').hover(
		function(){
		  
			var thisItem = $(this);
			if (thisItem.is("img")) {
				thisItem.attr("src", thisItem.attr("src").replace(/_nor.gif/, "_rol.gif"));
			}else if (thisItem.is("a")){
			 alert(thisItem.attr("src"));
			  thisItem.children().children().attr("src", thisItem.children().children().attr("src").replace(/_nor.gif/, "_rol.gif"));
			}
		},
	  	function(){
			var thisItem = $(this);
			if (thisItem.is("img")) {
				thisItem.attr("src", thisItem.attr("src").replace(/_rol.gif/, "_nor.gif"));
			}else if (thisItem.is("a")){
			thisItem.children().children().attr("src", thisItem.children().children().attr("src").replace(/_rol.gif/, "_nor.gif"));
			}
		}
	);

	$("#formulier").hide();
	$("#verstuur").click(function () {
		$("#formulier").show();		  	
		$("#verstuur").hide()
    });
						   
 	
  $(".wachtwoordscherm").hide();
  $("#ww").click(function () {
    $(".wachtwoordscherm").show();
    $(".inlogscherm").hide();
  });
  $("#ww1").click(function () {
    $(".wachtwoordscherm").show();
    $(".inlogscherm").hide();
  });
 
  $("#il").click(function () {
    $(".wachtwoordscherm").hide();
    $(".inlogscherm").show();
  });
	

	
	
	$("#genres_right>ul>li>span.inactive").hover(
      function () {
        $(this).removeClass("inactive");
        $(this).addClass("active");
      }, 
      function () {
        $(this).removeClass("active");
        $(this).addClass("inactive");
      }
    );
	


		
	
	// Rating hover
	$('.rates > img').hover(
		function(){
			var thisItem = $(this);
			var theseImg = $('.rates img');
			var thisIndex = theseImg.index(thisItem[0]);
			thisItem.attr("src", thisItem.attr("src").replace(/_out./, "_over."));
			thisItem.siblings().each(function(){
				var thisItem = $(this);
				if(theseImg.index(thisItem[0]) < thisIndex){
					thisItem.attr("src", thisItem.attr("src").replace(/_out./, "_over."));
				}
				else {
					if(thisItem.is('.active')){
						thisItem.attr("src", thisItem.attr("src").replace(/_over./, "_out."));
					}
				}
			});
		},function(){
			var thisItem = $(this).parent().children('img');
			thisItem.each(function(){
				var thisItem = $(this);
				if(!thisItem.is('.active')){
					thisItem.attr("src", thisItem.attr("src").replace(/_over./, "_out."));
				}
				else {
					thisItem.attr("src", thisItem.attr("src").replace(/_out./, "_over."));
				}
			});
		}
	);

	
	// Rating hover
	$('.rates > img').hover(
		function(){
			var thisItem = $(this);
			var theseImg = $('.rates img');
			var thisIndex = theseImg.index(thisItem[0]);
			thisItem.attr("src", thisItem.attr("src").replace(/_out./, "_over."));
			thisItem.siblings().each(function(){
				var thisItem = $(this);
				if(theseImg.index(thisItem[0]) < thisIndex){
					thisItem.attr("src", thisItem.attr("src").replace(/_out./, "_over."));
				}
				else {
					if(thisItem.is('.active')){
						thisItem.attr("src", thisItem.attr("src").replace(/_over./, "_out."));
					}
				}
			});
		},function(){
			var thisItem = $(this).parent().children('img');
			thisItem.each(function(){
				var thisItem = $(this);
				if(!thisItem.is('.active')){
					thisItem.attr("src", thisItem.attr("src").replace(/_over./, "_out."));
				}
				else {
					thisItem.attr("src", thisItem.attr("src").replace(/_out./, "_over."));
				}
			});
		}
	);


});







