$(document).ready(function(){

	$("ul.thumb li").hover(function() {
		$(this).css({'z-index' : '10'});
		$(this).find('img').addClass("hover").stop()
			.animate({
				marginTop: '-140px', 
				marginLeft: '-83px', 
				top: '50%', 
				left: '50%', 
				width: '154px', 
				height: '200px',
				padding: '5px',
				opacity: 1
			}, 300);
		
		}, function() {
		$(this).css({'z-index' : '0'});
		$(this).find('img').removeClass("hover").stop()
			.animate({
				marginTop: '0', 
				marginLeft: '0',
				top: '0', 
				left: '0', 
				width: '99px', 
				height: '128px', 
				padding: '0px',
				opacity: 0.7
			}, 300);
	});

/*
	$("ul.thumb li a").click(function() {
		var link = $(this).attr("href");
		location.href(link);
	});
*/
/*
	$('.gallery a').lightBox({
		fixedNavigation:true
	});
*/
	$(".iframe").colorbox({
		width:"600px", 
		height:"590px", 
		iframe:true,
		innerWidth:"100%",
		innerHeight:"100%",
		scrolling:false
		
	});
	$("#palauteLinkki").colorbox({
		width:"600px", 
		height:"590px", 
		iframe:true,
		innerWidth:"100%",
		innerHeight:"100%",
		scrolling:false
	});
	$(".gallery a").colorbox({
		maxHeight:"550px",
		rel:"nostot"
	});


//	$.ajax({
//		method: "get", url: "kysymys.asp",
//		success: function(html){
//			$("#leftKysymysContent").html(html);
//		}
//	});
//
//	$("#leftKysymysContent").ajaxError(function(event, request, settings){
//		$(this).append("Virhe kysymyksess&auml; " + settings.url);
//	});


 
});


function opencolorbox(hreffi){
	$.fn.colorbox({
		open:true,
		maxHeight:"550px",
		href:hreffi,
		rel:"nostot"
	}); 
}


function changeBg(aId, aId2, aSrc){
	var obj = document.getElementById(aId);
	var obj2 = document.getElementById(aId2);
	//obj.src = '/golfdigest/images/navi/' + aSrc;
	obj.style.display = 'none';
	obj2.style.display = 'block';
}

