$(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();
	
	$(".showhide a").toggle(
		function(){
			var getRel = $(this).attr('rel');
			$("#"+getRel).slideDown();
			$(this).text("Hide 2008 Winner");
		},
		function(){
			var getRel = $(this).attr('rel');
			$("#"+getRel).slideUp();			
			$(this).text("Show 2008 Winner");
		}
	)
	
	$(".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;
}
