$(document).ready(function(){
	
	if ($.browser.mozilla | $.browser.opera){//tnx ie & safari for setting gif file play speed for me :(
		$("#web-design").hover(
			function(){
				$(".web-design-icon div").css("display","block");
			}, 
			function(){
				$(".web-design-icon div").hide();
			}
		);

		$("#event-photography").hover(
			function(){
				$(".event-photography-icon div").css("display","block");
			}, 
			function(){
				$(".event-photography-icon div").hide();
			}
		);
	}

	// weg vies effect
	//$("#work li div").hover(
	//	function(){
	//		$("span", this).slideDown({"easing":"easeOutBounce"}).fadeIn();
	//	}, 
	//	function(){
	//		$("span", this).slideUp();
	//	}
	//);

	$("#footer").hover(
		function(){
			$("a", this).css({"color":"#000"});
		}, 
		function(){
			$("a", this).css({"color":"#666"});
		}
	);

	var count = $("#work-item-thumbs-jpgs").children().size();
	if (count > 1){
		$("#work-item-thumbs-jpgs img").hover(
			function(){
				$(this).css({"cursor":"pointer"});
			}, 
			function(){
				$(this).css({"cursor":"default"});
			}
		);
	}
	
	$("#body-contact textarea, #body-contact input.text").focus(function(){
		$(this).css({"background-color":"#d0d8da"});
		}).blur(function(){
			$(this).css({"background-color":"#dfe8ea"});
		}
	);
	
});
	
$(function(){
	$("#work-item-thumbs-jpgs").cycle({ 
		fx:     'scrollHorz',
		easing: 'easeOutExpo',
		speed:  600,
		timeout: 0,
		next:   '#work-item-thumbs-jpgs',
		//next:   '#next',
		//prev:   '#prev',
		after:   onAfter,
		pager:  '#numbers'
	    
	});

	function onAfter(){
		$('#caption').html(this.alt); 
	}

// lightbox stijl
//	function onAfter(curr, next, opts){
//		var index = $(this).parent().children().index(this);
//		$('#caption').html(this.alt); 
//		$('#prev')[index == 0 ? 'hide' : 'show']();
//		$('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
//	}

});