/*
	This javascript(jquery plugin) is created by iindev.com (http://www.iindev.com)
	This is not a free software. Please do not resell or redistribute this code
	without prior permission of iindev.com
	
	This plugin is tested using with jquery version 1.3.2
-------------------------------------------------------------------------------
*/

var speed			= 500;	//setting a half second speed for the sliding down effect
var duration		= 2000;	//setting a 2 second interval for next slide down


/*********************
Please do not edit after this area..
*********************/
var startAutoSliding;
var totalElements	= 0;
var totalHeight		= 0;
var currentHeight	= 0;

var easeEffect		= 'linear'


function slideDownSingle(){
	var whichOneToShow = parseInt($("#whichOneToShow").val())
	
	if(whichOneToShow == 0){
		clearInterval(startAutoSliding)
	}

	var howMuchToMove = $(".InfoDetails").eq(whichOneToShow).height() + 7
	
	var immediateHeight4backOut = totalHeight + 15;
	totalHeight -= howMuchToMove;

	$(".InfoDetails:first")
	.animate({marginTop:-immediateHeight4backOut}, 200)
	.animate({marginTop:-totalHeight}, speed)
	
	$("#whichOneToShow").val(whichOneToShow-1)
}

$(function(){

	totalElements = $(".InfoDetails").size()

	$("body").append('<input type="hidden" id="whichOneToShow" value="0" />')
	$("#whichOneToShow").val(totalElements-1);


	$(".InfoDetails").each(function(){
		totalHeight+=($(this).height()+7)
	})

	$(".InfoDetails:first").css({marginTop:-totalHeight})

})

$(window).load(function(){
	//slideDownSingle()
	//startAutoSliding = setInterval("slideDownSingle()", duration);
});