<?php  
require_once ( get_stylesheet_directory() . '/data/options.php' );
require_once ( get_stylesheet_directory() . '/data/profile.php' );
require_once ( get_stylesheet_directory() . '/data/options-page.php' );
require_once ( get_stylesheet_directory() . '/data/crop.php' );
require_once ( get_stylesheet_directory() . '/data/shortcodes.php' );
require_once ( get_stylesheet_directory() . '/data/widgets.php' );
require_once ( get_stylesheet_directory() . '/data/sidebars.php' ); 
require_once ( get_stylesheet_directory() . '/data/callscripts.php' );   
 
 



function scribbler_init() {


	add_theme_support( 'post-formats', array( 'quote' , 'link','image' ) );
	add_theme_support( 'automatic-feed-links' );
	add_theme_support( 'post-thumbnails' ); 
	if ( ! isset( $content_width ) ) $content_width = 557;
	add_filter('widget_text', 'do_shortcode'); // EXECUTE SHORTSCODES IN WIDGETS

	if ( function_exists( 'register_nav_menus' ) ) {
		register_nav_menus(
			array(
			  	'main_menu_1' => 'The Main Menu',  
				) 
			);
		}




}
add_action( 'init', 'scribbler_init' );

 






function the_template()
	{
	$return="";
	global $post;
	$custom = get_post_custom($post->ID);  
	if(isset($custom['page_type_class'][0]))
		{
		$page_type_class=$custom['page_type_class'][0]; 
		}	
		else
			{
			$page_type_class="page-sidebar-right";
			}
	if(is_archive() OR is_404())
		{
		$page_type_class="page-sidebar-right";
		}  
	return $page_type_class;
	}



function load_sidebar($position  , $sidebar)
	{ 
	global $post;
 	if(the_template()!="page-sidebar-no-sidebar")  
		{
		$return="";
		$sidebarx=get_post_custom_values('the_sidebar');
		$sidebar1=$sidebarx[0];
		$sidebarx=get_post_custom_values('the_sidebar');
		$sidebar2=$sidebarx[0]; 		

		if($position=="2")
			{
			$custom_sidebar=$sidebar2;
			}
			elseif($position=="1")
				{
				$custom_sidebar=$sidebar1;
				}
		if(($position!="") AND ($position!="1") AND ($position!="2"))
			{
			$custom_sidebar=$position;
			}
		if(isset($custom_sidebar))
			{
			if($custom_sidebar!="")
				{
				echo "<div class='sidebar_top'></div><div class='sidebar_body'>";
				dynamic_sidebar( "$custom_sidebar" );	
				echo "</div><div class='sidebar_bottom'></div>";		
				} 
			}
		}
	}








/* LOAD THE OPTION */
function load_option($name=null)
	{
	global $shortname; 
	$val=get_option($shortname."_".$name);
	return $val;
	}

function load_logo()
	{
	if(load_option("custom_logo")!="")
		{
		return "<img src='".load_option("custom_logo")."' alt='' />";
		}
		else
			{
			return "<p id='pagename'>".get_bloginfo('name')."</p><p id='pageslogan'>".get_bloginfo('description')."</p>";			
			}
	}
 
function categories_postcount_filter ($variable) 
	{
	$variable = str_replace('(', '<span class="post-count"> ', $variable);
	$variable = str_replace('&nbsp;','', $variable);
	$variable = str_replace(')', ' </span>', $variable);
	$variable = str_replace('0</li>', '', $variable);
   	return $variable;
	}






add_filter('wp_list_categories','categories_postcount_filter');
add_filter('get_archives_link','categories_postcount_filter');
add_filter('get_links_list','categories_postcount_filter');
add_filter('get_bookmarks','categories_postcount_filter');
add_filter('wp_list_bookmarks','categories_postcount_filter'); 
 




// ADD A PREVIEW IMAGE TO THE ADMIN POST VIEW
add_filter('manage_posts_columns', 'posts_columns', 5);
add_action('manage_posts_custom_column', 'posts_custom_columns', 5, 2);
add_action('manage_pages_custom_column', 'posts_custom_columns', 5, 2);
function posts_columns($defaults)
	{
    	$defaults['post_thumbs'] = "Image";
    	return $defaults;
	}


