function initRotate(jQueryMatch){
	var height = 20;
	var jQelems = jQueryMatch.children();
	jQelems.each(function(index, Element){
		$(Element).css({top:(index * height)})
	});
	jQueryMatch.addClass('roll');
	
	var num = jQelems.length;
	var pos = 0;
	
	var moveToNext = function(){
		$(jQelems[pos]).animate({top: -height}, 2000);
		var new_pos = pos + 1;
		if(new_pos >= jQelems.length){
			new_pos = 0;
		}
		pos = new_pos;
		var top = $(jQelems[pos]).css('top');
		if(parseInt(top) < 0){
			$(jQelems[pos]).css({top: height});
		}
		$(jQelems[pos]).animate({top: 0}, 2000);
	};
	var timer = Basic.timer(10000, moveToNext);
}

function hoverOverInit(jQueryMatch){
	var targetOp = 0.4;
	var startOp = 0.0;
	var _duration = 200;
	
	jQueryMatch.each(function(index, Element){
		var elem = $(Element);
		var _w = elem.innerWidth();
		var _h = elem.innerHeight();

		elem.addClass('grayed');
		elem.append('<span class="grayed_over"></span>')
			.find('.grayed_over')
			.css({opacity: startOp, width: _w, height: _h})
			.mouseenter(function(object){
				$(this).stop().animate({opacity: targetOp}, _duration);
			})
			.mouseleave(function(object){
				$(this).stop().animate({opacity: startOp}, _duration);
			});
	});
}

function initFlyBy(jQueryMatch){
	var posStartOffset = 100;
	var _duration = 1500;
	var timeOffset = 800;
	
	jQueryMatch.each(function (index, Element){
		var elem = $(Element);
		elem.css({opacity: 0});
	});
}

function initImageZoom(field){
	Slideshow.jQueryMatchImagesSlideshow($(field), 1200);
}

