????

Your IP : 216.73.216.174


Current Path : /home2/morganrand/www/wp-content/plugins/pinwheel-slider/settings/
Upload File :
Current File : /home2/morganrand/www/wp-content/plugins/pinwheel-slider/settings/admin-ajax.php

<?php
if ( is_admin() ) {
	/*
	* ----------------------------------------------------------------------
	*	Easy Builder Functions for Custom Slider and update slider type
	* ----------------------------------------------------------------------
	*/
	add_action( 'wp_ajax_pinwheel_add_form', 'pinwheel_add_form' );
	add_action( 'wp_ajax_pinwheel_show_posts', 'pinwheel_show_posts' );
	add_action( 'wp_ajax_pinwheel_add_video','pinwheel_add_video' );
	add_action( 'wp_ajax_pinwheel_show_px','pinwheel_show_px' );
	add_action( 'wp_ajax_pinwheel_show_fb','pinwheel_show_fb' );
	add_action( 'wp_ajax_pinwheel_show_flickr','pinwheel_show_flickr' );
	add_action( 'wp_ajax_pinwheel_show_it','pinwheel_show_it' );
	add_action( 'wp_ajax_pinwheel_fip_insert','pinwheel_fip_insert' );
	add_action( 'wp_ajax_pinwheel_insert_video','pinwheel_insert_video' );
	add_action( 'wp_ajax_pinwheel_show_post_type','pinwheel_show_post_type');
	add_action( 'wp_ajax_pinwheel_insert_posts', 'pinwheel_insert_posts' );
	add_action( 'wp_ajax_pinwheel_insert_slide', 'pinwheel_insert_slide' );
	add_action( 'wp_ajax_pinwheel_shfb_album','pinwheel_shfb_album' );
	add_action( 'wp_ajax_pinwheel_slider_preview','pinwheel_slider_preview' );
	add_action( 'wp_ajax_pinwheel_insert_media','pinwheel_insert_media' );
	add_action( 'wp_ajax_pinwheel_delete_slide','pinwheel_delete_slide' );
	// update slider type
	add_action( 'wp_ajax_pinwheel_update_slider_type', 'pinwheel_updt_sldr_type');
	add_action( 'wp_ajax_pinwheel_change_type', 'pinwheel_change_type');
	add_action( 'wp_ajax_pinwheel_show_params', 'pinwheel_show_params');
	//Easy Bulder Settings 
	add_action( 'wp_ajax_pinwheel_eb_settings', 'pinwheel_eb_settings');
	/*
	* -----------------------------------------------------------------
	*	Create new slider Functions 
	* -----------------------------------------------------------------
	*/
	add_action( 'wp_ajax_pinwheel_show_taxonomy','pinwheel_show_taxonomy' );
	add_action( 'wp_ajax_pinwheel_show_term','pinwheel_show_term' );
	add_action( 'wp_ajax_pinwheel_woo_product','pinwheel_woo_product');
	/*
	* -----------------------------------------------------------------
	*	Google fonts Functions 
	* -----------------------------------------------------------------
	*/
	add_action('wp_ajax_pinwheel_disp_gfweight','pinwheel_google_font_weight');
	add_action('wp_ajax_pinwheel_load_fontsdiv','pinwheel_load_fontsdiv_callback');
	/*
	* -----------------------------------------------------------------
	*	Settings Set preview Params
	* -----------------------------------------------------------------
	*/
	add_action( 'wp_ajax_pinwheel_preview_params','pinwheel_preview_params' );
	add_action( 'wp_ajax_pinwheel_tab_contents','pinwheel_tab_contents' );
}
/*
* -----------------------------------------------------------------
*	Easy Builder Functions for Custom Slider
* -----------------------------------------------------------------
*/
function pinwheel_insert_media() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	$images=(isset($_POST['imgID']))?$_POST['imgID']:array();
	$slider_id=$_POST['current_slider_id'];
	$ids=array_reverse($images);
	global $wpdb,$table_prefix;
	foreach($ids as $id){
		$title=(isset($_POST['title'][$id]))?$_POST['title'][$id]:'';
		$desc=(isset($_POST['desc'][$id]))?$_POST['desc'][$id]:'';
		$link=(isset($_POST['link'][$id]))?$_POST['link'][$id]:'';
		$nolink=(isset($_POST['nolink'][$id]))?$_POST['nolink'][$id]:'';
		$attachment = array(
			'ID'           => $id,
			'post_title'   => $title,
			'post_content' => $desc
		);
		wp_update_post( $attachment );
		update_post_meta($id, 'pinwheel_slide_redirect_url', $link);
		update_post_meta($id, 'pinwheel_sslider_nolink', $nolink);
		update_post_meta($id, '_pinwheel_slide_type', '1');
		if(!pinwheel_slider($id,$slider_id)) {
				$dt = date('Y-m-d H:i:s');
				$sql = "INSERT INTO ".$table_prefix.PINWHEEL_SLIDER_TABLE." (post_id, date, slider_id) VALUES ('$id', '$dt', '$slider_id')";
				$wpdb->query($sql);
		}
	}
	die();
}
function pinwheel_slider_preview() {
	check_ajax_referer( 'pinwheel-preview-nonce', 'preview_html' );
	global $wpdb,$table_prefix;
	$slider_meta = $table_prefix.PINWHEEL_SLIDER_META;
	if(isset($_POST['slider_id']) ) { 
		$slider_id = $_POST['slider_id'];
		$sql = "SELECT * FROM $slider_meta WHERE slider_id=$slider_id";
		$result = $wpdb->get_row($sql);
		$param_array = unserialize($result->param);
		$sliderset = $result->setid;
	}
	$html = '<div class="eb-preview-title">'.__('Live Preview','pinwheel-slider').'</div>';
	$offset = isset($param_array['offset'])?$param_array['offset']:'0';
	$scounter = isset($result->setid)?$result->setid :'';
	if($scounter == 1 ) $scounter = '';
	if( isset($_POST['slider_id']) && $_POST['slider_id'] != "" && $_POST['slider_id']!='0') {
		$html .= return_pinwheel_slider($_POST['slider_id'],$scounter,$offset);
	}
	$html .='pinwheelSplit';
	/* Thumbs Code */
	$slider_id = isset($_POST['slider_id'])?$_POST['slider_id']:'';
	$slider_posts=pinwheel_get_slider_posts_in_order($slider_id);
	$count = 0;
	if(isset($sliderset) && $sliderset != '1' ) $cntr = $sliderset; else $cntr = '';
	$pinwheel_slider_options='pinwheel_slider_options'.$cntr;
	$pinwheel_slider_curr=get_option($pinwheel_slider_options);
	$pinwheel_slider_curr= populate_pinwheel_current($pinwheel_slider_curr);
	$pinwheel_slider_defset = get_option('pinwheel_slider_options');
	foreach($slider_posts as $slider_post) {
		$icon = '';
		$slider_arr[] = $slider_post->post_id;
		$post = get_post($slider_post->post_id);	  
		if(isset($post) and isset($slider_arr)){
			if ( in_array($post->ID, $slider_arr) ) {
				$count++;
				/*---------- Image Fetch Start ---------*/
				$post_id = $post->ID;
				$pinwheel_media = get_post_meta($post_id,'pinwheel_media',true);
				if(!isset($pinwheel_slider_curr['img_pick'][0])) $pinwheel_slider_curr['img_pick'][0]='';
				if(!isset($pinwheel_slider_curr['img_pick'][2])) $pinwheel_slider_curr['img_pick'][2]='';
				if(!isset($pinwheel_slider_curr['img_pick'][3])) $pinwheel_slider_curr['img_pick'][3]='';
				if(!isset($pinwheel_slider_curr['img_pick'][5])) $pinwheel_slider_curr['img_pick'][5]='';
				
				if( isset( $pinwheel_slider_curr['img_pick'][0] ) && (isset ($pinwheel_slider_defset['img_pick'][1]) ) ){
					if($pinwheel_slider_curr['img_pick'][0] == '1') {
				 		$custom_key = array($pinwheel_slider_defset['img_pick'][1] );
				 	}
				}
				else {
				 $custom_key = '';
				}
				   	
				if($pinwheel_slider_curr['img_pick'][2] == '1'){
					$the_post_thumbnail = true;
				}
				else {
					$the_post_thumbnail = false;
				}

				if($pinwheel_slider_curr['img_pick'][3] == '1'){
					$attachment = true;
					$order_of_image = $pinwheel_slider_curr['img_pick'][4];
				}
				else{
					$attachment = false;
					$order_of_image = '1';
				}
				$image_scan = false;
				if(isset($pinwheel_slider_curr['img_pick'][5])){
					if($pinwheel_slider_curr['img_pick'][5] == '1') $image_scan = true;
				}

					$extract_size = 'thumbnail';
				
				$default_image=(isset($pinwheel_slider_curr['default_image']))?($pinwheel_slider_curr['default_image']):('false');
				$image_title_text=(isset($pinwheel_slider_curr['image_title_text']))?($pinwheel_slider_curr['image_title_text']):('0');

				$img_args = array(
					'custom_key' => $custom_key,
					'post_id' => $post_id,
					'attachment' => $attachment,
					'size' => 'thumbnail',
					'the_post_thumbnail' => $the_post_thumbnail,
					'default_image' => $default_image,
					'order_of_image' => $order_of_image,
					'link_to_post' => false,
					'image_scan' => $image_scan,
					'width' => 100,
					'height' => 85,
					'echo' => false,
					'permalink' => '',
					'timthumb'=>'',
					'style'=> '',
					'image_title_text'=>$image_title_text
				);		
				$navigation_image=pinwheel_sslider_get_the_image($img_args);
				
				/*------------ Image Fetch End -----------*/
				$sslider_author = get_userdata($post->post_author);
				$sslider_author_dname = $sslider_author->display_name;
				$desc = $post->post_content;
				//$delurl = admin_url("admin.php?page=pinwheel-slider-easy-builder&id=$slider_id&del=$post->ID");
				$pinwheel_sslider_link = get_post_meta($post_id,'pinwheel_slide_redirect_url',true);
				$stype = get_post_meta($post_id,'_pinwheel_slide_type',true);
				if($stype == 1 ) { $icon = '<div class="cs-icon"><i class="fa fa-file-word-o"></i></div>'; }
				if($stype == 5 ) { $icon = '<div class="cs-icon"><i class="fa fa-facebook"></i></div>'; }
				if($stype == 6 ) { $icon = '<div class="cs-icon"><i class="fa fa-flickr"></i></div>'; }
				if($stype == 7 ) { $icon = '<div class="cs-icon"><i class="fa fa-instagram"></i></div>'; }
				if($stype == 8 ) { $icon = '<div class="cs-icon"><i class="fa fa-youtube"></i></div>'; }
				if($stype == 9 ) { $icon = '<div class="cs-icon"><i class="fa fa-vimeo-square"></i></div>'; }
				if($stype == 10 ) { $icon = '<div class="cs-icon"><img src="'.pinwheel_slider_plugin_url( 'images/500px.png' ).'" width="13" height="14" style="vertical-align: middle;" /></div>'; }
			 	
			 	$html .= '<div id="'.$post->ID.'" class="pinwheel-reorder">
			 	<div class="cs-ptitle"><strong class="cs-post-title"> ' . $post->post_title . '</strong></div>
			 	<input type="hidden" name="order[]" value="'.$post->ID.'" />'.$icon.'<div>'.$navigation_image;
			 	
				if($post->post_type == "slidervilla")
					$html .= '<span class="editSlide"></span>';
				else 
					$html .= '<a href="'. get_edit_post_link( $post->ID ).'" target="_blank"><span class="editcore"></span></a>';
					$html .= '<a href="" onclick="return confirmDelete()" >
					<span class="delSlide" id="'.$post_id.'" ></span></a>';
				if($post->post_type == "slidervilla") {
				$edtlink = get_edit_post_link($post->ID);
					$html .= '<div class="pinwheel_slideDetails" style="display: none;">
						<div class="fL">
							<span class="imgTitle">
								<input placeholder="Title" title="Enter Image Title" type="text" name="title'.$post_id.'" value="'.$post->post_title.'" />
							</span>
							<span class="imgDesc">
								<textarea placeholder="Description" title="Enter Image Description" rows=3 name="desc'.$post_id.'">'.$desc.'</textarea>
							</span>
						</div>
						
						<div class="fR">
							<span class="imgLink">
								<input type="text" placeholder="Link to" value="'.$pinwheel_sslider_link.'" name="link'.$post_id.'" />
							</span>
							<a href="'.esc_attr($edtlink).'" target="_blank">'.__('Open Edit Window','pinwheel-slider').'</a>
						</div> 
						
					</div>';
				}
				$wpDateFormat = get_option('date_format');
				$publish_dt = date($wpDateFormat, strtotime($post->post_date));
				$html .= '</div>
					
					<div class="cs-ptitle-closed" >
						<strong class="cs-post-title"> ' . $post->post_title . '</strong>
						<div class="cs-pdt">'.$publish_dt.'</div>
					</div>
				</div>'; 
				
			}
		}
	}
	    
	if ($count == 0) {
	    $html .= '<div>'.__( 'No posts/pages have been added to the Slider - You can add respective post/page to slider on the Edit screen for that Post/Page', 'pinwheel-slider' ).'</div>';
	}
	$html .= '<input type="hidden" name="slider_posts" />';
	if ($count) { $html .= '<input type="submit" name="update_slides" class="btn_save nt-img" value="Save" style="clear: left;" />';}
	echo $html;
	die();
}
function pinwheel_shfb_album(){
	check_ajax_referer( 'pinwheel-slider-nonce', 'pinwheel_slider_pg' );
	$page_url = isset($_POST['page_url']) ? $_POST['page_url'] : '';
	$page = isset($_POST['page']) ? $_POST['page'] : '';
	$html = '';
	if($page_url != '') { 
		$gpinwheel_slider = get_option('pinwheel_slider_global_options');
		// Facebook Slider Key
		$fbkey = isset($gpinwheel_slider['fb_app_key'])?$gpinwheel_slider['fb_app_key']:'';
		$secret = isset($gpinwheel_slider['fb_secret'])?$gpinwheel_slider['fb_secret']:'';
		if( !empty( $secret ) ) {
			$fbkey.='|'.$secret;
		}
		$page_url_data = "https://graph.facebook.com/v2.4/?id=".$page_url."&field=id&access_token=$fbkey";
		$json_source = @file_get_contents($page_url_data);
		$fb_page = json_decode($json_source);
		if(isset($fb_page->id)) {
			$fb_page_id = $fb_page->id;
			//fetch list of albums
			if(preg_match("/https/",$fb_page_id) == 0 || preg_match("/http/",$fb_page_id) == 0) {
				$fb_album_data = "https://graph.facebook.com/v2.4/?id=".$fb_page_id."&fields=albums.limit(8)&access_token=$fbkey";
				$json_source_album = @file_get_contents($fb_album_data);
				$fb_page_album = json_decode($json_source_album);
				if(isset($fb_page_album->albums->data[0])) {
					// fetches album id's & names
					if($page == "create_new") $html .= '<label class="pinwheel-form-label">'.__('Albums','pinwheel-slider').'</label>';
					elseif($page == "quicktag") $html .= '<td scope="row"><label for="album">'.__('Albums','svslider').'</label></td>';
					else $html .= '<th scope="row">'.__('Albums','pinwheel-slider').'</th>';
					$fb_album_id = $fb_page_album->albums->data[0]->id;
					if($page != "create_new") $html .= '<td>';
					if($page == "quicktag") $html .= '<div class="styled-select"><select name="album" >';
					else $html .= '<select name="fb-album" class="pinwheel-form-input" >';
					$count = count($fb_page_album->albums->data);
					if($count > 8 ) $count = 8;
			 		for($j=0;$j<$count;$j++) {
						$selected = '';
						$fbalbum_id = $fb_page_album->albums->data[$j]->id;
						if($fb_album_id==$fbalbum_id) $selected='selected';
						$fb_album_name = $fb_page_album->albums->data[$j]->name;
						$html .= '<option value="'.$fbalbum_id.'" '.$selected.' >'.$fb_album_name.'</option>';
					}
					$html .= '</select>';
				} else {
					$html .= __('Please enter correct url','pinwheel-slider');
				}
			} else {
				$html .= __('Please Enter correct url','pinwheel-slider');
			}
			if($page == "quicktag") $html .= '</div>';
			if($page != "create_new") $html .= '</td>';
		}
	}
	echo $html;
	die();
}
function pinwheel_add_form() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	global $wpdb; // this is how you get access to the database
	$slider_id = intval( $_POST['slider_id'] );
	$html = '<form method="post" name="add_new_slide" id="add_new_slide" class="add-new-slide" >';
	$html .= '	<div class="pinwheel-slide">';
	$html .= '	<div class="pinwheel-slide-content">';
	$html .= '	<div class="pinwheel-form-row">';
	$html .= '		<label class="pinwheel-form-label">'. __('Title','pinwheel-slider').'</label>';
	$html .= '		<input type="text" name="slide_title" class="pinwheel-form-input slide_title" />';
	$html .= '	</div>';
	$html .= '	<div class="pinwheel-form-row">';
	$html .= '		<label class="pinwheel-form-label">'. __('Image','pinwheel-slider').'</label>';
	$html .= '		<input type="text" name="slide_image" class="pinwheel-form-input slide_image regular-text" value="" /> &nbsp; <input  class="pinwheel_upload_button" type="button" value="'. __('Upload','pinwheel-slider').'" />';
	$html .= '	</div>';
	$html .= '	<div class="pinwheel-form-row">';
	$html .= '		<label class="pinwheel-form-label">'. __('Slide Url','pinwheel-slider').'</label>';
	$html .= '		<input type="text" name="slide_url" class="pinwheel-form-input slide_url" />';
	$html .= '	</div>';
	$html .= '	<div class="pinwheel-form-lrow">';
	$html .= '		<label class="pinwheel-form-label">'. __('Description','pinwheel-slider').'</label>';
	$html .= '		<textarea name="slide_desc" class="pinwheel-form-input txtarea slide_desc" /> </textarea>';
	$html .= '	</div>';
	$html .= '	</div>';
	$html .= '	</div>';
	$html .= '	<div class="pinwheel-form-row">';
	$gpinwheel_slider = get_option('pinwheel_slider_global_options');
	$custom_post = isset($gpinwheel_slider['custom_post'])?$gpinwheel_slider['custom_post']:'0';
	if($custom_post == 0 ) $custom_post = post_type_exists('slidervilla');
	$html .= "<input type='hidden' name='custom_post' value='".$custom_post."' />";
	
	$html .= '		<input type="hidden" name="sliderid" value="'. $slider_id.'">';
	$html .= '		<input type="button" name="add_more" class="add_more" value="'. __('Add More','pinwheel-slider').'" /> ';
	$html .= '		<input type="submit" class="btn_save btn-insert" name="insert" value="'. __('Insert','pinwheel-slider').'" />';
	$html .= '<div id="pinwheel-error-msg" class="pinwheel-error-msg"></div>';
	$html .= '	</div>';
	$html .= '</form>';
	echo $html;
	die(); // this is required to terminate immediately and return a proper response
}
function pinwheel_show_posts() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	global $paged,$wpdb,$post; 
	$pages = '';
	$paged = isset($_POST['paged'])?$_POST['paged']:'';
	$post_type = isset($_POST['post_type'])?$_POST['post_type']:'';
	$sliderid = isset($_POST['sliderid'])?$_POST['sliderid']:'';
	$custom = isset($_POST['custom']) ? $_POST['custom'] : '';
	$range = 10;
	$html = '';
	if($custom == true) {
		$args = array(
			'_builtin' => false
		);
		$post_types = get_post_types( $args, 'names' ); 
		$html .= '	<div class="pinwheel-form-row">';
		$html .= '		<label class="pinwheel-form-label">'. __('Post Type','pinwheel-slider').'</label>';
		$html .= '<select name="post_type" class="pinwheel-form-input sel_post_type" >';
		$html .= '<option value="0">'. __('Select Post Type','pinwheel-slider').'</option>';
		foreach ( $post_types as $cpost_type ) {
			if($cpost_type == $post_type) $selected = 'selected'; else $selected = '';
		   $html .= '<option value="'.$cpost_type.'" '.$selected.'>' . $cpost_type . '</option>';
		}
		$html .= '</select>';
		$html .= '</div>';
	}
	$showitems = ($range * 2)+1; 
	if(empty($paged)) $paged = 1;
	
	$args = array(
		'post_type' => $post_type,
		'posts_per_page'=>10,	
		'post_status'   => 'publish',
		'paged'=>$paged
	);
	$pidarr = get_pinwheel_addedposts( $sliderid );
	if( count( $pidarr ) > 0 ) $args['post__not_in']=$pidarr;
	$the_query = new WP_Query( $args );
	$i=0;
	// The Loop
	if ( $the_query->have_posts() ) {
		$html .= '<div style="margin-left: 20px;" >';
		$html .= '<form name="eb-wp-posts" id="eb-wp-posts" method="post" >';
		$html .= '<table class="wp-list-table widefat sliders" >';
		
		$html .= '<col width="20%">
			<col width="80%">
			<thead>
			<tr>
				<th class="sliderid-column">'.__('ID','pinwheel-slider').'</th>
				<th class="slidername-column">'.__('Name','pinwheel-slider').'</th>
			</tr>
			</thead>';
		
		while ( $the_query->have_posts() ) {
			$the_query->the_post();
			$i++;
			$html .= '<tr>';
			$html .= '<td><input type="checkbox" name="post_id[]" value="'.get_the_ID().'"></td>';
			$html .= '<td>' . get_the_title() . '</td>';
			if($post_type == 'attachment' ) {
				$html .= '<td> <img src="'. wp_get_attachment_url(  ).'" width="50" height="30" /> </td>';
			}
			$html .= '</tr>';
		}
		$html .= '</table>';
		if($pages == '') {
			$pages = $the_query->max_num_pages;
			if(!$pages) {
				$pages = 1;
			}
		}  

		if(1 != $pages)
		{
			if($paged > 1 ) $prev = ($paged - 1); else $prev = 1;
			$html .= "<div class=\"eb-cs-pagination\"><span>".__('Page','pinwheel-slider')." ".$paged." ".__('of','pinwheel-slider')." ".$pages."</span>";
			$html .= "<a id='1' class='pageclk' >&laquo; ".__('First','pinwheel-slider')."</a>";
			$html .= "<a id='".$prev."' class='pageclk' >&lsaquo; ".__('Previous','pinwheel-slider')."</a>";

			for ($i=1; $i <= $pages; $i++) {
				if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) {
					$html .= ($paged == $i)? "<span class=\"current\">".$i."</span>":"<a id=\"$i\" class=\"inactive pageclk\">".$i."</a>";
				}
			}
			
			if( $paged + 1 > $pages ) $nextpg = 1;
			else $nextpg = $paged + 1;
			$html .= "<a id=\"".$nextpg ."\" class='pageclk' >".__('Next','pinwheel-slider')." &rsaquo;</a>"; 
			$html .= "<a id='".$pages."' class='pageclk' >".__('Last','pinwheel-slider')." &raquo;</a>";
						
			$html .= "</div>\n";
		}
		$html .= "<input type='submit' name='add_posts' value='".__('Insert','pinwheel-slider')."' class='btn_save add_posts' />\n";
		$html .= '<input type="hidden" name="sliderid" value="'. $sliderid.'">';
		$html .= '<input type="hidden" name="post_type" class="post_type" value="'. $post_type.'">';
		$html .= '</form>';
		$html .= "</div>\n";
		echo $html;
		/* Restore original Post Data */
		wp_reset_postdata();
	} else {
		echo "no posts found";
	}
	die();
}
function pinwheel_show_post_type() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	$html = '';
	$args = array(
		'_builtin' => false
	);
	$post_types = get_post_types( $args, 'names' ); 
	$html .= '	<div class="pinwheel-form-row">';
	$html .= '		<label class="pinwheel-form-label">'. __('Post Type','pinwheel-slider').'</label>';
	$html .= '<select name="post_type" class="pinwheel-form-input sel_post_type" >';
	$html .= '<option value="0">'. __('Select Post Type','pinwheel-slider').'</option>';
	foreach ( $post_types as $post_type ) {

	   $html .= '<option value="'.$post_type.'">' . $post_type . '</option>';
	}
	$html .= '</select>';
	$html .= '</div>';
	echo $html;
	die();
}
function pinwheel_add_video() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	$sliderid = $_POST['sliderid'];	
	$type = $_POST['type'];
	$html = '';
	$html .= "<form name='' method='post' id='pinwheel_insert_video'>";
	$html .= '<div class="pinwheel-video-wrap">';
	$html .= '<div class="pinwheel-video-slide">';
	$html .= '<div class="pinwheel-form-row">';
	$html .= '	<label class="pinwheel-form-label">'. __('Title','pinwheel-slider').'</label>';
	$html .= '	<input type="text" name="video_title" id="video_title" class="pinwheel-form-input" value="" />';
	$html .= '</div>';
	$html .= '<div class="pinwheel-form-row">';
	$html .= '	<label class="pinwheel-form-label">'. __('Video Url','pinwheel-slider').'</label>';
	$html .= '	<input type="text" name="video_url" id="video_url" class="pinwheel-form-input" value="" />';
	$html .= '</div>';
	$html .= '</div>';
	$html .= '</div>';
	$html .= '<div class="pinwheel-form-row">';
	$gpinwheel_slider = get_option('pinwheel_slider_global_options');
	$custom_post = isset($gpinwheel_slider['custom_post'])?$gpinwheel_slider['custom_post']:'0';
	if($custom_post == 0 ) $custom_post = post_type_exists('slidervilla');
	$html .= "<input type='hidden' name='custom_post' value='".$custom_post."' />";
	$html .= "<input type='button' name='add_video' value='".__('Add More','pinwheel-slider')."' class='add_video'  />\n";
	$html .= "<input type='submit' name='add_posts' value='".__('Insert','pinwheel-slider')."' class='btn_save pinwheel_insert_video' />\n";
	$html .= '<div id="pinwheel-error-msg" class="pinwheel-error-msg"></div>';
	$html .= '<input type="hidden" name="sliderid" value="'. $sliderid.'">';
	$html .= '<input type="hidden" name="type" value="'. $type.'">';
	$html .= '</div>';
	$html .= "</form>";
	echo $html;
	die();
}
function pinwheel_show_px() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	$gpinwheel_slider = get_option('pinwheel_slider_global_options');
	$pxkey = isset($gpinwheel_slider['px_ckey'])?$gpinwheel_slider['px_ckey']:'';
	$sliderid = $_POST['sliderid'];
	$feature = isset($_POST['feature']) ? $_POST['feature'] : 'popular';
	$pxuser = isset($_POST['pxuser']) ? $_POST['pxuser'] : '';
	if($feature == "popular") $psle = "selected"; else $psle = "";
	if($feature == "highest_rated") $hsle = "selected"; else $hsle = "";
	if($feature == "upcoming") $usle = "selected"; else $usle = "";
	if($feature == "editors") $esle = "selected"; else $esle = "";
	if($feature == "fresh_today") $ftsle = "selected"; else $ftsle = "";
	if($feature == "fresh_yesterday") $fysle = "selected"; else $fysle = "";
	if($feature == "fresh_week") $fwsle = "selected"; else $fwsle = "";	
	if($feature == "user") $usersle = "selected"; else $usersle = "";	
	if($feature == "user_favorites") $userfvsle = "selected"; else $userfvsle = "";	
	$html = '';
	$html .= "<form name='' method='post' id='px_connect'>";
	$html .= '<div class="pinwheel-form-row">';
	$html .= '	<label class="pinwheel-form-label">'.__('Type','pinwheel-slider').'</label>';
	$html .= '	<select name="feature" class="feature">';
	$html .= '		<option value="popular" '.$psle.'>'.__('Popular','pinwheel-slider').'</option>';
	$html .= '		<option value="highest_rated" '.$hsle.'>'.__('Highest Rated','pinwheel-slider').'</option>';
	$html .= '		<option value="upcoming" '.$usle.'>'.__('Upcoming','pinwheel-slider').'</option>';
	$html .= '		<option value="editors" '.$esle.'>'.__('Editors','pinwheel-slider').'</option>';
	$html .= '		<option value="fresh_today" '.$ftsle.'>'.__('Fresh Today','pinwheel-slider').'</option>';
	$html .= '		<option value="fresh_yesterday" '.$fysle.'>'.__('Fresh Yesterday','pinwheel-slider').'</option>';
	$html .= '		<option value="fresh_week" '.$fwsle.'>'.__('Fresh Week','pinwheel-slider').'</option>';
	$html .= '		<option value="user" '.$usersle.'>'.__('User','pinwheel-slider').'</option>';
	$html .= '		<option value="user_favorites" '.$userfvsle.'>'.__('User favorites','pinwheel-slider').'</option>';
	$html .= '	</select>';
	$html .= "<input type='submit' name='px_connect' value='".__('Connect','pinwheel-slider')."' class='btn_save px_connect' />\n";
	$html .= '</div>';
	if($feature == "user" || $feature == "user_favorites") $style = "display:block;"; else $style = "display:none;";
	$html .= '<div class="pinwheel-form-row pxuser" style="'.$style.'">';
	$html .= '	<label class="pinwheel-form-label">'.__('Name','pinwheel-slider').'</label>';
	$html .= "	<input type='text' name='pxuser' value='".$pxuser."'  />\n";
	$html .= '</div>';
	
	if($feature != '') { 
		if($feature == "user" || $feature == "user_favorites") {
			$pxurl = "https://api.500px.com/v1/photos?feature=".$feature."&username=".$pxuser."&consumer_key=$pxkey&image_size=4";
		} else {
			$pxurl = "https://api.500px.com/v1/photos?feature=".$feature."&consumer_key=$pxkey&image_size=4";
		}
		$pxjson = @file_get_contents($pxurl);
		if($pxjson == true) {
			$px = json_decode($pxjson);
			if(isset($px->photos)) {
				for($i = 0; $i < count($px->photos); $i++) {
					$limg = isset($px->photos[$i]->image_url)?$px->photos[$i]->image_url:'';
					$html .= '<div class="pinwheel-img-box"><img src="'.$limg.'" /></div>';
				}
			}
		} else {
			$html .= __('Please enter the correct information','pinwheel-slider');
		}
	}
	$html .= '<div style="clear:left;"></div>';
	$html .= '<div class="pinwheel-insert-btn">';
	if($feature != '') { 
		$custom_post = isset($gpinwheel_slider['custom_post'])?$gpinwheel_slider['custom_post']:'0';
		if($custom_post == 0 ) $custom_post = post_type_exists('slidervilla');
		$html .= "<input type='hidden' name='custom_post' value='".$custom_post."' /><input type='submit' name='px_insert' value='".__('Insert','pinwheel-slider')."' class='btn_save pinwheel_fip_insert' />\n";
		$html .= '<div id="pinwheel-error-msg" class="pinwheel-error-msg"></div>';
	} 
	$html .= '<input type="hidden" name="sliderid" value="'. $sliderid.'">';
	$html .= '</div>';
	$html .= "</form>";
	echo $html;
	die();
}
function pinwheel_show_fb() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	$sliderid = $_POST['sliderid'];	
	$page_url = isset($_POST['page_url']) ? $_POST['page_url'] : '';
	$albumid = isset($_POST['fb_album']) ? $_POST['fb_album'] : '';
	$html = '';
	$html .= "<form name='' method='post' id='fb_connect'>";
	$html .= '<div class="pinwheel-form-row">';
	$html .= '	<label class="pinwheel-form-label">'.__('Page Url','pinwheel-slider').'</label>';
	$html .= '	<input type="text" name="page_url" id="page_url" class="pinwheel-form-input regular-text" value="'.$page_url.'" />';
	$html .= "<input type='submit' name='fb_connect' value='".__('Connect','pinwheel-slider')."' class='btn_save fb_connect' />\n";
	$html .= '</div>';
	if($page_url != '') { 
		$gpinwheel_slider = get_option('pinwheel_slider_global_options');
		// Facebook Slider Key
		$fbkey = isset($gpinwheel_slider['fb_app_key'])?$gpinwheel_slider['fb_app_key']:'';
		$secret = isset($gpinwheel_slider['fb_secret'])?$gpinwheel_slider['fb_secret']:'';
		if( !empty( $secret ) ) {
			$fbkey.='|'.$secret;
		}
		$page_url_data = "https://graph.facebook.com/v2.4/?id=".$page_url."&field=id&access_token=$fbkey";
		$json_source = @file_get_contents($page_url_data);
		$fb_page = json_decode($json_source);
		if(isset($fb_page->id)) {
			$fb_page_id = $fb_page->id;
			//fetch list of albums
			$fb_album_data = "https://graph.facebook.com/v2.4/?id=".$fb_page_id."&fields=albums.limit(8)&access_token=$fbkey";
			$json_source_album = @file_get_contents($fb_album_data);
			$fb_page_album = json_decode($json_source_album);
			if(isset($fb_page_album->albums->data[0])) {
				// fetches album id's & names	
				$html .= '<div class="pinwheel-form-row">';
				$html .= '	<label class="pinwheel-form-label">'.__('Albums','pinwheel-slider').'</label>';
				if($albumid != '' ) $fb_album_id = $albumid; else $fb_album_id = $fb_page_album->albums->data[0]->id;
				$html .= '<select name="fb_album" class="fb_albums" >';
				$count = count($fb_page_album->albums->data);
				if($count > 8 ) $count = 8;
		 		for($j=0;$j<$count;$j++) {
					$selected = '';
					$fbalbum_id = $fb_page_album->albums->data[$j]->id;
					if($fb_album_id==$fbalbum_id) $selected='selected';
					$fb_album_name = $fb_page_album->albums->data[$j]->name;
					$html .= '<option value="'.$fbalbum_id.'" '.$selected.' >'.$fb_album_name.'</option>';
				}
				$html .= '</select>';
				$html .= '</div>';
				$fb_url = "https://graph.facebook.com/v2.4/?id=".$fb_album_id."&fields=id,name,photos.limit(20){images,created_time,from{name,id,category},name,id,picture,link}&access_token=$fbkey";
				$json_source = @file_get_contents($fb_url);
				$fb = json_decode($json_source);
				$countr = count($fb->photos->data);
				$html .= '<div class="fb-img-wrap">';
				for($i=0;$i<$countr;$i++) {
					$fb_img_src = $fb->photos->data[$i]->images[1]->source;
					$html .= '<div class="pinwheel-img-box"><img src="'.$fb_img_src.'" /></div>';
				}
				$html .= '</div>';
			} else {
				$html .= __('Please enter correct url','pinwheel-slider');
			}
		} else {
			$html .= __('Please enter correct url','pinwheel-slider');
		}
	}
	$html .= '<div style="clear:left;"></div>';
	$html .= '<div class="pinwheel-insert-btn">';
	if($page_url != '') { 
		$custom_post = isset($gpinwheel_slider['custom_post'])?$gpinwheel_slider['custom_post']:'0';
		if($custom_post == 0 ) $custom_post = post_type_exists('slidervilla');
		$html .= "<input type='hidden' name='custom_post' value='".$custom_post."' />";
		$html .= "<input type='submit' name='pinwheel_fip_insert' value='".__('Insert','pinwheel-slider')."' class='btn_save pinwheel_fip_insert' />\n";
		$html .= '<div id="pinwheel-error-msg" class="pinwheel-error-msg"></div>';
	} 
	$html .= '<input type="hidden" name="sliderid" value="'. $sliderid.'">';
	$html .= '</div>';
	$html .= "</form>";
	echo $html;
	die();
}
function pinwheel_show_flickr() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	$sliderid = $_POST['sliderid'];
	$method = isset($_POST['method']) ? $_POST['method'] : 'public_photo';
	$id = isset($_POST['id']) ? $_POST['id'] : '';
	$asle = $psle = '';
	if($method == "public_photo") $psle = "selected";
	if($method == "album") $asle = "selected";
	$html = '';
	$html .= "<form name='' method='post' id='flickr_connect'>";
	$html .= '<div class="pinwheel-form-row">';
	$html .= '	<label class="pinwheel-form-label">'.__('Type','pinwheel-slider').'</label>';
	$html .= '	<select name="method" class="method">';
	$html .= '		<option value="public_photo" '.$psle.'>'.__('User','pinwheel-slider').'</option>';
	$html .= '		<option value="album" '.$asle.'>'.__('Album','pinwheel-slider').'</option>';
	$html .= '	</select>';
	$html .= "<input type='submit' name='flickr_connect' value='".__('Connect','pinwheel-slider')."' class='btn_save flickr_connect' />\n";
	$html .= '</div>';
	$html .= '<div class="pinwheel-form-row id" >';
	$html .= '	<label class="pinwheel-form-label">'.__('ID','pinwheel-slider').'</label>';
	$html .= "	<input type='text' name='id' value='".$id."'  />\n";
	$html .= '</div>';
	if($id != "") {
		$gpinwheel_slider = get_option('pinwheel_slider_global_options');
		// Flickr Slider Key
		$flkey = isset($gpinwheel_slider['flickr_app_key'])?$gpinwheel_slider['flickr_app_key']:'';
		if($method == 'public_photo') { 
			$flicker_url = "https://api.flickr.com/services/rest/?&method=flickr.people.getPublicPhotos&api_key=$flkey&user_id=".$id."&format=json&nojsoncallback=1";
			$json_source = @file_get_contents($flicker_url);
			$fx = json_decode($json_source);
			if(isset($fx->photos)) {
				$count = count($fx->photos->photo);
				for($i=0;$i<$count;$i++) {
					$id = $fx->photos->photo[$i]->id;
					$owner = $fx->photos->photo[$i]->owner;
					$secret = $fx->photos->photo[$i]->secret;
					$server = $fx->photos->photo[$i]->server;
					$farm = $fx->photos->photo[$i]->farm;
					$html .= '<div class="pinwheel-img-box"><img src="https://farm'.$farm.'.staticflickr.com/'.$server.'/'.$id.'_'.$secret.'_z.jpg" /></div>';
				}
			} else {
				_e('Please enter the correct user','pinwheel-slider');
			}
		} elseif($method == 'album') { 
			$flicker_seturl = "https://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=$flkey&photoset_id=".$id."&format=json&nojsoncallback=1";
			$json_setsource = @file_get_contents($flicker_seturl);
			$setfx = json_decode($json_setsource);
			if(isset($setfx->photoset)) {
				$count = count($setfx->photoset->photo);
				for($i=0;$i<$count;$i++) {
					$id = $setfx->photoset->photo[$i]->id;
					$owner = isset($setfx->photoset->photo[$i]->owner)?$setfx->photoset->photo[$i]->owner:'';
					//$owner = $setfx->photoset->photo[$i]->owner;
					$secret = $setfx->photoset->photo[$i]->secret;
					$server = $setfx->photoset->photo[$i]->server;
					$farm = $setfx->photoset->photo[$i]->farm;
					$html .= '<div class="pinwheel-img-box"><img src="https://farm'.$farm.'.staticflickr.com/'.$server.'/'.$id.'_'.$secret.'_z.jpg" /></div>';
				}
			} else {
				_e('Please enter the correct album','pinwheel-slider');
			}
		}
	}
	$html .= '<div style="clear:left;"></div>';
	$html .= '<div class="pinwheel-insert-btn">';
	if($id != '') { 
		$custom_post = isset($gpinwheel_slider['custom_post'])?$gpinwheel_slider['custom_post']:'0';
		if($custom_post == 0 ) $custom_post = post_type_exists('slidervilla');
		$html .= "<input type='hidden' name='custom_post' value='".$custom_post."' />";
		$html .= "<input type='submit' name='px_insert' value='".__('Insert','pinwheel-slider')."' class='btn_save pinwheel_fip_insert' />\n";
		$html .= '<div id="pinwheel-error-msg" class="pinwheel-error-msg"></div>';
	} 
	$html .= '<input type="hidden" name="sliderid" value="'. $sliderid.'">';
	$html .= '</div>';
	$html .= "</form>";
	echo $html;
	die();
}
function pinwheel_show_it() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	$sliderid = $_POST['sliderid'];
	$uname = isset($_POST['uname']) ? $_POST['uname'] : '';
	$html = '';
	$html .= "<form name='' method='post' id='it_connect'>";
	$html .= '<div class="pinwheel-form-row" >';
	$html .= '	<label class="pinwheel-form-label">'.__('User Name','pinwheel-slider').'</label>';
	$html .= "	<input type='text' name='uname' value='".$uname."'  />\n";
	$html .= "<input type='submit' name='it_connect' value='".__('Connect','pinwheel-slider')."' class='btn_save it_connect' />\n";
	$html .= '</div>';
	
	if($uname != "") {
		$gpinwheel_slider = get_option('pinwheel_slider_global_options');
		// Instagram Slider Key
		$igkey = isset($gpinwheel_slider['insta_client_id'])?$gpinwheel_slider['insta_client_id']:'';
		$insta_id_url = "https://api.instagram.com/v1/users/search?q=".$uname."&client_id=$igkey";
		$json_source_id = @file_get_contents($insta_id_url);
		$insta_id_data = json_decode($json_source_id);
		if(isset($insta_id_data->data[0])) {
			$insta_id = $insta_id_data->data[0]->id;
			$insta_media_url="https://api.instagram.com/v1/users/".$insta_id."/media/recent/?client_id=$igkey";
			$json_source = @file_get_contents($insta_media_url);
			$insta_media_data = json_decode($json_source);
			$count = count($insta_media_data->data);
			for($i=0;$i<$count;$i++) {
				$img_src = $insta_media_data->data[$i]->images->standard_resolution->url;
				$thumb_src = $insta_media_data->data[$i]->images->thumbnail->url;
				$html .= '<div class="pinwheel-img-box"><img src="'.$img_src.'" /></div>';	
			}
		} else {
			$html .= __('Please enter the correct information','pinwheel-slider');
		}
	}
	$html .= '<div style="clear:left;"></div>';
	$html .= '<div class="pinwheel-insert-btn">';
	if($uname != '') { 
		$custom_post = isset($gpinwheel_slider['custom_post'])?$gpinwheel_slider['custom_post']:'0';
		if($custom_post == 0 ) $custom_post = post_type_exists('slidervilla');
		$html .= "<input type='hidden' name='custom_post' value='".$custom_post."' />";
		$html .= "<input type='submit' name='px_insert' value='".__('Insert','pinwheel-slider')."' class='btn_save pinwheel_fip_insert' />\n";
		$html .= '<div id="pinwheel-error-msg" class="pinwheel-error-msg"></div>';
	} 
	$html .= '<input type="hidden" name="sliderid" value="'. $sliderid.'">';
	$html .= '</div>';
	$html .= "</form>";
	echo $html;
	die();
}
function pinwheel_fip_insert() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	global $wpdb, $table_prefix, $post;
	$pinwheel_slider = get_option('pinwheel_slider_options');
	$table_name = $table_prefix.PINWHEEL_SLIDER_TABLE;
	$slider_id = $_POST['sliderid'];
	$img_url = $_POST['img_url'];
	$thumb_url = $_POST['thumb_url'];
	$type = $_POST['type'];
	if($type == "fb_connect") { $ftitle = 'Facebook Image'; $stype ='5'; }
	elseif($type == "px_connect") { $ftitle = '500px Image'; $stype ='10'; }
	elseif($type == "flickr_connect") { $ftitle = 'Flickr Image'; $stype ='6'; }
	elseif($type == "it_connect") { $ftitle = 'Instagram Image'; $stype ='7'; }
	else $ftitle = 'Default Image';
	for($i = 0; $i < count($img_url); $i++) {
		$slide_desc = '';
		$title = $ftitle.$i;
		$url = $img_url[$i];
		$thumbnail = $thumb_url[$i];
		$cptpost_args = array(
			'post_title'    => $title,
			'post_content'  => $slide_desc,
			'post_status'   => 'publish',
			'post_type' => 'slidervilla'
		);
		// insert the post into the database
		$cpt_id = @wp_insert_post($cptpost_args);
		$dt = date('Y-m-d H:i:s');
		$sql = "INSERT INTO $table_name (post_id, date, slider_id) VALUES ('$cpt_id', '$dt', '$slider_id')";
		$wpdb->query($sql);
		if($url != '') {
			$thumbnail_key = $pinwheel_slider['img_pick'][1];
			update_post_meta($cpt_id,$thumbnail_key,$url);
			update_post_meta($cpt_id,'_pinwheel_slide_type',$stype);
		}
			
	}
	die();
}
function pinwheel_insert_video() {
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	global $wpdb, $table_prefix, $post;
	$table_name = $table_prefix.PINWHEEL_SLIDER_TABLE;
	$type = $_POST['type'];
	$slider_id = $_POST['sliderid'];
	$video_url = $_POST['video_url'];
	$video_title = (isset($_POST['video_title']) && $_POST['video_title'] != '') ? $_POST['video_title'] : '';
	for($i = 0; $i < count($video_url); $i++) {
		$slide_desc = '';
		$title = $video_title[$i];
		$url = $video_url[$i];
		$cptpost_args = array(
			'post_title'    => $title,
			'post_content'  => $slide_desc,
			'post_status'   => 'publish',
			'post_type' => 'slidervilla'
		);
		// insert the post into the database
		$cpt_id = @wp_insert_post($cptpost_args);
		$dt = date('Y-m-d H:i:s');
		$sql = "INSERT INTO $table_name (post_id, date, slider_id) VALUES ('$cpt_id', '$dt', '$slider_id')";
		$wpdb->query($sql);
		if($url != '') {
			if($type == 'vimeo') {
				$size = 'thumbnail_small';
				$pieces = explode("/", $url);
				$video_id = end($pieces);
				if(get_transient('vimeo_' . $size . '_' . $video_id)) {
					$thumbnail = get_transient('vimeo_' . $size . '_' . $video_id);
				} else {
					$json = json_decode(file_get_contents( "http://vimeo.com/api/v2/video/" . $video_id . ".json" ));
					$thumbnail = $json[0]->$size;
					set_transient('vimeo_' . $size . '_' . $id, $thumbnail, 2629743);
				}
				$video_shortcode = '<iframe src="http://player.vimeo.com/video/'.$video_id.'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
				$stype = '9';
			} else {
				$video_id = substr($url, strpos($url, "v=") + 2);
				$thumbnail = "http://img.youtube.com/vi/".$video_id."/default.jpg";
				$video_shortcode = '<iframe src="https://www.youtube.com/embed/'.$video_id.'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';				
				$stype = '8';
			}


			$pinwheel_slider = get_option('pinwheel_slider_options');
			$thumbnail_key = $pinwheel_slider['img_pick'][1];
			update_post_meta($cpt_id, $thumbnail_key,$thumbnail);	
			update_post_meta($cpt_id,'_pinwheel_sslider_embedshortcode',$video_shortcode);
			update_post_meta($cpt_id, '_pinwheel_disable_image', 1 );
			update_post_meta($cpt_id, '_pinwheel_slide_type', $stype);
		}
	}
}
function pinwheel_insert_slide() { 
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	$pinwheel_slider = get_option('pinwheel_slider_options');
	global $wpdb, $table_prefix, $post;
	$table_name = $table_prefix.PINWHEEL_SLIDER_TABLE;
	$slider_id = $_POST['sliderid'];
	$aimage_url = $_POST['slide_image'];
	$aslide_url = $_POST['slide_url'];
	$aslide_title = (isset($_POST['slide_title']) && $_POST['slide_title'] != '') ? $_POST['slide_title'] : '';
	$aslide_desc = (isset($_POST['slide_desc']) && $_POST['slide_desc'] != '') ? $_POST['slide_desc'] : '';
	for($i =0; $i < count($aslide_title); $i++) {
		$slide_title = $aslide_title[$i];
		$slide_desc = $aslide_desc[$i];
		$slide_url = $aslide_url[$i];
		$image_url = $aimage_url[$i];
		$cptpost_args = array(
		'post_title'    => $slide_title,
		'post_content'  => $slide_desc,
		'post_status'   => 'publish',
		'post_type' => 'slidervilla'
		);
		$stype = '1';
		// insert the post into the database
		$cpt_id = @wp_insert_post($cptpost_args);
		update_post_meta($cpt_id, 'pinwheel_slide_redirect_url', $slide_url);
		update_post_meta($cpt_id, '_pinwheel_slide_type', $stype);
		
		$thumbnail_key = $pinwheel_slider['img_pick'][1];
		update_post_meta($cpt_id, $thumbnail_key, $image_url);
		
		$dt = date('Y-m-d H:i:s');
		$sql = "INSERT INTO $table_name (post_id, date, slider_id) VALUES ('$cpt_id', '$dt', '$slider_id')";
		$wpdb->query($sql);	
	}
	die();
}
function pinwheel_insert_posts() { 
	check_ajax_referer( 'pinwheel-add-slides-nonce', 'add_slides' );
	global $wpdb, $table_prefix, $post;
	$table_name = $table_prefix.PINWHEEL_SLIDER_TABLE;
	$slider_id = $_POST['sliderid'];
	$dt = date('Y-m-d H:i:s');
	$count = count($_POST['post_id']);
	$values = '';
	for($i = 0; $i < $count; $i++ ) {
		$id = $_POST['post_id'][$i];
		if(!pinwheel_slider($id,$slider_id)) {
			if($i == $count-1)
				$values .= "('$id', '$dt', '$slider_id')";
			else
				$values .= "('$id', '$dt', '$slider_id'),";
		}
		update_post_meta($id, '_pinwheel_slide_type', '1');
	}
	$sql = "INSERT INTO $table_name (post_id, date, slider_id) VALUES $values";
	$wpdb->query($sql);
	die();
}

