jQuery.noConflict();

/*
 * jQuery Cycle Lite Plugin
 * http://malsup.com/jquery/cycle/lite/
 * Copyright (c) 2008 M. Alsup
 * Version: 1.0 (06/08/2008)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.3 or later
 */
(function(b){var a="Lite-1.0";b.fn.cycle=function(e){return this.each(function(){e=e||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=0;this.cyclePause=0;var l=b(this);var i=e.slideExpr?b(e.slideExpr,this):l.children();var g=i.get();if(g.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+g.length);}return;}var h=b.extend({},b.fn.cycle.defaults,e||{},b.metadata?l.metadata():b.meta?l.data():{});h.before=h.before?[h.before]:[];h.after=h.after?[h.after]:[];h.after.unshift(function(){h.busy=0;});var f=this.className;h.width=parseInt((f.match(/w:(\d+)/)||[])[1])||h.width;h.height=parseInt((f.match(/h:(\d+)/)||[])[1])||h.height;h.timeout=parseInt((f.match(/t:(\d+)/)||[])[1])||h.timeout;if(l.css("position")=="static"){l.css("position","relative");}if(h.width){l.width(h.width);}if(h.height&&h.height!="auto"){l.height(h.height);}var j=0;i.css({position:"absolute",top:0,left:0}).hide().each(function(m){b(this).css("z-index",g.length-m);});b(g[j]).css("opacity",1).show();if(b.browser.msie){g[j].style.removeAttribute("filter");}if(h.fit&&h.width){i.width(h.width);}if(h.fit&&h.height&&h.height!="auto"){i.height(h.height);}if(h.pause){l.hover(function(){this.cyclePause=1;},function(){this.cyclePause=0;});}b.fn.cycle.transitions.fade(l,i,h);i.each(function(){var m=b(this);this.cycleH=(h.fit&&h.height)?h.height:m.height();this.cycleW=(h.fit&&h.width)?h.width:m.width();});i.not(":eq("+j+")").css({opacity:0});if(h.cssFirst){b(i[j]).css(h.cssFirst);}if(h.timeout){if(h.speed.constructor==String){h.speed={slow:600,fast:200}[h.speed]||400;}if(!h.sync){h.speed=h.speed/2;}while((h.timeout-h.speed)<250){h.timeout+=h.speed;}}h.speedIn=h.speed;h.speedOut=h.speed;h.slideCount=g.length;h.currSlide=j;h.nextSlide=1;var k=i[j];if(h.before.length){h.before[0].apply(k,[k,k,h,true]);}if(h.after.length>1){h.after[1].apply(k,[k,k,h,true]);}if(h.click&&!h.next){h.next=h.click;}if(h.next){b(h.next).bind("click",function(){return d(g,h,h.rev?-1:1);});}if(h.prev){b(h.prev).bind("click",function(){return d(g,h,h.rev?1:-1);});}if(h.timeout){this.cycleTimeout=setTimeout(function(){c(g,h,0,!h.rev);},h.timeout+(h.delay||0));}});};function c(j,e,i,k){if(e.busy){return;}var h=j[0].parentNode,m=j[e.currSlide],l=j[e.nextSlide];if(h.cycleTimeout===0&&!i){return;}if(i||!h.cyclePause){if(e.before.length){b.each(e.before,function(n,p){p.apply(l,[m,l,e,k]);});}var f=function(){if(b.browser.msie){this.style.removeAttribute("filter");}b.each(e.after,function(n,p){p.apply(l,[m,l,e,k]);});};if(e.nextSlide!=e.currSlide){e.busy=1;b.fn.cycle.custom(m,l,e,f);}var g=(e.nextSlide+1)==j.length;e.nextSlide=g?0:e.nextSlide+1;e.currSlide=g?j.length-1:e.nextSlide-1;}if(e.timeout){h.cycleTimeout=setTimeout(function(){c(j,e,0,!e.rev);},e.timeout);}}function d(e,f,i){var h=e[0].parentNode,g=h.cycleTimeout;if(g){clearTimeout(g);h.cycleTimeout=0;}f.nextSlide=f.currSlide+i;if(f.nextSlide<0){f.nextSlide=e.length-1;}else{if(f.nextSlide>=e.length){f.nextSlide=0;}}c(e,f,1,i>=0);return false;}b.fn.cycle.custom=function(j,h,i,f){var e=b(j),k=b(h);k.css({opacity:0});var g=function(){k.animate({opacity:1},i.speedIn,i.easeIn,f);};e.animate({opacity:0},i.speedOut,i.easeOut,function(){e.css({display:"none"});if(!i.sync){g();}});if(i.sync){g();}};b.fn.cycle.transitions={fade:function(g,f,e){f.not(":eq(0)").css("opacity",0);e.before.push(function(){b(this).show();});}};b.fn.cycle.ver=function(){return a;};b.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null};})(jQuery);

jQuery(document).ready(function() {
	var wprSlideshow = jQuery('#slideshow');
	wprSlideshow.css('width', wprSlideshow.parents('#header').width());
	var slideShowPhotoPath = '/layouts/golfbaan/images/banner/';
	var slideshow_images = [
		slideShowPhotoPath + 'img-01.jpg',
		slideShowPhotoPath + 'img-02.jpg',
		slideShowPhotoPath + 'img-03.jpg',
		slideShowPhotoPath + 'img-04.jpg',
		slideShowPhotoPath + 'img-05.jpg'
	];
	slideshow_images.sort(function() { return 0.5 - Math.random() });
	for (var i = 0; i < slideshow_images.length; i++) {
		wprSlideshow.append('<img src="' + slideshow_images[i] + '">');
	}
	wprSlideshow.cycle({
		timeout: 3000,
		speed: 1000,
		sync: 1,
		pause: 1
	});
});
