<?php

global $vbulletin;
//SET CONSTANTS
if ($vbulletin->stylevars['dbtech_vbnavtabs_420_image_padding'])
{
	$image_padding = ' padding: ' . $vbulletin->stylevars['dbtech_vbnavtabs_420_image_padding']['top'] . $vbulletin->stylevars['dbtech_vbnavtabs_420_image_padding']['units'];
	$image_padding .= ' ' . $vbulletin->stylevars['dbtech_vbnavtabs_420_image_padding']['right'] . $vbulletin->stylevars['dbtech_vbnavtabs_420_image_padding']['units'];
	$image_padding .= ' ' . $vbulletin->stylevars['dbtech_vbnavtabs_420_image_padding']['bottom'] . $vbulletin->stylevars['dbtech_vbnavtabs_420_image_padding']['units'];
	$image_padding .= ' ' . $vbulletin->stylevars['dbtech_vbnavtabs_420_image_padding']['left'] . $vbulletin->stylevars['dbtech_vbnavtabs_420_image_padding']['units'] . ';';
}

//START ARCADE NAV ELEMENTS
if ($vbulletin->options['dbtech_vbarcade_enable_navtab'])
{
	if ($vbulletin->options['dbtech_vbnavtabs_420_arctab_image'])
	{
		$result['dbtech_vbarcade'] = array(
			'text' => '<img src="dbtech/vbnavtabs_420/images/DBT_images/'. $vbulletin->options['dbtech_vbnavtabs_420_arctab_img_img'] .'"  style="margin-bottom:.25em; vertical-align:middle;' . $image_padding . '" >'
			.$vbphrase['dbtech_vbarcade_arcade'].'',
			'url' => 'arcade.php{session.sessionurl_q}',
			'productid' => 'dbtech_vbarcade',
			'navid' => 'dbtech_vbarcade',
			'name' => 'dbtech_vbarcade',
			'scripts' => 'arcade',
			'displayorder' => 40,
			'navtype' => 'tab',
			'active' => 1
		);
	} else{
		$result['dbtech_vbarcade'] = array(
			'text' => $vbphrase['dbtech_vbarcade_arcade'] ,
			'url' => 'arcade.php{session.sessionurl_q}',
			'productid' => 'dbtech_vbarcade',
			'navid' => 'dbtech_vbarcade',
			'name' => 'dbtech_vbarcade',
			'scripts' => 'arcade',
			'displayorder' => 40,
			'navtype' => 'tab',
			'active' => 1
		);		
	}

	function arcade_tab_sort($a, $b) { return ($a['displayorder'] == $b['displayorder'] ? 0 : ($a['displayorder'] > $b['displayorder'] ? 1 : -1)); }
	uasort($result, 'arcade_tab_sort');
}
//END ARCADE NAV ELEMENTS

?>