function posts_custom_columns($column_name, $id)
	{
	if($column_name === 'post_thumbs')
		{
        		echo the_post_thumbnail('icon');
    		}
	}


function check_color($color, $used_colors)
	{
	global $used_colors;
		if(!in_array($color,$used_colors))
			{
			return $color;
			}
			else
				{
				return "";
				}
	}


global $options;
foreach ($options as $value) 
	{
	if (isset($value['id']) && get_option( $value['id'] ) != FALSE ) 
		{
	            	$$value['id'] = get_option( $value['id'] ); 
		}
	}



function darker_color($color, $dif=30) 
	{
	$color = str_replace('#', '', $color);
    	if (strlen($color) != 6){ return '000000'; }
    	$rgb = '';
 	for ($x=0;$x<3;$x++)
		{
        		$c = hexdec(substr($color,(2*$x),2)) - $dif;
        		$c = ($c < 0) ? 0 : dechex($c);
        		$rgb .= (strlen($c) < 2) ? '0'.$c : $c;
    		}
 	return '#'.$rgb;
	}     





function the_excerpt_length( $length ) 
	{
	return 5;
	}
	add_filter( 'excerpt_length', 'the_excerpt_length' );




function continue_reading_link() 
	{
	return ' <a href="'. esc_url( get_permalink() ) . '"><span class="meta-nav">&rarr;</span></a>';
	}


add_filter('the_category', 'remove_category_rel'); 
function remove_category_rel($string)	
	{ 
    	return str_replace('rel="category tag"', '', $string);
	}



function auto_excerpt_more( $more ) 
	{
	return ' &hellip;' .  continue_reading_link();
	}
	add_filter( 'excerpt_more', 'auto_excerpt_more' );




function custom_excerpt_more( $output ) 
	{
	if ( has_excerpt() && ! is_attachment() ) 
		{
		$output .=  continue_reading_link();
		}
		return $output;
	}
	add_filter( 'get_the_excerpt', 'custom_excerpt_more' );





function custom_excerpt_length( $length ) 
	{
	return 25;
	}
	add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );





/*
** LOAD CUSTOM STYLE IN ADMIN - SECTION
*/

function cayman_admin_head() 
	{
	$aurl=get_template_directory_uri();
	$echo= '<link rel="stylesheet" type="text/css" href="'.$aurl;
	$echo.='/data/css/admin.css">';
	$echo2='<script type="text/javascript" src="'.$aurl;
	$echo2.='/data/script/admin.js"></script>';
	echo $echo.$echo2;
	}
	add_action('admin_head', 'cayman_admin_head');

 

/*
** BREADCRUMB FUNCTION
*/

