 // Fix IE PNG
 if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent) &&
  document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule)
 {
  document.styleSheets[0].addRule('*', 'behavior: url(resources/iepngfix.htc)');
 }



 var iCurrentLi = 0;
 
 function fadeOutLi() {
	$('#portfolio ul li').eq(iCurrentLi).fadeOut('slow', function() {
		
		// Hide all
		$(this).parent('ul').children('li').hide();

		if(iCurrentLi >= $(this).siblings().length )
			iCurrentLi = 0;
		else
			iCurrentLi+= 1;
		fadeLi();
	})
 }

 function fadeLi() {
	$('#portfolio ul li').eq(iCurrentLi).fadeIn('slow', function() {
		window.setTimeout(fadeOutLi, 4000);
	})
 }

 $('document').ready(function() {
 	
 		// hello button - scroll to form
 		$('#hellobutton').click(function() {
			$().scrollTo($('#form-container').position().top-20, {duration: 'normal'});
			$('#form-container').find('input:first').trigger('focus');
			return false;
		});


		$('#portfolio').addClass('animated');
		fadeLi();

 })