function pinwheel_change_type() {
	check_ajax_referer('pinwheel-eb-settings-nonce','eb_settings_nonce');
	$id = isset($_POST['slider_id']) ? $_POST['slider_id'] : '';
	$sname = isset($_POST['sname']) ? $_POST['sname'] : '';
	$gpinwheel_slider = get_option('pinwheel_slider_global_options');
	// YouTube Slider Key Check
	$youtube_key = isset($gpinwheel_slider['youtube_app_id'])?$gpinwheel_slider['youtube_app_id']:'';
	// Facebook Slider Key Check
	$fbkey = isset($gpinwheel_slider['fb_app_key'])?$gpinwheel_slider['fb_app_key']:'';
	// Instagram Slider Key Check
	$igkey = isset($gpinwheel_slider['insta_client_id'])?$gpinwheel_slider['insta_client_id']:'';
	// Flickr Slider Key Check
	$flkey = isset($gpinwheel_slider['flickr_app_key'])?$gpinwheel_slider['flickr_app_key']:'';
	// 500px Slider Key Check
	$pxkey = isset($gpinwheel_slider['px_ckey'])?$gpinwheel_slider['px_ckey']:'';
	$html = ''; 
	$html .= '<form method="post" name="pinwheel-update-type" id="pinwheel-update-type" >
			<div class="pinwheel-head">
				<span class="pinwheel-step-title">Select Slider Type</span>
			</div>';
	$html .= '	<div class="pinwheel-col pinwheel-vert-line">
				<div class="pinwheel-col-head">'. __('WordPress Core','pinwheel-slider').'</div>
				<div class="pinwheel-col-row">
					<input type="radio" name="slider_type" class="updt-sldr-type"  value="2" ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'. __('Recent Posts Slider','pinwheel-slider').'</span>
			</div>
			<div class="pinwheel-col-row">
				<input type="radio" name="slider_type" class="updt-sldr-type"  value="1" ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'. __('Category Slider','pinwheel-slider').'</span>
			</div>
			<div class="pinwheel-col-row">
				<input type="radio" name="slider_type" class="updt-sldr-type"  value="0" ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'. __('Custom Slider','pinwheel-slider').'</span>
			</div>
			<div class="pinwheel-col-row">
				<input type="radio" name="slider_type" class="updt-sldr-type"  value="7" ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'. __('Taxonomy Slider','pinwheel-slider').'</span>
			</div>
			<div class="pinwheel-col-row">
				<input type="radio" name="slider_type" class="updt-sldr-type"  value="17" ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'. __('Image Slider','pinwheel-slider').'</span>
			</div>
			<div class="pinwheel-col-head second">'. __('Social Network','pinwheel-slider').'</div>
			<div class="pinwheel-col-row">';
				if($fbkey == '') { $fbclass="class='no_key'"; } else { $fbclass=""; } 
	$html .= '			<input type="radio" name="slider_type" class="updt-sldr-type"  value="14" '.$fbclass.' ><i class="fa fa-facebook-square"></i><span class="pinwheel-icon-title">'. __('Facebook Album Slider','pinwheel-slider').'</span>';
				if($fbkey == '') { 
	$html .= '			<i class="fa fa-lock" title="Please Add Facebook App ID and Secret in Global Settings"></i>'; 
				}
	$html .= '		</div>
			<div class="pinwheel-col-row">';
				if($igkey == '') { $igclass="class='no_key'"; } else { $igclass=""; } 
	$html .= '			<input type="radio" name="slider_type" class="updt-sldr-type"  value="15" '.$igclass.' ><i class="fa fa-instagram"></i><span class="pinwheel-icon-title">'. __('Instagram Slider','pinwheel-slider').'</span>';
				if($igkey == '') { 
	$html .= '			<i class="fa fa-lock" title="Please Add Instagram Client Id in Global Settings"></i>';
				}
	$html .= '		</div>
			<div class="pinwheel-col-row">';
				if($flkey == '') { $flclass="class='no_key'"; } else { $flclass=""; }
	$html .= '			<input type="radio" name="slider_type" class="updt-sldr-type"  value="16" '.$flclass.' ><i class="fa fa-flickr"></i><span class="pinwheel-icon-title">'.__('Flickr Slider','pinwheel-slider').'</span>';
				if($flkey == '') { 
	$html .= '			<i class="fa fa-lock" title="Please Add Flickr API Key in Global Settings"></i>';
				}
	$html .= '		</div>
			<div class="pinwheel-col-row">';
				if($pxkey == '') { $pxclass="class='no_key'"; } else { $pxclass=""; } 
	$html .= '			<input type="radio" name="slider_type" class="updt-sldr-type"  value="18" '.$pxclass.' ><img src="'. pinwheel_slider_plugin_url( 'images/500px.png' ).'" width="13" height="14" /><span class="pinwheel-icon-title">'.__('500px Slider','pinwheel-slider').'</span>';
				if($pxkey == '') { 
	$html .= '			<i class="fa fa-lock" title="Please Add 500px Consumer Key in Global Settings"></i>';
				} 
	$html .= '		</div>
			<div class="pinwheel-col-head second">'.__('Videos','pinwheel-slider').'</div>
			<div class="pinwheel-col-row">';
				if($youtube_key == '') { $youtubeclass="class='no_key'"; } else { $youtubeclass=""; } 
	$html .= '			<input type="radio" name="slider_type" class="updt-sldr-type"  value="11" '.$youtubeclass.' ><i class="fa fa-youtube"></i><span class="pinwheel-icon-title">'. __('YouTube Playlist Slider','pinwheel-slider').' </span>';
				if($youtube_key == '') { 
	$html .= '			<i class="fa fa-lock" title="Please Add Youtube API Key in Global Settings"></i>';
				} 
	$html .= '		</div>
			<div class="pinwheel-col-row">';
				if($youtube_key == '') { $youtubeclass="class='no_key'"; } else { $youtubeclass=""; } 
	$html .= '			<input type="radio" name="slider_type" class="updt-sldr-type"  value="12" '.$youtubeclass.' ><i class="fa fa-youtube"></i><span class="pinwheel-icon-title">'.__('YouTube Search Slider','pinwheel-slider').'</span>';
				if($youtube_key == '') { 
	$html .= '			<i class="fa fa-lock" title="Please Add Youtube API Key in Global Settings"></i>';
				} 
	$html .= '	</div>
			<div class="pinwheel-col-row">
				<input type="radio" name="slider_type" class="updt-sldr-type"  value="13" ><i class="fa fa-vimeo-square"></i></span><span class="pinwheel-icon-title">'.__('Vimeo Slider','pinwheel-slider').'</span>
			</div>

		</div>
		<div class="pinwheel-col">';
			if(!is_plugin_active('nextgen-gallery/nggallery.php')) { 
				$nggclass="class='no_key'"; 
			} else { $nggclass = ""; } 
	$html .= '	<div class="pinwheel-col-head">'.__('Gallary Integration','pinwheel-slider').'</div>
			<div class="pinwheel-col-row">
				<input type="radio" name="slider_type" class="updt-sldr-type"  value="10" '.$nggclass.' ><i class="fa fa-picture-o"></i><span class="pinwheel-icon-title">'.__('NextGen Gallery Slider','pinwheel-slider').'</span>';
				if($nggclass != '') { 
	$html .= '			<i class="fa fa-lock" title="Please Activate NextGen Gallery Plugin to use it"></i>';
				}
	$html .= '		</div>

			<div class="pinwheel-col-head second">'.__('Ecommerce','pinwheel-slider').'</div>';
			if(!is_plugin_active('woocommerce/woocommerce.php') ) { 
				$wooclass = "class='no_key'" ;
				} else {
					$wooclass = "";
				} 
	$html .= '		<div class="pinwheel-col-row">
					<input type="radio" name="slider_type" class="updt-sldr-type"  value="3" '.$wooclass.' ><i class="fa fa-shopping-cart"></i><span class="pinwheel-icon-title">'.__('WooCommerce Slider','pinwheel-slider').'</span>';
				if($wooclass != '') { 
	$html .= '			 <i class="fa fa-lock" title="Please Activate WooCommerce Plugin to use it"></i>'; 
				}
	$html .= '			</div>';
			 if(!is_plugin_active('wp-e-commerce/wp-shopping-cart.php') ) { 
					$ecomclass = "class='no_key'" ;
				} else {
					$ecomclass = "";
				} 
	$html .= '			<div class="pinwheel-col-row">
					<input type="radio" name="slider_type" class="updt-sldr-type"  value="4" '.$ecomclass.' ><i class="fa fa-shopping-cart"></i><span class="pinwheel-icon-title">'.__('WP Ecommerce Slider','pinwheel-slider').'</span>';
				if($ecomclass != '') { 
	$html .= '			<i class="fa fa-lock" title="Please Activate WP Ecommerce Plugin to use it"></i>'; 
				}
	$html .= '			</div>
				<div class="pinwheel-col-head second">'.__('Events','pinwheel-slider').'</div>';
				if(!is_plugin_active('events-manager/events-manager.php') ) { 
					$emanclass = "class='no_key'" ;
				} else {
					$emanclass = "";
				}
	$html .= '			<div class="pinwheel-col-row">
					<input type="radio" name="slider_type" class="updt-sldr-type"  value="5" '.$emanclass.' ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Event Manager','pinwheel-slider').'</span>';
				if($emanclass != '') { 
	$html .= '			<i class="fa fa-lock" title="Please Activate WP Ecommerce Plugin to use it"></i>';
				}
	$html .= '			</div>';
				if(!is_plugin_active('the-events-calendar/the-events-calendar.php') ) { 
					$ecalclass = "class='no_key'" ;
				} else {
					$ecalclass = "";
				}
	$html .= '		<div class="pinwheel-col-row">
					<input type="radio" name="slider_type" class="updt-sldr-type"  value="6" '.$ecalclass.' ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Event Calendar','pinwheel-slider').'</span>';
				if($ecalclass != '') { 
	$html .= '			<i class="fa fa-lock" title="Please Activate WP Ecommerce Plugin to use it"></i>'; 
				} 
	$html .= '			</div>
				<div class="pinwheel-col-head second">'.__('Miscellaneous','pinwheel-slider').'</div>
				<div class="pinwheel-col-row">
				<input type="radio" name="slider_type" class="updt-sldr-type"  value="9" ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Post Attachments Slider','pinwheel-slider').'</span>
			</div>
			<div class="pinwheel-col-row">
				<input type="radio" name="slider_type" class="updt-sldr-type"  value="8" ><i class="fa fa-rss-square"></i><span class="pinwheel-icon-title">'.__('RSS feed Slider','pinwheel-slider').'</span>
			</div>
		</div>
		<div class="pinwheel-col-row">
			<input type="hidden" name="id" value="'.$id.'"  /> <input type="hidden" name="sname" value="'.$sname.'"  />
		</div>
	</form>';
	echo $html;
	die();
}