function oitheme_breadcrumbs() 
	{ 
	$space = '&raquo;';
	$home = 'Home'; 
	$before = '<span class="breadcrumb_current">'; 
	$after = '</span>'; 
	$oi_home_link=home_url();
	$homeLink=$oi_home_link;

echo '<a href="' . $oi_home_link . '">' . $home . '</a> ' . $space . ' '; 
if ( !is_home() && !is_front_page() || is_paged() ) 
	{    
	global $post, $options;
	$oi_home_link = home_url();

	if ( is_category() ) 
		{
		global $wp_query;
		$cat_obj = $wp_query->get_queried_object();
		      $thisCat = $cat_obj->term_id;
		      $thisCat = get_category($thisCat);
		      $parentCat = get_category($thisCat->parent);
		      if ($thisCat->parent != 0) 
				{
				echo(get_category_parents($parentCat, TRUE, ' ' . $space . ' '));
				}
		echo $before . 'Archive "' . single_cat_title('', false) . '"' . $after; 
    		} 
		elseif ( is_day() ) 
			{
			      echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $space . ' ';
			      echo '<a href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $space . ' ';
			      echo $before . get_the_time('d') . $after; 
			    } 
		elseif ( is_month() ) 
			{
      			echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $space . ' ';
      			echo $before . get_the_time('F') . $after; 
    			}
		elseif ( is_year() ) 
			{
      			echo $before . get_the_time('Y') . $after; 
			}
		elseif ( is_single() && !is_attachment() ) 
			{
      			if ( get_post_type() != 'post' ) 
				{
        				$post_type = get_post_type_object(get_post_type());
        				$slug = $post_type->rewrite;
        				echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a> ' . $space . ' ';
        				echo $before . get_the_title() . $after;
      				} 
		else 
			{
        			$cat = get_the_category(); $cat = $cat[0];
        			echo get_category_parents($cat, TRUE, ' ' . $space . ' ');
        			echo $before . get_the_title() . $after;
      			} 
    		} 
	elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) 
		{
      		$post_type = get_post_type_object(get_post_type());
      		echo $before . $post_type->labels->singular_name . $after; 
    		} 
	elseif ( is_page() && !$post->post_parent ) 
		{
      		echo $before . get_the_title() . $after; 
    		}
	elseif ( is_page() && $post->post_parent ) 
		{
     		$parent_id  = $post->post_parent;
      		$breadcrumbs = array();
      		while ($parent_id) 
			{
       			$page = get_page($parent_id);
        			$breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
        			$parent_id  = $page->post_parent;
      			}
      		$breadcrumbs = array_reverse($breadcrumbs);
      		foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $space . ' ';
      		echo $before . get_the_title() . $after; 
    		} 
	elseif ( is_search() ) 
		{
      		echo $before . 'Search results for "' . get_search_query() . '"' . $after; 
    		} 
	elseif ( is_tag() ) 
		{
      		echo $before . 'Posts tagged "' . single_tag_title('', false) . '"' . $after; 
    		}
	elseif ( is_author() ) 
		{
       		global $author;
      		$userdata = get_userdata($author);
      		echo $before . 'Articles posted by ' . $userdata->display_name . $after; 
    		} 
	elseif ( is_404() ) 
		{
      		echo $before . 'Error 404' . $after;
    		} 
    	if ( get_query_var('paged') ) 
		{
      		echo $space.'<span>Page' . ' ' . get_query_var('paged') .'</span>';
    		} 
  	}
} 

///////////////////////////////////////////// END BREADCRUMP





/* 
** FUNCTION PRINT_OPTION, Check if string is empty, if not: Output the String with Before and After, Used in customcss.php
*/
function print_option($before,$tstring,$after, $alternatestring=null)
	{
	if(!empty($tstring) )
		{
		if($tstring!="false")
			{
			if(($tstring!="") AND ($tstring!=" "))
				{
			echo " $before";
			if(($tstring!="on") AND ($alternatestring=="")  ) 
				{ 
				echo "$tstring"; 
				} 
				else 
					{ 
					echo $alternatestring; 
					}
			echo "$after";
				}
			}
		}		
	}


/*
** FUNCTION SWITCH_TRUE, NEEDED IN CUSTOM.CSS AND OPTIONS.PHP
*/
function switch_true($string)
	{
	if($string=="on")
		{
		$return="true";
		}
		else
			{
			$return="false";
			}
	return $return;
	}






/*
** MENU
*/




function mytheme_nav_fallback() {
	$return= wp_page_menu( 'echo=0&show_home=Start&menu_class=main-menu' );
	$return= str_replace("<ul>","<ul id='menu' class='main-menu'>",$return);
	echo $return;	
}


/*
**
** BACKGROUND META BOXES ON PAGES AND POSTS
**
*/

 
add_action( 'add_meta_boxes', 'cbg_add_custom_box' );
add_action( 'save_post', 'cbg_save_postdata' );
add_action( 'save_page', 'cbg_save_postdata' );

function cbg_add_custom_box() 
	{
	add_meta_box( 'choose_your_options',  'Custom Options','cbg_inner_custom_box', 'post' ,'normal','high');
	add_meta_box( 'choose_your_options',  'Custom Options','cbg_inner_custom_box', 'page','normal','high' ); 	 
	} 
