/*
 * jQuery Featured Posts Animation
 * Author: Gupse İnternet Teknolojileri (gupse.net)
 * Data: 2011-09-25
 */
$(document).ready(function() {

	$('#slider') 
	.cycle({
		fx:     'fade',
		speed:   900, 
		timeout: 4000, 
		startingSlide: 0,
		pause:   1,
		pagerEvent:   'mouseover',
		pager:   '#nav'
	});

	/* cycar: Cycle Carousel */
	var maxItems = 4;
	$(".cycar-wrapper li").each(function(i){
		if(i%maxItems == 0 && i>=maxItems){
			$(".cycar-wrapper").append("<ul class='cycar-list'></ul>");
		}
		$(".cycar-wrapper .cycar-list").last().append(this);
	});
	
	$("#cycar").append('<a id="cycar-next" class="fixPNG cycar-next" href="javascript:;">N</a> <a id="cycar-prev" class="fixPNG cycar-prev" href="javascript:;">P</a>');

	$('.cycar-wrapper').cycle({ 
		fx:      'scrollHorz', 
		speed:   '500', 
		timeout: '5000', 
		next:    '.cycar-next',
		prev:    '.cycar-prev'
	});

});
