$(document).ready(function () {
	//Create button for next featurepic
	var a = document.createElement('img');
	a.src = 'images/layout/arrow-green-right.png';
	a.style.position = 'relative';
	a.style.left = '660px';
	a.style.top = '-350px';
	a.className = 'nextButton';
	a.style.cursor = 'pointer';
	a.style.zIndex = '20';
	a.style.display = 'none';
	a.height = 38;
	a.width = 21;

	//Add arrow to all featurepics
	$('.featurepic').append(a);

	//Scrolling Arrow - show only on mouse over featurepics
	$('.featurepic').hover(
  function () {
    $('img.nextButton').fadeIn();
  },
  function () {
    $('img.nextButton').fadeOut();
  }
  );

	//Scroller for featurepics
	$('#scroller').cycle({
		fx:     'fade',
		speed:  'slow',
		timeout:	'5000',
		pause: 1,
		next:   '.featurepic img.nextButton',
		pager:  '.pager',
		pagerAnchorBuilder: function(idx, slide) {
			return '.pager li:eq(' + idx + ') a';
		}
	});
});