function cbg_inner_custom_box( $post ) 
	{
	global $allslider_sliders, $slider, $options;
	foreach((array)$allslider_sliders as $key => $val) 
		{
		$sl_types[]=$val['name'];
		}
	echo "<style>.meta-box-content {margin:2px; padding:8px; border:1px solid #dcdcdc; }
			.meta-box-content input[type=text] {width:100%; display:block;}
			.meta-box-content h3 {cursor:pointer; margin:0px -8px !important;}
		</style>";
	$cbg=get_post_custom_values('cbg');    
 

	$bgcolor=get_post_custom_values("bgcolor");
	$cx=get_post_custom_values("cx");
	$cx=$cx[0];
	$cy=get_post_custom_values("cy");
	$cy=$cy[0];
	$crep=get_post_custom_values("crep");
	$crep=$crep[0];
	$cfix=get_post_custom_values("cfix");
	$cfix=$cfix[0];
	$page_type_class=get_post_custom_values("page_type_class");
	$page_type_class=$page_type_class["0"]; 
	$the_sidebar=get_post_custom_values("the_sidebar");
	$the_sidebar=$the_sidebar[0];
	?>
	<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/jquery-ui.css" />
	<script type="text/javascript">
		jQuery(document).ready(function() {
		jQuery('.upload_image_button_cbg').click(function() {
		formfield = jQuery('.upload_image_cbg').attr('name');
		tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
		window.send_to_editor=window.send_to_editor_cbg;
		return false;
		});
		window.send_to_editor_cbg = function(html) {
		imgurl = jQuery('img',html).attr('src');
		jQuery('.upload_image_cbg').val(imgurl);
		tb_remove();
		}
	jQuery(".src_image").click(function()
		{
		var trigger;
		trigger=jQuery(this).prev().prev().attr('id');
		var url="<?php echo get_template_directory_uri(); ?>/data/load_bg.php?url=<?php echo get_template_directory_uri(); ?>&trigger="+trigger;
		jQuery("#src_load").load(url).dialog({modal:true,minWidth: 800,maxHeight: 400, height:500 }); 
		});
	jQuery(".tabs").tabs();
	});	
	</script>
	<div class='tabs'>
	<ul>
		<li><a href='#styling'>Styling</a></li> 
		<li><a href='#sidebars'>Sidebars</a></li> 
	</ul>
	<div id="styling">
	 	<div class="options-line">
			<div class="options-left"><label for="cbg">Custom Background:</label></div>
		       	<div class="options-right">
		            		<div class='clear-value'>x</div><input id="cbg" class="upload_image upload_image_cbg" type="text" size="36" name="cbg" value="<?php echo $cbg[0]; ?>" />
				<input class="upload_image_button_cbg" type="button" value="Upload Image" />
						<input class="src_image" type="button" value=" Sample " />
				<div>
					<span>Y-Axis: </span>
							<select name="cy" id="cy" >
								<option value="top" <?php if( $cy=="top") { echo " selected"; } ?> >Top</>
								<option value="center" <?php if( $cy=="center") { echo " selected"; } ?> >Center</>
								<option value="bottom" <?php if( $cy=="bottom") { echo " selected"; } ?> >Bottom</>					
							</select>
				<span>X-Axis: </span>
					<select name="cx" id="cx" >
						<option value="left" <?php if($cx=="left") { echo " selected"; } ?> >Left</>
						<option value="right" <?php if( $cx=="right") { echo " selected"; } ?> >Right</>
						<option value="center" <?php if( $cx=="center") { echo " selected"; } ?> >Center</>					
					</select>
				<span>Background-Repeat: </span>
					<select name="crep" id="crep" >
						<option value="repeat-x" <?php if( $crep=="repeat-x") { echo " selected"; } ?> >X</>
						<option value="repeat-y" <?php if( $crep=="repeat-y") { echo " selected"; } ?> >Y</>								
						<option value=""  <?php if( $crep=="") { echo " selected"; } ?> >All</>
						<option value="no-repeat" <?php if( $crep=="no-repeat") { echo " selected"; } ?> >No Repeat</>
					</select>
				<?php
				if($cfix=="on")	
					{ 
					$checked = " checked='checked' "; 
					$cclass=" checked";
					}
					else
						{
						$checked="";
						$cclass=" unchecked";
						} 
					?>
					<br /><br />	
					<div class="checkboxfake <?php echo $cclass; ?>" ><span style="margin-left:20px;">Background Fix</span></div>
				            	<input type="hidden" name="cfix" id="cfix" value="<?php echo $cfix; ?>" />
				</div>
				<div class="clear"></div>	
			</div>
		</div>
		<div class="options-line">
			<div class="options-left"><label for="cbg">Custom Backgroundcolor:</label></div>
		       	<div class="options-right">
		            		<div class='clear-value'>x</div><input id="bgcolor" class="color{required:false, hash:true,pickerClosable:true, adjust:false}" type="text" size="36" name="bgcolor" value="<?php echo $bgcolor[0]; ?>" /> 
			</div>
		</div>

	</div> 
	<div id="sidebars">
	  	 <div class="options-line">
			<div class="options-left"><label for="page_type_class">Sidebar position:</label></div>
		       	<div class="options-right"> 
				<select name="page_type_class" id="page_type_class" > 
					<option value="page-sidebar-no-sidebar" <?php if( $page_type_class=="page-sidebar-no-sidebar") { echo " selected"; } ?> >No sidebar</>
					<option value="page-sidebar-left" <?php if( $page_type_class=="page-sidebar-left") { echo " selected"; } ?> >Sidebar left</>
					<option value="page-sidebar-right" <?php if( $page_type_class=="page-sidebar-right") { echo " selected"; } ?> >Sidebar right</>			 
				</select>
			</div>
		</div>
	  	 <div class="options-line">
			<div class="options-left"><label for="slider">Sidebar:</label></div>
		       	<div class="options-right"> 
				<select name='the_sidebar' id='the_sidebar'>
					<option></option>
					<?php foreach ( $GLOBALS['wp_registered_sidebars'] as $sidebar ) { ?>
					     <option value="<?php echo $sidebar['id']  ; ?>" <?php if($sidebar['id']==$the_sidebar){echo " selected ";} ?>><?php echo ucwords( $sidebar['name'] );  ?></option>
					<?php } ?>
		 		</select>
			</div>
		</div>
	</div>
 

	</div><!-- tabs -->

	<div id="src_load"></div>
	<?php	  
	}

