// Sets the random images and text in the background
this.randomslide = function(){
	
	// Set slide count
	bgImageTotal=4;
	
	//Find the number of li elements
	var length = $("#slideshow_txt li").length;
	
	// Randomize images and text
	var ran = Math.round(Math.random()*(bgImageTotal-1))+1;
	
	// Set slideshow txt
	$("#slideshow_txt li:nth-child(" + ran + ")").show();
	
	// Set the background image path
	imgPath=('/wp-content/themes/dcm/images/slideshow_image'+ran+'.jpg');
	$('#header_slideshow').css('background-image', ('url("'+imgPath+'")'));
};

$(document).ready(function(){	
	randomslide();
});

