﻿
$(function() {
    $('div#featured').innerfade({
        speed: 1000,
        timeout: 5000,
        type: 'random',
        containerheight: '228px'
    });

});


 
$(document).ready(function(){

featuredcontentslider.init({
	id: "slider1",  //id of main slider DIV
	contentsource: ["inline", ""],  //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
	toc: "#increment",  //Valid values: "#increment", "markup", ["label1", "label2", etc]
	nextprev: ["", "הבא"],  //labels for "prev" and "next" links. Set to "" to hide.
	revealtype: "click", //Behavior of pagination links to reveal the slides: "click" or "mouseover"
	enablefade: [false, 0.1],  //[true/false, fadedegree]
	autorotate: [true, 6000],  //[true/false, pausetime]
	onChange: function(previndex, curindex){  //event handler fired whenever script changes slide
		//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
		//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
	}
})

});
 
(function($) {
$.fn.newsScroll = function(options) {
	return this.each(function() {	
		var $this = $(this), 
		  defaults = {
		  	speed: 400, 
		  	delay: 3000,
		  	list_item_height: $this.children('li').outerHeight() 
	     },
		  settings = $.extend({}, defaults, options);
	  setInterval(function() {
	  	    $this.children('li:first')
	  	    		.animate({ 
	  	    			marginTop : '-' + settings.list_item_height, 
	  	    		   opacity: 'hide' },
	  	    		   settings.speed, 
	  	    		   function() {
	  	 					$this.children('li:first')
	  	 					     .appendTo($this) 
	  	 					     .css('marginTop', 0) 
	  	 					     .fadeIn(300);
  		 			  }
 	 			  ); 
 	  }, settings.delay); 
	  });
}
})(jQuery);

