/* Random testimonial content 
----------------------------------------------------------------------------- */

initialize_random_content();
function initialize_random_content() {
	testimonial_number = $(".bottom_block > div.random_content").size();
	var x = 20;
	do
	   {
	   var randomnumber=Math.floor(Math.random()*testimonial_number);
	   }
	while (randomnumber < 1);
	var randomnumber=Math.floor(Math.random()*testimonial_number);
	$(".content_item_"+(randomnumber+1)).css("display","block"); 
	}

/* Slideshow
----------------------------------------------------------------------------- */

featuredcontentslider.init({
	id: "slider1",  //id of main slider DIV
	contentsource: ["inline", ""],  //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
	toc: "markup",  //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: [true, 0.2],  //[true/false, fadedegree]
	autorotate: [true, 3000],  //[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)
	}
})

/* Logo gallery
----------------------------------------------------------------------------- */

featuredcontentglider.init({
	gliderid: "the_gallery", //ID of main glider container
	contentclass: "gallery_panel", //Shared CSS class name of each glider content
	togglerid: "gallery_toggler", //ID of toggler container
	remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
	selected: 0, //Default selected content index (0=1st)
	persiststate: false, //Remember last content shown within browser session (true/false)?
	speed: 500, //Glide animation duration (in milliseconds)
	direction: "rightleft", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
	autorotate: true, //Auto rotate contents (true/false)?
	autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
})


/* Firefox fix version 4
------------------------------------------------------------------------------- */

$(document).ready ( 
	 function() {
	 
	  if ( $.browser.mozilla == true && $.browser.version > '4.0' ) {
	   $('div.slideshow_content').css('position','relative');
   	   $('div.slideshow_content').css('top','-30px');
	  }

	 }
);

