<?php
$custom_script = <<<HTML
	var width = attrs['width'].value;
	var delay = attrs['delay'].value;
	var position = attrs['position'].value;
	var bgcolor = attrs['bgcolor'].value;
	var bordercolor = attrs['bordercolor'].value;
	var textcolor = attrs['textcolor'].value;
	var effect = attrs['effect'].value;
	var content = attrs['content'].value;
	var tipscontent = attrs['tipscontent'].value;
	if(width != ''){
		width = ' width="'+width+'"';
	}
	if(delay != ''){
		delay = ' delay="'+delay+'"';
	}
	if(position != ''){
		position = ' position="'+position+'"';
	}
	if(bgcolor != ''){
		bgcolor = ' bgcolor="'+bgcolor+'"';
	}
	if(bordercolor != ''){
		bordercolor = ' bordercolor="'+bordercolor+'"';
	}
	if(textcolor != ''){
		textcolor = ' textcolor="'+textcolor+'"';
	}
	if(effect != ''){
		effect = ' effect="'+effect+'"';
	}
	var ret = '\\n[tips'+width+delay+position+bgcolor+bordercolor+textcolor+effect+']\\n';
	ret +='[tip_content]\\n'+tipscontent+'\\n[/tip_content]\\n';
	ret +=content+'\\n';
	ret +='[/tips]\\n';
	return ret;
HTML;
return 	array(
	"title" => __("Tips", THEME_ADMIN_DOMAIN),
	"shortcode" => "tips",
	"type" => 'custom',
	"options" => array(
		array(
			"name" => __("TipsContent (optional)",THEME_ADMIN_DOMAIN),
			"id" => "tipscontent",
			"size" => 30,
			"default" => "",
			"type" => "textarea",
		),
		array(
			"name" => __("Content (optional)",THEME_ADMIN_DOMAIN),
			"id" => "content",
			"default" => "",
			"type" => "textarea"
		),
		array(
			"name" => __("Width",THEME_ADMIN_DOMAIN),
			"id" => "width",
			"min" => "100",
			"max" => "942",
			"step" => "1",
			"default" => "100",
			"type" => "range",
		),
		array(
			"name" => __("Delay",THEME_ADMIN_DOMAIN),
			"id" => "delay",
			"min" => "10",
			"max" => "5000",
			"step" => "10",
			"default" => "500",
			"type" => "range",
		),
		array(
			"name" => __("Position",THEME_ADMIN_DOMAIN),
			"id" => "position",
			"type"=>"select",
			"default" => 'top-center',
			"options" => array(
				'top-center' => 'Top Center',
				'top-left' => 'Top Left',
				'top-right' => 'Top Right',
				'center-left' => 'Center Left',
				'center-right' => 'Center Right',
				'bottom-center' => 'Bottom Center',
				'bottom-left' => 'Bottom Left',
				'bottom-right' => 'Bottom Right',
			),
		),	
		array(
			"name" => __("Effect",THEME_ADMIN_DOMAIN),
			"id" => "effect",
			"type"=>"select",
			"default"=>"fade",
			"options" => array(
				'fade' => 'Fade',
				"toggle" =>"Toggle",
				"slide"=>"Slide",
			),
		),

		array(
			"name" => __("BackgroundColor(optional)",THEME_ADMIN_DOMAIN),
			"id" => "bgcolor",
			"size" => 30,
			"default" => "",
			"type" => "color",
		),
		array(
			"name" => __("BorderColor(optional)",THEME_ADMIN_DOMAIN),
			"id" => "bordercolor",
			"size" => 30,
			"default" => "",
			"type" => "color",
		),
		array(
			"name" => __("TextColor(optional)",THEME_ADMIN_DOMAIN),
			"id" => "textcolor",
			"default" => "",
			"type" => "color",
		),

	),
	"custom" => $custom_script,
);