function cbg_save_postdata()
	{  
	global $post;  
	if (  defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) 
		{
		return $post_id;
		$custom = get_post_custom($post->ID);  
		$cbg = $custom["cbg"][0]; 
		?>  
	  	<label>Slider:</label><input name="oi_theme_slider" value="<?php echo $slider[0]; ?>" />  
		<?php
		}
		else
			{
			if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
				{ 
				return $post_id;
				}
				else
					{
					if(isset($_POST["cbg"]))
						{
				    		update_post_meta($post->ID, "cbg", $_POST["cbg"]); 
						} 
					if(isset($_POST["bgcolor"]))
						{
				    		update_post_meta($post->ID, "bgcolor", $_POST["bgcolor"]); 
						}
					if(isset($_POST["cy"]))
						{
				    		update_post_meta($post->ID, "cy", $_POST["cy"]); 		
						}
					if(isset($_POST["cx"]))
						{
				    		update_post_meta($post->ID, "cx", $_POST["cx"]); 
						}
					if(isset($_POST["crep"]))
						{
				    		update_post_meta($post->ID, "crep", $_POST["crep"]); 
						}
					if(isset($_POST["cfix"]))
						{
				    		update_post_meta($post->ID, "cfix", $_POST["cfix"]); 
						}
					if(isset($_POST["the_sidebar"]))
						{
				    		update_post_meta($post->ID, "the_sidebar", $_POST["the_sidebar"]);
						}
					if(isset($_POST["page_type_class"]))
						{
				    		update_post_meta($post->ID, "page_type_class", $_POST["page_type_class"]);
						}
 

 
					}
			}
		}



///////////////////////////// END METABOXES