function pinwheel_show_params () {
	check_ajax_referer('pinwheel-eb-settings-nonce','eb_settings_nonce');
	if (isset ($_POST['slider_type'])) {
		$slider_type = isset($_POST['slider_type'])?$_POST['slider_type']:'2';
		$id = isset($_POST['id'])?$_POST['id']:'0';
		$html = '';
		$html .= '<div class="pinwheel-step2">
			<form method="post" name="pinwheel-create-new-step2" id="pinwheel-update-step2" class="pinwheel-step2-form pinwheel-validate" >';
			if($slider_type == 2) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="2" checked ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Recent Posts Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 1) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="1" checked ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Category Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 0) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="0" checked ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Custom Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 3) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="3" checked ><i class="fa fa-shopping-cart"></i></span><span class="pinwheel-icon-title">'.__('WooCommerce Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 4) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="4" checked ><i class="fa fa-shopping-cart"></i></span><span class="pinwheel-icon-title">'.__('ECommerce Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 5) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="5" checked ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Event Manager Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 6) {
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="6" checked ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Event Calendar Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 7) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="7" checked ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Taxonomy Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 17) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="17" checked ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Image Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 8) { 
		$html .= '		<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="8" checked ><i class="fa fa-rss-square"></i><span class="pinwheel-icon-title">'.__('RSS Feed Slider','pinwheel-slider').'</span>
				</div>';
			}  elseif($slider_type == 9) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="9" checked ><i class="fa fa-align-justify"></i><span class="pinwheel-icon-title">'.__('Post Attachment Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 10) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="10" checked ><i class="fa fa-picture-o"></i><span class="pinwheel-icon-title">'.__('NextGen Gallery Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 11) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="11" checked ><i class="fa fa-youtube"></i><span class="pinwheel-icon-title">'.__('Youtube Playlist Slider','pinwheel-slider').'</span>
				</div>';
			} elseif($slider_type == 12) {
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="12" checked ><i class="fa fa-youtube"></i><span class="pinwheel-icon-title">'.__('YouTube Search Slider','pinwheel-slider').'</span>
				</div>';
		} elseif($slider_type == 13) { 
		$html .= '		<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="13" checked ><i class="fa fa-vimeo-square"></i><span class="pinwheel-icon-title">'.__('Vimeo Slider','pinwheel-slider').'</span>
				</div>';
		} elseif($slider_type == 14) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="14" checked ><i class="fa fa-facebook-square"></i><span class="pinwheel-icon-title">'.__('Facebook Album Slider','pinwheel-slider').'</span>
				</div>';
		} elseif($slider_type == 15) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="15" checked ><i class="fa fa-instagram"></i><span class="pinwheel-icon-title">'.__('Instagram Slider','pinwheel-slider').'</span>
				</div>';
		} elseif($slider_type == 16) { 
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="16" checked ><i class="fa fa-flickr"></i><span class="pinwheel-icon-title">'.__('Flickr Slider','pinwheel-slider').'</span>
				</div>';
		} elseif($slider_type == 18) {
		$html .= '	<div class="pinwheel-col-row">
					<input type="radio" name="update-slider-type" value="18" checked ><img src="'. pinwheel_slider_plugin_url( 'images/500px.png' ).'" width="13" height="14" /><span class="pinwheel-icon-title">'.__('500px Slider','pinwheel-slider').'</span>
				</div>';
		}
		$sname = isset($_POST['sname'])?$_POST['sname']:'';
		$html .= '<div class="pinwheel-form-row"> 	
				<label>'. __('Slider Name','pinwheel-slider').'</label>			
				 <input type="text" name="new_slider_name" id="update_slider_name" value="'.$sname.'" class="pinwheel-form-input" /> 
			</div>
			<div class="pinwheel-form-row">
				<label>'.__('Offset','pinwheel-slider').'</label>
				<input type="number" name="offset" value="0" class="pinwheel-form-input small" />
			</div>';
			if($slider_type == 1) { 
				//category Slider Param
				$categories = get_categories();
				$scat_html='<option value="" selected >Select the Category</option>';
				foreach ($categories as $category) { 
					 if( isset($param_array['catg_slug']) && $category->slug==$param_array['catg_slug']){$selected = 'selected';} else{$selected='';}
					 $scat_html =$scat_html.'<option value="'.$category->slug.'" '.$selected.'>'.$category->name.'</option>';
				}
		$html .= '	<div class="pinwheel-form-row">
					<label>'.__('Category','pinwheel-slider').'</label>
					<select name="catg_slug" id="pinwheel_slider_catslug" class="pinwheel-form-input" >'.$scat_html.'</select>
				</div>';
			} elseif($slider_type == 3 ) { 
				if( is_plugin_active('woocommerce/woocommerce.php') ) {
					$wooterms = get_terms('product_cat');
					$woocat_html='<option value="" selected >Select the Category</option>';
					foreach( $wooterms as $woocategory) {
						if( isset($param_array['woo-catg']) && $woocategory->slug==$param_array['woo-catg'] ){$selected = 'selected';} else{$selected='';}
						$woocat_html =$woocat_html.'<option value="'.$woocategory->slug.'" '.$selected.'>'. $woocategory->name .'</option>';
					}
				} 
		$html .= '	<div class="pinwheel-form-row">
				<label>'.__('Select Slider Type','pinwheel-slider').'</label>
				<select name="woo_slider_type" id="woo-slider-type" class="pinwheel-form-input pinwheel_woo_type" >
					<option value="recent" >'.__('Recent Product Slider','pinwheel-slider').'</option>
					<option value="upsells" >'.__('Upsells Product Slider','pinwheel-slider').'</option>
					<option value="crosssells" >'.__('Crosssells Product Slider','pinwheel-slider').'</option>
					<option value="external" >'.__('External Product Slider','pinwheel-slider').'</option>
					<option value="grouped" >'.__('Grouped Product Slider','pinwheel-slider').'</option>
				</select>
			</div>
			<div class="pinwheel-form-row woo-product" style="display:none;">
				<label>'.__('Enter Product','pinwheel-slider').'</label>
				<input id="products" class="pinwheel-form-input" >
				<input id="product_id" name="product_id" value="" type="hidden" >
			</div>
			<div class="pinwheel-form-row">
				<label>'.__('Select Category','pinwheel-slider').'</label>
				<select id="pinwheel_slider_woo_catslug" multiple class="pinwheel-multiselect pinwheel-form-input" >'. $woocat_html.'</select>
				<input type="hidden" name="woo-catg"  />
			</div>';
			} elseif($slider_type == 4 ) { 
				if( is_plugin_active('wp-e-commerce/wp-shopping-cart.php') ) {
					$ecomterms = get_terms('wpsc_product_category');
					$ecomcat_html='<option value="" selected >Select the Category</option>';
					foreach( $ecomterms as $ecomcategory) {
						if( isset($param_array['ecom-catg']) && $ecomcategory->slug==$param_array['ecom-catg']){$selected = 'selected';} else{$selected='';}
						$ecomcat_html =$ecomcat_html.'<option value="'.$ecomcategory->slug.'" '.$selected.'>'.$ecomcategory->name.'</option>';
					}
				}
			
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Select Slider Type','pinwheel-slider').'</label>
					<select name="ecom_slider_type" id="ecom_slider_preview" onchange="catgtype(this.value);"  class="pinwheel-form-input" >
						<option value="0" >'.__('eCom Recent Product Slider','pinwheel-slider').'</option>
						<option value="1" >'.__('eCom Product Category Slider','pinwheel-slider').'</option>
					</select>
				</div>
				<div class="pinwheel-form-row pinwheel_catg" style="display:none;">
					<label>'.__('Select Category','pinwheel-slider').'</label>
					<select id="pinwheel_slider_ecom_catslug" name="ecom-catg" class="pinwheel-form-input" >'. $ecomcat_html.'</select>
				</div>';
			} elseif($slider_type == 5 ) { 
				if( is_plugin_active('events-manager/events-manager.php') ) {
					$eventterms = get_terms('event-categories');
					$eventcat_html='<option value="" selected >All Category</option>';
					foreach( $eventterms as $eventcategory) {
						$eventcat_html =$eventcat_html.'<option value="'.$eventcategory->slug.'" >'.$eventcategory->name.'</option>';
					} 
					$evtags = get_terms("event-tags");
					$evtag_html='<option value="" selected >All Tags</option>';
					foreach( $evtags as $tags) {
						$evtag_html = $evtag_html.'<option value="'.$tags->slug.'">'.$tags->name.'</option>';
					} 
				}
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Select Slider Scope','pinwheel-slider').'</label>
					<select name="eventm_slider_scope" id="eventm_slider_preview" class="pinwheel-form-input" >
						<option value="future" >'.__('Future Events','pinwheel-slider').'</option>
						<option value="past" >'.__('Past Events','pinwheel-slider').'</option>
						<option value="all" >'.__('Recent Events','pinwheel-slider').'</option>
					</select>
				</div>
				<div class="pinwheel-form-row">
					<label>'.__('Select Category','pinwheel-slider').'</label>
					<select id="pinwheel_slider_event_catslug" multiple class="pinwheel-multiselect pinwheel-form-input" >'.$eventcat_html.'</select>
					<input type="hidden" name="eman-catg"  />
				</div>
				<div class="pinwheel-form-row">
					<label>'.__('Select Tags','pinwheel-slider').'</label>
					<select id="pinwheel_slider_event_tags" multiple class="pinwheel-multiselect pinwheel-form-input" >'.$evtag_html.'</select>
					<input type="hidden" name="eman-tags"  />
				</div>';
			}  elseif($slider_type == 6 ) { 
				if( is_plugin_active('the-events-calendar/the-events-calendar.php') ) { 
					$eventcalterms = get_terms('tribe_events_cat');
					$eventcal_html='<option value="" selected >All Category</option>';
					foreach( $eventcalterms as $eventcalcat) {
						$eventcal_html =$eventcal_html.'<option value="'.$eventcalcat->slug.'" '.$selected.'>'.$eventcalcat->name.'</option>';
					}
					$evcaltags = get_terms("post_tag");
					$evcaltag_html='<option value="" selected >All Tags</option>';
					foreach( $evcaltags as $tags) {
						$evcaltag_html = $evcaltag_html.'<option value="'.$tags->slug.'">'.$tags->name.'</option>';
					} 
				}
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Select Slider Type','pinwheel-slider').'</label>
					<select name="eventcal_slider_type" id="eventcal_slider_preview" class="pinwheel-form-input" >
						<option value="list" >'.__('Future Events','pinwheel-slider').'</option>
						<option value="past" >'.__('Past Events','pinwheel-slider').'</option>
						<option value="all" >'.__('Recent Events','pinwheel-slider').'</option>
					</select>
				</div>
				<div class="pinwheel-form-row">
					<label>'.__('Select Category','pinwheel-slider').'</label>
					<select id="pinwheel_slider_eventcal_catslug" multiple class="pinwheel-multiselect pinwheel-form-input" >'.$eventcal_html.'</select>
					<input type="hidden" name="ecal-catg"  />
				</div>
				<div class="pinwheel-form-row">
					<label>'.__('Select Tags','pinwheel-slider').'</label>
					<select id="pinwheel_slider_eventcal_tags" multiple class="pinwheel-multiselect pinwheel-form-input" >'.$evcaltag_html.'</select>
					<input type="hidden" name="ecal-tags"  />
				</div>';
			} elseif($slider_type == 7) { 
				$post_types = get_post_types(); 
				$taxonomy_names = get_object_taxonomies( 'post' );
				// Taxonomy Slider Params  
			$html .= '
				<div class="pinwheel-form-row">
					<label>'.__('Post Type','pinwheel-slider').'</label>
					<select name="taxo_posttype" id="pinwheel_taxonomy_posttype" class="pinwheel-form-input" >';
					foreach ( $post_types as $cpost_type ) { 
						$html .= '<option value="'.$cpost_type.'" >' . $cpost_type . '</option>';
					} 
			$html .= '	</select>
				</div>
				<div class="pinwheel-form-row sh-taxo">
					<label>'.__('Taxonomy','pinwheel-slider').'</label>
					<select name="taxonomy_name" id="pinwheel_taxonomy" class="pinwheel-form-input" >
						<option value="" >Select Taxonomy </option>';
					foreach ( $taxonomy_names as $taxonomy_name ) { 
			$html .= '		<option value="'.$taxonomy_name.'" >' . $taxonomy_name . '</option>';
					}
			$html .= '	</select>
				</div>
				<div class="pinwheel-form-row sh-term" style="display:none;">
					
				</div>
				<div class="pinwheel-form-row">
					<label>'.__('Show','pinwheel-slider').'</label>
					<select name="taxonomy_show" id="pinwheel_taxonomy_show" class="pinwheel-form-input" >
						<option value="" >'.__('Default','pinwheel-slider').'</option>
						<option value="per_tax" >'.__('One Per Tax','pinwheel-slider').'</option>
					</select>
				</div>
				<div class="pinwheel-form-row">
					<label>'.__('Operator','pinwheel-slider').'</label>
					<select name="taxonomy_operator" id="pinwheel_taxonomy_operator" class="pinwheel-form-input" >
						<option value="IN" >'.__('IN','pinwheel-slider').'</option>
						<option value="NOT IN" >'.__('NOT IN','pinwheel-slider').'</option>
						<option value="AND" >'.__('AND','pinwheel-slider').'</option>
					</select>
				</div>
				<div class="pinwheel-form-row">
					<label>'.__('Author','pinwheel-slider').'</label>
					<select id="pinwheel_taxonomy_author" class="pinwheel-multiselect pinwheel-form-input" multiple >';
						$blogusers = get_users();						
						// Array of WP_User objects.
						foreach ( $blogusers as $user ) {
				$html .= '		<option value="'.$user->ID.'" >' . $user->user_nicename . '</option>';
						}
				$html .= '</select>
						<input type="hidden" name="taxonomy_author"  />
				</div>';
			} elseif($slider_type == 8) {
			$html .= '
				<div class="pinwheel-form-row">
					<label>'.__('Feedurl','pinwheel-slider').'</label>
					<input type="text" name="rssfeedurl" id="pinwheel_rssfeed_feedurl" class="pinwheel-form-input large" placeholder="http://mashable.com/feed/" /> 
				</div>

				<div class="pinwheel-form-row">
					<label>'.__('RSS Slider Id','pinwheel-slider').'</label>
					<input type="text" name="rssfeedid" id="pinwheel_rssfeed_id" class="pinwheel-form-input" /> 
				</div>

				<div class="pinwheel-form-row">
					<label>'.__('Default image','pinwheel-slider').'</label>
					<input type="text" name="rssfeedimg" id="pinwheel_rssfeed_defimage" class="pinwheel-form-input large" placeholder="'.pinwheel_slider_plugin_url('/images/default_image.png').'" /> 
				</div>
				
				<div class="pinwheel-form-row">
					<label>'.__('Image Class','pinwheel-slider').'</label>
					<input type="text" name="rss-image-class" id="pinwheel_rssfeed_image_class" class="pinwheel-form-input" /> 
				</div>

				<div class="pinwheel-form-row">
					<label>'.__('Source','pinwheel-slider').'</label>
					<select name="rssfeed-src" id="pinwheel_rssfeed_src" class="pinwheel-form-input rss-source">
						<option value="">'.__('Other','pinwheel-slider').'</option>
						<option value="smugmug">'.__('Smugmug','pinwheel-slider').'</option>
					</select>
				</div>
		
				<div class="pinwheel-form-row rss-feed">
					<label>'.__('Feed','pinwheel-slider').'</label>
					<select name="feed" name="feed" id="pinwheel_rssfeed_feed" class="pinwheel-form-input">
						<option value="">'.__('Other','pinwheel-slider').'</option>
						<option value="atom">'.__('Atom','pinwheel-slider').'</option>
					</select>
				</div>			
	
				<div class="pinwheel-form-row rss-size" style="display:none;">
					<label>'.__('Size','pinwheel-slider').'</label>
					<select name="rss-size" name="rss-size" id="pinwheel_rssfeed_size" class="pinwheel-form-input">
						<option value="Ti">'.__('Tiny thumbnails','pinwheel-slider').'</option>
						<option value="Th">'.__('Large thumbnails','pinwheel-slider').'</option>
						<option value="S">'.__('Small','pinwheel-slider').'</option>
						<option value="M">'.__('Medium','pinwheel-slider').'</option>
						<option value="L">'.__('Other','pinwheel-slider').'</option>
						<option value="XL">'.__('Large','pinwheel-slider').'</option>
						<option value="X2">'.__('X2Large','pinwheel-slider').'</option>
						<option value="X3">'.__('X3Large','pinwheel-slider').'</option>
						<option value="O">'.__('Original','pinwheel-slider').'</option>
					</select> 
				</div>

				<div class="pinwheel-form-row">
					<label>'.__('Scan child node content for images','pinwheel-slider').'</label>
					<input type="checkbox" name="rss-content" id="pinwheel_rssfeed_content" class="pinwheel-form-input" />
				</div>
				';
			} elseif($slider_type == 9) { 
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Post Id','pinwheel-slider').'</label>
					<input type="text" name="postattch-id" id="pinwheel_postattch_id" class="pinwheel-form-input" /> 
				</div>';
			} elseif($slider_type == 10) { 
				$galleriesOptions = get_pinwheel_nextgen_galleries();
				$html .= '<div class="pinwheel-form-row">
					<label>'.__('Select Gallery','pinwheel-slider').'</label>
					<select name="nextgen-id" id="pinwheel_nextgen_galleryid" class="pinwheel-form-input">
						'.$galleriesOptions.'
					</select>
				</div>
				<div class="pinwheel-form-row">
					<label>'.__('Link','pinwheel-slider').'</label>
					<input type="checkbox" name="nextgen-anchor" id="pinwheel_nextgen_anchor" value="1" class="pinwheel-form-input" />
				</div>';
			}elseif($slider_type == 11) { 
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Playlist id','pinwheel-slider').'</label>
					<input type="text" name="yt-playlist-id" id="yt-playlist-id" class="pinwheel-form-input" />
				</div>';
			} elseif($slider_type == 12) { 
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Term','pinwheel-slider').'</label>
					<input type="text" name="yt-search-term" id="yt-search-term" class="pinwheel-form-input" />
				</div>';
			} elseif($slider_type == 13) { 
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Select type','pinwheel-slider').'</label>
					<select name="vimeo-type" class="vimeo-type pinwheel-form-input" >
						<option value="channel">'.__('Channel','pinwheel-slider').'</option>
						<option value="album">'.__('Album','pinwheel-slider').'</option>
					</select>
				</div>
				<div class="pinwheel-form-row">
					<label id="vimeo-lb">'.__('Channel Name','pinwheel-slider').'</label>
					<input type="text" name="vimeo-val" id="vimeo-val" class="pinwheel-form-input" />
				</div>';
			} elseif($slider_type == 14) {
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Page Url','pinwheel-slider').'</label>
					<input type="text" name="fb-pg-url" id="fb-pg-url" class="pinwheel-form-input" />
					<input type="submit" name="cfb_connect" value="'.__('Connect','pinwheel-slider').'" class="btn_save cfb_connect" />
				</div>
				<div class="pinwheel-form-row fb-albums">
			
				</div>';
			} elseif($slider_type == 15) { 
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('User Name','pinwheel-slider').'</label>
					<input type="text" name="user-name" id="user-name" class="pinwheel-form-input" />
				</div>';
			} elseif($slider_type == 16) {
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Select type','pinwheel-slider').'</label>
					<select name="flickr-type" class="flickr-type pinwheel-form-input" >
						<option value="user">'.__('User','pinwheel-slider').'</option>
						<option value="album">'.__('Album','pinwheel-slider').'</option>
					</select>
				</div>
				<div class="pinwheel-form-row">
					<label id="flickr-lb">'.__('User ID','pinwheel-slider').'</label>
					<input type="text" name="fl-id" id="fl-user-id" class="pinwheel-form-input" />
				</div>';
			} elseif($slider_type == 18) {
			$html .= '<div class="pinwheel-form-row">
					<label>'.__('Select type','pinwheel-slider').'</label>
					<select name="feature" class="feature pinwheel-form-input" >
						<option value="popular">'.__('Popular','pinwheel-slider').'</option>
						<option value="highest_rated" >'.__('Highest Rated','pinwheel-slider').'</option>
						<option value="upcoming" >'.__('Upcoming','pinwheel-slider').'</option>
						<option value="editors" >'.__('Editors','pinwheel-slider').'</option>
						<option value="fresh_today" >'.__('Fresh Today','pinwheel-slider').'</option>
						<option value="fresh_yesterday" >'.__('Fresh Yesterday','pinwheel-slider').'</option>
						<option value="fresh_week" >'.__('Fresh Week','pinwheel-slider').'</option>
						<option value="user" >'.__('User','pinwheel-slider').'</option>
						<option value="user_favorites">'.__('User favorites','pinwheel-slider').'</option>
					</select>
				</div>
				<div class="pinwheel-form-row pxuser" style="display:none;">
					<label class="pinwheel-form-label">'.__('User Name','pinwheel-slider').'</label>
					<input type="text" name="pxuser" value="" class="pinwheel-form-input" />
				</div>';
			}
			$html .= '<input type="hidden" name="id" value="'.$id.'" / > <input type="hidden" name="sname" value="'.$sname.'"  />
			<input type="submit" name="update-type" class="btn_save update-type" value="'.__('Update','pinwheel-slider').'" />
			<input type="button" name="step2-prev" value="'.__('Back','pinwheel-slider').'" class="pinwheel-updt-btn-back" >
			<div style="clear:left;"></div>
			</form>
		</div>';
		echo $html;
	}
	die();
}
function pinwheel_updt_sldr_type() {
	check_ajax_referer('pinwheel-eb-settings-nonce','eb_settings_nonce');
	global $wpdb,$table_prefix;
	$slider_id = $_POST['id'];
	$slider_type = $_POST['update-slider-type'];
	$parm = $param = '';
	$param_array = array();	
	if($_POST['offset'] != '0' && $_POST['offset'] != '') {
			$param_array['offset']=$_POST['offset'];
	}
	if( $slider_type == '1') {
		if($_POST['catg_slug'] != '0' && $_POST['catg_slug'] != '') {
			$param_array['catg_slug']=$_POST['catg_slug'];
		}
	}
	if($slider_type == '3') {
		if(isset($_POST['woo_slider_type']) && $_POST['woo_slider_type'] != '') {
			$param_array['woo_slider_type'] = $_POST['woo_slider_type'];
		}
		if(isset($_POST['product_id']) && $_POST['product_id'] != '') {
			$param_array['product_id']=$_POST['product_id'];
		}
		if(isset($_POST['woo-catg']) && $_POST['woo-catg'] != '') {
			$param_array['woo-catg']=$_POST['woo-catg'];
		}
	}
	if($slider_type == '4') {
		if(isset($_POST['ecom-catg']) && $_POST['ecom-catg'] != '') {
			$param_array['ecom-catg']=$_POST['ecom-catg'];
		}
		if(isset($_POST['ecom_slider_type']) && $_POST['ecom_slider_type'] != '') {
			$param_array['ecom_slider_type']=$_POST['ecom_slider_type'];
		}
	}
	if($slider_type == '5') {
		if(isset($_POST['eventm_slider_scope']) && $_POST['eventm_slider_scope'] != '') {
			$param_array['eventm_slider_scope'] = $_POST['eventm_slider_scope'];
		}
		if(isset($_POST['eman-catg']) && $_POST['eman-catg'] != '0' && $_POST['eman-catg'] != '') {
			$param_array['eman-catg']=$_POST['eman-catg'];
		}
		if(isset($_POST['eman-tags']) && $_POST['eman-tags'] != '') {
			$param_array['eman-tags']=$_POST['eman-tags'];
		}
	}
	if($slider_type == '6') {
		if(isset($_POST['eventcal_slider_type']) && $_POST['eventcal_slider_type'] != '') {
			$param_array['eventcal_slider_type'] = $_POST['eventcal_slider_type'];
		}
		if(isset($_POST['ecal-catg']) && $_POST['ecal-catg'] != '0' && $_POST['ecal-catg'] != '') {
			$param_array['ecal-catg']=$_POST['ecal-catg'];
		}
		if(isset($_POST['ecal-tags']) && $_POST['ecal-tags'] != '') {
			$param_array['ecal-tags']=$_POST['ecal-tags'];
		}
	}	
	if($slider_type == '7') {
		if( isset($_POST['taxo_posttype']) && $_POST['taxo_posttype'] != '') {
			$param_array['post_type']=$_POST['taxo_posttype'];
		}
		if( isset($_POST['taxonomy_name']) && $_POST['taxonomy_name'] != '') {
			$param_array['taxonomy_name'] = $_POST['taxonomy_name'];
		}
		if( isset($_POST['taxonomy_term']) && $_POST['taxonomy_term'] != '') {
			$param_array['taxonomy_term']=$_POST['taxonomy_term'];
		}
		if( isset($_POST['taxonomy_show']) && $_POST['taxonomy_show'] != '') {
			$param_array['taxonomy_show']=$_POST['taxonomy_show'];
		}
		if( isset($_POST['taxonomy_operator']) && $_POST['taxonomy_operator'] != '') {
			$param_array['taxonomy_operator']=$_POST['taxonomy_operator']; 
		}
		if( isset($_POST['taxonomy_author']) && $_POST['taxonomy_author'] != '') {
			$param_array['taxonomy_author']=$_POST['taxonomy_author'];
		}
	}
	if($slider_type == '8') {
		if( isset($_POST['rssfeedid']) && $_POST['rssfeedid'] != '') {
			$param_array['feed_id']=$_POST['rssfeedid'];
		}
		if( isset($_POST['rssfeedurl']) && $_POST['rssfeedurl'] != '') {
			$param_array['feed_url']=$_POST['rssfeedurl'];
		}
		if( isset($_POST['rssfeedimg']) && $_POST['rssfeedimg'] != '') {
			$param_array['feed_img']=$_POST['rssfeedimg'];
		}	
		if( isset($_POST['feed']) && $_POST['feed'] != '') {
			$param_array['feed']=$_POST['feed'];
		}
		if( isset($_POST['rssfeed-order']) && $_POST['rssfeed-order'] != '') {
			$param_array['feed_order']=$_POST['rssfeed-order'];
		}
		if( isset($_POST['rss-content']) && $_POST['rss-content'] != '') {
			$param_array['feed_content']=$_POST['rss-content'];
		}
		if( isset($_POST['rssfeed-media']) && $_POST['rssfeed-media'] != '') {
			$param_array['feed_media']=$_POST['rssfeed-media'];
		}
		if( isset($_POST['rssfeed-src']) && $_POST['rssfeed-src'] != '') {
			$param_array['feed_src']=$_POST['rssfeed-src'];
		}	
		if( isset($_POST['rss-size']) && $_POST['rss-size'] != '') {
			$param_array['feed_size']=$_POST['rss-size'];
		}
		if( isset($_POST['rss-img-class']) && $_POST['rss-img-class'] != '') {
			$param_array['feed_imgclass']=$_POST['rss-img-class'];
		}	
	}
	if($slider_type == '9') {
		if(isset($_POST['postattch-id']) && $_POST['postattch-id'] != '') {
			$param_array['postattch-id']=$_POST['postattch-id'];
		}
	}	
	if($slider_type == '10') {
		if(isset($_POST['nextgen-id']) && $_POST['nextgen-id'] != '') {
			$param_array['nextgen-id']=$_POST['nextgen-id'];
		}
		if(isset($_POST['nextgen-anchor']) && $_POST['nextgen-anchor'] != '') {
			$param_array['nextgen-anchor']=$_POST['nextgen-anchor'];
		}		
	}
	if($slider_type == '11') {
		if(isset($_POST['yt-playlist-id']) && $_POST['yt-playlist-id'] != '') {
			$param_array['yt-playlist-id']=$_POST['yt-playlist-id'];
		}
	}
	if($slider_type == '12') {
		if(isset($_POST['yt-search-term']) && $_POST['yt-search-term'] != '') {
			$param_array['yt-search-term']=$_POST['yt-search-term'];
		}
	}
	if($slider_type == '13') {
		if(isset($_POST['vimeo-type']) && $_POST['vimeo-type'] != '') {
			$param_array['vimeo-type']=$_POST['vimeo-type'];
		}
		if(isset($_POST['vimeo-val']) && $_POST['vimeo-val'] != '') {
			$param_array['vimeo-val']=$_POST['vimeo-val'];
		}
	}
	if($slider_type == '14') {
		if(isset($_POST['fb-pg-url']) && $_POST['fb-pg-url'] != '') {
			$param_array['fb-pg-url']=$_POST['fb-pg-url'];
		}
		if(isset($_POST['fb-album']) && $_POST['fb-album'] != '') {
			$param_array['fb-album']=$_POST['fb-album'];
		}
	}
	if($slider_type == '15') {
		if(isset($_POST['user-name']) && $_POST['user-name'] != '') {
			$param_array['user-name']=$_POST['user-name'];
		}
	}
	if($slider_type == '16') {
		if(isset($_POST['flickr-type']) && $_POST['flickr-type'] != '') {
			$param_array['flickr-type']=$_POST['flickr-type'];
		}
		if(isset($_POST['fl-id']) && $_POST['fl-id'] != '') {
			$param_array['fl-id']=$_POST['fl-id'];
		}
	}
	if($slider_type == '18') {
		if(isset($_POST['feature']) && $_POST['feature'] != '') {
			$param_array['feature']=$_POST['feature'];
		}
		if(isset($_POST['pxuser']) && $_POST['pxuser'] != '') {
			$param_array['pxuser']=$_POST['pxuser'];
		}
	}
	$sparam = serialize($param_array);
	$param = $sparam;
	$parm = ",param = '$param'";
	$slider_name = isset($_POST["new_slider_name"])?$_POST["new_slider_name"]:'';
	$slider_meta = $table_prefix.PINWHEEL_SLIDER_META;
	$sql = "UPDATE ".$slider_meta." SET type='".$slider_type."', slider_name='".$slider_name."' $parm WHERE slider_id=$slider_id";
	$wpdb->query($sql);	
	$current_url = admin_url('admin.php?page=pinwheel-slider-easy-builder');
	$urlarg = array();
	$urlarg['id'] = $slider_id;
	$query_arg = add_query_arg( $urlarg ,$current_url);
	echo $current_url = $query_arg;
	die();
}
function pinwheel_eb_settings() {
	check_ajax_referer('pinwheel-eb-settings-nonce','eb_settings_nonce');
	$tab = isset($_POST['tab'])?$_POST['tab']:'';	
	$cntr = isset($_POST['cntr'])?$_POST['cntr']:'';
	$pinwheel_slider_options='pinwheel_slider_options'.$cntr;
	$pinwheel_slider_curr=get_option($pinwheel_slider_options);
	if(!isset($cntr) or empty($cntr)){$curr = 'Default';}
	else{$curr = $cntr;}
	$pinwheel_slider_curr= populate_pinwheel_current($pinwheel_slider_curr);
	$html = '';
	if(get_transient( 'pinwheel_eb_undo_set' ) != false) { 
		$undo_style="display:inline-block;";	
	} else $undo_style="display:none;";
	if($tab == 'basic') {
		$curr_ease = $pinwheel_slider_curr['easing'];
		$html .='<div class="ebs-row">
			<label>'.__('Skin','pinwheel-slider').'</label>
			<select class="eb-selnone" name="'.$pinwheel_slider_options.'[stylesheet]" id="pinwheel_slider_stylesheet" >';
				$directory = PINWHEEL_SLIDER_CSS_DIR;
				if ($handle = opendir($directory)) {
				    while (false !== ($file = readdir($handle))) { 
				     if($file != '.' and $file != '..') { 
					$html .='<option value="'.$file.'" '.selected($file,$pinwheel_slider_curr['stylesheet'],false).'>'.$file.'</option>';
				} }
				    closedir($handle);
				}
				
			$html .='</select>
		</div>';
		
		if($pinwheel_slider_curr['stylesheet']!='default'){
		
		$html .= '<div class="ebs-row">
			<label>'.__('Side Slides Pair','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[sideslides]" id="pinwheel_slider_no_sideslides" class="small-text" value="'.$pinwheel_slider_curr['sideslides'].'"/>
		</div>';
		}
		$html .= '<div class="ebs-row">
			<label>'.__('Auto-slide','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" id="pinwheel_slider_autoslide" name="'.$pinwheel_slider_options.'[autostep]" class="hidden_check" value="'.$pinwheel_slider_curr['autostep'].'">
				<input id="pinwheel_autoslide" class="cmn-toggle eb-toggle-round" type="checkbox" value="1" '.checked('1', $pinwheel_slider_curr['autostep'],false).' >
				<label for="pinwheel_autoslide"></label>
			</div>
		</div>
		<div class="ebs-row">
			<label>'.__('Easing Effect','pinwheel-slider').'</label>		
				<select class="eb-selnone" name="'.$pinwheel_slider_options.'[easing]" >
				<option value="swing" '.selected("swing",$curr_ease,false).'>'.__('swing','pinwheel-slider').'</option>
				<option value="easeInQuad" '.selected("easeInQuad",$curr_ease,false).'>'.__('easeInQuad','pinwheel-slider').'</option>
				<option value="easeOutQuad" '.selected("easeOutQuad",$curr_ease,false).'>'.__('easeOutQuad','pinwheel-slider').'</option>
				<option value="easeInOutQuad" '.selected("easeInOutQuad",$curr_ease,false).'>'.__('easeInOutQuad','pinwheel-slider').'</option>
				<option value="easeInCubic" '.selected("easeInCubic",$curr_ease,false).'>'.__('easeInCubic','pinwheel-slider').'</option>
				<option value="easeOutCubic" '.selected("easeOutCubic",$curr_ease,false).'>'.__('easeOutCubic','pinwheel-slider').'</option>
				<option value="easeInOutCubic" '.selected("easeInOutCubic",$curr_ease,false).'>'.__('easeInOutCubic','pinwheel-slider').'</option>
				<option value="easeInQuart" '.selected("easeInQuart",$curr_ease,false).'>'.__('easeInQuart','pinwheel-slider').'</option>
				<option value="easeOutQuart" '.selected("easeOutQuart",$curr_ease,false).'>'.__('easeOutQuart','pinwheel-slider').'</option>				
				<option value="easeInOutQuart" '.selected("easeInOutQuart",$curr_ease,false).'>'.__('easeInOutQuart','pinwheel-slider').'</option>		
				<option value="easeInQuint" '.selected("easeInQuint",$curr_ease,false).'>'.__('easeInQuint','pinwheel-slider').'</option>		
				<option value="easeOutQuint" '.selected("easeOutQuint",$curr_ease,false).'>'.__('easeOutQuint','pinwheel-slider').'</option>		
				<option value="easeInOutQuint" '.selected("easeInOutQuint",$curr_ease,false).'>'.__('easeInOutQuint','pinwheel-slider').'</option>		
				<option value="easeInSine" '.selected("easeInSine",$curr_ease,false).'>'.__('easeInSine','pinwheel-slider').'</option>		
				<option value="easeOutSine" '.selected("easeOutSine",$curr_ease,false).'>'.__('easeOutSine','pinwheel-slider').'</option>		
				<option value="easeInOutSine" '.selected("easeInOutSine",$curr_ease,false).'>'.__('easeInOutSine','pinwheel-slider').'</option>		
				<option value="easeInExpo" '.selected("easeInExpo",$curr_ease,false).'>'.__('easeInExpo','pinwheel-slider').'</option>		
				<option value="easeOutExpo" '.selected("easeOutExpo",$curr_ease,false).'>'.__('easeOutExpo','pinwheel-slider').'</option>					
				<option value="easeInOutExpo" '.selected("easeInOutExpo",$curr_ease,false).'>'.__('easeInOutExpo','pinwheel-slider').'</option>					
				<option value="easeInCirc" '.selected("easeInCirc",$curr_ease,false).'>'.__('easeInCirc','pinwheel-slider').'</option>		
				<option value="easeOutCirc" '.selected("easeOutCirc",$curr_ease,false).'>'.__('easeOutCirc','pinwheel-slider').'</option>		
				<option value="easeInOutCirc" '.selected("easeInOutCirc",$curr_ease,false).'>'.__('easeInOutCirc','pinwheel-slider').'</option>		
				<option value="easeInElastic" '.selected("easeInElastic",$curr_ease,false).'>'.__('easeInElastic','pinwheel-slider').'</option>		
				<option value="easeOutElastic" '.selected("easeOutElastic",$curr_ease,false).'>'.__('easeOutElastic','pinwheel-slider').'</option>		
				<option value="easeInOutElastic" '.selected("easeInOutElastic",$curr_ease,false).'>'.__('easeInOutElastic','pinwheel-slider').'</option>	
				<option value="easeInBack" '.selected("easeInBack",$curr_ease,false).'>'.__('easeInBack','pinwheel-slider').'</option>	
				<option value="easeOutBack" '.selected("easeOutBack",$curr_ease,false).'>'.__('easeOutBack','pinwheel-slider').'</option>	
				<option value="easeInOutBack" '.selected("easeInOutBack",$curr_ease,false).'>'.__('easeInOutBack','pinwheel-slider').'</option>	
				<option value="easeInBounce" '.selected("easeInBounce",$curr_ease,false).'>'.__('easeInBounce','pinwheel-slider').'</option>	
				<option value="easeOutBounce" '.selected("easeOutBounce",$curr_ease,false).'>'.__('easeOutBounce','pinwheel-slider').'</option>	
				<option value="easeInOutBounce" '.selected("easeInOutBounce",$curr_ease,false).'>'.__('easeInOutBounce','pinwheel-slider').'</option>	
			</select>
		</div>
		<div class="ebs-row">
			<label>'.__('Speed','pinwheel-slider').'</label>
			<input type="number" name="'.$pinwheel_slider_options.'[speed]" id="pinwheel_slider_speed" class="small-text" value="'.$pinwheel_slider_curr['speed'].'"/>
		</div>
		<div class="ebs-row">
				<label>'.__('Duration','pinwheel-slider').'</label>			
				<input type="number" name="'. $pinwheel_slider_options.'[time]" id="pinwheel_slider_trans" class="small-text" value="'. $pinwheel_slider_curr['time'].'" min="1" />
			</div>
		<div class="ebs-row">
			<label>'.__('Width','pinwheel-slider').'</label>
			<input type="number" name="'.$pinwheel_slider_options.'[width]" id="pinwheel_slider_width" class="small-text" value="'.$pinwheel_slider_curr['width'].'" min="1" />
		</div>

		<div class="ebs-row">
			<label>'.__('Height','pinwheel-slider').'</label>
			<input type="number" name="'.$pinwheel_slider_options.'[height]" id="pinwheel_slider_height" class="small-text" value="'.$pinwheel_slider_curr['height'].'" min="1" />
		</div>

		<div class="ebs-row">
			<label>'.__('No. of Posts','pinwheel-slider').'</label>
			<input type="number" name="'.$pinwheel_slider_options.'[no_posts]" id="pinwheel_slider_no_posts" class="small-text" value="'.$pinwheel_slider_curr['no_posts'].'" min="1" />
		</div>';
		
		
		$html .= '<p class="submit">
			<input type="submit" class="button-primary" name="save_eb_settings" value="'.__('Save Changes','pinwheel-slider').'" />
			<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
		</p>';
	} elseif($tab == 'miscellaneous') {
		$html .= '<div class="ebs-row">
			<label class="eb-llabel">'.__('Lightbox Effect','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[pphoto]" class="pinwheel_slider_pphoto hidden_check" value="'.$pinwheel_slider_curr['pphoto'].'">
				<input id="pinwheel_pphoto" class="cmn-toggle eb-toggle-round pinwheel_pphoto" type="checkbox" '.checked('1', $pinwheel_slider_curr['pphoto'],false).'>
				<label for="pinwheel_pphoto"></label>
			</div>
		</div>';
		if($pinwheel_slider_curr['pphoto'] == 1 ) $lbox_style = 'display:block';
		else $lbox_style = 'display:none';
		$html .= '<div class="ebs-row pinwheel_slider_lbox_type"  style="'.$lbox_style.'" >
			<label class="eb-llabel">'.__('Select LightBox','pinwheel-slider').'</label>
			<select name="'.$pinwheel_slider_options.'[lbox_type]"  class="eb-selnone">
				<option value="pphoto_box" '.selected("pphoto_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('PrettyPhoto','pinwheel-slider').'</option>
				<option value="nivo_box" '.selected("nivo_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('Nivo box','pinwheel-slider').'</option>
				<option value="photo_box" '.selected("photo_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('Photo box','pinwheel-slider').'</option>
				<option value="smooth_box" '.selected("smooth_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('Smooth box','pinwheel-slider').'</option>
				<option value="swipe_box" '.selected("swipe_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('Swipe box','pinwheel-slider').'</option>
			</select>
		</div>
		<div class="ebs-row">
			<label class="eb-llabel">'.__('Continue Reading Text','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[more]" id="pinwheel_slider_readmore" class="eb-smalltext" value="'.$pinwheel_slider_curr['more'].'" />
		</div>
		<div class="ebs-row">
			<label class="eb-llabel">'.__('Retain tags','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[allowable_tags]" id="pinwheel_slider_allowable_tags" class="eb-smalltext" value="'.$pinwheel_slider_curr['allowable_tags'].'" />
		</div>
		<div class="ebs-row">
			<label class="eb-llabel">'.__('Link attributes  ','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[a_attr]" id="pinwheel_slider_a_attr" class="eb-smalltext" value="'.htmlentities( $pinwheel_slider_curr['a_attr'] , ENT_QUOTES).'" />
		</div>
		<div class="ebs-row">
			<label class="eb-llabel">'.__('Enable FOUC','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[fouc]" id="pinwheel_slider_fouc" class="hidden_check" value="'.$pinwheel_slider_curr['fouc'].'">
				<input id="pinwheel_fouc" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['fouc'],false).'>
				<label for="pinwheel_fouc"></label>
			</div>
		</div>
		<div class="ebs-row">
			<label class="eb-llabel">'.__('Custom fields','pinwheel-slider').'</label>
			<textarea name="'.$pinwheel_slider_options.'[fields]"  id="pinwheel_slider_fields" rows="2" class="regular-text code">'.$pinwheel_slider_curr['fields'].'</textarea>
		</div>
		<div class="ebs-row">
			<label class="eb-llabel">'.__('Randomize slides','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[rand]" id="pinwheel_slider_rand" class="hidden_check" value="'.$pinwheel_slider_curr['rand'].'">
				<input id="pinwheel_rand" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['rand'],false).' >
				<label for="pinwheel_rand"></label>
			</div>
		</div>
		
		<div class="ebs-row">
			<label class="eb-llabel">'.__('Do not link slide to any url','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[donotlink]" id="pinwheel_slider_donotlink" class="hidden_check" value="'.$pinwheel_slider_curr['donotlink'].'">
				<input id="pinwheel_donotlink" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['donotlink'],false).' >
				<label for="pinwheel_donotlink"></label>
			</div>
		</div>
		
		<div class="ebs-row">
			<label class="eb-llabel">'.__('Disable Slider on Mobiles and Tablets','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[disable_mobile]" id="pinwheel_slider_disable_mobile" class="hidden_check" value="'.$pinwheel_slider_curr['disable_mobile'].'">
				<input id="pinwheel_disable_mobile" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['disable_mobile'],false).'>
				<label for="pinwheel_disable_mobile"></label>
			</div>
	 	</div>
		
		<p class="submit">
			<input type="submit" class="button-primary" name="save_eb_settings" value="'.__('Save Changes','pinwheel-slider').'" />
			<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
		</p>';	
	} elseif($tab == 'slidecontrol') {
		$html .= ' <div class="container eb-slidecontrol">
        <div class="content">
		<div class="ebs-row controlLabel">
			<label>'. __('Center Image Size','pinwheel-slider').'</label> 
		</div>
		
		<div class="ebs-row controllDiv">
			<label>'. __('Width','pinwheel-slider').'</label> 
			<input type="number" name="'. $pinwheel_slider_options.'[img_width]" class="small-text" value="'. $pinwheel_slider_curr['img_width'].'" id="pinwheel_slider_img_width" min="1" />
		</div>
		
		
		<div class="ebs-row controllDiv">
			<label>'. __('Height','pinwheel-slider').'</label> 
			<input type="number" name="'. $pinwheel_slider_options.'[img_height]" class="small-text" value="'.$pinwheel_slider_curr['img_height'].'" id="pinwheel_slider_img_height" min="1" />
		</div>';
		
		if($pinwheel_slider_curr['stylesheet']=='default'){
		
		$html .= '<div class="ebs-row controlLabel">
			<label>'. __('Side Image Size','pinwheel-slider').'</label> 
		</div>
			
		<div class="ebs-row controllDiv">
			<label>'. __('Width','pinwheel-slider').'</label> 
			<input type="number" name="'.$pinwheel_slider_options.'[sfw]" class="small-text" value="'.$pinwheel_slider_curr['sfw'].'" id="pinwheel_slider_sdimg_width" min="1" />
		</div>
		
		<div class="ebs-row controllDiv">
			<label>'. __('Height','pinwheel-slider').'</label> 
			<input type="number" name="'.$pinwheel_slider_options.'[sfh]" class="small-text" value="'.$pinwheel_slider_curr['sfh'].'" id="pinwheel_slider_sdimg_height" min="1" />
		</div>';
		}
			
		$html .= '<div class="ebs-row">
				<label>'. __('Distance of Small Side Images from Top','pinwheel-slider').'</label> 
				<input type="number" name="'.$pinwheel_slider_options.'[sf_top]" id="pinwheel_slider_sf_top" class="small-text" value="'. $pinwheel_slider_curr['sf_top'].'" style="margin-left: 15px;"/>
			</div>';
		
		if($pinwheel_slider_curr['stylesheet']=='multi'){
		
		$html .= '<div class="ebs-row">
				<label>'. __('Side Slides Visible Width','pinwheel-slider').'</label> 
					<input type="number" name="'. $pinwheel_slider_options.'[separation]" id="pinwheel_slider_slide_separation" class="small-text havemoreinfo" value="'. $pinwheel_slider_curr['separation'].'" />
			</div>';
		}
			
		$html .= '<div class="ebs-row">
				<label>'. __('Center Slider Background','pinwheel-slider').'</label>
				<input type="text" name="'.$pinwheel_slider_options.'[bg_color]" id="pinwheel_slider_bg_color" value="'. $pinwheel_slider_curr['bg_color'].'" class="wp-color-picker-field" data-default-color="#000000" />
			</div>

			<div class="ebs-row">
				<label>'. __('Transparent Background','pinwheel-slider').'</label>
				<div class="eb-switch eb-switchnone">
					<input type="hidden" name="'. $pinwheel_slider_options.'[bg]" id="pinwheel_slider_bg" class="hidden_check" value="'.$pinwheel_slider_curr['bg'].'">
					<input id="pinwheel_bg" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['bg'],false).'>
					<label for="pinwheel_bg"></label>
				</div>
			</div>
			
		<div class="ebs-row controlLabel">
			<label>'. __('Slide Border','pinwheel-slider').'</label> 
		</div>
			
		<div class="ebs-row controllDiv">
			<label>'. __('Thickness','pinwheel-slider').'</label>
			<input type="number" name="'. $pinwheel_slider_options.'[border]" id="pinwheel_slider_border" class="small-text" value="'.$pinwheel_slider_curr['border'].'" min="0" />
		</div>
		<div class="ebs-row controllDiv">
			<label>'. __('Color','pinwheel-slider').'</label>
			<input type="text" name="'. $pinwheel_slider_options.'[brcolor]" id="pinwheel_slider_brcolor" value="'. $pinwheel_slider_curr['brcolor'].'" class="wp-color-picker-field" data-default-color="#D8E7EE" />
		</div>

		<div class="ebs-row">
		<label>'. __('Padding between Slide Border and the Slide','pinwheel-slider').'</label>
		<input type="number" name="'. $pinwheel_slider_options.'[padding]" id="pinwheel_slider_easypadding" class="small-text" value="'. $pinwheel_slider_curr['padding'].'" min="0" />&nbsp;px	
		</div>

		<div class="ebs-row">
		<label>'. __('Overlay Text','pinwheel-slider').'</label>
		<div class=" eb-switch eb-switchnone">
		<input type="hidden" name="'. $pinwheel_slider_options.'[overlay_text]" id="pinwheel_slider_eoverlay_text" class="hidden_check" value="'. $pinwheel_slider_curr['overlay_text'].'">
		<input id="pinwheel_overlaytext" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['overlay_text'],false).'>
		<label for="pinwheel_overlaytext"></label>
	</div>
		</div>

			<div class="ebs-row">
				<label>'. __('Overlay Background','pinwheel-slider').'</label>
				<input type="text" name="'. $pinwheel_slider_options.'[tbgc]" id="pinwheel_slider_txtbg_color" value="'. $pinwheel_slider_curr['tbgc'].'" class="wp-color-picker-field" data-default-color="#000000" />
			</div>

			<div class="ebs-row">
				<label>'. __('Transparent Overlay Background','pinwheel-slider').'</label>
				<div class="eb-switch eb-switchnone">
					<input type="hidden" name="'. $pinwheel_slider_options.'[text_bg]" id="pinwheel_slider_txtbg" class="hidden_check" value="'. $pinwheel_slider_curr['text_bg'].'">
					<input id="pinwheel_txtbg" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['text_bg'],false).'>
					<label for="pinwheel_txtbg"></label>
				</div>
			</div>

			<div class="ebs-row">
				<label>'. __('Text Opacity','pinwheel-slider').'</label>
				<input type="number" name="'. $pinwheel_slider_options.'[text_opacity]" id="pinwheel_slider_txtop" class="small-text" value="'. $pinwheel_slider_curr['text_opacity'].'" step="0.1" />&nbsp;px	
			</div>

			<input type="submit" class="button-primary" name="save_eb_settings" value="'.__('Save Changes','pinwheel-slider').'" />
			<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
	 	</div>
    </div>	
			';
		}
		elseif($tab == 'image') {
		$default_pinwheel_slider_settings=get_pinwheel_slider_default_settings();
		$pinwheel_slider_curr['img_pick'][0]=(isset($pinwheel_slider_curr['img_pick'][0]))?$pinwheel_slider_curr['img_pick'][0]:'';
		$pinwheel_slider_curr['img_pick'][1]=(isset($pinwheel_slider_curr['img_pick'][1]))?$pinwheel_slider_curr['img_pick'][1]:'';
		$pinwheel_slider_curr['img_pick'][2]=(isset($pinwheel_slider_curr['img_pick'][2]))?$pinwheel_slider_curr['img_pick'][2]:'';
		$pinwheel_slider_curr['img_pick'][3]=(isset($pinwheel_slider_curr['img_pick'][3]))?$pinwheel_slider_curr['img_pick'][3]:'';
		$pinwheel_slider_curr['img_pick'][5]=(isset($pinwheel_slider_curr['img_pick'][5]))?$pinwheel_slider_curr['img_pick'][5]:'';
		$imgpick_style = '';
		if(isset($cntr) and $cntr>0) $imgpick_style = 'style="display:none;"';
		$focus_axis="display:none;";
		if($pinwheel_slider_curr['timthumb'] == 2)$focus_axis="display:block;";
		$html .= ' <div class="ebs-row">
			<div style="margin-bottom: 10px;">'.__('Image Source','pinwheel-slider').'</div>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[img_pick][0]" class="hidden_check" value="'.$pinwheel_slider_curr['img_pick'][0].'">
				<input id="pinwheel_customfldchk" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['img_pick'][0],false).'>
				<label for="pinwheel_customfldchk"></label>
			</div>';
			if(!isset($cntr) or empty($cntr)){ 
				$html .= __('Custom field','pinwheel-slider'); 
			} else { 
				$html .= __('(Set custom field name on Default Settings)','pinwheel-slider'); 
			}
			$html .='<input type="text" name="'.$pinwheel_slider_options.'[img_pick][1]" class="text eb-small-text" value="'.$pinwheel_slider_curr['img_pick'][1].'" '.$imgpick_style.' />
		</div>
		<div class="ebs-row">
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[img_pick][2]" class="hidden_check" value="'.$pinwheel_slider_curr['img_pick'][2].'">
				<input id="pinwheel_featuredimgchk" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['img_pick'][2],false).'>
				<label for="pinwheel_featuredimgchk"></label>
			</div>
			<label>'.__('Featured Image','pinwheel-slider').'</label>	
		</div>
		<div class="ebs-row">
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[img_pick][3]" class="hidden_check" value="'.$pinwheel_slider_curr['img_pick'][3].'">
				<input id="pinwheel_attachedimgchk" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['img_pick'][3],false).'>
				<label for="pinwheel_attachedimgchk"></label>
			</div>
			<label>Attached image,order </label>
			<input type="text" name="'.$pinwheel_slider_options.'[img_pick][4]" class="small-text" value="'.$pinwheel_slider_curr['img_pick'][4].'" />	
		</div>

		<div class="ebs-row">
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[img_pick][5]" class="hidden_check" value="'.$pinwheel_slider_curr['img_pick'][5].'">
				<input id="pinwheel_scanimgchk" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['img_pick'][5],false).'>
				<label for="pinwheel_scanimgchk"></label>
			</div>
			<label>Scan content</label>
		</div>
		<div class="ebs-row">
			<label>'.__('Fetched Image size','pinwheel-slider').'</label>';
			$sizename=$pinwheel_slider_options.'[crop]';
			$html .= pinwheel_get_image_sizes($sizename,$pinwheel_slider_curr['crop']).'
		</div>
			
		<div class="ebs-row">
			<label>'.__('Image title on hover','pinwheel-slider').'</label>
			<div class="eb-switch  eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[image_title_text]" class="hidden_check" value="'.$pinwheel_slider_curr['image_title_text'].'">
				<input id="pinwheel_thover" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['image_title_text'],false).'>
				<label for="pinwheel_thover"></label>
			</div>
		</div>

		
		<div class="ebs-row">
			<label>'.__('Pure image slider','pinwheel-slider').'</label>
			<div class="eb-switch  eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[image_only]" id="pinwheel_slider_image_only" class="hidden_check" value="'.$pinwheel_slider_curr['image_only'].'">
				<input id="pinwheel_imageonly" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['image_only'],false).'>
				<label for="pinwheel_imageonly"></label>
			</div>
		</div>
		
		
		<div class="ebs-row">
			<label>'.__('Transition','pinwheel-slider').'</label> ';
			$tital_tran_name = $pinwheel_slider_options.'[img_transition]';
			$html .= get_pinwheel_transitions($tital_tran_name,$pinwheel_slider_curr['img_transition']).'
		</div>

		<div class="ebs-row">
			<label>'. __('Duration (seconds)','pinwheel-slider').'</label> 
			<input type="number" name="'.$pinwheel_slider_options.'[img_duration]" id="pinwheel_slider_img_duration" class="small-text" value="'.$pinwheel_slider_curr['img_duration'].'" />
		</div>

		<div class="ebs-row">
			<label>'. __('Delay time (seconds)','pinwheel-slider').'</label> 
			<input type="number" name="'.$pinwheel_slider_options.'[img_delay]" id="pinwheel_slider_img_delay" class="small-text" value="'.$pinwheel_slider_curr['img_delay'].'" />
		</div>	
		
		<div class="ebs-row">
			<label class="eb-slabel">'.__('Cropping','pinwheel-slider').'</label>
			<input type="radio" name="'.$pinwheel_slider_options.'[timthumb]" value="1" '.checked('1', $pinwheel_slider_curr['timthumb'],false).' class="pscrop" > <span>'.__('OFF','pinwheel-slider').'</span> 
			<div class="crop-sub">
			<input type="radio" name="'.$pinwheel_slider_options.'[timthumb]" value="0" '.checked('0', $pinwheel_slider_curr['timthumb'],false).' class="pscrop" > <span>'.__('ON (Hard cropping using php)','pinwheel-slider').'</span> <br/>
			<input type="radio" name="'.$pinwheel_slider_options.'[timthumb]" value="2" '.checked('2', $pinwheel_slider_curr['timthumb'],false).' class="pscrop" > <span>'.__('ON (Image Positioning using JS)','pinwheel-slider').'</span>
			</div>
		</div>	
		
		<div class="ebs-row focus_axis" style="'.$focus_axis.'">
			<label class="eb-llabel">'.__('X-axis','pinwheel-slider').'</label> <span class="currx">('. $pinwheel_slider_curr['focusx'] .')</span>
			<input type="range" name="'.$pinwheel_slider_options.'[focusx]" id="pinwheel_slider_focusx" value="'.$pinwheel_slider_curr['focusx'].'" min="-1" max="1" step="0.001" />
		</div>	
		<div class="ebs-row focus_axis" style="'.$focus_axis.'">
			<label class="eb-llabel">'.__('Y-axis','pinwheel-slider').'</label> <span class="curry">('. $pinwheel_slider_curr['focusy'] .')</span>
			<input type="range" name="'.$pinwheel_slider_options.'[focusy]" id="pinwheel_slider_focusy" value="'.$pinwheel_slider_curr['focusy'].'" min="-1" max="1" step="0.001" />
		</div>	
		
		<div class="ebs-row">	
			<label>'.__('Default Image','pinwheel-slider').'</label>
			<img id="default-img" src="'.$pinwheel_slider_curr['default_image'].'" width="80" height="70" />
			<input type="submit" name="default-image-upload" class="pinwheel-upload-default" value="Upload" style="float:left;margin-left: 50%;background: #dddddd;cursor:pointer;" >
			<input type="submit" name="default-image-reset" class="pinwheel-reset-default" value="Reset" style="background: #dddddd;cursor:pointer;" >
			<input type="hidden" id="default-image-url" value="'.$default_pinwheel_slider_settings['default_image'].'">
			<input type="hidden" name="'.$pinwheel_slider_options.'[default_image]" id="pinwheel_slider_default_image" class="regular-text code" value="'.$pinwheel_slider_curr['default_image'].'" />
		</div>
		<p class="submit">
			<input type="submit" class="button-primary" name="save_eb_settings" value="'.__('Save Changes','pinwheel-slider').'" />
			<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
		</p>';
	} elseif($tab == 'text') {
		$title_from = $pinwheel_slider_curr['title_from'];
		$html .= '<div class="eb-altcolor">
	<div class="eb-altcolorinner settings-tbl">
		<div class="ebs-row controlLabel">	
	 		<label>'.__('Slider title','pinwheel-slider').'</label>
	 	</div>
	 	
		<div class="ebs-row">	
			<label>'.__('Default Text','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[title_text]" id="pinwheel_slider_title_text" value="'.htmlentities($pinwheel_slider_curr['title_text'], ENT_QUOTES).'" class="eb-title-text" />
		</div>


		<div class="ebs-row">	
			<label>'.__('Select title from','pinwheel-slider').'</label>
			<select name="'.$pinwheel_slider_options.'[title_from]"  class="eb-selnone">
				<option value="0" '.selected('0',$title_from,false).'>'.__('Default Title Text','pinwheel-slider').'</option>
				<option value="1" '.selected('1',$title_from,false).'>'.__('Slider Name','pinwheel-slider').'</option>
			</select>
		</div>

			<div class="ebs-row">
				<label>'.__('Font Type','pinwheel-slider').'</label>			
				<!-- code for new fonts - 3.0 -->
				<input type="hidden" value="title_font" class="ftype_rname">
				<input type="hidden" value="title_fontg" class="ftype_gname">
				<input type="hidden" value="stfont_custom" class="ftype_cname">
				<select name="'.$pinwheel_slider_options.'[st_font]" id="pinwheel_slider_st_font" class="main-font eb-selnone">
					<option value="regular" '.selected( $pinwheel_slider_curr['st_font'], "regular",false ).' > Regular Fonts </option>
					<option value="google" '.selected( $pinwheel_slider_curr['st_font'], "google",false ).' > Google Fonts </option>
					<option value="custom" '.selected( $pinwheel_slider_curr['st_font'], "custom",false ).' > Custom Fonts </option>
				</select>	
			</div>

			<div class="load-fontdiv" colspan="2"></div>


	<div class="ebs-row">
	<label>'.__('Color','pinwheel-slider').'</label>
		<input type="text" name="'.$pinwheel_slider_options.'[title_fcolor]" id="pinwheel_slider_title_fcolor" value="'. $pinwheel_slider_curr['title_fcolor'].'" class="wp-color-picker-field" data-default-color="#ffffff" />
	</div>

	<div class="ebs-row">
	<label>'.__('Size','pinwheel-slider').'</label>
	<input type="number" name="'. $pinwheel_slider_options.'[title_fsize]" id="pinwheel_slider_title_fsize" class="small-text" value="'.$pinwheel_slider_curr['title_fsize'].'" min="1" />
	</div>

	<div class="ebs-row font-style">
		<label>'.__('Style','pinwheel-slider').'</label>
		<select name="'. $pinwheel_slider_options.'[title_fstyle]" id="pinwheel_slider_title_fstyle"  class="eb-selnone">
						<option value="bold" '.selected("bold",$pinwheel_slider_curr['title_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
				<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['title_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
				<option value="italic" '.selected("italic",$pinwheel_slider_curr['title_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
				<option value="normal" '.selected("normal",$pinwheel_slider_curr['title_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
		</select>
	</div>
	</div>
	</div>
		<div class="settings-tbl">
		
		<div class="ebs-row">
			<label>'. __('Post Title','pinwheel-slider').'</label> 
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[show_ptitle]" id="pinwheel_slider_show_ptitle" class="hidden_check" value="'.$pinwheel_slider_curr['show_ptitle'].'">
				<input id="pinwheel_showptitle" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['show_ptitle'],false).'>
				<label for="pinwheel_showptitle"></label>
			</div>
		</div>
		
		<div class="ebs-row">
			<label>'.__('Font Type','pinwheel-slider').'</label>			
			<!-- code for new fonts - 3.0 -->
			<input type="hidden" value="ptitle_font" class="ftype_rname">
			<input type="hidden" value="ptitle_fontg" class="ftype_gname">
			<input type="hidden" value="ptfont_custom" class="ftype_cname">
			<select name="'.$pinwheel_slider_options.'[pt_font]" id="pinwheel_slider_pt_font" class="main-font eb-selnone">
				<option value="regular" '.selected( $pinwheel_slider_curr['pt_font'], "regular", false ).' > Regular Fonts </option>
				<option value="google" '.selected( $pinwheel_slider_curr['pt_font'], "google", false ).' > Google Fonts </option>
				<option value="custom" '.selected( $pinwheel_slider_curr['pt_font'], "custom", false ).' > Custom Fonts </option>
			</select>	
			<div class="load-fontdiv" colspan="2"></div>
		</div>
		<div class="ebs-row">
			<label>'.__('Color','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[ptitle_fcolor]" id="pinwheel_slider_ptitle_fcolor" value="'.$pinwheel_slider_curr['ptitle_fcolor'].'" class="wp-color-picker-field" data-default-color="#ffffff" />
		</div>
		<div class="ebs-row">
			<label>'.__('Size','pinwheel-slider').'</label>
			<input type="number" name="'.$pinwheel_slider_options.'[ptitle_fsize]" id="pinwheel_slider_ptitle_fsize" class="small-text" value="'.$pinwheel_slider_curr['ptitle_fsize'].'" min="1" />
		</div>
		<div class="ebs-row font-style">
			<label>'.__('Style','pinwheel-slider').'</label>
			<select name="'.$pinwheel_slider_options.'[ptitle_fstyle]" id="pinwheel_slider_ptitle_fstyle"  class="eb-selnone">
				<option value="bold" '.selected("bold",$pinwheel_slider_curr['ptitle_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
				<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['ptitle_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
				<option value="italic" '.selected("italic",$pinwheel_slider_curr['ptitle_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
				<option value="normal" '.selected("normal",$pinwheel_slider_curr['ptitle_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
			</select>
		</div>
		<div class="ebs-row">
			<label>'.__('HTML element','pinwheel-slider').'</label>
			<select name="'.$pinwheel_slider_options.'[title_element]"  class="eb-selnone">
				<option value="1" '.selected("1",$pinwheel_slider_curr['title_element'], false).' >h1</option>
				<option value="2" '.selected("2",$pinwheel_slider_curr['title_element'], false).' >h2</option>
				<option value="3" '.selected("3",$pinwheel_slider_curr['title_element'], false).' >h3</option>
				<option value="4" '.selected("4",$pinwheel_slider_curr['title_element'], false).' >h4</option>
				<option value="5" '.selected("5",$pinwheel_slider_curr['title_element'], false).' >h5</option>
				<option value="6" '.selected("6",$pinwheel_slider_curr['title_element'], false).' >h6</option>
			</select>	
		</div>
		<div class="ebs-row">
			<label>'.__('Transition','pinwheel-slider').'</label>';
			$tital_tran_name = $pinwheel_slider_options.'[ptitle_transition]';
			$html .=get_pinwheel_transitions($tital_tran_name,$pinwheel_slider_curr['ptitle_transition']).'
		</div>
		<div class="ebs-row">
			<label>'.__('Duration (seconds)','pinwheel-slider').'</label> 
			<input type="number" name="'.$pinwheel_slider_options.'[ptitle_duration]" id="pinwheel_slider_ptitle_duration" class="small-text" value="'.$pinwheel_slider_curr['ptitle_duration'].'" />
		</div>
		<div class="ebs-row">
			<label>'.__('Delay time (seconds)','pinwheel-slider').'</label> 
			<input type="number" name="'.$pinwheel_slider_options.'[ptitle_delay]" id="pinwheel_slider_ptitle_delay" class="small-text" value="'.$pinwheel_slider_curr['ptitle_delay'].'" />
		</div>
		</div>

		<div class="eb-altcolor">
			<div class="eb-altcolorinner settings-tbl">
				<div class="ebs-row">
					<label>'.__('Content','pinwheel-slider').'</label>
					<div class="eb-switch eb-switchnone">
						<input type="hidden" name="'.$pinwheel_slider_options.'[show_content]" id="pinwheel_slider_show_content" class="hidden_check" value="'.$pinwheel_slider_curr['show_content'].'">
						<input id="pinwheel_showcontent" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['show_content'],false).'>
						<label for="pinwheel_showcontent"></label>
					</div>
			 	</div>
			 	
				<div class="ebs-row">
					<label>'.__('Minimize Content on Load','pinwheel-slider').'</label>
					<div class="eb-switch eb-switchnone">
						<input type="hidden" name="'.$pinwheel_slider_options.'[minimize_content]" id="pinwheel_slider_show_contenthide" class="hidden_check" value="'.$pinwheel_slider_curr['minimize_content'].'">
						<input id="pinwheel_showcontenthide" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['minimize_content'],false).'>
						<label for="pinwheel_showcontenthide"></label>
					</div>
				</div>

				<div class="ebs-row">
					<label>'.__('Font Type','pinwheel-slider').'</label>			
					<!-- code for new fonts - 3.0 -->
					<input type="hidden" value="content_font" class="ftype_rname">
					<input type="hidden" value="content_fontg" class="ftype_gname">
					<input type="hidden" value="pcfont_custom" class="ftype_cname">
					<select name="'.$pinwheel_slider_options.'[pc_font]" id="pinwheel_slider_pc_font" class="main-font eb-selnone">
						<option value="regular" '.selected("regular",$pinwheel_slider_curr['pc_font'],false).' > Regular Fonts </option>
						<option value="google" '.selected( "google", $pinwheel_slider_curr['pc_font'], false ).' > Google Fonts </option>
						<option value="custom" '.selected( "custom", $pinwheel_slider_curr['pc_font'], false ).' > Custom Fonts </option>
					</select>	
					<div class="load-fontdiv"></div>
				</div>
				<div class="ebs-row">
					<label>'.__('Color','pinwheel-slider').'</label>
					<input type="text" name="'.$pinwheel_slider_options.'[content_fcolor]" id="pinwheel_slider_content_fcolor" value="'.$pinwheel_slider_curr['content_fcolor'].'" class="wp-color-picker-field" data-default-color="#ffffff" />
				</div>
				<div class="ebs-row">
					<label>'.__('Size','pinwheel-slider').'</label>
					<input type="number" name="'.$pinwheel_slider_options.'[content_fsize]" id="pinwheel_slider_content_fsize" class="small-text" value="'.$pinwheel_slider_curr['content_fsize'].'" min="1" />
				</div>

				<div class="ebs-row font-style">	
				<label>'.__('Style','pinwheel-slider').'</label>
					<select name="'.$pinwheel_slider_options.'[content_fstyle]" id="pinwheel_slider_content_fstyle"  class="eb-selnone">
					<option value="bold" '.selected("bold",$pinwheel_slider_curr['content_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
					<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['content_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
					<option value="italic" '.selected("italic",$pinwheel_slider_curr['content_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
					<option value="normal" '.selected("normal",$pinwheel_slider_curr['content_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
					</select>
				</div>

				<div class="ebs-row">
				<label>'.__('source','pinwheel-slider').'</label>
					<select name="'.$pinwheel_slider_options.'[content_from]" id="pinwheel_slider_content_from" class="eb-selnone" >
						<option value="slider_content" '.selected("slider_content",$pinwheel_slider_curr['content_from'],false).' >'.__('Slider Content Custom field','pinwheel-slider').'</option>
						<option value="excerpt" '.selected("excerpt",$pinwheel_slider_curr['content_from'],false).' >'.__('Post Excerpt','pinwheel-slider').'</option>
						<option value="content" '.selected("content",$pinwheel_slider_curr['content_from'],false).' >'.__('From Content','pinwheel-slider').'</option>
					</select>
				</div>
				<div class="ebs-row">
					<label>'.__('Length','pinwheel-slider').'</label>
					<div class="eb-lrightdiv">
						<div>
						<input id="pinwheel_slider_climit" name="'.$pinwheel_slider_options.'[climit]" type="radio" value="0" '.checked('0', $pinwheel_slider_curr['climit'],false).'  />
						<label class="eb-mlabel">'.__(' words','pinwheel-slider').'</label>
						<input type="number" name="'.$pinwheel_slider_options.'[content_limit]" id="pinwheel_slider_content_limit" class="small-text" value="'.$pinwheel_slider_curr['content_limit'].'" min="1" />
						</div>
						<div class="eb-margindiv">
						<input id="pinwheel_slider_climit" name="'.$pinwheel_slider_options.'[climit]" type="radio" value="1" '.checked('1', $pinwheel_slider_curr['climit'],false).'  />
						<label class="eb-mlabel">'.__(' Characters','pinwheel-slider').'</label>
						<input type="number" name="'.$pinwheel_slider_options.'[content_chars]" id="pinwheel_slider_content_chars" class="small-text" value="'.$pinwheel_slider_curr['content_chars'].'" min="1"/>
						</div>
					</div>	
				</div>

				<div class="ebs-row">
					<label>'.__('Transition','pinwheel-slider').'</label>';
					$content_tran_name = $pinwheel_slider_options.'[content_transition]';
					$html.=get_pinwheel_transitions($content_tran_name,$pinwheel_slider_curr['content_transition']).'
				</div>

				<div class="ebs-row">
					<label>'.__('Duration (seconds)','pinwheel-slider').'</label> 
					<input type="number" name="'.$pinwheel_slider_options.'[content_duration]" id="pinwheel_slider_content_duration" class="small-text" value="'.$pinwheel_slider_curr['content_duration'].'" />
				</div>

				<div class="ebs-row">
					<label>'.__('Delay time (seconds)','pinwheel-slider').'</label> 
					<input type="number" name="'.$pinwheel_slider_options.'[content_delay]" id="pinwheel_slider_content_delay" class="small-text" value="'.$pinwheel_slider_curr['content_delay'].'" />
				</div>
			</div><!--eb-altcolorinner-->
		</div><!--eb-altcolor-->
		<p class="submit">
			<input type="submit" class="button-primary" name="save_eb_settings" value="'.__('Save Changes','pinwheel-slider').'" />
			<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />		
		</p>';
	} elseif($tab == 'nav') {
		$html .= '<div class="ebs-row">
			<label>'.__('Disable Arrows','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[prev_next]" id="pinwheel_slider_enable_arrow" class="hidden_check" value="'.$pinwheel_slider_curr['prev_next'].'">
				<input id="pinwheel_disablearrow" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['prev_next'],false).'>
				<label for="pinwheel_disablearrow"></label>
			</div>
		</div>
		<div class="ebs-row controlLabel">
			<label>'.__('Choose Arrow','pinwheel-slider').'</label>
		</div>
		<div class="ebs-row controlLabel">';
					$directory = PINWHEEL_SLIDER_CSS_OUTER.'/buttons/';
							if ($handle = opendir($directory)) {
							    while (false !== ($file = readdir($handle))) { 
							     if($file != '.' and $file != '..') { 
							     $nexturl='css/buttons/'.$file.'/next.png';
								$html .= '<div class="arrows"><img src="'. pinwheel_slider_plugin_url($nexturl).'" width="32" height="32"/>
								<input name="'. $pinwheel_slider_options.'[buttons]" type="radio" id="pinwheel_slider_buttons" class="arrows_input" value="'. $file.'" '.checked($file,$pinwheel_slider_curr['buttons'],false).' /></div>';
							 } }
							    closedir($handle);
							}
							$html .= '<div class="svilla_cl"></div>
			</div>
		</div>
		<div class="ebs-row">
			<label>'.__('Arrow Width','pinwheel-slider').'</label> 
			<input type="number" name="'.$pinwheel_slider_options.'[navimg_w]" id="pinwheel_slider_nav_w" class="small-text" value="'.$pinwheel_slider_curr['navimg_w'].'" min="1" />
		</div>
		
		<div class="ebs-row">
			<label>'.__('Arrow Height','pinwheel-slider').'</label> 
			<input type="number" name="'.$pinwheel_slider_options.'[navimg_ht]" id="pinwheel_slider_nav_h" class="small-text" value="'.$pinwheel_slider_curr['navimg_ht'].'" min="1" />
		</div>
		
		<div class="ebs-row controlLabel">
			<label>'.__('Previous Button Distance','pinwheel-slider').'</label>
		</div>
		<div class="ebs-row controllDiv">
			<label for="'.$pinwheel_slider_options.'[pnavtop]">'.__('Top','pinwheel-slider').'</label>
			<input type="number" name="'.$pinwheel_slider_options.'[pnavtop]" class="small-text" value="'.$pinwheel_slider_curr['pnavtop'].'" />&nbsp;'.__('%','pinwheel-slider').'
		</div>
		<div class="ebs-row controllDiv">
			<label for="'. $pinwheel_slider_options.'[pnavleft]">'.__('Left','pinwheel-slider').'</label>
			<input type="number" name="'. $pinwheel_slider_options.'[pnavleft]" class="small-text" value="'.$pinwheel_slider_curr['pnavleft'].'" />&nbsp;'.__('%','pinwheel-slider').'
		</div>		
		<div class="ebs-row">
		
		<div class="ebs-row controlLabel">
			<label>'.__('Next Button Distance','pinwheel-slider').'</label>
		</div>
		<div class="ebs-row controllDiv">
			<label for="'. $pinwheel_slider_options.'[nnavtop]">'.__('Top','pinwheel-slider').'</label>
			<input type="number" name="'.$pinwheel_slider_options.'[nnavtop]" class="small-text" value="'.$pinwheel_slider_curr['nnavtop'].'" />&nbsp;'.__('%','pinwheel-slider').'
		</div>
		<div class="ebs-row controllDiv">
			<label for="'.$pinwheel_slider_options.'[nnavright]">'.__('Right','pinwheel-slider').'</label>
			<input type="number" name="'. $pinwheel_slider_options.'[nnavright]" class="small-text" value="'. $pinwheel_slider_curr['nnavright'].'" />&nbsp;'.__('%','pinwheel-slider').' 
		</div>
		
		<div class="eb-altcolor">
			<div class="eb-altcolorinner settings-tbl">

		<div class="ebs-row">
			<label>'.__('Navigation Number','pinwheel-slider').'</label>
			<select name="'.$pinwheel_slider_options.'[navnum]" class="eb-selnone" >
			<option value="0" '.selected("0",$pinwheel_slider_curr['navnum'],false).' >'.__('No','pinwheel-slider').'</option>
			<option value="1" '.selected("1",$pinwheel_slider_curr['navnum'],false).' >'.__('Yes','pinwheel-slider').'</option>
			</select>
		</div>
				
				
		<div class="ebs-row">
			<label>'.__('Position','pinwheel-slider').'</label> 
			<select name="'. $pinwheel_slider_options.'[navsum]" class="eb-selnone"> 
			<option value="0" '.selected("0",$pinwheel_slider_curr['navsum'],false).' >'.__('No','pinwheel-slider').'</option>
			<option value="1" '.selected("1",$pinwheel_slider_curr['navsum'],false).' >'.__('Yes','pinwheel-slider').'</option>
			</select>
		</div>	
				
				
			</div><!--eb-altcolorinner-->
		</div><!--eb-altcolor-->
		<p class="submit">
			<input type="submit" class="button-primary" name="save_eb_settings" value="'.__('Save Changes','pinwheel-slider').'" />
			<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />		
		</p>';
	} elseif($tab == 'events') {
		$html .='<div class="settings-tbl">
			<div class="ebs-row">
				<label>'.__('Event date-time','pinwheel-slider').'</label>
				<div class="eb-switch eb-switchnone">
					<input type="hidden" name="'.$pinwheel_slider_options.'[enable_eventdt]" id="pinwheel_slider_enable_eventdt" class="hidden_check" value="'.$pinwheel_slider_curr['enable_eventdt'].'">
					<input id="pinwheel_enableeventdt" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_eventdt'],false).'>
					<label for="pinwheel_enableeventdt"></label>
				</div> 
			</div>
			<div class="ebs-row">
				<label>'.__('Font','pinwheel-slider').'</label>			
				<!-- code for new fonts - 3.0 -->
				<input type="hidden" value="slide_eventm_font" class="ftype_rname">
				<input type="hidden" value="slide_eventm_fontg" class="ftype_gname">
				<input type="hidden" value="slide_eventm_custom" class="ftype_cname">
				<select name="'.$pinwheel_slider_options.'[eventmd_font]" id="pinwheel_slider_eventmd_font" class="main-font eb-selnone">
					<option value="regular" '.selected( $pinwheel_slider_curr['eventmd_font'], "regular",false ).' > Regular Fonts </option>
					<option value="google" '.selected( $pinwheel_slider_curr['eventmd_font'], "google",false ).' > Google Fonts </option>
					<option value="custom" '.selected( $pinwheel_slider_curr['eventmd_font'], "custom",false ).' > Custom Fonts </option>
				</select>	
				<div class="load-fontdiv"></div>
			</div>
	
			<div class="ebs-row">
				<label>'.__('Font Color','pinwheel-slider').'</label>
					<input type="text" name="'.$pinwheel_slider_options.'[slide_eventm_fcolor]" id="pinwheel_slide_woocat_fcolor" value="'.$pinwheel_slider_curr['slide_eventm_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" />
			</div>

			<div class="ebs-row">
				<label>'.__('Font Size','pinwheel-slider').'</label>
				<input type="number" name="'.$pinwheel_slider_options.'[slide_eventm_fsize]" id="pinwheel_slide_woocat_fsize" class="small-text" value="'.$pinwheel_slider_curr['slide_eventm_fsize'].'" min="1" />
			</div>

			<div class="ebs-row font-style">
				<label>'.__('Font Style','pinwheel-slider').'</label>
				<select name="'.$pinwheel_slider_options.'[slide_eventm_fstyle]" id="pinwheel_slide_woocat_fstyle" class="eb-selnone" >
				<option value="bold" '.selected("bold",$pinwheel_slider_curr['slide_eventm_fstyle'], false).' >'.__('Bold','pinwheel-slider').'</option>
				<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['slide_eventm_fstyle'], false).' >'.__('Bold Italic','pinwheel-slider').'</option>
				<option value="italic" '.selected("italic",$pinwheel_slider_curr['slide_eventm_fstyle'], false).' >'.__('Italic','pinwheel-slider').'</option>
				<option value="normal" '.selected("normal",$pinwheel_slider_curr['slide_eventm_fstyle'], false).' >'.__('Normal','pinwheel-slider').'</option>
				</select>
			</div>
		</div>
		<div class="settings-tbl">
		<div class="ebs-row">
			<label>'.__('Event address','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[enable_eventadd]" id="pinwheel_slider_enable_eventadd" class="hidden_check" value="'.$pinwheel_slider_curr['enable_eventadd'].'">
				<input id="pinwheel_enableeventadd" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_eventadd'],false).'>
				<label for="pinwheel_enableeventadd"></label>
			</div> 
		</div>
		<div class="ebs-row">
			<label>'.__('Font','pinwheel-slider').'</label>			
			<!-- code for new fonts - 3.0 -->
			<input type="hidden" value="eventm_addr_font" class="ftype_rname">
			<input type="hidden" value="eventm_addr_fontg" class="ftype_gname">
			<input type="hidden" value="eventm_addr_custom" class="ftype_cname">
			<select name="'.$pinwheel_slider_options.'[event_addr_font]" id="pinwheel_slider_event_addr_font" class="main-font eb-selnone">
				<option value="regular" '.selected( $pinwheel_slider_curr['event_addr_font'], "regular", false ).' > Regular Fonts </option>
				<option value="google" '.selected( $pinwheel_slider_curr['event_addr_font'], "google", false ).' > Google Fonts </option>
				<option value="custom" '.selected( $pinwheel_slider_curr['event_addr_font'], "custom", false ).' > Custom Fonts </option>
			</select>	
			<div class="load-fontdiv"></div>
		</div>
		<div class="ebs-row">
			<label>'.__('Font Color','pinwheel-slider').'</label>
				<input type="text" name="'.$pinwheel_slider_options.'[eventm_addr_fcolor]" id="pinwheel_slide_woocat_fcolor" value="'.$pinwheel_slider_curr['eventm_addr_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" />
		</div>
		<div class="ebs-row">
			<label>'.__('Font Size','pinwheel-slider').'</label>
				<input type="number" name="'.$pinwheel_slider_options.'[eventm_addr_fsize]" id="pinwheel_slide_woocat_fsize" class="small-text" value="'.$pinwheel_slider_curr['eventm_addr_fsize'].'" min="1" />
		</div>
		<div class="ebs-row font-style">
			<label>'.__('Font Style','pinwheel-slider').'</label>
			<select name="'.$pinwheel_slider_options.'[eventm_addr_fstyle]" id="pinwheel_slide_woocat_fstyle"  class="eb-selnone">
				<option value="bold" '.selected("bold",$pinwheel_slider_curr['eventm_addr_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
				<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['eventm_addr_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
				<option value="italic" '.selected("italic",$pinwheel_slider_curr['eventm_addr_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
				<option value="normal" '.selected("normal",$pinwheel_slider_curr['eventm_addr_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
			</select>
		</div>
	</div>
	<div class="eb-altcolor">
		<div class="eb-altcolorinner settings-tbl">
			<div class="ebs-row">
				<label>'.__('Event category','pinwheel-slider').'</label>
				<div class="eb-switch eb-switchnone">
					<input type="hidden" name="'.$pinwheel_slider_options.'[enable_eventcat]" id="pinwheel_slider_enable_eventcat" class="hidden_check" value="'.$pinwheel_slider_curr['enable_eventcat'].'">
					<input id="pinwheel_enableeventcat" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_eventcat'],false).'>
					<label for="pinwheel_enableeventcat"></label>
				</div> 
			</div>
			<div class="ebs-row">	
				<label>'.__('Font','pinwheel-slider').'</label>			
				<!-- code for new fonts - 3.0 -->
				<input type="hidden" value="eventm_cat_font" class="ftype_rname">
				<input type="hidden" value="eventm_cat_fontg" class="ftype_gname">
				<input type="hidden" value="eventm_cat_custom" class="ftype_cname">
				<select name="'.$pinwheel_slider_options.'[event_cat_font]" id="pinwheel_slider_event_cat_font" class="main-font eb-selnone">
					<option value="regular" '.selected( $pinwheel_slider_curr['event_cat_font'], "regular", false ).' > Regular Fonts </option>
					<option value="google" '.selected( $pinwheel_slider_curr['event_cat_font'], "google", false ).' > Google Fonts </option>
					<option value="custom" '.selected( $pinwheel_slider_curr['event_cat_font'], "custom", false ).' > Custom Fonts </option>
				</select>	
				<div class="load-fontdiv"></div>
			</div>
			<div class="ebs-row">
				<label>'.__('Font Color','pinwheel-slider').'</label>
				<input type="text" name="'.$pinwheel_slider_options.'[eventm_cat_fcolor]" id="pinwheel_slide_woocat_fcolor" value="'.$pinwheel_slider_curr['eventm_cat_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" />
			</div>
			<div class="ebs-row">
				<label>'.__('Font Size','pinwheel-slider').'</label>
				<input type="number" name="'.$pinwheel_slider_options.'[eventm_cat_fsize]" id="pinwheel_slide_woocat_fsize" class="small-text" value="'.$pinwheel_slider_curr['eventm_cat_fsize'].'" min="1" />
			</div>
			<div class="ebs-row font-style">
				<label>'.__('Font Style','pinwheel-slider').'</label>
				<select name="'.$pinwheel_slider_options.'[eventm_cat_fstyle]" id="pinwheel_slide_woocat_fstyle" class="eb-selnone" >
				<option value="bold" '.selected("bold",$pinwheel_slider_curr['slide_woo_cat_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
				<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['slide_woo_cat_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
				<option value="italic" '.selected("italic",$pinwheel_slider_curr['slide_woo_cat_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
				<option value="normal" '.selected("normal",$pinwheel_slider_curr['slide_woo_cat_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
				</select>
			</div>
		</div><!--eb-altcolorinner-->
	</div><!--eb-altcolor-->
	<p class="submit">
		<input type="submit" class="button-primary" name="save_eb_settings" value="'.__('Save Changes','pinwheel-slider').'" />
		<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
	</p>';
	} elseif($tab == 'eshop') {
		$html.='<div class="ebs-row">
			<label>'.__('Slide Add to cart ','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[enable_wooaddtocart]" id="pinwheel_slider_enable_wooaddtocart" class="hidden_check" value="'.$pinwheel_slider_curr['enable_wooaddtocart'].'">
				<input id="pinwheel_enablewooaddtocartsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_wooaddtocart'],false).'>
				<label for="pinwheel_enablewooaddtocartsett"></label>
			</div>
		</div>
		<div class="ebs-row">
			<label>'.__('Button Text','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[woo_adc_text]" id="pinwheel_woo_adc_text" class="eb-title-text" value="'.$pinwheel_slider_curr['woo_adc_text'].'" />
		</div>
		<div class="ebs-row">
		<label>'.__('Button Color','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[woo_adc_color]" id="pinwheel_woo_adc_color" value="'.$pinwheel_slider_curr['woo_adc_color'].'" class="wp-color-picker-field" data-default-color="#3DB432" />
		</div>
		<div class="ebs-row">
			<label>'.__('Button text Color','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[woo_adc_tcolor]" id="pinwheel_woo_adc_tcolor" value="'.$pinwheel_slider_curr['woo_adc_tcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" /></div>
		<div class="ebs-row">
			<label>'.__('Button Size','pinwheel-slider').'</label>
			<input type="number" name="'.$pinwheel_slider_options.'[woo_adc_fsize]" id="pinwheel_woo_adc_fsize" class="small-text" value="'.$pinwheel_slider_curr['woo_adc_fsize'].'" min="1" />
		</div>
		<div class="ebs-row">
			<label>'.__('Border Thickness','pinwheel-slider').'</label>
			<input type="number" name="'.$pinwheel_slider_options.'[woo_adc_border]" id="pinwheel_woo_adc_border" class="small-text" value="'.$pinwheel_slider_curr['woo_adc_border'].'" min="0" />
		</div>
		<div class="ebs-row">
			<label>'.__('Border Color','pinwheel-slider').'</label>
			<input type="text" name="'.$pinwheel_slider_options.'[woo_adc_brcolor]" id="pinwheel_woo_adc_brcolor" value="'.$pinwheel_slider_curr['woo_adc_brcolor'].'" class="wp-color-picker-field" data-default-color="#D8E7EE" />
		</div>
		<div class="eb-altcolor">
			<div class="eb-altcolorinner">
				<div class="ebs-row">
					<label>'.__('Slide Sale strip ','pinwheel-slider').'</label>
					<div class="eb-switch eb-switchnone">
						<input type="hidden" name="'.$pinwheel_slider_options.'[enable_woosalestrip]" id="pinwheel_slider_enable_woosalestrip" class="hidden_check" value="'.$pinwheel_slider_curr['enable_woosalestrip'].'">
						<input id="pinwheel_enablewoosalestripsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_woosalestrip'],false).'>
						<label for="pinwheel_enablewoosalestripsett"></label>
					</div>
				</div>
				<div class="ebs-row">
					<label>'.__('Strip Text','pinwheel-slider').'</label>
					<input type="text" name="'.$pinwheel_slider_options.'[woo_sale_text]" id="pinwheel_woo_saletext" class="eb-title-text" value="'.$pinwheel_slider_curr['woo_sale_text'].'" />
				</div>
				<div class="ebs-row">
					<label>'.__('Strip Color','pinwheel-slider').'</label>
					<input type="text" name="'.$pinwheel_slider_options.'[woo_sale_color]" id="pinwheel_woo_salecolor" value="'.$pinwheel_slider_curr['woo_sale_color'].'" class="wp-color-picker-field" data-default-color="#D8E7EE" />
				</div>
				<div class="ebs-row">
					<label>'.__('Text Color','pinwheel-slider').'</label>
					<input type="text" name="'.$pinwheel_slider_options.'[woo_sale_tcolor]" id="pinwheel_woo_saletcolor" value="'.$pinwheel_slider_curr['woo_sale_tcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" />
				</div>
			</div><!--eb-altcolorinner-->
		</div><!--eb-altcolor-->
		<div class="settings-tbl">
			<div class="ebs-row">
				<label>'.__('Slide Regular price ','pinwheel-slider').'</label>
				<div class="eb-switch eb-switchnone">
					<input type="hidden" name="'.$pinwheel_slider_options.'[enable_wooregprice]" id="pinwheel_slider_enable_wooregprice" class="hidden_check" value="'.$pinwheel_slider_curr['enable_wooregprice'].'">
					<input id="pinwheel_enablewooregpricesett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_wooregprice'],false).'>
					<label for="pinwheel_enablewooregpricesett"></label>
				</div> 
			</div>
			<div class="ebs-row">
				<label>'.__('Font','pinwheel-slider').'</label>			
				<!-- code for new fonts - 3.0 -->
				<input type="hidden" value="slide_woo_price_font" class="ftype_rname">
				<input type="hidden" value="slide_woo_price_fontg" class="ftype_gname">
				<input type="hidden" value="slide_woo_price_custom" class="ftype_cname">
				<select name="'.$pinwheel_slider_options.'[woo_font]" id="pinwheel_slider_woo_font" class="main-font eb-selnone">
					<option value="regular" '.selected( $pinwheel_slider_curr['woo_font'], "regular", false ).' > Regular Fonts </option>
					<option value="google" '.selected( $pinwheel_slider_curr['woo_font'], "google", false ).' > Google Fonts </option>
					<option value="custom" '.selected( $pinwheel_slider_curr['woo_font'], "custom", false ).' > Custom Fonts </option>
				</select>	
				<div class="load-fontdiv"></div>
			</div>
			<div class="ebs-row">
				<label>'.__('Font Color','pinwheel-slider').'</label>
				<input type="text" name="'.$pinwheel_slider_options.'[slide_woo_price_fcolor]" id="pinwheel_slide_wooprice_fcolor" value="'.$pinwheel_slider_curr['slide_woo_price_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" />
			</div>
			<div class="ebs-row">
				<label>'.__('Font Size','pinwheel-slider').'</label>
				<input type="number" name="'.$pinwheel_slider_options.'[slide_woo_price_fsize]" id="pinwheel_slide_wooprice_fsize" class="small-text" value="'.$pinwheel_slider_curr['slide_woo_price_fsize'].'" min="1" />
			</div>
			<div class="ebs-row font-style">
				<label>'.__('Font Style','pinwheel-slider').'</label>
				<select name="'.$pinwheel_slider_options.'[slide_woo_price_fstyle]" id="pinwheel_slide_wooprice_fstyle" class="eb-selnone" >
					<option value="bold" '.selected("bold",$pinwheel_slider_curr['slide_woo_price_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
					<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['slide_woo_price_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
					<option value="italic" '.selected("italic",$pinwheel_slider_curr['slide_woo_price_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
					<option value="normal" '.selected("normal",$pinwheel_slider_curr['slide_woo_price_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
				</select>
			</div>
		</div>
		<div class="eb-altcolor">
			<div class="eb-altcolorinner settings-tbl">
				<div class="ebs-row">
					<label>'.__('Slide Sale price','pinwheel-slider').'</label>
					<div class="eb-switch eb-switchnone">
						<input type="hidden" name="'.$pinwheel_slider_options.'[enable_woosprice]" id="pinwheel_slider_enable_woosprice" class="hidden_check" value="'.$pinwheel_slider_curr['enable_woosprice'].'">
						<input id="pinwheel_enablewoospricesett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_woosprice'],false).'>
						<label for="pinwheel_enablewoospricesett"></label>
					</div> 
				</div>
				<div class="ebs-row"> 
					<label>'.__('Font','pinwheel-slider').'</label>			
					<!-- code for new fonts - 3.0 -->
					<input type="hidden" value="slide_woo_saleprice_font" class="ftype_rname">
					<input type="hidden" value="slide_woo_saleprice_fontg" class="ftype_gname">
					<input type="hidden" value="slide_woo_saleprice_custom" class="ftype_cname">
					<select name="'.$pinwheel_slider_options.'[woosale_font]" id="pinwheel_slider_woosale_font" class="main-font eb-selnone">
						<option value="regular" '.selected( $pinwheel_slider_curr['woosale_font'], "regular", false ).' > Regular Fonts </option>
						<option value="google" '.selected( $pinwheel_slider_curr['woosale_font'], "google", false ).' > Google Fonts </option>
						<option value="custom" '.selected( $pinwheel_slider_curr['woosale_font'], "custom", false ).' > Custom Fonts </option>
					</select>	
					<div class="load-fontdiv"></div>
				</div>
				<div class="ebs-row">
					<label>'.__('Font Color','pinwheel-slider').'</label>
					<input type="text" name="'.$pinwheel_slider_options.'[slide_woo_saleprice_fcolor]" id="pinwheel_slide_woosaleprice_fcolor" value="'.$pinwheel_slider_curr['slide_woo_saleprice_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" />
				</div>
				<div class="ebs-row">
					<label>'.__('Font Size','pinwheel-slider').'</label>
					<input type="number" name="'.$pinwheel_slider_options.'[slide_woo_saleprice_fsize]" id="pinwheel_slide_woosaleprice_fsize" class="small-text" value="'.$pinwheel_slider_curr['slide_woo_saleprice_fsize'].'" min="1" />
				</div>
				<div class="ebs-row font-style">
					<label>'.__('Font Style','pinwheel-slider').'</label>
					<select name="'.$pinwheel_slider_options.'[slide_woo_saleprice_fstyle]" id="pinwheel_slide_woosaleprice_fstyle" class="eb-selnone" >
						<option value="bold" '.selected("bold",$pinwheel_slider_curr['slide_woo_saleprice_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
						<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['slide_woo_saleprice_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
						<option value="italic" '.selected("italic",$pinwheel_slider_curr['slide_woo_saleprice_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
						<option value="normal" '.selected("normal",$pinwheel_slider_curr['slide_woo_saleprice_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
					</select>
				</div>
			</div><!--eb-altcolorinner-->
		</div><!--eb-altcolor-->
		<div class="settings-tbl">
			<div class="ebs-row">
				<label>'.__('Slide Category','pinwheel-slider').'</label>
				<div class="eb-switch eb-switchnone">
					<input type="hidden" name="'.$pinwheel_slider_options.'[enable_woocat]" id="pinwheel_slider_enable_woocat" class="hidden_check" value="'.$pinwheel_slider_curr['enable_woocat'].'">
					<input id="pinwheel_enablewoocatsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_woocat'],false).'>
					<label for="pinwheel_enablewoocatsett"></label>
				</div> 
			</div>
			<div class="ebs-row"> 
				<label>'.__('Font','pinwheel-slider').'</label>			
				<!-- code for new fonts - 3.0 -->
				<input type="hidden" value="slide_woo_cat_font" class="ftype_rname">
				<input type="hidden" value="slide_woo_cat_fontg" class="ftype_gname">
				<input type="hidden" value="slide_woo_cat_custom" class="ftype_cname">
				<select name="'.$pinwheel_slider_options.'[woocat_font]" id="pinwheel_slider_woocat_font" class="main-font eb-selnone">
					<option value="regular" '.selected( $pinwheel_slider_curr['woocat_font'], "regular",false ).' > Regular Fonts </option>
					<option value="google" '.selected( $pinwheel_slider_curr['woocat_font'], "google",false ).' > Google Fonts </option>
					<option value="custom" '.selected( $pinwheel_slider_curr['woocat_font'], "custom",false ).' > Custom Fonts </option>
				</select>	
				<div class="load-fontdiv"></div>
			</div>
			<div class="ebs-row">
				<label>'.__('Font Color','pinwheel-slider').'</label>
				<input type="text" name="'.$pinwheel_slider_options.'[slide_woo_cat_fcolor]" id="pinwheel_slide_woocat_fcolor" value="'.$pinwheel_slider_curr['slide_woo_cat_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" />
			</div>
			<div class="ebs-row">
				<label>'.__('Font Size','pinwheel-slider').'</label>
				<input type="number" name="'.$pinwheel_slider_options.'[slide_woo_cat_fsize]" id="pinwheel_slide_woocat_fsize" class="small-text" value="'.$pinwheel_slider_curr['slide_woo_cat_fsize'].'" min="1" />
			</div>
			<div class="ebs-row font-style">
				<label>'.__('Font Style','pinwheel-slider').'</label>
				<select name="'.$pinwheel_slider_options.'[slide_woo_cat_fstyle]" id="pinwheel_slide_woocat_fstyle" class="eb-selnone" >
					<option value="bold" '.selected("bold",$pinwheel_slider_curr['slide_woo_cat_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
					<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['slide_woo_cat_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
					<option value="italic" '.selected("italic",$pinwheel_slider_curr['slide_woo_cat_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
					<option value="normal" '.selected("normal",$pinwheel_slider_curr['slide_woo_cat_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
				</select>
			</div>
		</div>
		
		<div class="ebs-row">
			<label>'.__('Stars','pinwheel-slider').'</label>
			<div class="eb-switch eb-switchnone">
				<input type="hidden" name="'.$pinwheel_slider_options.'[enable_woostar]" id="pinwheel_slider_enable_woostar" class="hidden_check" value="'.$pinwheel_slider_curr['enable_woostar'].'">
				<input id="pinwheel_enablewoostarsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_woostar'],false).'>
				<label for="pinwheel_enablewoostarsett"></label>
			</div> 
		</div>
		<div class="ebs-row">
			<div style="display: flex;">';
				$url='images/star/gold.png';
				$url1='images/star/black.png';
				$url2='images/star/red.png'; 
				$url3='images/star/green.png';
				$url4='images/star/grogreen.png';
				$url5='images/star/yellow.png';
				$url6='images/star/grored.png';
				$url7='images/star/groyellow.png';
			$html .= '</div>
			<div class="arrows"><img src="'.pinwheel_slider_plugin_url($url).'" width="16" height="16"/>
			<input name="'.$pinwheel_slider_options.'[nav_woo_star]" type="radio" id="pinwheel_nav_woo_star1" class="woo_star" value="gold" '.checked('gold',$pinwheel_slider_curr['nav_woo_star'],false).' /> </div>

			<div class="arrows"><img src="'.pinwheel_slider_plugin_url($url1).'" width="16" height="16"/>
			<input name="'.$pinwheel_slider_options.'[nav_woo_star]" type="radio" id="pinwheel_nav_woo_star2" class="woo_star" value="black" '.checked('black',$pinwheel_slider_curr['nav_woo_star'],false).' /> </div>

			<div class="arrows"><img src="'.pinwheel_slider_plugin_url($url2).'" width="16" height="16"/>
			<input name="'.$pinwheel_slider_options.'[nav_woo_star]" type="radio" id="pinwheel_nav_woo_star3" class="woo_star" value="red" '.checked('red',$pinwheel_slider_curr['nav_woo_star'],false).' /> </div>

			<div class="arrows"><img src="'.pinwheel_slider_plugin_url($url3).'" width="16" height="16"/>
			<input name="'.$pinwheel_slider_options.'[nav_woo_star]" type="radio" id="pinwheel_nav_woo_star4" class="woo_star" value="green" '.checked('green',$pinwheel_slider_curr['nav_woo_star'],false).' /> </div>

			<div class="arrows"><img src="'.pinwheel_slider_plugin_url($url4).'" width="16" height="16"/>
			<input name="'.$pinwheel_slider_options.'[nav_woo_star]" type="radio" id="pinwheel_nav_woo_star5" class="woo_star" value="grogreen" '.checked('grogreen',$pinwheel_slider_curr['nav_woo_star'],false).' /> </div>

			<div class="arrows"><img src="'.pinwheel_slider_plugin_url($url5).'" width="16" height="16"/>
			<input name="'.$pinwheel_slider_options.'[nav_woo_star]" type="radio" id="pinwheel_nav_woo_star6" class="woo_star" value="yellow" '.checked('yellow',$pinwheel_slider_curr['nav_woo_star'],false).' /> </div>

			<div class="arrows"><img src="'.pinwheel_slider_plugin_url($url6).'" width="16" height="16"/>
			<input name="'.$pinwheel_slider_options.'[nav_woo_star]" type="radio" id="pinwheel_nav_woo_star7" class="woo_star" value="grored" '.checked('grored',$pinwheel_slider_curr['nav_woo_star'],false).' /> </div>

			<div class="arrows"><img src="'.pinwheel_slider_plugin_url($url7).'" width="16" height="16"/>
			<input name="'.$pinwheel_slider_options.'[nav_woo_star]" type="radio" id="pinwheel_nav_woo_star8" class="woo_star" value="groyellow" '.checked('groyellow',$pinwheel_slider_curr['nav_woo_star'],false).' /> </div>
			<p class="submit">
				<input type="submit" class="button-primary" name="save_eb_settings" value="'.__('Save Changes','pinwheel-slider').'" />
				<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
			</p>
		</div>';
	}
	echo $html;
	die();
}
/*
	Delete Slide from custom Slider
*/

function pinwheel_delete_slide() {
	check_ajax_referer( 'pinwheel-preview-nonce', 'preview_html' );
	global $wpdb, $table_prefix;
	$table_name = $table_prefix.PINWHEEL_SLIDER_TABLE;
	$current_slider = isset($_POST['slider_id'])?$_POST['slider_id']:'0'; 
	$post_id = isset($_POST['post_id'])?$_POST['post_id']:'0'; 
	$sql = "DELETE FROM $table_name WHERE post_id = '$post_id' AND slider_id = '$current_slider' LIMIT 1";
	$wpdb->query($sql);
	$current_url = admin_url('admin.php?page=pinwheel-slider-easy-builder');
	$urlarg = array();
	$urlarg['id'] = $current_slider;
	$query_arg = add_query_arg( $urlarg ,$current_url);
	echo $current_url = $query_arg;
	//echo "Deleated Successfully!";
	die();
}
/*
* -----------------------------------------------------------------
*	Create new slider and QuickTag Functions 
* -----------------------------------------------------------------
*/
function pinwheel_woo_product() {
	check_ajax_referer( 'pinwheel-slider-nonce', 'pinwheel_slider_pg' );
	$type = $_POST['type'];
	$param   = $_POST['term'];
	$options = array();
	global $wpdb,$table_prefix;
	$tbl = $table_prefix.'posts';
	if($type == 'grouped') {
		$args = array(
			'post_type'	=> 'product',
			'tax_query'	=> array( array('taxonomy' => 'product_type','field' => 'slug','terms' => 'grouped') )
		);
		$grouped = get_posts($args);
		foreach($grouped as $group) {
			if (preg_match('#^'.$param.'#i', $group->post_title) === 1) {
				$options['product'][] = array(
					'ID' => $group->ID,
					'title' => $group->post_title
				);
			}
		}
	} else {
		$sql = "SELECT * FROM $tbl WHERE post_type = 'product' and post_title LIKE '".$param."%'";
		$results = $wpdb->get_results($sql);
		foreach($results as $row ) {
		   // more structure in data allows an easier processing
		   $options['product'][] = array(
			'ID' => $row->ID,
			'title' => $row->post_title
		   );
		}
	}
	echo json_encode($options);
	die();
}                                  
function pinwheel_show_taxonomy() {
	check_ajax_referer( 'pinwheel-slider-nonce', 'pinwheel_slider_pg' );
	$html = '';
	$post_type = isset($_POST['post_type'])?$_POST['post_type']:'';
	$update = isset($_POST['update'])?$_POST['update']:'';
	$quicktag = isset($_POST['quicktag'])?$_POST['quicktag']:'';
	$option = isset($_POST['option'])?$_POST['option']:'';
	$taxonomy_names = get_object_taxonomies( $post_type );
	if($update != '') $html .= '<th  scope="row">'. __('Taxonomy','pinwheel-slider').'</th>';
	elseif($quicktag != '') $html .= '<td  scope="row">'. __('Taxonomy','svslider').'</td>';
	else $html .= '<label>'.__('Taxonomy','pinwheel-slider').'</label>';
	if($update != '') $html .= '<td><select name="taxonomy_name" id="pinwheel_taxonomy" class="taxo-update" >';
	elseif($quicktag != '') $html .= '<td><div class="styled-select"><select name="taxonomy" id="pinwheel_taxonomy"  >';
	elseif($option != '') $html .= '<select name="'.$option.'[taxonomy]" id="pinwheel_taxonomy" >';
	else $html .= '<select name="taxonomy_name" id="pinwheel_taxonomy" class="pinwheel-form-input" >';
	$html .= '<option value="" >Select Taxonomy </option>';
	foreach ( $taxonomy_names as $taxonomy_name ) { 
		$html .= '<option value="'.$taxonomy_name.'" >' . $taxonomy_name . '</option>';
	}
	$html .= '</select>';
	if($update != '') $html .= '</td>';
	elseif($quicktag != '') $html .= '</div></td>';
	echo $html;
	die();
}
function pinwheel_show_term() {
	check_ajax_referer( 'pinwheel-slider-nonce', 'pinwheel_slider_pg' );
	$html = '';
	$taxo = isset($_POST['taxo'])?$_POST['taxo']:'';
	$update = isset($_POST['update'])?$_POST['update']:'';
	$quicktag = isset($_POST['quicktag'])?$_POST['quicktag']:'';
	$preview = isset($_POST['preview'])?$_POST['preview']:'';
	$option = isset($_POST['option'])?$_POST['option']:'';
	$terms = get_terms( $taxo );
	if($update != '') $html .= '<th  scope="row">'. __('Term','pinwheel-slider').'</th>';
	elseif($quicktag != '') $html .= '<td  scope="row">'. __('Term','svslider').'</td>';
	else $html .= '<label>'.__('Term','pinwheel-slider').'</label>';
	if($update != '') $html .= '<td><select name="taxonomy_term[]" id="pinwheel_taxonomy_term" class="pinwheel-form-input" multiple >';
	elseif($quicktag != '') $html .= '<td><select class="pinwheel-multiselect" multiple >';
	elseif($preview != '') $html .= '<select class="pinwheel-multiselect" id="pinwheel_taxonomy_term" multiple >';
	else $html .= '<select name="taxonomy_term[]" id="pinwheel_taxonomy_term" class="pinwheel-form-input" multiple >';
	foreach ( $terms as $term ) { 
		$html .= '<option value="'.$term->slug.'" >' . $term->name . '</option>';
	} 
	$html .= '</select>';
	if($update != '') $html .= '</td>';
	elseif($quicktag != '') $html .= '<input type="hidden" name="term" value="" /></td>'; 
	elseif($preview != '') { 
		if($option != 'undefined' && $option != '') $html .= '<input type="hidden" name="'.$option.'[taxonomy_term]" value="" />';
		else $html .= '<input type="hidden" name="taxonomy_term" value="" />';
	}
	echo $html;
	die();
}
/*
* -----------------------------------------------------------------
*	Google fonts Functions 
* -----------------------------------------------------------------
*/
function pinwheel_google_font_weight() {
	check_ajax_referer( 'pinwheel-google-nonce', 'google_fonts' );
	$arrg=array();
	$html = get_pinwheel_google_font_weight( $currfont = $_POST['font'], $name = $_POST['fname'], $id = $_POST['fid'], $current_value ='' );
	$html_fsubset = get_pinwheel_google_font_subset_html( $currfont = $_POST['font'], $subsetname = $_POST['fsubsetnm'], $subsetid = $_POST['fsubsetid'], $current_value ='' );
	array_push($arrg, $html, $html_fsubset);
	echo json_encode($arrg);
	die();
}
function pinwheel_load_fontsdiv_callback() {
	check_ajax_referer( 'pinwheel-google-nonce', 'google_fonts' );
	$html ='';
	$pinwheel_slider_options = 'pinwheel_slider_options'.$_POST['currcounter'];
	$pinwheel_slider_curr=get_option($pinwheel_slider_options);
	$pinwheel_slider_curr= populate_pinwheel_current($pinwheel_slider_curr);
	$currpage = $_POST['currpage'];
	$nm = isset($_POST['nm'])?$_POST['nm']:'';
	$type = isset($_POST['font_type'])?$_POST['font_type']:'';
	if( $currpage == 'pinwheel-slider-settings' ) {
		if( $type == 'regular' ) {
			$html.='<table><tr valign="top">
			<th scope="row">'. __('Font','pinwheel-slider') .'</th>
			<td>';
			$dfonts=get_pinwheel_default_fonts($name= $pinwheel_slider_options."[$nm]", $id = "pinwheel_slider_$nm", $class = "havemoreinfo", $current_value=$pinwheel_slider_curr["$nm"] );
			$html.=$dfonts;
			$html.='<span class="moreInfo">
				<div class="tooltip1">'. __('This value will be fallback font if Google web font value is specified below','pinwheel-slider').'
				</div>
			</span>
			</td>
			</tr></table>';
		} else if( $type == 'google' ) {
			$html='';
			$nmgw = $nm.'w';
			$nmgsubset = $nm.'subset';
			$html.='<table><tr valign="top">
			<th scope="row">'. __('Google Web Font','pinwheel-slider').'</th>
			<td>';
				$google_fonts  = get_pinwheel_google_fonts_html( $name = $pinwheel_slider_options."[$nm]", $gid = "pinwheel_slider_$nm", $current_value = $pinwheel_slider_curr["$nm"]);
				$html.=$google_fonts; 
			$html.='</td>	
			</tr>

			<tr valign="top">
			<th scope="row">'. __('Google Font Weight','pinwheel-slider').'</th>
			<td class="google-fontsweight">';
				$google_fw=get_pinwheel_google_font_weight( $currfont = $pinwheel_slider_curr[$nm], $name = $pinwheel_slider_options."[$nmgw]", $id = "pinwheel_slider_$nmgw", $current_value = $pinwheel_slider_curr["$nmgw"] );
				$html.=$google_fw;
			$html.='</td>
			</tr>

			<tr valign="top">
			<th scope="row">'. __('Google Font Subset','pinwheel-slider').'</th>
			<td class="google-fontsubset">';
				$google_fsubset=get_pinwheel_google_font_subset_html($currfont = $pinwheel_slider_curr[$nm], $name = $pinwheel_slider_options."[$nmgsubset][]", $id = "pinwheel_slider_$nmgsubset", $current_value = $pinwheel_slider_curr["$nmgsubset"]);
				$html.=$google_fsubset;
			$html.='</td>
			</tr></table>';
		} else if( $type == 'custom' ) {
			$html.='<table><tr valign="top">
			<th scope="row">'. __('Custom Font','pinwheel-slider').'</th>
			<td>';
				$custom_font=get_pinwheel_custom_font_html($name = $pinwheel_slider_options."[$nm]", $id = "pinwheel_slider_$nm", $current_value = $pinwheel_slider_curr["$nm"]);
				$html.=$custom_font;
			$html.='</td>
			</tr></table>';
		}
	} else { //Easy builder page fonts
			if( $type == 'regular' ) {
			$html.='<div class="ebs-row">
			<label>'. __('Font','pinwheel-slider') .'</label>';
			$dfonts=get_pinwheel_default_fonts($name= $pinwheel_slider_options."[$nm]", $id = "pinwheel_slider_$nm", $class = "havemoreinfo", $current_value=$pinwheel_slider_curr["$nm"] );
			$html.=$dfonts;
			$html.='<span class="moreInfo">
				<div class="tooltip1">'. __('This value will be fallback font if Google web font value is specified below','pinwheel-slider').'
				</div>
			</span>
			</div>';
		} else if( $type == 'google' ) {
			$html='';
			$nmgw = $nm.'w';
			$nmgsubset = $nm.'subset';
			$html.='<div class="ebs-row">
			<label>'. __('Google Web Font','pinwheel-slider').'</label>';
				$google_fonts  = get_pinwheel_google_fonts_html( $name = $pinwheel_slider_options."[$nm]", $gid = "pinwheel_slider_$nm", $current_value = $pinwheel_slider_curr["$nm"]);
				$html.=$google_fonts; 
			$html.='</div>	

			<div class="ebs-row">	
			<label>'. __('Google Font Weight','pinwheel-slider').'</label>
			<div class="google-fontsweight">';
				$google_fw=get_pinwheel_google_font_weight( $currfont = $pinwheel_slider_curr[$nm], $name = $pinwheel_slider_options."[$nmgw]", $id = "pinwheel_slider_$nmgw", $current_value = $pinwheel_slider_curr["$nmgw"] );
				$html.=$google_fw;
			$html.='</div><div>

			<div class="ebs-row">
			<label>'. __('Google Font Subset','pinwheel-slider').'</label>
			<div class="google-fontsubset">';
				$google_fsubset=get_pinwheel_google_font_subset_html($currfont = $pinwheel_slider_curr[$nm], $name = $pinwheel_slider_options."[$nmgsubset][]", $id = "pinwheel_slider_$nmgsubset", $current_value = $pinwheel_slider_curr["$nmgsubset"]);
				$html.=$google_fsubset;
			$html.='</div></div>';
		} else if( $type == 'custom' ) {
			$html.='<div class="ebs-row">
			<label>'. __('Custom Font','pinwheel-slider').'</label>';
				$custom_font=get_pinwheel_custom_font_html($name = $pinwheel_slider_options."[$nm]", $id = "pinwheel_slider_$nm", $current_value = $pinwheel_slider_curr["$nm"]);
				$html.=$custom_font;
			$html.='</div>';
		}
	}
	echo $html;
	die();	
}
/*
* -----------------------------------------------------------------
*	Settings Set Preview Param Function
* -----------------------------------------------------------------
*/
function pinwheel_preview_params() {
	check_ajax_referer( 'pinwheel-settings-nonce', 'settings_nonce' );
	$slider_type = isset($_POST['slider_type'])?$_POST['slider_type']:'';
	$cntr = isset($_POST['cntr'])?$_POST['cntr']:'';
	$pinwheel_slider_options='pinwheel_slider_options'.$cntr;
	$pinwheel_slider_curr=get_option($pinwheel_slider_options);
	$pinwheel_slider_curr= populate_pinwheel_current($pinwheel_slider_curr);
	$html = '<th scope="row">'. __('Choose Sub Type','pinwheel-slider').'</th> 
		<td>
			<fieldset>
				<legend class="screen-reader-text"><span>'.__('Preview Slider Params','pinwheel-slider').'</span></legend>';
	$html .= '<label for="'.$pinwheel_slider_options.'[offset]" >'.__('Offset','pinwheel-slider').'</label><input type="number" name="'.$pinwheel_slider_options.'[offset]" value="'.$pinwheel_slider_curr['offset'].'" id="pinwheel_slider_offset" class="small-text code" >';
	if($slider_type == 0 ) {
		//slider names for Custom Slider
		$slider_id = $pinwheel_slider_curr['slider_id'];	
		$sliders = pinwheel_ss_get_sliders();
		$sname_html='<option value="0" selected >Select the Slider</option>';
 		
	  	foreach ($sliders as $slider) { 
		 if($slider['slider_id']==$slider_id ){$selected = 'selected';} else{$selected='';}
			 if($slider['slider_id']!='0') {
			 	$sname_html =$sname_html.'<option value="'.$slider['slider_id'].'" '.$selected.'>'.$slider['slider_name'].'</option>';		 
			}
	  	} 
		
		$html .= '<label for="'.$pinwheel_slider_options.'[slider_id]" class="pinwheel_sid">'.__('Select Slider Name','pinwheel-slider').'</label><select id="pinwheel_slider_id" name="'.$pinwheel_slider_options.'[slider_id]" class="pinwheel_sid">'.$sname_html.'</select>';
	} elseif($slider_type == 1 ) {
		// Categories For Category Slider
		$categories = get_categories();
		$scat_html='<option value="" selected >Select the Category</option>';
		foreach ($categories as $category) { 
			 if($category->slug==$pinwheel_slider_curr['catg_slug']){$selected = 'selected';} else{$selected='';}
			 $scat_html =$scat_html.'<option value="'.$category->slug.'" '.$selected.'>'. $category->name .'</option>';
		} 
		$html .= '<label for="'.$pinwheel_slider_options.'[catg_slug]" class="pinwheel_catslug">'. __('Select Category','pinwheel-slider').'</label><select id="pinwheel_slider_catslug" name="'.$pinwheel_slider_options.'[catg_slug]" class="pinwheel_catslug">'.$scat_html.'</select>';
	} elseif( $slider_type == 3 ) {
		// WooCommerce Slider	
		$pstyle = "display:none;";
		if($pinwheel_slider_curr['woo_type'] == 'recent') { $woor = 'selected'; } else $woor = '';
		if($pinwheel_slider_curr['woo_type'] == 'upsells') { $woou = 'selected'; $pstyle = "display:block;";} else $woou = '';
		if($pinwheel_slider_curr['woo_type'] == 'crosssells') { $wooc = 'selected'; $pstyle = "display:block;"; } else $wooc = '';
		if($pinwheel_slider_curr['woo_type'] == 'external') { $wooe = 'selected'; $pstyle = "display:block;"; } else $wooe = '';
		if($pinwheel_slider_curr['woo_type'] == 'grouped') { $woog = 'selected'; $pstyle = "display:block;"; } else $woog = '';
		// WooCommerce Categories
		if( is_plugin_active('woocommerce/woocommerce.php') ) {
			$wooterms = get_terms('product_cat');
			$catgs = isset($pinwheel_slider_curr['product_woocatg_slug'])?$pinwheel_slider_curr['product_woocatg_slug']:'';
			$catgs_a = explode(",",$catgs);
			if($catgs == '' ) $selc = 'selected'; else $selc = '';
			$woocat_html='<option value="" '.$selc.' >All Category</option>';
			foreach( $wooterms as $woocategory) {
				if($catgs != '' && in_array($woocategory->slug, $catgs_a)){
					$selected = 'selected';
				} else{ $selected=''; }
				$woocat_html =$woocat_html.'<option value="'.$woocategory->slug.'" '.$selected.'>'. $woocategory->name .'</option>';
			}
		}
		$product_id = isset($pinwheel_slider_curr['product_id'])?$pinwheel_slider_curr['product_id']:''; 
		if($product_id != '') $product = get_the_title($product_id);
		$html .= '<label for="'.$pinwheel_slider_options.'[woo_type]" class="pinwheel_woo_type">'.__('Select Slider Type','pinwheel-slider').'</label>
		<select name="'.$pinwheel_slider_options.'[woo_type]" class="pinwheel_woo_type" id="woo_slider_preview" >
			<option value="recent" '.$woor.'>'. __('Recent Product Slider','pinwheel-slider').'</option>
			<option value="upsells"'.$woou.'>'. __('Upsells Product Slider','pinwheel-slider').'</option>
			<option value="crosssells"'.$wooc.'>'. __('Crosssells Product Slider','pinwheel-slider').'</option>
			<option value="external"'.$wooe.'>'. __('External Product Slider','pinwheel-slider').'</option>
			<option value="grouped"'.$woog.'>'. __('Grouped Product Slider','pinwheel-slider').'</option>
		</select>';
		$html .= '<label for="'.$pinwheel_slider_options.'[product_id]" class="woo-product"  style="'.$pstyle.'" >'.__('Product','pinwheel-slider').'</label><input id="products" value="'.$product.'" class="woo-product" style="'.$pstyle.'" >
		<input id="product_id" name="'.$pinwheel_slider_options.'[product_id]" value="'.$product_id.'" type="hidden" >';
		$html .= '<label for="'.$pinwheel_slider_options.'[product_woocatg_slug]" class="pinwheel_woo_catg">'.__('Select Category','pinwheel-slider').'</label><select id="pinwheel_slider_woo_catslug" class="pinwheel-multiselect" multiple > '.$woocat_html.'</select><input type="hidden" name="'.$pinwheel_slider_options.'[product_woocatg_slug]" value="'.$pinwheel_slider_curr['product_woocatg_slug'].'" />';
	} elseif( $slider_type == 4 ) {
		$ecstyle="display:none;";
		if ($pinwheel_slider_curr['ecom_type'] == "0"){ $rsel = "selected";} else { $rsel = ''; }
		if ($pinwheel_slider_curr['ecom_type'] == "1"){ $csel = "selected"; $ecstyle="display:table-row;"; } else { $csel =''; }
		$ecomcat_html='<option value="" selected >Select the Category</option>';
		if( is_plugin_active('wp-e-commerce/wp-shopping-cart.php') ) {
			$ecomterms = get_terms('wpsc_product_category');
			$ecomcat_html='<option value="" selected >Select the Category</option>';
			foreach( $ecomterms as $ecomcategory) {
				if($ecomcategory->slug==$pinwheel_slider_curr['product_ecomcatg_slug']){$selected = 'selected';} else{$selected='';}
				$ecomcat_html =$ecomcat_html.'<option value="'.$ecomcategory->slug.'" '.$selected.'>'.$ecomcategory->name.'</option>';
			}
		}
		$html .= '<label for="'.$pinwheel_slider_options.'[ecom_type]" class="pinwheel_ecom_type">'.__('Select Slider Type','pinwheel-slider').'</label>
		<select name="'.$pinwheel_slider_options.'[ecom_type]" class="pinwheel_ecom_type" id="ecom_slider_preview" onchange="ecomtype(this.value);" >
			<option value="0" '.$rsel.' >'. __('eCom Recent Product Slider','pinwheel-slider').'</option>
			<option value="1" '.$csel.' >'. __('eCom Product Category Slider','pinwheel-slider').'</option>
		</select>
		<label for="'.$pinwheel_slider_options.'[product_ecomcatg_slug]" class="pinwheel_ecom_catg" style="'.$ecstyle.'">'.__('Select Category','pinwheel-slider').'</label>
		
		<select id="pinwheel_slider_ecom_catslug" name="'.$pinwheel_slider_options.'[product_ecomcatg_slug]" class="pinwheel_ecom_catg"  style="'.$ecstyle.'">'.$ecomcat_html.'</select>';
	} elseif( $slider_type == 5 ) {
		// Event Manager Slider
		if($pinwheel_slider_curr['event_type'] == 'future') { $eventmf = 'selected'; } else $eventmf = '';
		if($pinwheel_slider_curr['event_type'] == 'past') { $eventmp = 'selected'; } else $eventmp = '';
		if($pinwheel_slider_curr['event_type'] == 'all') { $eventmr = 'selected'; } else $eventmr = '';	
		// Event Categories
		$eventcat_html='<option value="" selected >Select the Category</option>';
		if( is_plugin_active('events-manager/events-manager.php') ) { 
			$eventterms = get_terms('event-categories');
			$catgs = isset($pinwheel_slider_curr['events_mancatg_slug'])?$pinwheel_slider_curr['events_mancatg_slug']:'';
			$catgs_a = explode(",",$catgs);
			if($catgs == '' ) $selc = 'selected'; else '';
			$eventcat_html='<option value="" '.$selc.' >All Categories</option>';
			foreach( $eventterms as $eventcategory) {
				if($catgs != '' && in_array($eventcategory->slug, $catgs_a)){$selected = 'selected';} else{$selected='';}
				$eventcat_html =$eventcat_html.'<option value="'.$eventcategory->slug.'" '.$selected.'>'.$eventcategory->name.'</option>';
			} 
			// Event Tags
			$evtags = get_terms("event-tags");
			$tags = isset($pinwheel_slider_curr['events_mantag_slug'])?$pinwheel_slider_curr['events_mantag_slug']:'';
			$tags_a = explode(",",$tags);
			if($tags == '') $sel = 'selected'; else $sel = '';
			$evtag_html='<option value="" '.$sel.' >All Tags</option>';
			foreach( $evtags as $tags) {
				if($tags != '' && in_array($tags->slug, $tags_a)){$selected = 'selected';} else {$selected='';}
				$evtag_html = $evtag_html.'<option value="'.$tags->slug.'" '.$selected.'>'.$tags->name.'</option>';
			}
		}
		$html .= '<label for="'.$pinwheel_slider_options.'[event_type]" class="pinwheel_eventman_type">'.__('Select Slider Scope','pinwheel-slider').'</label>
	<select name="'.$pinwheel_slider_options.'[event_type]" class="pinwheel_eventman_type" id="eventm_slider_preview" >
		<option value="future" '.$eventmf.'>'.__('Future Events','pinwheel-slider').'</option>
		<option value="past" '.$eventmp.'>'.__('Past Events','pinwheel-slider').'</option>
		<option value="all" '.$eventmr.'>'.__('Recent Events','pinwheel-slider').'</option>
	</select>';
		$html .= '<label for="'.$pinwheel_slider_options.'[events_mancatg_slug]" class="pinwheel_eventman_catg">'.__('Select Category','pinwheel-slider').'</label>
<select id="pinwheel_slider_event_catslug" class="pinwheel-multiselect" multiple>'.$eventcat_html.'</select><input type="hidden" name="'.$pinwheel_slider_options.'[events_mancatg_slug]" value="'.$pinwheel_slider_curr['events_mancatg_slug'].'" />';
		$html .= '<label for="'.$pinwheel_slider_options.'[events_mantag_slug]" class="pinwheel_eventman_catg">'.__('Select Tag','pinwheel-slider').'</label>
<select class="pinwheel-multiselect" multiple >'.$evtag_html.'</select><input type="hidden" name="'.$pinwheel_slider_options.'[events_mantag_slug]" value="'.$pinwheel_slider_curr['events_mantag_slug'].'" />';
	} elseif( $slider_type == 6 ) {
		// Event Calendar Slider
		if($pinwheel_slider_curr['eventcal_type'] == 'upcoming') { $ecalu = 'selected'; } else $ecalu = '';	
		if($pinwheel_slider_curr['eventcal_type'] == 'past') { $ecalp = 'selected'; } else $ecalp = '';
		if($pinwheel_slider_curr['eventcal_type'] == 'all') { $ecala = 'selected'; } else $ecala = '';
		$eventcal_html='<option value="" selected >Select the Category</option>';
		if( is_plugin_active('the-events-calendar/the-events-calendar.php') ) { 
			$eventcalterms = get_terms('tribe_events_cat');
			$catgs = isset($pinwheel_slider_curr['events_calcatg_slug'])?$pinwheel_slider_curr['events_calcatg_slug']:'';
			$catgs_a = explode(",",$catgs);
			if($catgs == '') $csel = 'selected'; else $csel = '';
			$eventcal_html='<option value="" '.$csel.' >All Category</option>';
			foreach( $eventcalterms as $eventcalcat) {
				if($catgs != '' && in_array($eventcalcat->slug, $catgs_a)){$selected = 'selected';} else{$selected='';}
				$eventcal_html =$eventcal_html.'<option value="'.$eventcalcat->slug.'" '.$selected.'>'.$eventcalcat->name.'</option>';
			}
			$evcaltags = get_terms("post_tag");
			$tags = isset($pinwheel_slider_curr['events_caltag_slug'])?$pinwheel_slider_curr['events_caltag_slug']:'';
			$tags_a = explode(",",$tags);
			if($tags == '') $sel = 'selected'; else $sel = '';
			$evcaltag_html='<option value="" '.$sel.' >All Tags</option>';
			foreach( $evcaltags as $tags) {
				if($tags != '' && in_array($tags->slug, $tags_a)){ $selected = 'selected';} else {$selected='';}
				$evcaltag_html = $evcaltag_html.'<option value="'.$tags->slug.'" '.$selected.'>'.$tags->name.'</option>';
			}
		}
		$html .= '<label for="'.$pinwheel_slider_options.'[eventcal_type]" class="pinwheel_eventcal_type">'.__('Select Slider Type','pinwheel-slider').'</label>
<select name="'.$pinwheel_slider_options.'[eventcal_type]" id="eventcal_slider_preview" >
	<option value="list" '.$ecalu.' >'.__('Future Events','pinwheel-slider').'</option>
	<option value="past"'.$ecalp.' >'.__('Past Events','pinwheel-slider').'</option>
	<option value="all" '.$ecala.' >'. __('Recent Events','pinwheel-slider').'</option>
</select>';
		$html .= '<label for="'.$pinwheel_slider_options.'[events_calcatg_slug]" >'.__('Select Category','pinwheel-slider').'</label>
<select id="pinwheel_slider_eventcal_catslug" class="pinwheel-multiselect" multiple>'.$eventcal_html.'</select><input type="hidden" name="'.$pinwheel_slider_options.'[events_calcatg_slug]" value="'.$pinwheel_slider_curr['events_calcatg_slug'].'" />';
		$html .= '<label for="'.$pinwheel_slider_options.'[events_caltag_slug]" >'.__('Select Tag','pinwheel-slider').'</label>
<select id="pinwheel_slider_eventcal_catslug" class="pinwheel-multiselect" multiple>'.$evcaltag_html.'</select><input type="hidden"  name="'.$pinwheel_slider_options.'[events_caltag_slug]" value="'.$pinwheel_slider_curr['events_caltag_slug'].'" />';
	} elseif( $slider_type == 7 ) {
		// Taxonomy Slider
		$post_types = get_post_types(); 
		$post_type = isset($pinwheel_slider_curr['taxonomy_posttype'])?$pinwheel_slider_curr['taxonomy_posttype']:'post';
		if($post_type == '') $post_type = 'post';
		$taxonomy_names = get_object_taxonomies( $post_type );
		$html .='<label for="'.$pinwheel_slider_options.'[taxonomy_posttype]" >'.__('Post Type','pinwheel-slider').'</label><select name="'.$pinwheel_slider_options.'[taxonomy_posttype]" id="pinwheel_taxonomy_posttype" >';
		foreach ( $post_types as $cpost_type ) {
			$ptselected =''; 
			if($post_type == $cpost_type) $ptselected="selected";
			$html .='<option value="'.$cpost_type.'" '.$ptselected.' >' . $cpost_type . '</option>';
		}
		$html .='</select>';
		$html .='<div class="sh-taxo"><label for="'.$pinwheel_slider_options.'[taxonomy]" >'.__('Taxonomy','pinwheel-slider').'</label>
	<select name="'.$pinwheel_slider_options.'[taxonomy]" id="pinwheel_taxonomy" class="taxo-update" >
	<option value="" >Select Taxonomy </option>';
	$taxo = isset($pinwheel_slider_curr['taxonomy'])?$pinwheel_slider_curr['taxonomy']:'';
	foreach ( $taxonomy_names as $taxonomy_name ) { 
		$taxoselected = '';
		if( $taxo == $taxonomy_name ) $taxoselected = 'selected';
		$html .='<option value="'.$taxonomy_name.'" '.$taxoselected.' >' . $taxonomy_name . '</option>';
	} 
	$html .='</select></div>';
	if($taxo != '') $term_style = 'display:block'; else $term_style = 'display:none';
	$html .='<div class="sh-term" style="'.$term_style.'" ><label for="'.$pinwheel_slider_options.'[taxonomy_term]" >'.__('Term','pinwheel-slider').'</label>
	<select id="pinwheel_taxonomy_term" class="pinwheel-multiselect" multiple >';
	$terms = get_terms( $taxo );
	$taxoterm = isset($pinwheel_slider_curr['taxonomy_term'])?$pinwheel_slider_curr['taxonomy_term']:'';
	$taxoterm = explode(",",$taxoterm);
	foreach ( $terms as $term ) { 
		$termselected = '';
		if(in_array($term->slug, $taxoterm)) $termselected = 'selected';
		$html .= '<option value="'.$term->slug.'" '.$termselected.' >' . $term->name . '</option>';
	}
	$html .='</select><input type="hidden" name="'.$pinwheel_slider_options.'[taxonomy_term]" id="pinwheel_taxonomy" value="'.$pinwheel_slider_curr['taxonomy_term'].'"></div><input type="hidden" id="pinwheel-option" value="'.$pinwheel_slider_options.'">';
	$show = isset($pinwheel_slider_curr['taxonomy_show'])?$pinwheel_slider_curr['taxonomy_show']:'';
	if($show == '') $dsel = 'selected'; else $dsel = '';
	if($show == 'per_tax') $psel = 'selected'; else $psel = '';
	$html .='<label for="'.$pinwheel_slider_options.'[taxonomy_show]" >'.__('Show','pinwheel-slider').'</label>
		<select name="'.$pinwheel_slider_options.'[taxonomy_show]" id="pinwheel_taxonomy_show" class="pinwheel-form-input" >
			<option value="" '.$dsel.' >'.__('Default','pinwheel-slider').'</option>
			<option value="per_tax" '.$psel.' >'. __('One Per Tax','pinwheel-slider').'</option>
		</select>';
	$operator = isset($pinwheel_slider_curr['taxonomy_operator'])?$pinwheel_slider_curr['taxonomy_operator']:'';
	if($operator == 'IN' || $operator == '') $isel = 'selected'; else $isel = '';
	if($operator == 'NOT IN') $nsel = 'selected'; else $nsel = '';
	if($operator == 'AND') $asel = 'selected'; else $asel = '';
	$html .='<br><br><label for="'.$pinwheel_slider_options.'[taxonomy_operator]" >'.__('Operator','pinwheel-slider').'</label>
		<select name="'.$pinwheel_slider_options.'[taxonomy_operator]" id="pinwheel_taxonomy_operator" >
			<option value="IN" '.$isel.' >'.__('IN','pinwheel-slider').'</option>
			<option value="NOT IN" '.$nsel.' >'. __('NOT IN','pinwheel-slider').'</option>
			<option value="AND" '.$asel.' >'. __('AND','pinwheel-slider').'</option>
		</select>';
	$html .='<label for="'.$pinwheel_slider_options.'[taxonomy_author]" >'.__('Author','pinwheel-slider').'</label><select class="pinwheel-multiselect" multiple >
	<option value="" >Select Author </option>';
	$auth = isset($pinwheel_slider_curr['taxonomy_author'])?$pinwheel_slider_curr['taxonomy_author']:'';			
	$auth = explode(",",$auth);		
	$blogusers = get_users();	
	// Array of WP_User objects.
	foreach ( $blogusers as $user ) {
		 $aselected = '';
		if(in_array($user->ID, $auth)) $aselected = 'selected';
		$html .='<option value="'.$user->ID.'" '.$aselected.' >' . $user->user_nicename . '</option>';
	}
	$html .='</select><input type="hidden" name="'.$pinwheel_slider_options.'[taxonomy_author]" value="'.$pinwheel_slider_curr['taxonomy_author'].'" />';
} elseif( $slider_type == 8 ) {
		// RSS feed Slider
		$html .='<label for="'.$pinwheel_slider_options.'[rssfeed_feedurl]" >'.__('Feed Url','pinwheel-slider').'</label><input type="text" name="'.$pinwheel_slider_options.'[rssfeed_feedurl]" id="pinwheel_rssfeed_feedurl" class="regular-text code" value="'.htmlentities( $pinwheel_slider_curr['rssfeed_feedurl'] , ENT_QUOTES).'" placeholder="http://mashable.com/feed/" />';
		$html .='<label for="'.$pinwheel_slider_options.'[rssfeed_id]" >'.__('RSS Slider Id','pinwheel-slider').'</label><input type="number" name="'.$pinwheel_slider_options.'[rssfeed_id]" id="pinwheel_rssfeed_id" class="small-text code" value="'.htmlentities( $pinwheel_slider_curr['rssfeed_id'] , ENT_QUOTES).'"/>';
		$html .='<label for="'.$pinwheel_slider_options.'[rssfeed_default_image]" >'.__('Default Image','pinwheel-slider').'</label><input type="text" name="'.$pinwheel_slider_options.'[rssfeed_default_image]" id="pinwheel_rssfeed_defimage" class="regular-text code" value="'.htmlentities( $pinwheel_slider_curr['rssfeed_default_image'] , ENT_QUOTES).'" />';
		$html .='<label for="'.$pinwheel_slider_options.'[rssfeed_image_class]" >'.__('Image Class','pinwheel-slider').'</label><input type="text" name="'.$pinwheel_slider_options.'[rssfeed_image_class]" id="pinwheel_rssfeed_image_class" class="regular-text code" value="'. htmlentities( $pinwheel_slider_curr['rssfeed_image_class'] , ENT_QUOTES).'" />';
		$source = $pinwheel_slider_curr['rssfeed_src'];
		$html .='<label for="'.$pinwheel_slider_options.'[rssfeed_src]" >'.__('Source','pinwheel-slider').'</label>
		<select name="'.$pinwheel_slider_options.'[rssfeed_src]" id="pinwheel_rssfeed_src" class="rss-source">
			<option value="" '.selected($source,"").'>'. __('Other','pinwheel-slider').'</option>
			<option value="smugmug" '.selected($source,"smugmug").'>'. __('Smugmug','pinwheel-slider').'</option>
		</select>
		';
		$size_style=$feed_style="style='display:none;'";
		if($source == "smugmug" ) $size_style="style='table-cell;'";
		else  $feed_style="style='display:table-cell;'";
		$feed = $pinwheel_slider_curr['rssfeed_feed'];
		$html .='<label for="'.$pinwheel_slider_options.'[rssfeed_feed]" class="rss-feed" '.$feed_style.' >'.__('Feed','pinwheel-slider').'</label>
		<select name="'.$pinwheel_slider_options.'[rssfeed_feed]" id="pinwheel_rssfeed_feed" class="rss-feed" '.$feed_style.'>
			<option value="" '.selected($feed,"").'>'.__('Other','pinwheel-slider').'</option>
			<option value="atom" '. selected($feed,"atom").'>'.__('Atom','pinwheel-slider').'</option>
		</select>
		';
		$size = $pinwheel_slider_curr['rssfeed_size'];
		$html .='<label for="'.$pinwheel_slider_options.'[rssfeed_size]" class="rss-size" '.$size_style.' >'.__('Size','pinwheel-slider').'</label>
		<select name="'.$pinwheel_slider_options.'[rssfeed_size]" id="pinwheel_rssfeed_size" class="rss-size" '.$size_style.'>
			<option value="Ti" '.selected($size, "Ti").'>'.__('Tiny thumbnails','pinwheel-slider').'</option>
			<option value="Th" '. selected($size, "Th").'>'.__('Large thumbnails','pinwheel-slider').'</option>
			<option value="S" '. selected($size, "S").'>'.__('Small','pinwheel-slider').'</option>
			<option value="M" '. selected($size, "M").'>'.__('Medium','pinwheel-slider').'</option>
			<option value="L" '. selected($size, "L").'>'.__('Other','pinwheel-slider').'</option>
			<option value="XL" '. selected($size, "XL").'>'.__('Large','pinwheel-slider').'</option>
			<option value="X2" '. selected($size, "X2").'>'.__('X2Large','pinwheel-slider').'</option>
			<option value="X3" '. selected($size, "X3").'>'.__('X3Large','pinwheel-slider').'</option>
			<option value="O" '. selected($size, "O").'>'.__('Original','pinwheel-slider').'</option>
		</select>
		';
		$rsscontent = $pinwheel_slider_curr['rssfeed_content'];
		$html .='<label for="'.$pinwheel_slider_options.'[rssfeed_content]" >'.__('Scan child node content for images','pinwheel-slider').'</label>
		<input type="checkbox" name="'.$pinwheel_slider_options.'[rssfeed_content]" id="pinwheel_rssfeed_content" value="1" '.checked("1",$rsscontent,false).'/>';
	} elseif( $slider_type == 9 ) {
		$html .='<label for="'.$pinwheel_slider_options.'[postattch_id]" >'.__('Post Id','pinwheel-slider').'</label><input type="text" name="'.$pinwheel_slider_options.'[postattch_id]" id="pinwheel_postattch_id" class="regular-text code" value="'.htmlentities( $pinwheel_slider_curr['postattch_id'] , ENT_QUOTES).'" />';
	}  elseif( $slider_type == 10 ) {
		$gid = $pinwheel_slider_curr['nextgen_gallery_id'];
		$galleriesOptions = get_pinwheel_nextgen_galleries($gid); 
		$html .='<label for="'.$pinwheel_slider_options.'[nextgen_gallery_id]" >'.__('Select Gallery','pinwheel-slider').'</label>
		<select name="'.$pinwheel_slider_options.'[nextgen_gallery_id]" id="pinwheel_nextgen_galleryid" class="regular-text code havemoreinfo">
			'.$galleriesOptions.'
		</select>
		';
		$html .='<label for="'.$pinwheel_slider_options.'[nextgen_anchor]" >'.__('Link','pinwheel-slider').'</label>&nbsp;<input type="checkbox" name="'.$pinwheel_slider_options.'[nextgen_anchor]" value="1" id="pinwheel_nextgen_galleryid" '.checked('1', $pinwheel_slider_curr['nextgen_anchor'],false).' />';	
	}
	$html .= '</fieldset></td>';
	echo $html;
	die();
}
function pinwheel_tab_contents() {
	check_ajax_referer( 'pinwheel-settings-nonce', 'settings_nonce' );
	$tab = isset($_POST['tab'])?$_POST['tab']:'';	
	$cntr = isset($_POST['cntr'])?$_POST['cntr']:'';
	$pinwheel_slider_options='pinwheel_slider_options'.$cntr;
	$pinwheel_slider_curr=get_option($pinwheel_slider_options);
	if(!isset($cntr) or empty($cntr)){$curr = 'Default';}
	else{$curr = $cntr;}
	$pinwheel_slider_curr= populate_pinwheel_current($pinwheel_slider_curr);
	$html = '';
	if(get_transient( 'pinwheel_undo_set' ) != false) { 
		$undo_style="display:inline-block;";	
	} else $undo_style="display:none;";
	if($tab == 'content') {	
		$curr_preview = $pinwheel_slider_curr['preview'];
		$html .= '<div id="previewslider" class="sub_settings toggle_settings">
			<h2 class="sub-heading">'.__('Slider Live Preview and Source Panel','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 

			<table class="form-table">
				<tr valign="top"> 
					<th scope="row"><label for="pinwheel_slider_disable_preview">'.__('Disable Live Preview','pinwheel-slider').'</label></th> 
					<td> 
						<div class="eb-switch eb-switchnone">
							<input type="hidden" id="pinwheel_slider_disable_preview" name="'.$pinwheel_slider_options.'[disable_preview]" class="hidden_check" value="'.$pinwheel_slider_curr['disable_preview'].'">
							<input id="pinwheel_disablepreview" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['disable_preview'],false).' >
							<label for="pinwheel_disablepreview"></label>
						</div>
					</td>
				</tr>
				<tr valign="top" id="pinwheel_preview">
					<th scope="row">'.__('Slider Type','pinwheel-slider').'</th>
					<td>
						<select name="'.$pinwheel_slider_options.'[preview]" id="pinwheel_slider_preview">
							<option value="2" '.selected( 2, $curr_preview, false).' >'.__('Recent Posts Slider','pinwheel-slider').'</option>
							<option value="1"'.selected( 1, $curr_preview, false).' >'.__('Category Slider','pinwheel-slider').'</option>
<option value="0" '.selected( 0, $curr_preview, false).' >'.__('Custom Slider','pinwheel-slider').'</option>';
							if( is_plugin_active('woocommerce/woocommerce.php') ) { 
								$html .= '<option value="3" '.selected( 3, $curr_preview, false).' >'.__('WooCommerce Slider','pinwheel-slider').'</option>';
							}
							if( is_plugin_active('wp-e-commerce/wp-shopping-cart.php') ) {
								$html .= '<option value="4" '.selected( 4, $curr_preview, false).' >'.__('eCommerce Slider','pinwheel-slider').'</option>';
							}
							if( is_plugin_active('events-manager/events-manager.php') ) {
								$html .= '<option value="5" '.selected( 5, $curr_preview, false).' >'.__('Events Manager Slider','pinwheel-slider').'</option>';
							}
							if( is_plugin_active('the-events-calendar/the-events-calendar.php') ) { 
								$html .= '<option value="6" '.selected( 6, $curr_preview, false).' >'.__('Events Calendar Slider','pinwheel-slider').'</option>';
							}
							$html .= '<option value="7" '.selected( 7, $curr_preview, false).' >'.__('Taxonomy Slider','pinwheel-slider').'</option>

							<option value="8" '.selected( 8, $curr_preview, false).' >'.__('RSS feed Slider','pinwheel-slider').'</option>

							<option value="9" '.selected( 9, $curr_preview, false).' >'.__('Post Attachments Slider','pinwheel-slider').'</option>';

							if( is_plugin_active('nextgen-gallery/nggallery.php') ) {
								$html .= '<option value="10" '.selected( 10, $curr_preview, false).' >'.__('NextGenGallery Slider','pinwheel-slider').'</option>';
							}
						$html .= '</select>';
					$html .= '</td>
				</tr>
				<tr valign="top" class="pinwheel_slider_params"> </tr>	
				<tr valign="top">
					<th scope="row">'.__('Skin','pinwheel-slider').'</th>
					<td>
						<select name="'.$pinwheel_slider_options.'[stylesheet]" id="pinwheel_slider_stylesheet" class="pinwheel-skin">';
						$directory = PINWHEEL_SLIDER_CSS_DIR;
						if ($handle = opendir($directory)) {
						    while (false !== ($file = readdir($handle))) { 
						     if($file != '.' and $file != '..') {
							$sel_file =''; 
							if ($pinwheel_slider_curr['stylesheet'] == $file) $sel_file = 'selected';
							$html .= '<option value="'.$file.'" '.$sel_file.' >'.$file.'</option>';
						} }
						    closedir($handle);
						}
						$html .= '</select>
					</td>
				</tr>
				</table>
				<p class="submit">
					<input type="submit" name="save_settings" class="button-primary" value="'.__('Save and Preview Slider','pinwheel-slider').'" />
					<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
				</p>
				<div class="settingsdiv">'.__('Shortcode','pinwheel-slider').'</div>
				<div class="yellowdiv">';
					if($cntr=='') $set=' set="1"'; else $set=' set="'.$cntr.'"';
					$offset = '';
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
						$offset = ' offset="'.$pinwheel_slider_curr['offset'].'"';
					if ($pinwheel_slider_curr['preview'] == "0")
						$preview = '[pinwheelslider id="'.$pinwheel_slider_curr['slider_id'].'"'.$set.$offset.']';
					elseif($pinwheel_slider_curr['preview'] == "1")
						$preview = '[pinwheelcategory catg_slug="'.$pinwheel_slider_curr['catg_slug'].'"'.$set.$offset.']';
					elseif($pinwheel_slider_curr['preview'] == "3" ) {
						$woocat = $product_id = '';
						if(isset($pinwheel_slider_curr['product_woocatg_slug']) && !empty($pinwheel_slider_curr['product_woocatg_slug']) )
							$woocat = ' term="'.$pinwheel_slider_curr['product_woocatg_slug'].'"';
						if(isset($pinwheel_slider_curr['product_id']) && !empty($pinwheel_slider_curr['product_id']) )
							$product_id = ' product_id="'.$pinwheel_slider_curr['product_id'].'"';
						$preview = '[pinwheelwoocommerce type="'.$pinwheel_slider_curr['woo_type'].'"'.$set.$offset.$product_id.$woocat.']';
					}
					elseif($pinwheel_slider_curr['preview'] == "4" && $pinwheel_slider_curr['ecom_type'] == "0")
						$preview = '[pinwheeltaxonomy post_type="wpsc-product"'.$set.$offset.']';
					elseif($pinwheel_slider_curr['preview'] == "4" && $pinwheel_slider_curr['ecom_type'] == "1")
						$preview = '[pinwheeltaxonomy post_type="wpsc-product" taxonomy="wpsc_product_category" term="'.$pinwheel_slider_curr['product_ecomcatg_slug'].'" '.$set.$offset.']';
					elseif($pinwheel_slider_curr['preview'] == "5") {
						$ecat = $etag = $scope = '';
						if(isset($pinwheel_slider_curr['events_mancatg_slug']) && !empty($pinwheel_slider_curr['events_mancatg_slug']) )
							$ecat = ' term="'.$pinwheel_slider_curr['events_mancatg_slug'].'"';
						if(isset($pinwheel_slider_curr['events_mantag_slug']) && !empty($pinwheel_slider_curr['events_mantag_slug']) )
							$etag = ' tags="'.$pinwheel_slider_curr['events_mantag_slug'].'"';
						if(isset($pinwheel_slider_curr['event_type']) && !empty($pinwheel_slider_curr['event_type']) )
							$scope = ' scope="'.$pinwheel_slider_curr['event_type'].'"';
						$preview = '[pinwheelevent'.$scope.$set.$offset.$ecat.$etag.']';
					}
					elseif($pinwheel_slider_curr['preview'] == "6") {
						$ecat = $etag = $scope = '';
						if(isset($pinwheel_slider_curr['events_calcatg_slug']) && !empty($pinwheel_slider_curr['events_calcatg_slug']) )
							$ecat = ' term="'.$pinwheel_slider_curr['events_calcatg_slug'].'"';
						if(isset($pinwheel_slider_curr['events_caltag_slug']) && !empty($pinwheel_slider_curr['events_caltag_slug']) )
							$etag = ' tags="'.$pinwheel_slider_curr['events_caltag_slug'].'"';
						if(isset($pinwheel_slider_curr['eventcal_type']) && !empty($pinwheel_slider_curr['eventcal_type']) )
							$scope = ' type="'.$pinwheel_slider_curr['eventcal_type'].'"';
						$preview = '[pinwheelcalendar'.$scope.$set.$offset.$ecat.$etag.']';
					}
					elseif($pinwheel_slider_curr['preview'] == "7") {
						$postype=$taxonomy=$term=$operator=$author=$show='';
						if(isset($pinwheel_slider_curr['taxonomy_posttype']) && $pinwheel_slider_curr['taxonomy_posttype'] != '' ) {
							$postype = ' post_type="'.$pinwheel_slider_curr['taxonomy_posttype'].'"';	
						}
						if(($pinwheel_slider_curr['taxonomy']) && $pinwheel_slider_curr['taxonomy'] != '' ) {
							$taxonomy = ' taxonomy="'.$pinwheel_slider_curr['taxonomy'].'"';
						}
						if(isset($pinwheel_slider_curr['taxonomy_term']) && $pinwheel_slider_curr['taxonomy_term'] != '' ) {
							$term = ' term="'.$pinwheel_slider_curr['taxonomy_term'].'"';
						}
						if(isset($pinwheel_slider_curr['taxonomy_operator']) && $pinwheel_slider_curr['taxonomy_operator'] != '' ) {
							$operator = ' operator="'.$pinwheel_slider_curr['taxonomy_operator'].'"';
						}
						if(isset($pinwheel_slider_curr['taxonomy_author']) && $pinwheel_slider_curr['taxonomy_author'] != '' ) {
							$author = ' author="'.$pinwheel_slider_curr['taxonomy_author'].'"';
						}
						if(isset($pinwheel_slider_curr['taxonomy_show']) && $pinwheel_slider_curr['taxonomy_show'] != '' ) {
							$show = ' show="'.$pinwheel_slider_curr['taxonomy_show'].'"';
						}		
						$preview = '[pinwheeltaxonomy'.$postype.$set.$offset.$taxonomy.$term.$operator.$author.$show.']';
					}
					elseif($pinwheel_slider_curr['preview'] == "8") {
						$id=$feed=$feedurl=$default_image=$src=$order=$media=$content=$image_class=$size='';
						if(isset($pinwheel_slider_curr['rssfeed_id']) && $pinwheel_slider_curr['rssfeed_id'] != '' ) {
							$id = ' id="'.$pinwheel_slider_curr['rssfeed_id'].'"';
						}
						if(isset($pinwheel_slider_curr['rssfeed_feed']) && $pinwheel_slider_curr['rssfeed_feed'] != '' ) {
							$feed = ' feed="'.$pinwheel_slider_curr['rssfeed_feed'].'"';	
						}
						if(isset($pinwheel_slider_curr['rssfeed_feedurl']) && $pinwheel_slider_curr['rssfeed_feedurl'] != '' ) {
							$feedurl = ' feedurl="'.$pinwheel_slider_curr['rssfeed_feedurl'].'"';	
						}
						if(isset($pinwheel_slider_curr['rssfeed_default_image']) && $pinwheel_slider_curr['rssfeed_default_image'] != '' ) {
							$default_image = ' default_image="'.$pinwheel_slider_curr['rssfeed_default_image'].'"';	
						}
						if(isset($pinwheel_slider_curr['rssfeed_src']) && $pinwheel_slider_curr['rssfeed_src'] != '' ) {
							$src = ' src="'.$pinwheel_slider_curr['rssfeed_src'].'"';	
						}
						if(isset($pinwheel_slider_curr['rssfeed_order']) && $pinwheel_slider_curr['rssfeed_order'] != '' ) {
							$order = ' order="'.$pinwheel_slider_curr['rssfeed_order'].'"';	
						}
						if(isset($pinwheel_slider_curr['rssfeed_media']) && $pinwheel_slider_curr['rssfeed_media'] != '' ) {
							$media = ' media="'.$pinwheel_slider_curr['rssfeed_media'].'"';
						}
						if(isset($pinwheel_slider_curr['rssfeed_content']) && $pinwheel_slider_curr['rssfeed_content'] != '' ) {
							$content = ' content="'.$pinwheel_slider_curr['rssfeed_content'].'"';
						}
						if(isset($pinwheel_slider_curr['rssfeed_image_class']) && $pinwheel_slider_curr['rssfeed_image_class'] != '' ) {
							$image_class = ' image_class="'.$pinwheel_slider_curr['rssfeed_image_class'].'"';
						}
						if(isset($pinwheel_slider_curr['rssfeed_size']) && $pinwheel_slider_curr['rssfeed_size'] != '' ) {
							$size = ' size="'.$pinwheel_slider_curr['rssfeed_size'].'"';
						}
						$preview = '[pinwheelfeed'.$id.$feed.$feedurl.$set.$offset.$default_image.$src.$order.$media.$content.$image_class.$size.']';
					}
					elseif($pinwheel_slider_curr['preview'] == "9") {
						$id='';
						if(isset($pinwheel_slider_curr['postattch_id'])  && $pinwheel_slider_curr['postattch_id'] != '' ) {
							$id = ' id="'.$pinwheel_slider_curr['postattch_id'].'"';
						}
						$preview = '[pinwheelattachments'.$id.$set.$offset.']';
					}
					elseif($pinwheel_slider_curr['preview'] == "10") {
						$gallery_id=$anchor='';
						if(isset($pinwheel_slider_curr['nextgen_gallery_id'])) {
							$gallery_id = ' gallery_id="'.$pinwheel_slider_curr['nextgen_gallery_id'].'"';	
						}
						if(isset($pinwheel_slider_curr['nextgen_anchor']) && !empty($pinwheel_slider_curr['nextgen_anchor']) ) {
							$anchor = ' anchor="'.$pinwheel_slider_curr['nextgen_anchor'].'"';
						}	
						$preview = '[pinwheelngg'.$gallery_id.$set.$offset.$anchor.']';
					}
					else $preview = '[pinwheelrecent'.$set.$offset.']';
					$html .= $preview;
			$html .= '</div>
			<div class="settingsdiv">'.__('Template Tag','pinwheel-slider').'</div>
			<div class="yellowdiv yellowdiv_txtleft">';
				if($cntr=='') $tset=' $set="1"'; else $tset=' $set="'.$cntr.'"';
				$toffset = '';
				if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$toffset = ',$offset="'.$pinwheel_slider_curr['offset'].'"';
				if ($pinwheel_slider_curr['preview'] == "0")
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider")){get_pinwheel_slider($slider_id="'.$pinwheel_slider_curr['slider_id'].'",'.$tset.$toffset.');}?&gt;</code>';
				elseif($pinwheel_slider_curr['preview'] == "1")
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_category")){get_pinwheel_slider_category($catg_slug="'.$pinwheel_slider_curr['catg_slug'].'",'.$tset.$toffset.');}?&gt;</code>';
				elseif($pinwheel_slider_curr['preview'] == "3" ) {
					$args = '';
					if($cntr=='') $args .= 'set=1'; else $args .= 'set='.$cntr;
					$args .= '&type='. $pinwheel_slider_curr['woo_type'];
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$args .= '&offset='.$pinwheel_slider_curr['offset'];
					if(isset($pinwheel_slider_curr['product_woocatg_slug']) && !empty($pinwheel_slider_curr['product_woocatg_slug']) )
						$args .= '&term='.$pinwheel_slider_curr['product_woocatg_slug'];
					if(isset($pinwheel_slider_curr['product_id']) && !empty($pinwheel_slider_curr['product_id']) )
						$args .= '&product_id='.$pinwheel_slider_curr['product_id'];
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_woocommerce")){get_pinwheel_slider_woocommerce( "'.$args.'" );}?&gt;</code>';
				}
				elseif($pinwheel_slider_curr['preview'] == "4" && $pinwheel_slider_curr['ecom_type'] == "0") {
					$args = '';
					if($cntr=='') $args .= 'set=1'; else $args .= 'set='.$cntr;
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$args .= '&offset='.$pinwheel_slider_curr['offset'];
					$args .= '&post_type=wpsc-product';	
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_taxonomy")){get_pinwheel_slider_taxonomy( "'.$args.'" );}?&gt;</code>';
				}
				elseif($pinwheel_slider_curr['preview'] == "4" && $pinwheel_slider_curr['ecom_type'] == "1") {
					$args = '';
					if($cntr=='') $args .= 'set=1'; else $args .= 'set='.$cntr;
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$args .= '&offset='.$pinwheel_slider_curr['offset'];
					$args .= '&post_type=wpsc-product&taxonomy=wpsc_product_category';	
					if(isset($pinwheel_slider_curr['product_ecomcatg_slug']) && $pinwheel_slider_curr['product_ecomcatg_slug'] != '' ) {
						$args .= '&term='.$pinwheel_slider_curr['product_ecomcatg_slug'];
					}
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_taxonomy")){get_pinwheel_slider_taxonomy( "'.$args.'" );}?&gt;</code>';
				}
				elseif($pinwheel_slider_curr['preview'] == "5") {
					$args = '';
					if($cntr=='') $args .= 'set=1'; else $args .= 'set='.$cntr;
					if(isset($pinwheel_slider_curr['event_type']) && !empty($pinwheel_slider_curr['event_type']) )
						$args .= '&scope='.$pinwheel_slider_curr['event_type'];
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$args .= '&offset='.$pinwheel_slider_curr['offset'];
					if(isset($pinwheel_slider_curr['events_mancatg_slug']) && !empty($pinwheel_slider_curr['events_mancatg_slug']) )
						$args .= '&term='.$pinwheel_slider_curr['events_mancatg_slug'];
					if(isset($pinwheel_slider_curr['events_mantag_slug']) && !empty($pinwheel_slider_curr['events_mantag_slug']) )
						$args .= '&tags='.$pinwheel_slider_curr['events_mantag_slug'];

					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_event")){get_pinwheel_slider_event( "'.$args.'" );}?&gt;</code>';
				}
				elseif($pinwheel_slider_curr['preview'] == "6") {
					$args = '';
					if($cntr=='') $args .= 'set=1'; else $args .= 'set='.$cntr;
					if(isset($pinwheel_slider_curr['eventcal_type']) && !empty($pinwheel_slider_curr['eventcal_type']) )
						$args .= '&type='.$pinwheel_slider_curr['eventcal_type'];
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$args .= '&offset='.$pinwheel_slider_curr['offset'];
					if(isset($pinwheel_slider_curr['events_calcatg_slug']) && !empty($pinwheel_slider_curr['events_calcatg_slug']) )
						$args .= '&term='.$pinwheel_slider_curr['events_calcatg_slug'];
					if(isset($pinwheel_slider_curr['events_caltag_slug']) && !empty($pinwheel_slider_curr['events_caltag_slug']) )
						$args .= '&tags='.$pinwheel_slider_curr['events_caltag_slug'];

					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_event_calendar")){get_pinwheel_slider_event_calendar( "'.$args.'" );}?&gt;</code>';
				}
				elseif($pinwheel_slider_curr['preview'] == "7") {
					$args = '';
					if($cntr=='') $args .= 'set=1'; else $args .= 'set='.$cntr;
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$args .= '&offset='.$pinwheel_slider_curr['offset'];
					if(isset($pinwheel_slider_curr['taxonomy_posttype']) && $pinwheel_slider_curr['taxonomy_posttype'] != '' ) {
						$args .= '&post_type='.$pinwheel_slider_curr['taxonomy_posttype'];	
					}
					if(($pinwheel_slider_curr['taxonomy']) && $pinwheel_slider_curr['taxonomy'] != '' ) {
						$args .= '&taxonomy='.$pinwheel_slider_curr['taxonomy'];
					}
					if(isset($pinwheel_slider_curr['taxonomy_term']) && $pinwheel_slider_curr['taxonomy_term'] != '' ) {
						$args .= '&term='.$pinwheel_slider_curr['taxonomy_term'];
					}
					if(isset($pinwheel_slider_curr['taxonomy_operator']) && $pinwheel_slider_curr['taxonomy_operator'] != '' ) {
						$args .= '&operator='.$pinwheel_slider_curr['taxonomy_operator'];
					}
					if(isset($pinwheel_slider_curr['taxonomy_author']) && $pinwheel_slider_curr['taxonomy_author'] != '' ) {
						$args .= '&author='.$pinwheel_slider_curr['taxonomy_author'];
					}
					if(isset($pinwheel_slider_curr['taxonomy_show']) && $pinwheel_slider_curr['taxonomy_show'] != '' ) {
						$args .= '&show='.$pinwheel_slider_curr['taxonomy_show'];
					}		
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_taxonomy")){get_pinwheel_slider_taxonomy( "'.$args.'" );}?&gt;</code>';
				}
				elseif($pinwheel_slider_curr['preview'] == "8") {
					$args = '';
					if($cntr=='') $args .= 'set=1'; else $args .= 'set='.$cntr;
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$args .= '&offset='.$pinwheel_slider_curr['offset'];
					if(isset($pinwheel_slider_curr['rssfeed_id']) && $pinwheel_slider_curr['rssfeed_id'] != '' ) {
						$args .= '&id='.$pinwheel_slider_curr['rssfeed_id'];
					}
					if(isset($pinwheel_slider_curr['rssfeed_feed']) && $pinwheel_slider_curr['rssfeed_feed'] != '' ) {
						$args .= '&feed='.$pinwheel_slider_curr['rssfeed_feed'];	
					}
					if(isset($pinwheel_slider_curr['rssfeed_feedurl']) && $pinwheel_slider_curr['rssfeed_feedurl'] != '' ) {
						$args .= '&feedurl='.$pinwheel_slider_curr['rssfeed_feedurl'];	
					}
					if(isset($pinwheel_slider_curr['rssfeed_default_image']) && $pinwheel_slider_curr['rssfeed_default_image'] != '' ) {
						$args .= '&default_image='.$pinwheel_slider_curr['rssfeed_default_image'];	
					}
					if(isset($pinwheel_slider_curr['rssfeed_src']) && $pinwheel_slider_curr['rssfeed_src'] != '' ) {
						$args .= '&src='.$pinwheel_slider_curr['rssfeed_src'];	
					}
					if(isset($pinwheel_slider_curr['rssfeed_order']) && $pinwheel_slider_curr['rssfeed_order'] != '' ) {
						$args .= '&order='.$pinwheel_slider_curr['rssfeed_order'];	
					}
					if(isset($pinwheel_slider_curr['rssfeed_media']) && $pinwheel_slider_curr['rssfeed_media'] != '' ) {
						$args .= '&media='.$pinwheel_slider_curr['rssfeed_media'];
					}
					if(isset($pinwheel_slider_curr['rssfeed_content']) && $pinwheel_slider_curr['rssfeed_content'] != '' ) {
						$args .= '&content='.$pinwheel_slider_curr['rssfeed_content'];
					}
					if(isset($pinwheel_slider_curr['rssfeed_image_class']) && $pinwheel_slider_curr['rssfeed_image_class'] != '' ) {
						$args .= '&image_class='.$pinwheel_slider_curr['rssfeed_image_class'];
					}
					if(isset($pinwheel_slider_curr['rssfeed_size']) && $pinwheel_slider_curr['rssfeed_size'] != '' ) {
						$args .= '&size='.$pinwheel_slider_curr['rssfeed_size'];
					}
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_feed")){get_pinwheel_slider_feed( "'.$args.'" );}?&gt;</code>';

				}
				elseif($pinwheel_slider_curr['preview'] == "9") {
					$args = '';
					if($cntr=='') $args .= 'set=1'; else $args .= 'set='.$cntr;
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$args .= '&offset='.$pinwheel_slider_curr['offset'];
					if(isset($pinwheel_slider_curr['postattch_id'])  && $pinwheel_slider_curr['postattch_id'] != '' ) {
						$args .= '&id='.$pinwheel_slider_curr['postattch_id'];
					}
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_attachments")){get_pinwheel_slider_attachments( "'.$args.'" );}?&gt;</code>';
				}
				elseif($pinwheel_slider_curr['preview'] == "10") {
					$args = '';
					if($cntr=='') $args .= 'set=1'; else $args .= 'set='.$cntr;
					if (isset($pinwheel_slider_curr['offset']) && $pinwheel_slider_curr['offset'] != "0" && !empty($pinwheel_slider_curr['offset']) )
					$args .= '&offset='.$pinwheel_slider_curr['offset'];
					if(isset($pinwheel_slider_curr['nextgen_gallery_id'])) {
						$args .= '&gallery_id='.$pinwheel_slider_curr['nextgen_gallery_id'];	
					}
					if(isset($pinwheel_slider_curr['nextgen_anchor']) && !empty($pinwheel_slider_curr['nextgen_anchor']) ) {
						$args .= '&anchor='.$pinwheel_slider_curr['nextgen_anchor'];
					}
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_ngg")){get_pinwheel_slider_ngg( "'.$args.'" );}?&gt;</code>';	
				} else
					$template_tag = '<code>&lt;?php if(function_exists("get_pinwheel_slider_recent")){get_pinwheel_slider_recent('.$tset.$toffset.');}?&gt;</code>';
				$html .= $template_tag;
			$html .= '</div>
		</div>';
	} elseif($tab == 'basic') {
		$curr_ease = $pinwheel_slider_curr['easing'];
		$html .= '<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Basic Settings','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table">';
				if($pinwheel_slider_curr['stylesheet']!='default'){
				$html .= '<tr valign="top" class="pinwheel_sideslides">
						<th scope="row">'.__('No. of Side Slides Pair').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[sideslides]" 								id="pinwheel_slider_no_sideslides" class="small-text" value="'.$pinwheel_slider_curr['sideslides'].'"/></td>
						</tr>';
					}
				$html .= '<tr valign="top">
						<th scope="row">'.__('Slide Easing Effect','pinwheel-slider').'</th>
						<td><select name="'.$pinwheel_slider_options.'[easing]" >

						<option value="swing" '.selected("swing",$curr_ease,false).'>'.__('swing','pinwheel-slider').'</option>
						<option value="easeInQuad" '.selected("easeInQuad",$curr_ease,false).'>'.__('easeInQuad','pinwheel-slider').'</option>
						<option value="easeOutQuad" '.selected("easeOutQuad",$curr_ease,false).'>'.__('easeOutQuad','pinwheel-slider').'</option>
						<option value="easeInOutQuad" '.selected("easeInOutQuad",$curr_ease,false).'>'.__('easeInOutQuad','pinwheel-slider').'</option>
						<option value="easeInCubic" '.selected("easeInCubic",$curr_ease,false).'>'.__('easeInCubic','pinwheel-slider').'</option>
						<option value="easeOutCubic" '.selected("easeOutCubic",$curr_ease,false).'>'.__('easeOutCubic','pinwheel-slider').'</option>
						<option value="easeInOutCubic" '.selected("easeInOutCubic",$curr_ease,false).'>'.__('easeInOutCubic','pinwheel-slider').'</option>
						<option value="easeInQuart" '.selected("easeInQuart",$curr_ease,false).'>'.__('easeInQuart','pinwheel-slider').'</option>
						<option value="easeOutQuart" '.selected("easeOutQuart",$curr_ease,false).'>'.__('easeOutQuart','pinwheel-slider').'</option>				
						<option value="easeInOutQuart" '.selected("easeInOutQuart",$curr_ease,false).'>'.__('easeInOutQuart','pinwheel-slider').'</option>		
						<option value="easeInQuint" '.selected("easeInQuint",$curr_ease,false).'>'.__('easeInQuint','pinwheel-slider').'</option>		
						<option value="easeOutQuint" '.selected("easeOutQuint",$curr_ease,false).'>'.__('easeOutQuint','pinwheel-slider').'</option>		
						<option value="easeInOutQuint" '.selected("easeInOutQuint",$curr_ease,false).'>'.__('easeInOutQuint','pinwheel-slider').'</option>		
						<option value="easeInSine" '.selected("easeInSine",$curr_ease,false).'>'.__('easeInSine','pinwheel-slider').'</option>		
						<option value="easeOutSine" '.selected("easeOutSine",$curr_ease,false).'>'.__('easeOutSine','pinwheel-slider').'</option>		
						<option value="easeInOutSine" '.selected("easeInOutSine",$curr_ease,false).'>'.__('easeInOutSine','pinwheel-slider').'</option>		
						<option value="easeInExpo" '.selected("easeInExpo",$curr_ease,false).'>'.__('easeInExpo','pinwheel-slider').'</option>		
						<option value="easeOutExpo" '.selected("easeOutExpo",$curr_ease,false).'>'.__('easeOutExpo','pinwheel-slider').'</option>					
						<option value="easeInOutExpo" '.selected("easeInOutExpo",$curr_ease,false).'>'.__('easeInOutExpo','pinwheel-slider').'</option>					
						<option value="easeInCirc" '.selected("easeInCirc",$curr_ease,false).'>'.__('easeInCirc','pinwheel-slider').'</option>		
						<option value="easeOutCirc" '.selected("easeOutCirc",$curr_ease,false).'>'.__('easeOutCirc','pinwheel-slider').'</option>		
						<option value="easeInOutCirc" '.selected("easeInOutCirc",$curr_ease,false).'>'.__('easeInOutCirc','pinwheel-slider').'</option>		
						<option value="easeInElastic" '.selected("easeInElastic",$curr_ease,false).'>'.__('easeInElastic','pinwheel-slider').'</option>		
						<option value="easeOutElastic" '.selected("easeOutElastic",$curr_ease,false).'>'.__('easeOutElastic','pinwheel-slider').'</option>		
						<option value="easeInOutElastic" '.selected("easeInOutElastic",$curr_ease,false).'>'.__('easeInOutElastic','pinwheel-slider').'</option>	
						<option value="easeInBack" '.selected("easeInBack",$curr_ease,false).'>'.__('easeInBack','pinwheel-slider').'</option>	
						<option value="easeOutBack" '.selected("easeOutBack",$curr_ease,false).'>'.__('easeOutBack','pinwheel-slider').'</option>	
						<option value="easeInOutBack" '.selected("easeInOutBack",$curr_ease,false).'>'.__('easeInOutBack','pinwheel-slider').'</option>	
						<option value="easeInBounce" '.selected("easeInBounce",$curr_ease,false).'>'.__('easeInBounce','pinwheel-slider').'</option>	
						<option value="easeOutBounce" '.selected("easeOutBounce",$curr_ease,false).'>'.__('easeOutBounce','pinwheel-slider').'</option>	
						<option value="easeInOutBounce" '.selected("easeInOutBounce",$curr_ease,false).'>'.__('easeInOutBounce','pinwheel-slider').'</option>	
						</select>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Speed of Transition','pinwheel-slider').'</th>
						<td><input type="text" name="'. $pinwheel_slider_options.'[speed]" id="pinwheel_slider_speed" class="small-text havemoreinfo" value="'. $pinwheel_slider_curr['speed'].'" />
						<span class="moreInfo">
						<div class="tooltip1">
						'.__('The duration of Slide Animation in milliseconds. Lower value indicates fast animation. Enter numeric values like 10 or 11.','pinwheel-slider').'
						</div>
						</span>
						</td>
					</tr>
					<tr valign="top"> 
					<th scope="row">'.__('Auto-slide','pinwheel-slider').'</th> 
					<td>
					<div class="eb-switch eb-switchnone">
						<input type="hidden" id="pinwheel_slider_autoslide" name="'.$pinwheel_slider_options.'[autostep]" class="hidden_check" value="'.$pinwheel_slider_curr['autostep'].'">
						<input id="pinwheel_autoslidesett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['autostep'],false).' >
						<label for="pinwheel_autoslidesett"></label>
					</div>
					</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Time between Transitions','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[time]" id="pinwheel_slider_time" class="small-text havemoreinfo" value="'.$pinwheel_slider_curr['time'].'" />
						<span class="moreInfo">
						<div class="tooltip1">
						'.__('Valid only in case auto-sliding is enabled ; Lower value indicates Slides will Appear Faster. The slider will slide left if this value is negative i.e. say -4 or -5 and slides right if value is positive. If entered 0 slider will not slide.','pinwheel-slider').'
						</div>
						</span>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('No. of Posts','pinwheel-slider').'</th>
						<td>
							<input type="number" name="'.$pinwheel_slider_options.'[no_posts]" id="pinwheel_slider_no_posts" class="small-text" value="'.$pinwheel_slider_curr['no_posts'].'" min="1" />
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Width','pinwheel-slider').'</th>
						<td>
							<input type="number" name="'.$pinwheel_slider_options.'[width]" id="pinwheel_slider_width" class="small-text" value="'.$pinwheel_slider_curr['width'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Height','pinwheel-slider').'</th>
						<td><input type="number" name="'.$pinwheel_slider_options.'[height]" id="pinwheel_slider_height" class="small-text" value="'.$pinwheel_slider_curr['height'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
					</tr>
				</table>
				<p class="submit">
					<input type="submit" name="save_settings" class="button-primary" value="'.__('Save Changes','pinwheel-slider').'" />
					<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
				</p>
			</div>
			'.do_action('pinwheel_addon_settings',$cntr,$pinwheel_slider_options,$pinwheel_slider_curr);

	} elseif($tab == 'slides') {
		$default_pinwheel_slider_settings=get_pinwheel_slider_default_settings();
		$pinwheel_slider_curr['img_pick'][0]=(isset($pinwheel_slider_curr['img_pick'][0]))?$pinwheel_slider_curr['img_pick'][0]:'';
		$pinwheel_slider_curr['img_pick'][2]=(isset($pinwheel_slider_curr['img_pick'][2]))?$pinwheel_slider_curr['img_pick'][2]:'';
		$pinwheel_slider_curr['img_pick'][3]=(isset($pinwheel_slider_curr['img_pick'][3]))?$pinwheel_slider_curr['img_pick'][3]:'';
		$pinwheel_slider_curr['img_pick'][5]=(isset($pinwheel_slider_curr['img_pick'][5]))?$pinwheel_slider_curr['img_pick'][5]:'';
		$img_style = '';
		if(isset($cntr) and $cntr>0) $img_style = 'style="display:none;"';
		$curr_crop = $pinwheel_slider_curr['crop'];
		$curr_tele = $pinwheel_slider_curr['title_element'];
		$curr_stle = $pinwheel_slider_curr['title_from'];
		$focus_axis="display:none;";
		if($pinwheel_slider_curr['timthumb'] == 2)$focus_axis="display:table-row;";
		$html .= '<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Slide Image','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<p>'.__('Customize the looks of the big image in the slide for each of the sliding post here','pinwheel-slider').'</p> 
				<table class="form-table">
					<tr valign="top"> 
						<th scope="row">
							<span class="havemoreinfo">'.__('Image Source','pinwheel-slider').'</span> 
							<span class="moreInfo">
								<div class="tooltip1" style="display: none;">
									'.__('The first one is having priority over second, the second having priority on third and so on','pinwheel-slider').'
								</div>
							</span>
						</th> 
						<td>
							<fieldset>
								<div class="mdivsett">
									<div class="eb-switch eb-switchnone">
										<input type="hidden" name="'.$pinwheel_slider_options.'[img_pick][0]" class="hidden_check" value="'.$pinwheel_slider_curr['img_pick'][0].'">
										<input id="pinwheel_customfldchksett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['img_pick'][0],false).'>
										<label for="pinwheel_customfldchksett"></label>
									</div>';		
									if(!isset($cntr) or empty($cntr)){ 
										$html .= __('Custom field','pinwheel-slider'); 
									} else { 
										$html .= __('(Set custom field name on Default Settings)','pinwheel-slider'); }
									$html .= '<input type="text" name="'.$pinwheel_slider_options.'[img_pick][1]" class="settingsminput" value="'.$pinwheel_slider_curr['img_pick'][1].'" '.$img_style.' />
								</div>
								<div class="mdivsett">
									<div class="eb-switch eb-switchnone">
										<input type="hidden" name="'.$pinwheel_slider_options.'[img_pick][2]" class="hidden_check" value="'.$pinwheel_slider_curr['img_pick'][2].'">
										<input id="pinwheel_featuredimgchksett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['img_pick'][2],false).'>
										<label for="pinwheel_featuredimgchksett"></label>
									</div>
									<label>Featured Image</label>	
								</div>
								<div class="mdivsett">
									<div class="eb-switch eb-switchnone">
										<input type="hidden" name="'.$pinwheel_slider_options.'[img_pick][3]" class="hidden_check" value="'.$pinwheel_slider_curr['img_pick'][3].'">
										<input id="pinwheel_attachedimgchksett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['img_pick'][3],false).'>
										<label for="pinwheel_attachedimgchksett"></label>
									</div>
									<label>Attached image,order </label>
									<input type="text" name="'.$pinwheel_slider_options.'[img_pick][4]" class="small-text" value="'.$pinwheel_slider_curr['img_pick'][4].'" />	
								</div>

								<div class="mdivsett">
									<div class="eb-switch eb-switchnone">
										<input type="hidden" name="'.$pinwheel_slider_options.'[img_pick][5]" class="hidden_check" value="'.$pinwheel_slider_curr['img_pick'][5].'">
										<input id="pinwheel_scanimgchksett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['img_pick'][5],false).'>
										<label for="pinwheel_scanimgchksett"></label>
									</div>
									<label>Scan content</label>
								</div>
							</fieldset>
						</td> 
					</tr> 
					<tr valign="top">
						<th scope="row">'.__('Fetched Image size','pinwheel-slider').'</th>
						<td>';
							$sizename=$pinwheel_slider_options.'[crop]';
							$html .= pinwheel_get_image_sizes($sizename,$curr_crop).'
						</td>
					</tr>
					
					<tr valign="top"> 
						<th scope="row">'.__( 'Cropping','pinwheel-slider' ).'</th> 
						<td>
							<input type="radio" name="'.$pinwheel_slider_options.'[timthumb]" value="1" '.checked('1', $pinwheel_slider_curr['timthumb'],false).' class="pscrop" > '.__('OFF','pinwheel-slider').'
						</td>
					</tr>
					
					<tr valign="top"> 
						<th scope="row"></th> 
						<td>
							<input type="radio" name="'.$pinwheel_slider_options.'[timthumb]" value="0" '.checked('0', $pinwheel_slider_curr['timthumb'],false).' class="pscrop" >
							'.__('ON (Hard cropping using php)','pinwheel-slider').'
						</td>
					</tr>
					
					<tr valign="top"> 
						<th scope="row"></th> 
						<td>
							<input type="radio" name="'.$pinwheel_slider_options.'[timthumb]" value="2" '.checked('2', $pinwheel_slider_curr['timthumb'],false).' class="pscrop" >
							'.__('ON (Image Positioning using JS)','pinwheel-slider').'
						</td>
					</tr>
					
					<tr valign="top" class="focus_axis" style="'.$focus_axis.'">
						<th scope="row">'.__('Focus X','pinwheel-slider').'
							<span class="currx"> ( '. $pinwheel_slider_curr['focusx'] .' ) </span>
						</th>
						<td>
							<input type="range" name="'.$pinwheel_slider_options.'[focusx]" id="pinwheel_slider_focusx" value="'.$pinwheel_slider_curr['focusx'].'" min="-1" max="1" step="0.001" />
						</td>
					</tr>
					
					<tr valign="top" class="focus_axis" style="'.$focus_axis.'">
						<th scope="row">'.__('Focus Y','pinwheel-slider').'
						<span class="curry"> ( '. $pinwheel_slider_curr['focusx'] .' ) </span>
						</th>
						<td>
							<input type="range" name="'.$pinwheel_slider_options.'[focusy]" id="pinwheel_slider_focusy" value="'.$pinwheel_slider_curr['focusy'].'" min="-1" max="1" step="0.001" />
						</td>
					</tr>
						
					<tr valign="top">
						<th scope="row">'.__('Transition','pinwheel-slider').'</th>
						<td>';
						$img_tran_name = $pinwheel_slider_options.'[img_transition]';
						$html .= get_pinwheel_transitions($img_tran_name,$pinwheel_slider_curr['img_transition']).'
					</td>
					</tr>

					<tr valign="top">
						<th scope="row">'.__('Duration (seconds)','pinwheel-slider').'</th>
						<td>
							<input type="text" name="'. $pinwheel_slider_options.'[img_duration]" id="pinwheel_slider_img_duration" value="'. $pinwheel_slider_curr['img_duration'].'" />
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Delay time (seconds)','pinwheel-slider').'</th>
						<td>
							<input type="text" name="'. $pinwheel_slider_options.'[img_delay]" id="pinwheel_slider_img_delay" value="'. $pinwheel_slider_curr['img_delay'].'" />
						</td>
					</tr>

					<tr valign="top">
						<th scope="row">'.__('Pure Image Slider','pinwheel-slider').'</th>
						<td>
							<div class="eb-switch eb-switchnone havemoreinfo">
								<input type="hidden" name="'.$pinwheel_slider_options.'[image_only]" id="pinwheel_slider_image_only" class="hidden_check" value="'.$pinwheel_slider_curr['image_only'].'">
								<input id="pinwheel_imageonlysett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['image_only'],false).'>
								<label for="pinwheel_imageonlysett"></label>
							</div>
							<span class="moreInfo">
								<div class="tooltip1">
								'.__('check this to convert Pinwheel Slider to Image Slider with no content','pinwheel-slider').'
								</div>
							</span>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Image Title on Hover','pinwheel-slider').'</th>
						<td>
							<div class="eb-switch eb-switchnone havemoreinfo">
								<input type="hidden" name="'.$pinwheel_slider_options.'[image_title_text]" class="hidden_check" value="'.$pinwheel_slider_curr['image_title_text'].'">
								<input id="pinwheel_thoversett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['image_title_text'],false).'>
								<label for="pinwheel_thoversett"></label>
							</div>
							<span class="moreInfo">
								<div class="tooltip1">
								'.__('If enabled, whenever user hovers the Slide Image, the image title attribute will be displayed.','pinwheel-slider').'
								</div>
							</span>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Default Image','pinwheel-slider').'</th>
						<td>	
							<img id="default-img" src="'.$pinwheel_slider_curr['default_image'].'" width="80" height="70" style="float: left;" />
							<input type="submit" name="default-image-upload" class="pinwheel-upload-default" value="Upload" style="float: left;margin-left: -90px;margin-top: 75px;background: #dddddd;cursor:pointer;" >
							<input type="submit" name="default-image-reset" class="pinwheel-reset-default" value="Reset" style="background: #dddddd;float: left;margin-top: 75px;margin-left: -30px;cursor:pointer;" >
							<input type="hidden" id="default-image-url" value="'.$default_pinwheel_slider_settings['default_image'].'">
							<input type="hidden" name="'.$pinwheel_slider_options.'[default_image]" id="pinwheel_slider_default_image" class="regular-text code havemoreinfo" value="'.$pinwheel_slider_curr['default_image'].'" />

							<span class="moreInfo">
								<div class="tooltip1">
								'.__('Enter the url of the default image i.e. the image to be displayed if there is no image available for the slide. By default, the url is <br />','pinwheel-slider').'<span style="color:#0000ff;">'.$pinwheel_slider_curr['default_image'].'</span>'.'
								</div>
							</span>
						</td>
					</tr>
				</table>
				<p class="submit">
					<input type="submit" name="save_settings" class="button-primary" value="'.__('Save Changes','pinwheel-slider').'" />
					<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
				</p>
			</div> <!--#slides-->
			<div class="sub_settings_m toggle_settings">
				<h2 class="sub-heading">'.__('Slides Settings','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table settings-tbl">	
					<tr valign="top"> 
						<th scope="row">'.__('Center Slide Image Size','pinwheel-slider').'</th> 
						<td>
							<input type="number" name="'.$pinwheel_slider_options.'[img_width]" class="small-text" value="'.$pinwheel_slider_curr['img_width'].'" id="pinwheel_slider_img_width" min="1" />&nbsp;<strong>x</strong>&nbsp;<input type="number" name="'.$pinwheel_slider_options.'[img_height]" class="small-text" value="'.$pinwheel_slider_curr['img_height'].'" id="pinwheel_slider_img_height" min="1" />&nbsp;'.__('px','pinwheel-slider').'
						</td> 
					</tr>';

			if($pinwheel_slider_curr['stylesheet']=='default'){
				$html .= '<tr valign="top" class="smallsliderow"> 
					<th scope="row">'.__('Side (Small) Image Size','pinwheel-slider').'</th> 
					<td><fieldset><legend class="screen-reader-text"><span>'.__('Side (Small) Image Size','pinwheel-slider').'</span></legend> 
					<label for="'.$pinwheel_slider_options.'[sfw]">'.__('Width','pinwheel-slider').'</label>
					<input type="text" name="'. $pinwheel_slider_options.'[sfw]" id="small_width" class="small-text" value="'. $pinwheel_slider_curr['sfw'].'" />&nbsp;'.__('px','pinwheel-slider').' &nbsp;&nbsp; 
					<label for="'.$pinwheel_slider_options.'[sfh]">'.__('Height','pinwheel-slider').'</label>
					<input type="text" name="'. $pinwheel_slider_options.'[sfh]" id="small_height" class="small-text" value="'. $pinwheel_slider_curr['sfh'].'" />&nbsp;'.__('px','pinwheel-slider').' &nbsp;&nbsp; 
					</fieldset></td> 
				</tr>';
				}
				$html .= '<tr valign="top" class="smalltop">
					<th scope="row">'.__('Distance of Small Side Images from Top','pinwheel-slider').'</th>
					<td><input type="text" name="'. $pinwheel_slider_options.'[sf_top]" id="pinwheel_slider_sf_top" class="small-text" value="'. $pinwheel_slider_curr['sf_top'].'" />&nbsp;px
					<span class="moreInfo">
						&nbsp; <span class="trigger"> ? </span>
						<div class="tooltip">
						'.__('Top margin for the small feature images.','pinwheel-slider').'
						</div>
					</span>
					</td>
				</tr>';

				if($pinwheel_slider_curr['stylesheet']=='multi'){
				$html .= '<tr valign="top" class="sepaeration">
					<th scope="row">'.__('Side Slides (images) Visible Width','pinwheel-slider').'</th>
					<td><input type="text" name="'. $pinwheel_slider_options.'[separation]" id="pinwheel_slider_slide_separation" class="small-text havemoreinfo" value="'. $pinwheel_slider_curr['separation'].'" />&nbsp;'.__('px','pinwheel-slider').'
					<span class="moreInfo">
					<div class="tooltip1">
						'.__('Make the width of visible area of side slides in left and right by this size','pinwheel-slider').'
					</div>
					</span>
					</td>
				</tr>';
				}
				$html .= '<tr valign="top" class="sizemultiplier">
					<th scope="row">'.__('Make Side Slides Smaller by','pinwheel-slider').'</th>
					<td><input type="text" name="'. $pinwheel_slider_options.'[sizemultiplier]" id="pinwheel_slider_sideslide_sizemultiplier" class="small-text havemoreinfo" value="'. $pinwheel_slider_curr['sizemultiplier'].'" />&nbsp;'.__('px','pinwheel-slider').'
					<span class="moreInfo">
					<div class="tooltip1">
						'.__('Make the side slides smaller by this factor','pinwheel-slider').'
					</div>
					</span>
					</td>
				</tr>
				<tr valign="top">
					<th scope="row">'. __('Center (Large) Slide Background Color','pinwheel-slider').'</th>
					<td>
					<input type="text" name="'. $pinwheel_slider_options.'[bg_color]" id="pinwheel_slider_bg_color" value="'. $pinwheel_slider_curr['bg_color'].'" class="wp-color-picker-field" data-default-color="#eeeced" /><br /> 

					<div class="eb-switch eb-switchnone">
						<input type="hidden" name="'. $pinwheel_slider_options.'[bg]" id="pinwheel_slider_bg" class="hidden_check" value="'. $pinwheel_slider_curr['bg'].'">
						<input id="pinwheel_bgsett" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['bg'],false).'>
						<label for="pinwheel_bgsett"></label>
					</div>'. __(' Use Transparent Background','pinwheel-slider').'

				</tr>
					<tr valign="top">
					<th scope="row">'.__('Slide Border Thickness','pinwheel-slider').'</th>
					<td><input type="number" name="'. $pinwheel_slider_options.'[border]" id="pinwheel_slider_border" class="small-text" value="'. $pinwheel_slider_curr['border'].'" min="0" />&nbsp;'.__('px (put 0 if no border is required)','pinwheel-slider').'</td>
				</tr>

					<tr valign="top">
					<th scope="row">'.__('Slide Border Color','pinwheel-slider').'</th>
					<td><input type="text" name="'. $pinwheel_slider_options.'[brcolor]" id="pinwheel_slider_brcolor" value="'. $pinwheel_slider_curr['brcolor'].'" class="wp-color-picker-field" data-default-color="#cccccc" /></td>
				</tr>
					
				<tr valign="top">
					<th scope="row">'.__('Padding between Slide Border and the Slide','pinwheel-slider').'</th>
					<td><input type="number" name="'. $pinwheel_slider_options.'[padding]" id="pinwheel_slider_padding" class="small-text havemoreinfo" value="'. $pinwheel_slider_curr['padding'].'" min="0" />&nbsp;px
					<span class="moreInfo">
					<div class="tooltip1">
						'.__('Put 0 if no padding is required','pinwheel-slider').'
					</div>
					</span>
					</td>
					</tr>
					<tr valign="top"> 
					<th scope="row">'.__('Overlay Text on Center (Large) Slide','pinwheel-slider').'</th> 
					<td> 
						<div class="eb-switchnone">
							<input type="hidden" name="'. $pinwheel_slider_options.'[overlay_text]" id="pinwheel_slider_overlay_text" class="hidden_check" value="'. $pinwheel_slider_curr['overlay_text'].'">
							<input id="pinwheel_overlaytext" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['overlay_text'],false).'>
							<label for="pinwheel_overlaytext"></label>
						</div>
					</td>
					</tr>

					<tr valign="top">
					<th scope="row">'.__('Center (Large) Slide Text Background Color','pinwheel-slider').'</th>
					<td><input type="text" name="'. $pinwheel_slider_options.'[tbgc]" id="pinwheel_slider_tbgc" value="'. $pinwheel_slider_curr['tbgc'].'" class="wp-color-picker-field" data-default-color="#000000" /><br />

					<div class="eb-switch eb-switchnone">
						<input type="hidden" name="'. $pinwheel_slider_options.'[text_bg]" id="pinwheel_slider_text_bg" class="hidden_check" value="'. $pinwheel_slider_curr['text_bg'].'">
						<input id="pinwheel_textbg" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['text_bg'],false).'>
						<label for="pinwheel_textbg"></label>
					</div>'.__(' Use Transparent Background','pinwheel-slider').'
					</tr>

					<tr valign="top">
					<th scope="row">'.__('Center (Large) Slide Text Background Opacity','pinwheel-slider').'</th>
					<td><input type="text" name="'. $pinwheel_slider_options.'[text_opacity]" id="pinwheel_slider_text_opacity" class="small-text havemoreinfo" value="'. $pinwheel_slider_curr['text_opacity'].'" />

					<span class="moreInfo">
					<div class="tooltip1">
							'.__('Enter value between 0 and 1, both inclusive ( e.g. 0.8 )','pinwheel-slider').'
					</div>
					</span>
					</td>
				</tr>	
						
						
						
					</table>
					<p class="submit">
						<input type="submit" name="save_settings" class="button-primary" value="'.__('Save Changes','pinwheel-slider') .'" />
						<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
					</p>
			</div>
			<div class="sub_settings_m toggle_settings">
				<h2 class="sub-heading">'.__('Slider Title','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<p>'.__('Customize the looks of the title of each of the sliding post here','pinwheel-slider').'</p> 
				<table class="form-table settings-tbl">
					<tr valign="top">
						<th scope="row">'.__('Default Title Text','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[title_text]" id="pinwheel_slider_title_text" value="'.$pinwheel_slider_curr['title_text'].'" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Pick Slider Title From','pinwheel-slider').'</th>
						<td><select name="'.$pinwheel_slider_options.'[title_from]" >
						<option value="0" '.selected("Default Title Text",$curr_stle,false).' >'.__('Default Title Text','pinwheel-slider').'</option>
						<option value="1" '.selected("Slider Name",$curr_stle,false).' >'.__('Slider Name','pinwheel-slider').'</option>
						
						</select>
						</td>
					</tr>
					<!-- code for new fonts -->
					<tr valign="top">
						<th scope="row">'.__('Font Type','pinwheel-slider').'</th>
						<td>
							<input type="hidden" value="title_font" class="ftype_rname">
							<input type="hidden" value="title_fontg" class="ftype_gname">
							<input type="hidden" value="stfont_custom" class="ftype_cname">
							<select name="'.$pinwheel_slider_options.'[st_font]" id="pinwheel_slider_st_font" class="main-font">
								<option value="regular" '.selected( $pinwheel_slider_curr['st_font'], "regular",false ).' > Regular Fonts </option>
								<option value="google" '.selected( $pinwheel_slider_curr['st_font'], "google",false ).' > Google Fonts </option>
								<option value="custom" '.selected( $pinwheel_slider_curr['st_font'], "custom",false ).' > Custom Fonts </option>
							</select>
						</td>
					</tr>
					<tr><td class="load-fontdiv" colspan="2"></td></tr>
						<!-- code for new fonts -->
						<tr valign="top">
							<th scope="row">'.__('Font Color','pinwheel-slider').'</th>
							<td><input type="text" name="'.$pinwheel_slider_options.'[title_fcolor]" id="pinwheel_slider_title_fcolor" value="'.$pinwheel_slider_curr['title_fcolor'].'" class="wp-color-picker-field" data-default-color="#ffffff" /></td>
						</tr>
						<tr valign="top">
						<th scope="row">'.__('Font Size','pinwheel-slider').'</th>
						<td><input type="number" name="'.$pinwheel_slider_options.'[title_fsize]" id="pinwheel_slider_title_fsize" class="small-text" value="'.$pinwheel_slider_curr['title_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
						</tr>
						<tr valign="top" class="font-style">
							<th scope="row">'.__('Font Style','pinwheel-slider').'</th>
							<td><select name="'.$pinwheel_slider_options.'[title_fstyle]" id="pinwheel_slider_title_fstyle" >
								<option value="bold" '.selected("bold",$pinwheel_slider_curr['title_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
								<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['title_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
								<option value="italic" '.selected("italic",$pinwheel_slider_curr['title_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
								<option value="normal" '.selected("normal",$pinwheel_slider_curr['title_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
								</select>
							</td>
						</tr>	
						
					</table>
					<p class="submit">
						<input type="submit" name="save_settings" class="button-primary" value="'.__('Save Changes','pinwheel-slider') .'" />
						<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
					</p>
			</div>
			<div class="sub_settings_m toggle_settings">
				<h2 class="sub-heading">'.__('Post Title','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<p>'.__('Customize the looks of the title of each of the sliding post here','pinwheel-slider').'</p> 
				<table class="form-table settings-tbl">
				
					<tr valign="top"> 
					<th scope="row">'.__( 'Post Title','pinwheel-slider' ).'</th> 
					<td>
						<div class="eb-switch eb-switchnone">
							<input type="hidden" name="'.$pinwheel_slider_options.'[show_ptitle]" id="pinwheel_slider_show_ptitle" class="hidden_check" value="'.$pinwheel_slider_curr['show_ptitle'].'">
							<input id="pinwheel_showptitle" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['show_ptitle'],false).'>
							<label for="pinwheel_showptitle"></label>
						</div>
					</td>
					</tr>

					<!-- code for new fonts -->
					<tr valign="top">
						<th scope="row">'.__('Font Type','pinwheel-slider').'</th>
						<td>
							<input type="hidden" value="ptitle_font" class="ftype_rname">
							<input type="hidden" value="ptitle_fontg" class="ftype_gname">
							<input type="hidden" value="ptfont_custom" class="ftype_cname">
							<select name="'.$pinwheel_slider_options.'[pt_font]" id="pinwheel_slider_pt_font" class="main-font">
								<option value="regular" '.selected( $pinwheel_slider_curr['pt_font'], "regular",false ).' > Regular Fonts </option>
								<option value="google" '.selected( $pinwheel_slider_curr['pt_font'], "google",false ).' > Google Fonts </option>
								<option value="custom" '.selected( $pinwheel_slider_curr['pt_font'], "custom",false ).' > Custom Fonts </option>
							</select>
						</td>
					</tr>
					<tr><td class="load-fontdiv" colspan="2"></td></tr>
						<!-- code for new fonts -->
						<tr valign="top">
							<th scope="row">'.__('Font Color','pinwheel-slider').'</th>
							<td><input type="text" name="'.$pinwheel_slider_options.'[ptitle_fcolor]" id="pinwheel_slider_ptitle_fcolor" value="'.$pinwheel_slider_curr['ptitle_fcolor'].'" class="wp-color-picker-field" data-default-color="#ffffff" /></td>
						</tr>
						<tr valign="top">
						<th scope="row">'.__('Font Size','pinwheel-slider').'</th>
						<td><input type="number" name="'.$pinwheel_slider_options.'[ptitle_fsize]" id="pinwheel_slider_ptitle_fsize" class="small-text" value="'.$pinwheel_slider_curr['ptitle_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
						</tr>
						<tr valign="top" class="font-style">
							<th scope="row">'.__('Font Style','pinwheel-slider').'</th>
							<td><select name="'.$pinwheel_slider_options.'[ptitle_fstyle]" id="pinwheel_slider_ptitle_fstyle" >
								<option value="bold" '.selected("bold",$pinwheel_slider_curr['ptitle_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
								<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['ptitle_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
								<option value="italic" '.selected("italic",$pinwheel_slider_curr['ptitle_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
								<option value="normal" '.selected("normal",$pinwheel_slider_curr['ptitle_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
								</select>
							</td>
						</tr>

						<tr valign="top">
							<th scope="row">'.__('HTML element','pinwheel-slider').'
							</th>
							<td><select name="'.$pinwheel_slider_options.'[title_element]" >
								<option value="1" '.selected("1",$curr_tele,false).' >h1</option>
								<option value="2" '.selected("2",$curr_tele,false).' >h2</option>
								<option value="3" '.selected("3",$curr_tele,false).' >h3</option>
								<option value="4" '.selected("4",$curr_tele,false).' >h4</option>
								<option value="5" '.selected("5",$curr_tele,false).' >h5</option>
								<option value="6" '.selected("6",$curr_tele,false).' >h6</option>
								</select>
							</td>
						</tr>
						<tr valign="top">
							<th scope="row">'.__('Transition','pinwheel-slider').'</th>
							<td>';
								$tital_tran_name = $pinwheel_slider_options.'[ptitle_transition]';
								$html .= get_pinwheel_transitions($tital_tran_name,$pinwheel_slider_curr['ptitle_transition']).'
							</td>
						</tr>
						<tr valign="top">
							<th scope="row">'.__('Duration (seconds)','pinwheel-slider').'</th>
							<td>
								<input type="text" name="'.$pinwheel_slider_options.'[ptitle_duration]" id="pinwheel_slider_ptitle_duration"  value="'.$pinwheel_slider_curr['ptitle_duration'].'" />
							</td>
						</tr>
						<tr valign="top">
							<th scope="row">'.__('Delay time (seconds)','pinwheel-slider').'</th>
							<td>
								<input type="text" name="'.$pinwheel_slider_options.'[ptitle_delay]" id="pinwheel_slider_ptitle_delay"  value="'.$pinwheel_slider_curr['ptitle_delay'].'" />
							</td>
						</tr>
					</table>
					<p class="submit">
						<input type="submit" name="save_settings" class="button-primary" value="'.__('Save Changes','pinwheel-slider') .'" />
						<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
					</p>
			</div>
			<div id="postcontent" class="sub_settings_m toggle_settings">
				<h2 class="sub-heading">'.__('Post Content','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<p>'.__('Customize the looks of the content of each of the sliding post here','pinwheel-slider').'</p> 
				<table class="form-table settings-tbl">
					<tr valign="top"> 
						<th scope="row">'.__('Content','pinwheel-slider').'</th> 
						<td>
							<div class="eb-switchnone">
								<input type="hidden" name="'.$pinwheel_slider_options.'[show_content]" id="pinwheel_slider_show_content" class="hidden_check" value="'.$pinwheel_slider_curr['show_content'].'">
								<input id="pinwheel_showcontentsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['show_content'],false).'>
								<label for="pinwheel_showcontentsett"></label>
							</div>
						</td>
					</tr>
		
					<tr valign="top">
						<th scope="row">'.__('Minimize Content on Load','pinwheel-slider').'</th>
						<td>
						<div class="eb-switchnone">
						<input type="hidden" name="'.$pinwheel_slider_options.'[minimize_content]" id="pinwheel_slider_show_contenthide" class="hidden_check" value="'.$pinwheel_slider_curr['minimize_content'].'">
						<input id="pinwheel_showcontenthide" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['minimize_content'],false).'>
						<label for="pinwheel_showcontenthide"></label>
						</div>
						</td>
					</tr>

					<tr valign="top">
						<th scope="row">'.__('Font Type','pinwheel-slider').'</th>
						<td>
							<input type="hidden" value="content_font" class="ftype_rname">
							<input type="hidden" value="content_fontg" class="ftype_gname">
							<input type="hidden" value="pcfont_custom" class="ftype_cname">
							<select name="'.$pinwheel_slider_options.'[pc_font]" id="pinwheel_slider_pc_font" class="main-font">
								<option value="regular" '.selected( $pinwheel_slider_curr['pc_font'], "regular",false ).' > Regular Fonts </option>
								<option value="google" '.selected( $pinwheel_slider_curr['pc_font'], "google",false ).' > Google Fonts </option>
								<option value="custom" '.selected( $pinwheel_slider_curr['pc_font'], "custom",false ).' > Custom Fonts </option>
							</select>
						</td>
					</tr>
					<tr><td class="load-fontdiv" colspan="2"></td></tr>
					<tr valign="top">
						<th scope="row">'.__('Font Color','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[content_fcolor]" id="pinwheel_slider_content_fcolor" value="'.$pinwheel_slider_curr['content_fcolor'].'" class="wp-color-picker-field" data-default-color="#ffffff" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Font Size','pinwheel-slider').'</th>
						<td><input type="number" name="'.$pinwheel_slider_options.'[content_fsize]" id="pinwheel_slider_content_fsize" class="small-text" value="'.$pinwheel_slider_curr['content_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
					</tr>
					<tr valign="top" class="font-style">
						<th scope="row">'.__('Font Style','pinwheel-slider').'</th>
						<td>
							<select name="'.$pinwheel_slider_options.'[content_fstyle]" id="pinwheel_slider_content_fstyle" >
								<option value="bold" '.selected("bold",$pinwheel_slider_curr['content_fstyle'],false).' >'.__('Bold','pinwheel-slider').'</option>
								<option value="bold italic" '.selected("bold",$pinwheel_slider_curr['content_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
								<option value="italic" '.selected("bold",$pinwheel_slider_curr['content_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
								<option value="normal" '.selected("bold",$pinwheel_slider_curr['content_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
							</select>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Source','pinwheel-slider').'</th>
						<td><select name="'.$pinwheel_slider_options.'[content_from]" id="pinwheel_slider_content_from" >
							<option value="slider_content" '.selected("slider_content",$pinwheel_slider_curr['content_from'],false).' >'.__('Slider Content Custom field','pinwheel-slider').'</option>
							<option value="excerpt" '.selected("excerpt",$pinwheel_slider_curr['content_from'],false).' >'.__('Post Excerpt','pinwheel-slider').'</option>
							<option value="content" '.selected("content",$pinwheel_slider_curr['content_from'],false).' >'.__('From Content','pinwheel-slider').'</option>
							</select>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Length','pinwheel-slider').'</th>
						<td>
							<div>
							<input id="pinwheel_slider_climit" name="'.$pinwheel_slider_options.'[climit]" type="radio" value="0" '.checked('0', $pinwheel_slider_curr['climit'],false).'  />
							<label class="eb-mlabel">'.__(' words','pinwheel-slider').'</label>
							<input type="number" name="'.$pinwheel_slider_options.'[content_limit]" id="pinwheel_slider_content_limit" class="small-text" value="'.$pinwheel_slider_curr['content_limit'].'" min="1" />
							</div>
							<div class="eb-margindiv">
							<input id="pinwheel_slider_climit" name="'.$pinwheel_slider_options.'[climit]" type="radio" value="1" '.checked('1', $pinwheel_slider_curr['climit'],false).'  />
							<label class="eb-mlabel">'.__(' Characters','pinwheel-slider').'</label>
							<input type="number" name="'.$pinwheel_slider_options.'[content_chars]" id="pinwheel_slider_content_chars" class="small-text" value="'.$pinwheel_slider_curr['content_chars'].'" min="1"/>
							</div>
						</td>	
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Transition','pinwheel-slider').'</th>
						<td>';
							$content_tran_name = $pinwheel_slider_options.'[content_transition]';
							$html .= get_pinwheel_transitions($content_tran_name,$pinwheel_slider_curr['content_transition']).'
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Duration (seconds)','pinwheel-slider').'</th>
						<td>
							<input type="text" name="'.$pinwheel_slider_options.'[content_duration]" id="pinwheel_slider_content_duration" value="'.$pinwheel_slider_curr['content_duration'].'" />
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Delay time (seconds)','pinwheel-slider').'</th>
						<td>
							<input type="text" name="'.$pinwheel_slider_options.'[content_delay]" id="pinwheel_slider_content_delay"  value="'.$pinwheel_slider_curr['content_delay'].'" />
						</td>
					</tr>
				</table>
			</div>';
	} elseif($tab == 'navarrow') {
		$html .= '<div class="sub_settings toggle_settings">
				<h2 class="sub-heading" id="navarrows_exmin">'.__('Navigational Arrows','pinwheel-slider').'<img src="'. pinwheel_slider_plugin_url( 'images/close.png' ).'" id="minmax_img" class="toggle_img"></h2> 
				<table class="form-table">
					<tr valign="top">
						<th scope="row">'.__('Disable Arrows','pinwheel-slider').'</th>
						<td>
							<div class="eb-switchnone">
								<input type="hidden" name="'. $pinwheel_slider_options.'[prev_next]" id="pinwheel_slider_enable_arrow" class="hidden_check" value="'. $pinwheel_slider_curr['prev_next'].'">
								<input id="pinwheel_enablearrowsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['prev_next'],false).'>
								<label for="pinwheel_enablearrowsett"></label>
							</div>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Select Navigation Arrow','pinwheel-slider').'</th>
						<td style="background: #ccc;">';
							$directory = PINWHEEL_SLIDER_CSS_OUTER.'/buttons/';
							if ($handle = opendir($directory)) {
							    while (false !== ($file = readdir($handle))) { 
							     if($file != '.' and $file != '..') { 
							     $nexturl='css/buttons/'.$file.'/next.png';
								$html .= '<div class="arrows"><img src="'. pinwheel_slider_plugin_url($nexturl).'" width="32" height="32"/>
								<input name="'. $pinwheel_slider_options.'[buttons]" type="radio" id="pinwheel_slider_buttons" class="arrows_input" value="'. $file.'" '.checked($file,$pinwheel_slider_curr['buttons'],false).' /></div>';
							 } }
							    closedir($handle);
							}
							$html .= '<div class="svilla_cl"></div>
						</td>
					</tr>

					<tr valign="top">
						<th scope="row">'.__('Size' ,'pinwheel-slider').'</th>
						<td><input type="number" name="'. $pinwheel_slider_options.'[navimg_w]" id="pinwheel_slider_nav_w" class="small-text" value="'. $pinwheel_slider_curr['navimg_w'].'" min="1" />&nbsp;<strong> x </strong>&nbsp; <input type="number" name="'. $pinwheel_slider_options.'[navimg_ht]" id="pinwheel_slider_nav_h" class="small-text" value="'. $pinwheel_slider_curr['navimg_ht'].'" min="1" />&nbsp;px</td>
					</tr>

					<tr valign="top">
						<th scope="row">'.__('Previous Navigation Button Distance from ','pinwheel-slider').'<small>'.__(' (it is in percentage)','pinwheel-slider').'</small></th>
						<td><fieldset><legend class="screen-reader-text"><span>'.__('Previous Navigation Button Distance from','pinwheel-slider').'</span></legend> 
						<label for="'.$pinwheel_slider_options.'[pnavtop]">'.__('Top','pinwheel-slider').'</label>
						<input type="text" name="'.$pinwheel_slider_options.'[pnavtop]" class="small-text" value="'.$pinwheel_slider_curr['pnavtop'].'" />&nbsp;'.__('%','pinwheel-slider').' &nbsp;&nbsp; 
						<label for="'.$pinwheel_slider_options.'[pnavleft]">'.__('Left','pinwheel-slider').'</label>
						<input type="text" name="'.$pinwheel_slider_options.'[pnavleft]" class="small-text" value="'.$pinwheel_slider_curr['pnavleft'].'" />&nbsp;'.__('%','pinwheel-slider').' &nbsp;&nbsp; 
						</fieldset></td>
					</tr>

					<tr valign="top">
						<th scope="row">'.__('Next Navigation Button Distance from ','pinwheel-slider').'<small>'.__(' (it is in percentage)','pinwheel-slider').'</small></th>
						<td><fieldset><legend class="screen-reader-text"><span>'.__('Next Navigation Button Distance from','pinwheel-slider').'</span></legend> 
						<label for="'.$pinwheel_slider_options.'[nnavtop]">'.__('Top','pinwheel-slider').'</label>
						<input type="text" name="'.$pinwheel_slider_options.'[nnavtop]" class="small-text" value="'.$pinwheel_slider_curr['nnavtop'].'" />&nbsp;'.__('%','pinwheel-slider').' &nbsp;&nbsp; 
						<label for="'.$pinwheel_slider_options.'[nnavright]">'.__('Right','pinwheel-slider').'</label>
						<input type="text" name="'.$pinwheel_slider_options.'[nnavright]" class="small-text" value="'. $pinwheel_slider_curr['nnavright'].'" />&nbsp;'.__('%','pinwheel-slider').' &nbsp;&nbsp; 
						</fieldset></td>
					</tr>
				</table>
				<p class="submit">
					<input type="submit" name="save_settings" class="button-primary" value="'.__('Save Changes','pinwheel-slider') .'" />
					<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
				</p>
			</div>
			<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Navigation Panel','pinwheel-slider').'<img src="'. pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table">
					<tr valign="top">
						<th scope="row">'.__('Show Navigation Numbers','pinwheel-slider').'</th>
						<td><select name="'.$pinwheel_slider_options.'[navnum]" >
						<option value="0" '.selected("0",$pinwheel_slider_curr['navnum'],false).' >'.__('No','pinwheel-slider').'</option>
						<option value="1" '.selected("1",$pinwheel_slider_curr['navnum'],false).' >'.__('Yes','pinwheel-slider').'</option>
						</select>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Show Slider Position Numbers e.g (2 of 10)','pinwheel-slider').'</th>
						<td><select name="'.$pinwheel_slider_options.'[navsum]" >
						<option value="0" '.selected("0",$pinwheel_slider_curr['navsum'],false).' >'.__('No','pinwheel-slider').'</option>
						<option value="1" '.selected("1",$pinwheel_slider_curr['navsum'],false).' >'.__('Yes','pinwheel-slider').'</option>
						</select>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Enter Custom CSS for Navigation','pinwheel-slider').'</th>
						<td><textarea name="'.$pinwheel_slider_options.'[navcss]"  rows="8" cols="50" class="regular-text code">'.$pinwheel_slider_curr['navcss'].'</textarea><small>'.__('(custom css styles that you would want to be applied to the navigation elements)','pinwheel-slider').'</small></td>
</tr>

					<tr valign="top">
						<th scope="row">'.__('Enter CSS as follows:-','pinwheel-slider').'</th>
						<td style="font-family:Courier, "Courier New", monospace;background:#ccc"><code>
						.pinwheel_slider .tracker-summation-container {bottom:0px;right:5px;background:#777;font-family:Verdana,Geneva,sans-serif;color:#fff;} /* For Slider Position Numbers*/ <br />
						.pinwheel_slider .tracker-individual-container {bottom:0px;right:0px;}/* For Navigation Number Container*/ <br />
						.pinwheel_slider .tracker-individual-container .tracker-individual-blip{background:#777;font-family:Verdana,Geneva,sans-serif;color:#fff;} /* For Individual Navigation Numbers*/ <br />
						.pinwheel_slider .tracker-individual-container .tracker-individual-blip-selected{background:#222;color:#fff;font-weight:bold;} /* For Navigation Number of Active Slide*/
						</code>
						</td>
					</tr>

				</table>
				<p class="submit">
					<input type="submit" name="save_settings" class="button-primary" value="'.__('Save Changes','pinwheel-slider').'" />
					<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
				</p>
			</div>';
					
	} elseif($tab == 'miscellaneous') {
		$html .= '<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Miscellaneous','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table">
					<tr valign="top">
						<th scope="row">'.__('Retain tags','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[allowable_tags]" id="pinwheel_slider_allowable_tags" class="regular-text code" value="'.$pinwheel_slider_curr['allowable_tags'].'" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Link attributes  ','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[a_attr]" id="pinwheel_slider_a_attr" class="regular-text code havemoreinfo" value="'.htmlentities( $pinwheel_slider_curr['a_attr'] , ENT_QUOTES).'" />
						<span class="moreInfo">
							<div class="tooltip1">
							'.__('eg. target="_blank" rel="external nofollow"','pinwheel-slider').'
							</div>
						</span>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Lightbox Effect','pinwheel-slider').'</th>
						<td>
						<div class="eb-switch eb-switchnone havemoreinfo">
							<input type="hidden" name="'.$pinwheel_slider_options.'[pphoto]" class="pinwheel_slider_pphoto hidden_check" value="'.$pinwheel_slider_curr['pphoto'].'">
							<input id="pinwheel_pphotosett" class="cmn-toggle eb-toggle-round pinwheel_pphoto" type="checkbox" '.checked('1', $pinwheel_slider_curr['pphoto'],false).'>
							<label for="pinwheel_pphotosett"></label>
						</div>

						<span class="moreInfo">
							<div class="tooltip1">
							'.__('If checked, when user clicks the slide image, it will appear in a modal lightbox','pinwheel-slider').'
							</div>
						</span>
						</td>
					</tr>';
					if($pinwheel_slider_curr['pphoto'] == 1 ) $lbox_style = 'display:table-row';
					else $lbox_style = 'display:none';
					$html .= '<tr valign="top" class="pinwheel_slider_lbox_type" style="'.$lbox_style.'" >
						<th scope="row"  >'.__('Select LightBox','pinwheel-slider').'</th>
						<td>

						<select name="'.$pinwheel_slider_options.'[lbox_type]" >
							<option value="pphoto_box" '.selected("pphoto_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('PrettyPhoto','pinwheel-slider').'</option>
							<option value="nivo_box" '.selected("nivo_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('Nivo box','pinwheel-slider').'</option>
							<option value="photo_box" '.selected("photo_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('Photo box','pinwheel-slider').'</option>
							<option value="smooth_box" '.selected("smooth_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('Smooth box','pinwheel-slider').'</option>
							<option value="swipe_box" '.selected("swipe_box",$pinwheel_slider_curr['lbox_type'],false).' >'.__('Swipe box','pinwheel-slider').'</option>
						</select>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Custom Fields','pinwheel-slider').'</th>
						<td><textarea name="'.$pinwheel_slider_options.'[fields]"  id="pinwheel_slider_fields" rows="2" class="regular-text code havemoreinfo">'.$pinwheel_slider_curr['fields'].'</textarea>
						<span class="moreInfo">
							<div class="tooltip1">
							'.__('Separate different fields using commas eg. description,customfield2','pinwheel-slider').'
							</div>
						</span>
						</td>
					</tr>
			
					<tr valign="top">
						<th scope="row">'.__('Continue Reading Text','pinwheel-slider').'</th>
						<td>
						<input type="text" name="'.$pinwheel_slider_options.'[more]" id="pinwheel_slider_more" class="regular-text" value="'.$pinwheel_slider_curr['more'].'" />
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Disable "on resize event"','pinwheel-slider').'</th>
						<td>
							<div class="eb-switchnone">
								<input type="hidden" name="'.$pinwheel_slider_options.'[disableresize]" id="pinwheel_slider_disable_resize" class="hidden_check" value="'.$pinwheel_slider_curr['disableresize'].'">
								<input id="pinwheel_disableresize" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['disableresize'],false).'>
								<label for="pinwheel_disableresize"></label>
							</div>
						</td>
						</tr>
					<tr valign="top">
						<th scope="row">'.__('Randomize Slides','pinwheel-slider').'</th>
						<td>
						<div class="eb-switch eb-switchnone havemoreinfo">
							<input type="hidden" name="'.$pinwheel_slider_options.'[rand]" id="pinwheel_slider_rand" class="hidden_check" value="'.$pinwheel_slider_curr['rand'].'">
							<input id="pinwheel_randsett" class="cmn-toggle eb-toggle-round" type="checkbox" '. checked('1', $pinwheel_slider_curr['rand'],false).'>
							<label for="pinwheel_randsett"></label>
						</div>
						<span class="moreInfo">
							<div class="tooltip1">
							'.__('check this if you want the slides added to appear in random order.','pinwheel-slider').'
							</div>
						</span>
						</td>
					</tr>
					
					<tr valign="top">
					<th scope="row">'.__('Do not link slide to any url','pinwheel-slider').'</th>
					<td>
						<div class="eb-switch eb-switchnone">
							<input type="hidden" name="'.$pinwheel_slider_options.'[donotlink]" id="pinwheel_slider_donotlink" class="hidden_check" value="'.$pinwheel_slider_curr['donotlink'].'">
							<input id="pinwheel_donotlinksett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['donotlink'],false).' >
							<label for="pinwheel_donotlinksett"></label>
						</div>
					</td>
					</tr>
					
					<tr valign="top">
						<th scope="row">'.__('Disable Slider on Mobiles and Tablets','pinwheel-slider').'</th> 
						<td>
						<div class="eb-switch eb-switchnone">
							<input type="hidden" name="'.$pinwheel_slider_options.'[disable_mobile]" id="pinwheel_slider_disable_mobile" class="hidden_check" value="'.$pinwheel_slider_curr['disable_mobile'].'">
							<input id="pinwheel_disable_mobile" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['disable_mobile'],false).'>
							<label for="pinwheel_disable_mobile"></label>
						</div>
						</td>
				 	</tr>
		
					<tr valign="top">
						<th scope="row">'.__('Enable FOUC','pinwheel-slider').'</th>
						<td>
						<div class="eb-switch eb-switchnone havemoreinfo">
							<input type="hidden" name="'.$pinwheel_slider_options.'[fouc]" id="pinwheel_slider_fouc" class="hidden_check" value="'.$pinwheel_slider_curr['fouc'].'">
							<input id="pinwheel_foucsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['fouc'],false).'>
							<label for="pinwheel_foucsett"></label>
						</div>
						<span class="moreInfo">
							<div class="tooltip1">
							'.__('check this if you would not want to disable Flash of Unstyled Content in the slider when the page is loaded.','pinwheel-slider').'
							</div>
						</span>
						</td>
					</tr>

					<tr valign="top">
						<th scope="row">'.__('Enable Generated CSS','pinwheel-slider').'</th>
						<td>
							<div class="eb-switch eb-switchnone havemoreinfo">
								<input type="hidden" name="'.$pinwheel_slider_options.'[gencss]" id="pinwheel_slider_gencsscode" class="hidden_check" value="'.$pinwheel_slider_curr['gencss'].'">
								<input id="pinwheel_gencss" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['gencss'],false).'>
								<label for="pinwheel_gencss"></label>

							</div>
						</td>
					</tr>
				</table>
				<div id="pinwheel_slider_gencss" >
					<p>'.__('Save Changes for the settings first and then view this data. You can use this CSS in your \'custom\' stylesheets if you use other than \'default\' value for the Stylesheet folder.','pinwheel-slider').'</p>'; 
					$pinwheel_slider_css = pinwheel_get_inline_css($cntr,$echo='1');
					$html .= '<div class="pinwheel_generated_css">

						.pinwheel_slider.pinwheel_slider_set'. $cntr.'{'.$pinwheel_slider_css['pinwheel_slider'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_slider_handle{'. $pinwheel_slider_css['pinwheel_slider_handle'].'} <br />
						.pinwheel_slider_set'. $cntr.' .sldr_title{'. $pinwheel_slider_css['sldr_title'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_slideri{'. $pinwheel_slider_css['pinwheel_slideri'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_slider_thumbnail{'. $pinwheel_slider_css['pinwheel_slider_thumbnail'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_slideri h2{'. $pinwheel_slider_css['pinwheel_slider_h2'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_slideri h2 a{'. $pinwheel_slider_css['pinwheel_slider_h2_a'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_slideri span{'. $pinwheel_slider_css['pinwheel_slider_span'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_slideri p.more{'. $pinwheel_slider_css['pinwheel_slider_p_more'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_text{'. $pinwheel_slider_css['pinwheel_text'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_next{'. $pinwheel_slider_css['pinwheel_next'].'} <br />
						.pinwheel_slider_set'. $cntr.' .pinwheel_prev{'. $pinwheel_slider_css['pinwheel_prev'].'} ';
						$title_style = $pinwheel_slider_css['pinwheel_slider_h2'];
						$ttranstyle = '';
						if( isset($pinwheel_slider_curr['ptitle_transition']) && $pinwheel_slider_curr['ptitle_transition'] != '' ) {
							/* Slider : Title Transition */
							$title_duration = $pinwheel_slider_curr['ptitle_duration'];
							$title_delay = $pinwheel_slider_curr['ptitle_delay'];
							if($title_duration != "") $ttranstyle .= ';-webkit-animation-duration: '.$title_duration.'s;-moz-animation-duration: '.$title_duration.'s;animation-duration: '.$title_duration.'s';
							if($title_delay != "") $ttranstyle .= ';-webkit-animation-delay: '.$title_delay.'s;-moz-animation-delay: '.$title_delay.'s;animation-delay: '.$title_delay.'s;';
							if($title_duration != "" || $title_delay != "")
								$title_style = substr_replace($pinwheel_slider_css['pinwheel_slider_h2'], $ttranstyle, -1);
						}
						$html .= '.pinwheel_slider_set'.$cntr.' .pinwheel_slideri h'.$pinwheel_slider_curr['title_element'].' {'.$title_style.'} <br />
						.pinwheel_slider_set'.$cntr.' .pinwheel_slideri h'.$pinwheel_slider_curr['title_element'].' a{'.$pinwheel_slider_css['pinwheel_slider_h2_a'].'}';
						
						/* Content Transition */
						$ttranstyle = $ctranstyle = '';
						$excerpt_style = $pinwheel_slider_css['pinwheel_slider_span'];
						if( isset($pinwheel_slider_curr['content_transition']) && $pinwheel_slider_curr['content_transition'] != '' ) {
							/* Slider : Content Transition */
							$content_duration = $pinwheel_slider_curr['content_duration'];
							$content_delay = $pinwheel_slider_curr['content_delay'];
							if($content_duration != "") $ctranstyle .= ';-webkit-animation-duration: '.$content_duration.'s;-moz-animation-duration: '.$content_duration.'s;animation-duration: '.$content_duration.'s';
							if($content_delay != "") $ctranstyle .= ';-webkit-animation-delay: '.$content_delay.'s;-moz-animation-delay: '.$content_delay.'s;animation-delay: '.$content_delay.'s;';
							if($content_duration != "" || $content_delay != "")
								$excerpt_style = substr_replace($pinwheel_slider_css['pinwheel_slider_span'], $ctranstyle, -1);
						}
						$html .= '.pinwheel_slider_set'.$cntr.' .pinwheel-excerpt p{'.$excerpt_style.'}
	
						.pinwheel_slider_set'.$cntr.' .pinwheel-excerpt h4{'.$pinwheel_slider_css['pinwheel_slider_h2'].'}';
						$img_style = $pinwheel_slider_css['pinwheel_slider_thumbnail'];
						if( isset($pinwheel_slider_curr['img_transition']) && $pinwheel_slider_curr['img_transition'] != '' ) {
							/* Slider : Image Transition */
							$itranstyle = '';
							$img_duration = $pinwheel_slider_curr['img_duration'];
							$img_delay = $pinwheel_slider_curr['img_delay'];
							if($img_duration != "") $itranstyle .= ';-webkit-animation-duration: '.$img_duration.'s;-moz-animation-duration: '.$img_duration.'s;animation-duration: '.$img_duration.'s';
							if($img_delay != "") $itranstyle .= ';-webkit-animation-delay: '.$img_delay.'s;-moz-animation-delay: '.$img_delay.'s;animation-delay: '.$img_delay.'s;';
							if($img_duration != "" || $img_delay != "")
								$img_style = substr_replace($pinwheel_slider_css['pinwheel_slider_thumbnail'], $itranstyle, -1);
						}
						$html .= '.pinwheel_slider_set'.$cntr.' .pinwheel_slides .pinwheel_slider_thumbnail{'.$img_style.'}
						.pinwheel_slider_set'.$cntr.' .pinwheel_eshortcode{'.$img_style.'}';
						// Styles for event Calendar 
						if( isset($pinwheel_slider_curr['preview']) && ($pinwheel_slider_curr['preview'] == '5' || $pinwheel_slider_curr['preview'] == '6' ) ) { 
						$html .= '.pinwheel_slider_set'.$cntr.' .pinwheel_slides .event_addr {'.$pinwheel_slider_css['eventm_addr'].'}
						.pinwheel_slider_set'.$cntr.' .pinwheel_slides .slidedatetime {'.$pinwheel_slider_css['slide_eventm_datetime'].'}
						.pinwheel_slider_set'.$cntr.' .pinwheel-slider-control .event_navdate {'.$pinwheel_slider_css['nav_eventm_datetime'].'}
						.pinwheel_slider_set'.$cntr.' .pinwheel_slides .pinwheel_eventcat a {'.$pinwheel_slider_css['eventm_cat'].'}';
						} // END -  for event Calendar Generated CSS
						 // Styles for eShop 
						if( isset($pinwheel_slider_curr['preview']) && ($pinwheel_slider_curr['preview'] == '3' || $pinwheel_slider_curr['preview'] == '4' ) ) { 
						$html .= '.pinwheel_slider_set'.$cntr.' .pinwheel_slides .add_to_cart_button button {'.$pinwheel_slider_css['pinwheel_woo_add_to_cart'].'}
						.pinwheel_slider_set'.$cntr.' .pinwheel_slides .woo_sale {'.$pinwheel_slider_css['pinwheel_woo_sale_strip'].'}
						.pinwheel_slider_set'.$cntr.' .pinwheel_slides .regular {'.$pinwheel_slider_css['pinwheel_slide_wooprice'].'}
						.pinwheel_slider_set'.$cntr.' .pinwheel_slides .sale-price {'.$pinwheel_slider_css['pinwheel_slide_woosaleprice'].'}
						.pinwheel_slider_set'.$cntr.' .pinwheel_slides .pinwheel_woocat a{'.$pinwheel_slider_css['pinwheel_slide_cat'].'}
						.pinwheel_slider_set'.$cntr.' .wpsc_buy_button{'.$pinwheel_slider_css['pinwheel_woo_add_to_cart'].'}';
						} // END - Woo Generated CSS 
					$html .= '</div>
				</div>
			</div>';
	} elseif($tab == 'woo') {
		$html .= '<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Slide Add to cart','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table">
					<tr valign="top">
						<th scope="row">'.__('Add to Cart','pinwheel-slider').'</th>
						<td>
							<div class="eb-switch eb-switchnone">
								<input type="hidden" name="'.$pinwheel_slider_options.'[enable_wooaddtocart]" id="pinwheel_slider_enable_wooaddtocart" class="hidden_check" value="'.$pinwheel_slider_curr['enable_wooaddtocart'].'">
								<input id="pinwheel_enablewooaddtocartsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_wooaddtocart'],false).'>
								<label for="pinwheel_enablewooaddtocartsett"></label>
							</div>
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Button Text','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[woo_adc_text]" id="pinwheel_woo_adc_text" class="regular-text" value="'.$pinwheel_slider_curr['woo_adc_text'].'" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Button Color','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[woo_adc_color]" id="pinwheel_woo_adc_color" value="'.$pinwheel_slider_curr['woo_adc_color'].'" class="wp-color-picker-field" data-default-color="#3DB432" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Button text Color','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[woo_adc_tcolor]" id="pinwheel_woo_adc_tcolor" value="'.$pinwheel_slider_curr['woo_adc_tcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Button Size','pinwheel-slider').'</th>
						<td><input type="number" name="'.$pinwheel_slider_options.'[woo_adc_fsize]" id="pinwheel_woo_adc_fsize" class="small-text" value="'.$pinwheel_slider_curr['woo_adc_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Border Thickness','pinwheel-slider').'</th>
						<td><input type="number" name="'.$pinwheel_slider_options.'[woo_adc_border]" id="pinwheel_woo_adc_border" class="small-text" value="'.$pinwheel_slider_curr['woo_adc_border'].'" min="0" />&nbsp;'.__('px  (put 0 if no border is required)','pinwheel-slider').'</td>
					</tr>

					<tr valign="top">
						<th scope="row">'.__('Border Color','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[woo_adc_brcolor]" id="pinwheel_woo_adc_brcolor" value="'.$pinwheel_slider_curr['woo_adc_brcolor'].'" class="wp-color-picker-field" data-default-color="#D8E7EE" /></td>
					</tr>
				</table>
				<p class="submit">
					<input type="submit" class="button-primary" name="save_settings" value="'.__('Save Changes','pinwheel-slider').'" />
					<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
				</p>
			</div>
			<!-- Sale Strip -->
			<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Slide Sale strip','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table">
					<tr valign="top">
						<th scope="row">'.__('Sale Strip','pinwheel-slider').'</th>
						<td>
							<div class="eb-switch eb-switchnone">
								<input type="hidden" name="'.$pinwheel_slider_options.'[enable_woosalestrip]" id="pinwheel_slider_enable_woosalestrip" class="hidden_check" value="'.$pinwheel_slider_curr['enable_woosalestrip'].'">
								<input id="pinwheel_enablewoosalestripsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_woosalestrip'],false).'>
								<label for="pinwheel_enablewoosalestripsett"></label>
							</div> 
						</td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Strip Text','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[woo_sale_text]" id="pinwheel_woo_saletext" class="regular-text" value="'.$pinwheel_slider_curr['woo_sale_text'].'" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Strip Color','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[woo_sale_color]" id="pinwheel_woo_salecolor" value="'.$pinwheel_slider_curr['woo_sale_color'].'" class="wp-color-picker-field" data-default-color="#D8E7EE" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Text Color','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[woo_sale_tcolor]" id="pinwheel_woo_saletcolor" value="'.$pinwheel_slider_curr['woo_sale_tcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" /></td>
					</tr>
				</table>
				<p class="submit">
					<input type="submit" class="button-primary" name="save_settings" value="'.__('Save Changes','pinwheel-slider').'" />
				</p>
			</div>
			<!-- Sale Strip ends -->
			<!-- slide price -->
			<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Slide Regular price','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table settings-tbl">
					<tr valign="top">
						<th scope="row">'.__('Regular Price','pinwheel-slider').'</th>
						<td>
							<div class="eb-switch eb-switchnone">
									<input type="hidden" name="'.$pinwheel_slider_options.'[enable_wooregprice]" id="pinwheel_slider_enable_wooregprice" class="hidden_check" value="'.$pinwheel_slider_curr['enable_wooregprice'].'">
									<input id="pinwheel_enablewooregpricesett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_wooregprice'],false).'>
									<label for="pinwheel_enablewooregpricesett"></label>
							</div> 
						</td>
					</tr>
					<!-- code for new fonts -->
					<tr valign="top">
						<th scope="row">'.__('Font Type','pinwheel-slider').'</th>
						<td>
						<input type="hidden" value="slide_woo_price_font" class="ftype_rname">
						<input type="hidden" value="slide_woo_price_fontg" class="ftype_gname">
						<input type="hidden" value="slide_woo_price_custom" class="ftype_cname">
						<select name="'.$pinwheel_slider_options.'[woo_font]" id="pinwheel_slider_woo_font" class="main-font">
							<option value="regular" '.selected( $pinwheel_slider_curr['woo_font'], "regular", false ).' > Regular Fonts </option>
							<option value="google" '.selected( $pinwheel_slider_curr['woo_font'], "google", false ).' > Google Fonts </option>
							<option value="custom" '.selected( $pinwheel_slider_curr['woo_font'], "custom", false ).' > Custom Fonts </option>
						</select>
						</td>
					</tr>
					<tr><td class="load-fontdiv" colspan="2"></td></tr>
					<!-- code for new fonts -->
					<tr valign="top">
						<th scope="row">'.__('Font Color','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[slide_woo_price_fcolor]" id="pinwheel_slide_wooprice_fcolor" value="'.$pinwheel_slider_curr['slide_woo_price_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" /></td>
					</tr>

					<tr valign="top">
						<th scope="row">'.__('Font Size','pinwheel-slider').'</th>
						<td><input type="number" name="'.$pinwheel_slider_options.'[slide_woo_price_fsize]" id="pinwheel_slide_wooprice_fsize" class="small-text" value="'.$pinwheel_slider_curr['slide_woo_price_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
					</tr>

					<tr valign="top" class="font-style">
						<th scope="row">'.__('Font Style','pinwheel-slider').'</th>
						<td><select name="'.$pinwheel_slider_options.'[slide_woo_price_fstyle]" id="pinwheel_slide_wooprice_fstyle" >
						<option value="bold" '.selected("bold",$pinwheel_slider_curr['slide_woo_price_fstyle'], false).' >'.__('Bold','pinwheel-slider').'</option>
						<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['slide_woo_price_fstyle'], false).' >'.__('Bold Italic','pinwheel-slider').'</option>
						<option value="italic" '.selected("italic",$pinwheel_slider_curr['slide_woo_price_fstyle'], false).' >'.__('Italic','pinwheel-slider').'</option>
						<option value="normal" '.selected("normal",$pinwheel_slider_curr['slide_woo_price_fstyle'], false).' >'.__('Normal','pinwheel-slider').'</option>
						</select>
						</td>
					</tr>
				</table>
				<p class="submit">
					<input type="submit" class="button-primary" name="save_settings" value="'.__('Save Changes','pinwheel-slider').'" />
					<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
				</p>
			</div>
			<!-- slide price ends-->
			<!-- slide sale price -->
			<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Slide Sale price','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table settings-tbl">
					<tr valign="top"> 
						<th scope="row">'.__('Sale Price','pinwheel-slider').'</th>
						<td>
							<div class="eb-switch eb-switchnone">
								<input type="hidden" name="'.$pinwheel_slider_options.'[enable_woosprice]" id="pinwheel_slider_enable_woosprice" class="hidden_check" value="'.$pinwheel_slider_curr['enable_woosprice'].'">
								<input id="pinwheel_enablewoospricesett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_woosprice'],false).'>
								<label for="pinwheel_enablewoospricesett"></label>
							</div> 
						</td>
					</tr>
					<!-- code for new fonts -->
					<tr valign="top">
						<th scope="row">'.__('Font Type','pinwheel-slider').'</th>
						<td>
						<input type="hidden" value="slide_woo_saleprice_font" class="ftype_rname">
						<input type="hidden" value="slide_woo_saleprice_fontg" class="ftype_gname">
						<input type="hidden" value="slide_woo_saleprice_custom" class="ftype_cname">
						<select name="'.$pinwheel_slider_options.'[woosale_font]" id="pinwheel_slider_woosale_font" class="main-font">
							<option value="regular" '.selected( $pinwheel_slider_curr['woosale_font'], "regular", false ).' > Regular Fonts </option>
							<option value="google" '.selected( $pinwheel_slider_curr['woosale_font'], "google", false ).' > Google Fonts </option>
							<option value="custom" '.selected( $pinwheel_slider_curr['woosale_font'], "custom", false ).' > Custom Fonts </option>
						</select>
						</td>
					</tr>

					<tr><td class="load-fontdiv" colspan="2"></td></tr>
					<!-- code for new fonts -->
					<tr valign="top">
						<th scope="row">'.__('Font Color','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[slide_woo_saleprice_fcolor]" id="pinwheel_slide_woosaleprice_fcolor" value="'.$pinwheel_slider_curr['slide_woo_saleprice_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Font Size','pinwheel-slider').'</th>
						<td><input type="number" name="'.$pinwheel_slider_options.'[slide_woo_saleprice_fsize]" id="pinwheel_slide_woosaleprice_fsize" class="small-text" value="'.$pinwheel_slider_curr['slide_woo_saleprice_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
					</tr>

					<tr valign="top" class="font-style">
						<th scope="row">'.__('Font Style','pinwheel-slider').'</th>
						<td><select name="'.$pinwheel_slider_options.'[slide_woo_saleprice_fstyle]" id="pinwheel_slide_woosaleprice_fstyle" >
						<option value="bold" '.selected( "bold",$pinwheel_slider_curr['slide_woo_saleprice_fstyle'], false).' >'.__('Bold','pinwheel-slider').'</option>
						<option value="bold italic" '.selected( "bold italic",$pinwheel_slider_curr['slide_woo_saleprice_fstyle'], false).' >'.__('Bold Italic','pinwheel-slider').'</option>
						<option value="italic" '.selected( "italic",$pinwheel_slider_curr['slide_woo_saleprice_fstyle'], false).' >'.__('Italic','pinwheel-slider').'</option>
						<option value="normal" '.selected( "normal",$pinwheel_slider_curr['slide_woo_saleprice_fstyle'], false).' >'.__('Normal','pinwheel-slider').'</option>
						</select>
						</td>
					</tr>
				</table>
				<p class="submit">
					<input type="submit" class="button-primary" name="save_settings" value="'.__('Save Changes','pinwheel-slider').'" />
					<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
				</p>
			</div>
			<!-- slide sale price ends -->
			<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Slide Category','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table settings-tbl">
					<tr valign="top"> 
						<th scope="row">'.__('Slide Category','pinwheel-slider').'</th>
						<td>
							<div class="eb-switch eb-switchnone">
								<input type="hidden" name="'.$pinwheel_slider_options.'[enable_woocat]" id="pinwheel_slider_enable_woocat" class="hidden_check" value="'.$pinwheel_slider_curr['enable_woocat'].'">
								<input id="pinwheel_enablewoocatsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_woocat'],false).'>
								<label for="pinwheel_enablewoocatsett"></label>
							</div> 
						</td>
					</tr>
					<!-- code for new fonts -->
					<tr valign="top">
						<th scope="row">'.__('Font Type','pinwheel-slider').'</th>
						<td>
						<input type="hidden" value="slide_woo_cat_font" class="ftype_rname">
						<input type="hidden" value="slide_woo_cat_fontg" class="ftype_gname">
						<input type="hidden" value="slide_woo_cat_custom" class="ftype_cname">
						<select name="'.$pinwheel_slider_options.'[woocat_font]" id="pinwheel_slider_woocat_font" class="main-font">
							<option value="regular" '.selected( $pinwheel_slider_curr['woocat_font'], "regular", false ).' > Regular Fonts </option>
							<option value="google" '.selected( $pinwheel_slider_curr['woocat_font'], "google", false ).' > Google Fonts </option>
							<option value="custom" '.selected( $pinwheel_slider_curr['woocat_font'], "custom", false ).' > Custom Fonts </option>
						</select>
						</td>
					</tr>
					<tr><td class="load-fontdiv" colspan="2"></td></tr>
					<!-- code for new fonts -->
					<tr valign="top">
						<th scope="row">'.__('Font Color','pinwheel-slider').'</th>
						<td><input type="text" name="'.$pinwheel_slider_options.'[slide_woo_cat_fcolor]" id="pinwheel_slide_woocat_fcolor" value="'.$pinwheel_slider_curr['slide_woo_cat_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" /></td>
					</tr>
					<tr valign="top">
						<th scope="row">'.__('Font Size','pinwheel-slider').'</th>
						<td><input type="number" name="'.$pinwheel_slider_options.'[slide_woo_cat_fsize]" id="pinwheel_slide_woocat_fsize" class="small-text" value="'.$pinwheel_slider_curr['slide_woo_cat_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
					</tr>
					<tr valign="top" class="font-style">
						<th scope="row">'.__('Font Style','pinwheel-slider').'</th>
						<td><select name="'.$pinwheel_slider_options.'[slide_woo_cat_fstyle]" id="pinwheel_slide_woocat_fstyle" >
						<option value="bold" '.selected("bold",$pinwheel_slider_curr['slide_woo_cat_fstyle'], false).'>'.__('Bold','pinwheel-slider').'</option>
						<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['slide_woo_cat_fstyle'], false).' >'.__('Bold Italic','pinwheel-slider').'</option>
						<option value="italic" '.selected("italic",$pinwheel_slider_curr['slide_woo_cat_fstyle'], false).' >'.__('Italic','pinwheel-slider').'</option>
						<option value="normal" '.selected("normal",$pinwheel_slider_curr['slide_woo_cat_fstyle'], false).' >'.__('Normal','pinwheel-slider').'</option>
						</select>
						</td>
					</tr>
				</table>
				<p class="submit">
					<input type="submit" class="button-primary" name="save_settings" value="'.__('Save Changes','pinwheel-slider').'" />
					<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
				</p>
			</div>';
			
	} elseif($tab == 'events') {
		$html .= '<!-- slide date-time -->
		<div class="sub_settings toggle_settings">
			<h2 class="sub-heading">'.__('Slide date-time','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
			<table class="form-table settings-tbl">
				<tr valign="top"> 
					<th scope="row">'.__('Event date-time','pinwheel-slider').'</th>
					<td>
					<div class="eb-switch eb-switchnone">
						<input type="hidden" name="'.$pinwheel_slider_options.'[enable_eventdt]" id="pinwheel_slider_enable_eventdt" class="hidden_check" value="'.$pinwheel_slider_curr['enable_eventdt'].'">
						<input id="pinwheel_enableeventdtsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_eventdt'],false).'>
						<label for="pinwheel_enableeventdtsett"></label>
					</div> 
					</td>
				</tr>
				<!-- code for new fonts -->
				<tr valign="top">
					<th scope="row">'.__('Font Type','pinwheel-slider').'</th>
					<td>
					<input type="hidden" value="slide_eventm_font" class="ftype_rname">
					<input type="hidden" value="slide_eventm_fontg" class="ftype_gname">
					<input type="hidden" value="slide_eventm_custom" class="ftype_cname">
					<select name="'.$pinwheel_slider_options.'[eventmd_font]" id="pinwheel_slider_eventmd_font" class="main-font">
						<option value="regular" '.selected( $pinwheel_slider_curr['eventmd_font'], "regular", false ).' > Regular Fonts </option>
						<option value="google" '.selected( $pinwheel_slider_curr['eventmd_font'], "google", false ).' > Google Fonts </option>
						<option value="custom" '.selected( $pinwheel_slider_curr['eventmd_font'], "custom", false ).' > Custom Fonts </option>
					</select>
					</td>
				</tr>
				<tr><td class="load-fontdiv" colspan="2"></td></tr>
				<!-- code for new fonts -->
				<tr valign="top">
					<th scope="row">'.__('Font Color','pinwheel-slider').'</th>
					<td><input type="text" name="'.$pinwheel_slider_options.'[slide_eventm_fcolor]" id="pinwheel_slide_woocat_fcolor" value="'.$pinwheel_slider_curr['slide_eventm_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" /></td>
				</tr>
				<tr valign="top">
					<th scope="row">'.__('Font Size','pinwheel-slider').'</th>
					<td><input type="number" name="'.$pinwheel_slider_options.'[slide_eventm_fsize]" id="pinwheel_slide_woocat_fsize" class="small-text" value="'.$pinwheel_slider_curr['slide_eventm_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
				</tr>
				<tr valign="top" class="font-style">
					<th scope="row">'.__('Font Style','pinwheel-slider').'</th>
					<td><select name="'.$pinwheel_slider_options.'[slide_eventm_fstyle]" id="pinwheel_slide_eventm_fstyle" >
					<option value="bold" '.selected("bold",$pinwheel_slider_curr['slide_eventm_fstyle'], false).' >'.__('Bold','pinwheel-slider').'</option>
					<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['slide_eventm_fstyle'], false).' >'.__('Bold Italic','pinwheel-slider').'</option>
					<option value="italic" '.selected("italic",$pinwheel_slider_curr['slide_eventm_fstyle'], false).' >'.__('Italic','pinwheel-slider').'</option>
					<option value="normal" '.selected("normal",$pinwheel_slider_curr['slide_eventm_fstyle'], false).' >'.__('Normal','pinwheel-slider').'</option>
					</select>
					</td>
				</tr>
			</table>
			<p class="submit">
				<input type="submit" class="button-primary" name="save_settings" value="'.__('Save Changes','pinwheel-slider').'" />
				<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
			</p>
		</div>
		<!-- slide date-time end>
			<!-- event address-->
			<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Event address','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table settings-tbl">
				<tr valign="top"> 
					<th scope="row">'.__('Event Address','pinwheel-slider').'</th>
					<td>
					<div class="eb-switch eb-switchnone">
						<input type="hidden" name="'.$pinwheel_slider_options.'[enable_eventadd]" id="pinwheel_slider_enable_eventadd" class="hidden_check" value="'.$pinwheel_slider_curr['enable_eventadd'].'">
						<input id="pinwheel_enableeventaddsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_eventadd'],false).'>
						<label for="pinwheel_enableeventaddsett"></label>
					</div> 
					</td>
				</tr>
				<!-- code for new fonts -->
				<tr valign="top">
					<th scope="row">'.__('Font Type','pinwheel-slider').'</th>
					<td>
					<input type="hidden" value="eventm_addr_font" class="ftype_rname">
					<input type="hidden" value="eventm_addr_fontg" class="ftype_gname">
					<input type="hidden" value="eventm_addr_custom" class="ftype_cname">
					<select name="'.$pinwheel_slider_options.'[event_addr_font]" id="pinwheel_slider_event_addr_font" class="main-font">
						<option value="regular" '.selected( $pinwheel_slider_curr['event_addr_font'], "regular", false ).' > Regular Fonts </option>
						<option value="google" '.selected( $pinwheel_slider_curr['event_addr_font'], "google", false ).' > Google Fonts </option>
						<option value="custom" '.selected( $pinwheel_slider_curr['event_addr_font'], "custom", false ).' > Custom Fonts </option>
					</select>
					</td>
				</tr>
				<tr><td class="load-fontdiv" colspan="2"></td></tr>
				<!-- code for new fonts -->
				<tr valign="top">
					<th scope="row">'.__('Font Color','pinwheel-slider').'</th>
					<td><input type="text" name="'.$pinwheel_slider_options.'[eventm_addr_fcolor]" id="pinwheel_slide_naveventm_fcolor" value="'.$pinwheel_slider_curr['eventm_addr_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" /></td>
				</tr>
				<tr valign="top">
					<th scope="row">'.__('Font Size','pinwheel-slider').'</th>
					<td><input type="number" name="'.$pinwheel_slider_options.'[eventm_addr_fsize]" id="pinwheel_slide_naveventm_fsize" class="small-text" value="'.$pinwheel_slider_curr['eventm_addr_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
				</tr>
				<tr valign="top" class="font-style">
					<th scope="row">'.__('Font Style','pinwheel-slider').'</th>
					<td><select name="'.$pinwheel_slider_options.'[eventm_addr_fstyle]" id="pinwheel_slide_eventm_fstyle" >
					<option value="bold" '.selected("bold",$pinwheel_slider_curr['eventm_addr_fstyle'],false).'>'.__('Bold','pinwheel-slider').'</option>
					<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['eventm_addr_fstyle'],false).' >'.__('Bold Italic','pinwheel-slider').'</option>
					<option value="italic" '.selected("italic",$pinwheel_slider_curr['eventm_addr_fstyle'],false).' >'.__('Italic','pinwheel-slider').'</option>
					<option value="normal" '.selected("normal",$pinwheel_slider_curr['eventm_addr_fstyle'],false).' >'.__('Normal','pinwheel-slider').'</option>
					</select>
					</td>
				</tr>
			</table>
			<p class="submit">
				<input type="submit" class="button-primary" name="save_settings" value="'.__('Save Changes','pinwheel-slider').'" />
				<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
			</p>
			</div>
			<!-- event address ends>
			<!-- event category-->
			<div class="sub_settings toggle_settings">
				<h2 class="sub-heading">'.__('Event Category','pinwheel-slider').'<img src="'.pinwheel_slider_plugin_url( 'images/close.png' ).'" class="toggle_img"></h2> 
				<table class="form-table settings-tbl">
				<tr valign="top"> 
					<th scope="row">'.__('Event Category','pinwheel-slider').'</th>
					<td>
					<div class="eb-switch eb-switchnone">
						<input type="hidden" name="'.$pinwheel_slider_options.'[enable_eventcat]" id="pinwheel_slider_enable_eventcat" class="hidden_check" value="'.$pinwheel_slider_curr['enable_eventcat'].'">
						<input id="pinwheel_enableeventcatsett" class="cmn-toggle eb-toggle-round" type="checkbox" '.checked('1', $pinwheel_slider_curr['enable_eventcat'],false).'>
						<label for="pinwheel_enableeventcatsett"></label>
					</div> 
					</td>
				</tr>
				<!-- code for new fonts -->
				<tr valign="top">
					<th scope="row">'.__('Font Type','pinwheel-slider').'</th>
					<td>
					<input type="hidden" value="eventm_cat_font" class="ftype_rname">
					<input type="hidden" value="eventm_cat_fontg" class="ftype_gname">
					<input type="hidden" value="eventm_cat_custom" class="ftype_cname">
					<select name="'.$pinwheel_slider_options.'[event_cat_font]" id="pinwheel_slider_event_cat_font" class="main-font">
						<option value="regular" '.selected( $pinwheel_slider_curr['event_cat_font'], "regular", false ).' > Regular Fonts </option>
						<option value="google" '.selected( $pinwheel_slider_curr['event_cat_font'], "google", false ).' > Google Fonts </option>
						<option value="custom" '.selected( $pinwheel_slider_curr['event_cat_font'], "custom", false ).' > Custom Fonts </option>
					</select>
					</td>
				</tr>
				<tr><td class="load-fontdiv" colspan="2"></td></tr>
				<!-- code for new fonts -->
				<tr valign="top">
					<th scope="row">'.__('Font Color','pinwheel-slider').'</th>
					<td><input type="text" name="'.$pinwheel_slider_options.'[eventm_cat_fcolor]" id="pinwheel_slide_eventm_fcolor" value="'.$pinwheel_slider_curr['eventm_cat_fcolor'].'" class="wp-color-picker-field" data-default-color="#a6a6a6" /></td>
				</tr>
				<tr valign="top">
					<th scope="row">'.__('Font Size','pinwheel-slider').'</th>
					<td><input type="number" name="'.$pinwheel_slider_options.'[eventm_cat_fsize]" id="pinwheel_slide_eventm_fsize" class="small-text" value="'.$pinwheel_slider_curr['eventm_cat_fsize'].'" min="1" />&nbsp;'.__('px','pinwheel-slider').'</td>
				</tr>
				<tr valign="top"  class="font-style">
					<th scope="row">'.__('Font Style','pinwheel-slider').'</th>
					<td><select name="'.$pinwheel_slider_options.'[eventm_cat_fstyle]" id="pinwheel_slide_eventm_fstyle" >
					<option value="bold" '.selected("bold",$pinwheel_slider_curr['eventm_cat_fstyle'], false).' >'.__('Bold','pinwheel-slider').'</option>
					<option value="bold italic" '.selected("bold italic",$pinwheel_slider_curr['eventm_cat_fstyle'], false).' >'.__('Bold Italic','pinwheel-slider').'</option>
					<option value="italic" '.selected("italic",$pinwheel_slider_curr['eventm_cat_fstyle'], false).' >'.__('Italic','pinwheel-slider').'</option>
					<option value="normal" '.selected("normal",$pinwheel_slider_curr['eventm_cat_fstyle'], false).' >'.__('Normal','pinwheel-slider').'</option>
					</select>
					</td>
				</tr>
			</table>
			<p class="submit">
				<input type="submit" class="button-primary" name="save_settings" value="'.__('Save Changes','pinwheel-slider').'" />
				<input type="submit" name="undo_settings" class="pinwheel-undo" style="'.$undo_style.'" value="'.__('Undo','pinwheel-slider').'" />
			</p>
		</div>
		<!-- event category ends-->';
	}
	echo $html;
	die();
}
?>