<?php
if (! function_exists("theme_get_image_size")) {
	function theme_get_image_size(){
		$customs =  theme_get_option('image','customs');
		$sizes = array(
			"small" => __("Small",THEME_ADMIN_DOMAIN),
			"medium" => __("Medium",THEME_ADMIN_DOMAIN),
			"large" => __("Large",THEME_ADMIN_DOMAIN),
		);
		if(!empty($customs)){
			$customs = explode(',',$customs);
			foreach($customs as $custom){
				$sizes[$custom] = ucfirst(strtolower($custom));
			}
		}
		return $sizes;
	}
}
return array(
	"title" => __("Image", THEME_ADMIN_DOMAIN),
	"shortcode" => 'image',
	"type" => 'enclosing',
	"contentOption" => 'src',
	"options" => array(
		array(
			"name" => __("Image Source Url",THEME_ADMIN_DOMAIN),
			"id" => "src",
			"size" => 30,
			"default" => "",
			'imagewidth'=>'200',
			'imageheight'=>'100',
			"type" => "upload",
		),
		array(
			"name" => __("Image Title (optional)",THEME_ADMIN_DOMAIN),
			"id" => "title",
			"size" => 30,
			"default" => "",
			"type" => "text",
		),
		array(
			"name" => __("Align (optional)",THEME_ADMIN_DOMAIN),
			"id" => "align",
			"default" => '',
			"prompt" => __("Choose one..",THEME_ADMIN_DOMAIN),
			"options" => array(
				"left" => __('Left',THEME_ADMIN_DOMAIN),
				"right" => __('Right',THEME_ADMIN_DOMAIN),
				"center" => __('Center',THEME_ADMIN_DOMAIN),
			),
			"type" => "select",
		),
		array(
			"name" => __("Icon (optional)",THEME_ADMIN_DOMAIN),
			"id" => "icon",
			"default" => '',
			"prompt" => __("Choose one..",THEME_ADMIN_DOMAIN),
			"options" => array(
				"zoom" => __('Zoom',THEME_ADMIN_DOMAIN),
				"play" => __('Play',THEME_ADMIN_DOMAIN),
				"doc" => __('Doc',THEME_ADMIN_DOMAIN),
				"link" => __('Link',THEME_ADMIN_DOMAIN),
			),
			"type" => "select",
		),
		array (
			"name" => __("Lightbox",THEME_ADMIN_DOMAIN),
			"id" => "lightbox",
			"default" => false,
			"type" => "toggle"
		),
		array (
			"name" => __("Lightbox group (optional)",THEME_ADMIN_DOMAIN),
			"id" => "group",
			"default" => '',
			"type" => "text"
		),
		array(
			"name" => __("Size (optional)",THEME_ADMIN_DOMAIN),
			"id" => "size",
			"default" => '',
			"prompt" => __("Choose one..",THEME_ADMIN_DOMAIN),
			"options" => theme_get_image_size(),
			"type" => "select",
		),
		array (
			"name" => __("Width (optional)",THEME_ADMIN_DOMAIN),
			"id" => "width",
			"default" => 0,
			"min" => 0,
			"max" => 942,
			"step" => "1",
			"type" => "range"
		),
		array (
			"name" => __("Height (optional)",THEME_ADMIN_DOMAIN),
			"id" => "height",
			"default" => 0,
			"min" => 0,
			"max" => 900,
			"step" => "1",
			"type" => "range"
		),
		array (
			"name" => __("Auto adjust Height",THEME_ADMIN_DOMAIN),
			"id" => "autoHeight",
			"default" => false,
			"type" => "toggle"
		),
		array(
			"name" => __("Link (optional)",THEME_ADMIN_DOMAIN),
			"size" => 30,
			"id" => "link",
			"default" => "",
			"type" => "text",
		),
		array(
			"name" => __("Link Target (optional)",THEME_ADMIN_DOMAIN),
			"id" => "linkTarget",
			"default" => '',
			"prompt" => __("Choose one..",THEME_ADMIN_DOMAIN),
			"options" => array(
				"_blank" => __('Load in a new window',THEME_ADMIN_DOMAIN),
				"_self" => __('Load in the same frame as it was clicked',THEME_ADMIN_DOMAIN),
				"_parent" => __('Load in the parent frameset',THEME_ADMIN_DOMAIN),
				"_top" => __('Load in the full body of the window',THEME_ADMIN_DOMAIN),
			),
			"type" => "select",
		),
	),
	"custom" => '',
);
