$(document).ready(function() {
	$(".error p.e-msg").fadeOut(5000);	
	
	$("a.deletephoto").click(function(){
		if(window.confirm('Are you sure want to delete this photo?')){
			return true;
		}else{
			return false;
		}
	})
	
	$(".visible").css({visibility:"visible"});
	$(".invisible").hide();
	
	$('a.showwinner').toggle(
		function(){
			$('.wrap-inside #winner').slideDown();
			$(this).text('Hide 2009 Winner');
			return false;
		},
		function(){
			$('.wrap-inside #winner').slideUp();
			$(this).text('Show 2009 Winner');
			return false;			
		}	
	)
	
	$(".winner li a").click(function(){
		var getRelImg = $(this).attr('rel');
		if($("#"+getRelImg).is(':hidden')){
			$(".ss img").hide().removeClass('active');
			$("#"+getRelImg).fadeIn(1000).addClass("active");
			$('.winner li img').hide();
			$('.winner li').removeClass("active");		
			$(this).parent().children("img").show();
		}
		return false;		
	})
	
	$(".prev-gpc a").hover(
		function(){
			$(this).next().css('display','block');
		},
		function(){
			$(this).next().hide();
		}
	)
	
});

function ngapload(){
	$(".visible").hide();
	$(".invisible").show();
	return true;
}

// Cufon
Cufon.replace(
	'.contest h1 a,' +
	'.judges-reg .col-judges h2 a,' +
	'#content h1,' +
	'#content h2,' +
	'.sidebar .news h2 a',{ 
	hover: true
})