/*
** THE PAGINATION
*/
function custom_pagination()
	{
	global $wp_query;
	$big = 9999; 
	if(paginate_links( array('base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),'format' => '?paged=%#%','current' => max( 1, get_query_var('paged') ),'total' => $wp_query->max_num_pages) )!="")
		{
		echo "<div class='pagination'>";
		echo paginate_links( array('base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),'format' => '?paged=%#%','current' => max( 1, get_query_var('paged') ),'total' => $wp_query->max_num_pages) );
		echo "</div>";
		}
	}


/*
** THE COMMENTSTEMPLATE
*/
function mytheme_comment($comment, $args, $depth) 
	{
	$GLOBALS['comment'] = $comment; ?>
	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
		<article id="comment-<?php comment_ID(); ?>" class="comment-body">
			<footer class="comment-author vcard">
				<?php echo get_avatar( $comment->comment_author_email, 60 ); ?>
				<p class='commentauthor'><?php  comment_author_link(); ?></p>
				<p class='comment-time'><?php comment_date(); ?>, <?php comment_time(); ?></p>							
			</footer>
			<div class="comments-body">				
				<?php comment_text() ?>
				<div class="reply">
					<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?> | <?php edit_comment_link('Edit','  ','') ?>
 				</div>
				<?php if ($comment->comment_approved == '0') : ?>
					<em>Your comment is awaiting moderation.</em>			
				<?php endif; ?>
			</div>
			<div class="clear"></div>
		</article>
	<?php
   	}




/*
** PRINT THE "EDIT THIS" LINK 
*/
function the_adminbar()
	{
	return edit_post_link();
	}



/*
** ADD LIGHTBOX TO IMAGES IN CONTENT
*/
function add_rel_lightbox($content)
	{
	$string = '/<a href="(.*?).(jpg|jpeg|png|gif|bmp|ico)"><img(.*?)class="(.*?)wp-image-(.*?)" \/><\/a>/i';	
	preg_match_all( $string, $content, $matches, PREG_SET_ORDER);
	foreach ($matches as $val)
		{
		$slimbox_caption = '';
		$post = get_post($val[5]);		
		$string = '<a href="' . $val[1] . '.' . $val[2] . '"><img' . $val[3] . 'class="' . $val[4] . 'wp-image-' . $val[5] . '" /></a>';
		$replace = '<a href="' . $val[1] . '.' . $val[2] . '" rel="prettyPhoto"><img' . $val[3] . 'class="' . $val[4] . 'wp-image-' . $val[5] . ' image-wp" /></a>';
		$content = str_replace( $string, $replace, $content);
		}
	return $content;
	}
	add_filter('the_content', 'add_rel_lightbox', 12);


 
 
 

function hex2rgb($hex) 
	{
   	$hex = str_replace("#", "", $hex); 
   	if(strlen($hex) == 3) 
		{
		$r = hexdec(substr($hex,0,1).substr($hex,0,1));
	      	$g = hexdec(substr($hex,1,1).substr($hex,1,1));
	      	$b = hexdec(substr($hex,2,1).substr($hex,2,1));
	   	}
		else 
			{
	      		$r = hexdec(substr($hex,0,2));
	      		$g = hexdec(substr($hex,2,2));
	      		$b = hexdec(substr($hex,4,2));
	   		}
	   $rgb = array($r, $g, $b);
	   return implode(",", $rgb); 
	}








 



function wpex_clean_shortcodes($content){   
$array = array (
    '<p>[' => '[', 
    ']</p>' => ']', 
    ']<br />' => ']'
);
$content = strtr($content, $array);
return $content;
}
add_filter('the_content', 'wpex_clean_shortcodes');







class Arrow_Walker_Nav_Menu extends Walker_Nav_Menu {
    function display_element($element, &$children_elements, $max_depth, $depth=0, $args, &$output) {
        $id_field = $this->db_fields['id'];
        if (!empty($children_elements[$element->$id_field])) { 
            $element->classes[] = 'arrow'; //enter any classname you like here!
        }
        Walker_Nav_Menu::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
    }
}










 