function rollover(imgSrc)
{	
	var cap = document.getElementById(imgSrc);
	cap.src = "i/"+imgSrc+"_on.gif";
}
function rollout(imgSrc)
{	
	var cap = document.getElementById(imgSrc);
	cap.src = "i/"+imgSrc+".gif";
}

function openDialog()
{	
	var dialogX = ($("body").innerWidth()/2)-148;	
	$("#dialoger").css({top:240, left:dialogX});
	$("#dialoger").fadeIn("slow");
}

function killDialog()
{	
	$("#dialoger").fadeOut("slow");
}



$(document).ready(function() {

	if ( $.browser.msie && $.browser.version < 7)
	{		
		$("#flex").each(function(i) { /*
		 this.style.backgroundImage = "none"
		 this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/timmah.png', sizingMethod='scale')"; 
		 */
	    });	
		$("#voteBasket").each(function(i) {
									   /*
		 this.style.backgroundImage = "none"
		 this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/timmah.png', sizingMethod='scale')"; 
		 */
	    });	
		$("#voteIcon").each(function(i) {
									 /*
  		 this.style.backgroundImage = "none"
		 this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='i/voteIcon.png', sizingMethod='scale')"; 		
		 */
		});	
        $(".voteLabel").find("a").each(function(i) {
												/*
		 this.style.backgroundImage = "none"
		 this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/i/label_vote_main.png', sizingMethod='scale')"; 
		 */
	    });		
	}
						   
   $("#voteUL > li").each(function(i)
	{	
	  $(this).hover(function(){$(this).addClass("hovered")},function(){$(this).removeClass("hovered")});	  
	  $(this).mouseup(function(){ $("#voteList" > "ul").find("li").each(function(i){ $(this).removeClass("selected"), $(this).find("#confirmVote").css({display:"none"})})});
	  $(this).click(function(){ $(this).addClass("selected"), $(this).find("#confirmVote").css({display:"block"})});	  	 
	});
  
   $("#btn_login").click(function(){ 
	   	var yuk = $("html").height()
		var gen = $(window).width()
		var ust = $(window).height()/2 - $("#loginPane").outerHeight()/2;
		var sol = $(window).width()/2 - $("#loginPane").outerWidth()/2;
		$("#fpFader").css({'height':yuk, 'width':gen, 'display':'block', 'opacity':0})
		$("#loginPane").css({'top':ust, 'left':sol})
		$("#fpFader").animate({opacity: 0.8}, 'normal', function(){$("#loginPane").show('fast')})});
   $("#loginCancel").click(function(){ 		
		$("#loginPane").hide('fast',function(){$("#fpFader").fadeOut('normal')});
		})
});
