<?
$SLIDERMODE = $P['plugpath'];

##########################################################################
#### $SLIDERMODE 0 ... new Slider 1 ... Close an active Slider
##########################################################################

#### new Slider only if no exists ( multiple slider not supported)

if ($SLIDERMODE == "0" && !$wb->Instances->SliderInstance())	{
	$Design->RegCss['contentslider']['css'] = true;
	require_once (DESIGNRENDERSCRIPTS.'slider.class.php');
	$wb->Instances->SliderSetInstance (new SliderHandler ($P)); 
}

#### finalize a slider if exists
#### then get the instance object an close it. 
#### remove the instance from stack
#### create an paragraph entry in fill data in a psossible other instance
#### for ex.: tabs, accordion, split

if ($SLIDERMODE == "1" && $wb->Instances->SliderInstance()) { 
	$slide = $wb->Instances->SliderGetInstance ();
	$id = $slide->CloseSlider($P);
	$wb->Instances->SliderDelInstance();
	$Paragraph->Content['Content'] = 'STR_MakeParagraph(SENTRA_HOME.\'assets/content/'.$id.'.php\');';
	$wb->Instances->FillData($Paragraph->Content['Content']);	
}
?>