<?php
$config = array(
	'title' => __('Portfolio Item Options',THEME_ADMIN_DOMAIN),
	'id' => 'portfolio',
	'post_types' => array('portfolio'),
	'callback' => '',
	'context' => 'normal',
	'priority' => 'high',
);

$options = array(
	array(
		"name" => __("Breadcrumbs Parent Page",THEME_ADMIN_DOMAIN),
		"desc" => __("If set will enable portfolio items breadcrumbs. The page you choose here will be the parent page of portfolio items on the breadcrumbs.",THEME_ADMIN_DOMAIN),
		"id" => "_breadcrumbs_page",
		"page" => 0,
		"default" => 0,
		"chosen" => "true", 
		"prompt" => __("Default",THEME_ADMIN_DOMAIN),
		"type" => "select",
	),
	array(
		"name" => __("Portfolio Type",THEME_ADMIN_DOMAIN),
		"desc" => sprintf(__("%s supports image and video for demonstrating the portfolio in the Lightbox. If the type is document, the thumbnail image is link to page of portfolio",THEME_ADMIN_DOMAIN),THEME_NAME),
		"id" => "_type",
		"default" => 'image',
		"options" => array(
			"image" => __('Image',THEME_ADMIN_DOMAIN),
			"gallery" => __('Gallery',THEME_ADMIN_DOMAIN),
			"video" => __('Video',THEME_ADMIN_DOMAIN),
			"doc" => __('Document',THEME_ADMIN_DOMAIN),
			"link" => __('Link',THEME_ADMIN_DOMAIN),
			"iframe" => __('Iframe',THEME_ADMIN_DOMAIN),
		),
		"type" => "select",
	),
	array(
		"type" => "group_start",
		"group" => "portfolio_image",
	),
	array(
		"name" => __("Fullsize Image for Lightbox (optional)",THEME_ADMIN_DOMAIN),
		"desc" => __("The fullsize images you would like to use for the portfolio lightbox pop-up demonstrate.If not assigned, it will use featured image instead.",THEME_ADMIN_DOMAIN),
		"id" => "_image",
		"button" => "Insert Image",
		"default" => '',
		"type" => "Upload",
	),
	array(
		"type" => "group_end",
	),
	array(
		"type" => "group_start",
		"group" => "portfolio_video",
	),
	array(
		"name" => __("Video Link for Lightbox",THEME_ADMIN_DOMAIN),
		"desc" => __("Paste the full url of the Flash(YouTube or Vimeo etc).Only necessary when the lightbox type is video.",THEME_ADMIN_DOMAIN),
		"size" => 30,
		"id" => "_video",
		"default" => '',
		"class" => 'full',
		"type" => "text",
	),
	array(
		"name" => __("Video Width",THEME_ADMIN_DOMAIN),
		"desc" => __("If you specify a number below, this will override the global configuration.",THEME_ADMIN_DOMAIN),
		"id" => "_video_width",
		"default" => "",
		"min" => 0,
		"max" => 960,
		"step" => "1",
		"units" => array('px','%'),
		'default_unit' => 'px',
		"type" => "measurement",
	),
	array(
		"name" => __("Video Height",THEME_ADMIN_DOMAIN),
		"desc" => __("If you specify a number below, this will override the global configuration.",THEME_ADMIN_DOMAIN),
		"id" => "_video_height",
		"default" => "",
		"min" => 0,
		"max" => 960,
		"step" => "1",
		"units" => array('px','%'),
		'default_unit' => 'px',
		"type" => "measurement",
	),
	array(
		"type" => "group_end",
	),
	array(
		"type" => "group_start",
		"group" => "portfolio_iframe",
	),
	array(
		"name" => __("Lightbox iframe href",THEME_ADMIN_DOMAIN),
		"desc" => __("If you specify the full url of the website link below, when you click on the item, it will show the website on the lightbox.",THEME_ADMIN_DOMAIN),
		"id" => '_lightbox_href',
		"size" => 30,
		"default" => '',
		"class" => 'full',
		"type" => "text",
	),
	array(
		"name" => __("Lightbox Width For Iframe",THEME_ADMIN_DOMAIN),
		"id" => "_lightbox_iframe_width",
		"default" => '',
		"type" => "text"
	),
	array(
		"name" => __("Lightbox Height For Iframe",THEME_ADMIN_DOMAIN),
		"id" => "_lightbox_iframe_width",
		"default" => '',
		"type" => "text"
	),
	array(
		"type" => "group_end",
	),
	array(
		"type" => "group_start",
		"group" => "portfolio_doc",
	),
	array(
		"name" => __("Lightbox Content",THEME_ADMIN_DOMAIN),
		"desc" => __("The content that display on the lightbox when the portfolio item type is lightbox. You can use shortcode here.",THEME_ADMIN_DOMAIN),
		"id" => "_lightbox_content",
		"default" => '',
		"type" => "textarea",
	),
	array(
		"name" => __("Lightbox Width For Doc",THEME_ADMIN_DOMAIN),
		"id" => "_lightbox_doc_width",
		"default" => '',
		"type" => "text"
	),
	array(
		"name" => __("Lightbox Height For Doc",THEME_ADMIN_DOMAIN),
		"id" => "_lightbox_doc_width",
		"default" => '',
		"type" => "text"
	),
	array(
		"type" => "group_end",
	),
	array(
		"type" => "group_start",
		"group" => "portfolio_link",
	),
	array(
		"name" => __("Link for Portfolio item",THEME_ADMIN_DOMAIN),
		"desc" => __("The url that the portfolio item linked to. It only available if Portfolio type set to Link.",THEME_ADMIN_DOMAIN),
		"id" => "_link",
		"default" => "",
		"shows" => array('page','cat','post','portfolio','product','manually'),
		"type" => "superlink"	
	),
	array(
		"name" => __("Link Target",THEME_ADMIN_DOMAIN),
		"id" => "_link_target",
		"default" => '_self',
		"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",
	),
	array(
		"type" => "group_end",
	),
	array(
		"name" => __("Thumbnail Icon",THEME_ADMIN_DOMAIN),
		"desc" => __("It will override portfolio type's defualt icon setting.",THEME_ADMIN_DOMAIN),
		"id" => "_icon",
		"default" => 'default',
		"options" => array(
			"default" => __('Default',THEME_ADMIN_DOMAIN),
			"zoom" => __('Image',THEME_ADMIN_DOMAIN),
			"play" => __('Video',THEME_ADMIN_DOMAIN),
			"doc" => __('Document',THEME_ADMIN_DOMAIN),
			"link" => __('Link',THEME_ADMIN_DOMAIN),
		),
		"type" => "select",
	),
   	array(
		"name" => __("Enable Read More",THEME_ADMIN_DOMAIN),
		"desc" => __("if this is on, the read more button will show.",THEME_ADMIN_DOMAIN),
		"id" => "_more",
		"default" => "",
		"type" => "tritoggle"
	),
	array(
		"name" => __("Link for Read More",THEME_ADMIN_DOMAIN),
		"id" => "_more_link",
		"default" => "",
		"shows" => array('page','cat','post','portfolio','product','manually'),
		"type" => "superlink"
	),
	array(
		"name" => __("Link Target for Read More",THEME_ADMIN_DOMAIN),
		"id" => "_more_link_target",
		"default" => '_self',
		"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",
	),
);
new metaboxesGenerator($config,$options);
