<?php
define ( 'JS_PATH' , get_template_directory_uri().'/library/functions/shortcodes/shortcode.js');


add_action('admin_head','html_quicktags');
function html_quicktags() {

	$output = "<script type='text/javascript'>\n
	/* <![CDATA[ */ \n";
	wp_print_scripts( 'quicktags' );

	$buttons = array();
	
	/*$buttons[] = array(
		'name' => 'raw',
		'options' => array(
			'display_name' => 'raw',
			'open_tag' => '\n[raw]',
			'close_tag' => '[/raw]\n',
			'key' => ''
	));*/
	
	$buttons[] = array(
		'name' => 'one_whole',
		'options' => array(
			'display_name' => 'Full width',
			'open_tag' => '\n[one_whole]',
			'close_tag' => '[/one_whole]\n',
			'key' => ''
	));
	
	$buttons[] = array(
		'name' => 'one_third',
		'options' => array(
			'display_name' => 'one third',
			'open_tag' => '\n[one_third]',
			'close_tag' => '[/one_third]\n',
			'key' => ''
	));
		
	$buttons[] = array(
		'name' => 'two_third',
		'options' => array(
			'display_name' => 'two third',
			'open_tag' => '\n[two_third]',
			'close_tag' => '[/two_third]\n',
			'key' => ''
	));	
	
	$buttons[] = array(
		'name' => 'one_half',
		'options' => array(
			'display_name' => 'one half',
			'open_tag' => '\n[one_half]',
			'close_tag' => '[/one_half]\n',
			'key' => ''
	));	
	
	$buttons[] = array(
		'name' => 'one_fourth',
		'options' => array(
			'display_name' => 'one fourth',
			'open_tag' => '\n[one_fourth]',
			'close_tag' => '[/one_fourth]\n',
			'key' => ''
	));	
	
	$buttons[] = array(
		'name' => 'three_fourth',
		'options' => array(
			'display_name' => 'three fourth',
			'open_tag' => '\n[three_fourth]',
			'close_tag' => '[/three_fourth]\n',
			'key' => ''
	));
	
	$buttons[] = array(
		'name' => 'one_sixth',
		'options' => array(
			'display_name' => 'one sixth',
			'open_tag' => '\n[one_sixth]',
			'close_tag' => '[/one_sixth]\n',
			'key' => ''
	));
	
	$buttons[] = array(
		'name' => 'five_twelveth',
		'options' => array(
			'display_name' => 'five twelveth',
			'open_tag' => '\n[five_twelveth]',
			'close_tag' => '[/five_twelveth]\n',
			'key' => ''
	));
	
	$buttons[] = array(
		'name' => 'seven_twelveth',
		'options' => array(
			'display_name' => 'seven twelveth',
			'open_tag' => '\n[seven_twelveth]',
			'close_tag' => '[/seven_twelveth]\n',
			'key' => ''
	));
        
        $buttons[] = array(
		'name' => 'one_twelveth',
		'options' => array(
			'display_name' => 'one twelveth',
			'open_tag' => '\n[one_twelveth]',
			'close_tag' => '[/one_twelveth]\n',
			'key' => ''
	));
        
        $buttons[] = array(
		'name' => 'eleven_twelveth',
		'options' => array(
			'display_name' => 'eleven twelveth',
			'open_tag' => '\n[eleven_twelveth]',
			'close_tag' => '[/eleven_twelveth]\n',
			'key' => ''
	));
        
        $buttons[] = array(
		'name' => 'five_sixth',
		'options' => array(
			'display_name' => 'five sixth',
			'open_tag' => '\n[five_sixth]',
			'close_tag' => '[/five_sixth]\n',
			'key' => ''
	));
	
	$buttons[] = array(
		'name' => 'row',
		'options' => array(
			'display_name' => 'Insert Row',
			'open_tag' => '\n[row]',
			'close_tag' => '[/row]\n',
			'key' => ''
	));
	
	$buttons[] = array(
		'name' => 'clear',
		'options' => array(
			'display_name' => 'Clear Float',
			'open_tag' => '[clear /]',
			'close_tag' => '',
			'key' => ''
	));
			
	for ($i=0; $i <= (count($buttons)-1); $i++) {
		$output .= "edButtons[edButtons.length] = new edButton('ed_{$buttons[$i]['name']}'
			,'{$buttons[$i]['options']['display_name']}'
			,'{$buttons[$i]['options']['open_tag']}'
			,'{$buttons[$i]['options']['close_tag']}'
			,'{$buttons[$i]['options']['key']}'
		); \n";
	}
	
	$output .= "\n /* ]]> */ \n
	</script>";
	echo $output;
}

function Wecare_addbuttons() {
	if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
		return;

	if ( get_user_option('rich_editing') == 'true') {
		add_filter("mce_external_plugins", "add_alc_custom_tinymce_plugin");
		add_filter('mce_buttons_3', 'register_alc_custom_button');
	}
}
function register_alc_custom_button($buttons) {
	array_push(
		$buttons,
		"AddButton",
		"Dropdown",
		"|",
		"Tabs",
		"Toggle",
		"Accordion",
		"|",
		"Horizontal navigation",
		"Vertical navigation",
		"Sidenav",
		"|",
		"Slider",
       // "Oslider",
		"Carousel",
		"|",
		//"AddPanel",
                "AddBanner",
                "Progress",
		"Fblock",
		"Testimonial",
		"Teammember",	
		"Tblock",		
		"|",		
		"Alert",
		"Audio",
		"Video",
                "Shvideo",
		"|",	
		"SocialButton", 
		"Contact",
		"|",	
		"Reveal",
		"Portlisting",
		"Bloglisting"
		); 
	return $buttons;
} 
function add_alc_custom_tinymce_plugin($plugin_array) {
	$plugin_array['WecareShortcodes'] = JS_PATH;
	return $plugin_array;
}
add_action('init', 'Wecare_addbuttons');

/*********************BANNER************************/
function alc_banner( $atts, $content = null ) {
 extract(shortcode_atts(array( 
	), $atts));
$out='<div class="l-more">
	<div class="l-banner"><p>'. do_shortcode ($content).'</p><div class="clear"></div></div>
    </div>';
	
    return $out;
}
add_shortcode('banner', 'alc_banner');

/********************* PANEL **********************

function alc_panel( $atts, $content = null ) {
 extract(shortcode_atts(array(
		"icon" => '' 
	), $atts));	
	$out = '<section class="quote promo-box"><blockquote>';
	if ($icon) $out.='<i class="'.$icon.'"></i>';$out.= do_shortcode ($content).'<div class="clear"></div></blockquote></section>'; 
    return $out;
}
add_shortcode('panel', 'alc_panel');

/**************************************************/


/***************** PROGRESS BAR *******************/

function alc_progressbar( $atts, $content = null ) {
    extract(shortcode_atts(array(
		"type" => '',
		"meter" => '',
		"style" => '',
		"animated" => '',
		"class" => '',
	), $atts));	
	$out = '
	<div class="progress '.$type.' '.$style.' '.$animated.' '.$class.'">
		<div class="bar" style="width:'.$meter.'%"></div>
	</div>';
    return $out;
}
add_shortcode('progressbar', 'alc_progressbar');

/************************************************/

/*************** Dropdown buttons ***************/

function alc_dropbutton_group( $atts, $content ){
	extract(shortcode_atts(array(
		'title' => '',
		'type'	=> ''
	), $atts));
	$GLOBALS['dropbutton_count'] = 0;
	$randomId = mt_rand(0, 100000);
	$return = '';
	do_shortcode( $content );
	$counter = 1;
	if( is_array( $GLOBALS['dropbuttons'] ) ){
		foreach( $GLOBALS['dropbuttons'] as $dropbutton ){
			$dropbuttons[] = '<li><a href="'.$dropbutton['url'].'">'.do_shortcode($dropbutton['content']).'</a></li>';
			if ($dropbutton['divider'] == 1)
			{
				$dropbuttons[] = '<li class="divider"></li>';
			}
		}
		
		if ($type == 'split')
		{
			$return.='
			<div class="btn-group">
				<button class="btn">'.$title.'</button>
				<button class="btn dropdown-toggle" data-toggle="dropdown">
				<span class="caret"></span>
				</button>';
		}
		else
		{	
			$return.= '
			<div class="btn-group">
				 <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">'.$title.'<span class="caret"></span></a>';
		}
		$return.= '<ul class="dropdown-menu" id="'.$randomId.'">'.implode( "\n", $dropbuttons ).'</ul>';
		$return.= '</div>';
	}
	return $return;
}
add_shortcode( 'dropbuttongroup', 'alc_dropbutton_group' );
/*****************/


function alc_dropbutton( $atts, $content ){
	extract(shortcode_atts(array(
	'title' => '',
	'url' => '',
	'divider' => '',
	), $atts));
	
	$x = $GLOBALS['dropbutton_count'];
	$GLOBALS['dropbuttons'][$x] = array( 'title' => $title, 'url' => $url, 'divider' => $divider, 'content' =>  $content );
	
	$GLOBALS['dropbutton_count']++;
}

add_shortcode( 'dropbutton', 'alc_dropbutton' );
/************************************************/

/******************* BUTTONS ********************/

function alc_button( $atts, $content = null ) {
	extract(shortcode_atts(array(
		'size' => 'medium',
		'link' => '#',
        'type' => '',
		'color' => '',
        'position'=>'',
        'status'=>'',
        'fullwidth'=>'',
		'target' => '',
        'icon'=>''
	), $atts));

	$target = ($target) ? ' target="_blank"' : '';
 
	$out = '<a href="'.$link.'"'.$target.' class="btn '.$type.' '.$size.' '.$color.' '.$position.' '.$status.' '.$fullwidth.'"><i class="fa '.$icon.'"></i>'.do_shortcode($content).'</a>';
    return $out;
}
add_shortcode('button', 'alc_button');

/************************************************/

/******************TABS****************************/
function alc_tab_group( $atts, $content ){		
	$GLOBALS['tab_count'] = 0;	
	do_shortcode( $content );
	$randomId = mt_rand(0, 100000);
	$counter = 0;
	$return = '<div class="tabs">';
		if( is_array( $GLOBALS['tabs'] ) ){
			foreach( $GLOBALS['tabs'] as $tab ){
				$active = ($counter == 0) ? ' class="active"' : '';
				$tabs[] = '<li'.$active.'><a href="#tabs-'.$randomId.'">'.$tab['title'].'</a></li>';                
				$tabcontent[] = '<div id="tabs-'.$randomId.'" class="tab-content">'.do_shortcode($tab['content']).'</div>';	
				$randomId++;
				$counter ++;
			}
			$return.= '<ul class="tab-list">'.implode( "\n", $tabs ).'</ul>';
			$return.= implode( "\n", $tabcontent );
		}
	$return.='</div>';
	return $return;
}
add_shortcode( 'tabgroup', 'alc_tab_group' );

/***********/

function alc_tab( $atts, $content ){
	extract(shortcode_atts(array(
	'title' => 'Tab %d',
	), $atts));
	
	$x = $GLOBALS['tab_count'];
	$GLOBALS['tabs'][$x] = array( 'title' => sprintf( $title, $GLOBALS['tab_count'] ), 'content' =>  $content );
	
	$GLOBALS['tab_count']++;
}
add_shortcode( 'tab', 'alc_tab' );


/************************************************/


/*****************Vertical Navigation***********/
function alc_vernav_group( $atts, $content ){
	extract(shortcode_atts(array(
		'title' => '',
	), $atts));
	$GLOBALS['vernav_count'] = 0;
	do_shortcode( $content );
	$return = '<div class="well" style="max-width: 340px; padding: 8px 0"><ul class="nav nav-list">';
	if (!empty($title)) $return.='<li class="nav-header">'.$title.'</li>';
	if( is_array( $GLOBALS['vernavs'] ) ){
		foreach( $GLOBALS['vernavs'] as $vernav ){
			$vernavs[] = ' 
				<li><a href="'.$vernav['link'].'">'.$vernav['title'].'</a></li>';	
		}
		$return.=implode( "\n", $vernavs );
		$return.= '</ul></div>';
	}
	return $return;
}
add_shortcode( 'vernavgroup', 'alc_vernav_group' );

/***********/

function alc_vernav( $atts, $content ){
	extract(shortcode_atts(array(
	'title' => 'Nav %d',
	'link'	=> ''
	), $atts));
	
	$x = $GLOBALS['vernav_count'];
	$GLOBALS['vernavs'][$x] = array( 'title' => sprintf( $title, $GLOBALS['vernav_count'] ), 'content' =>  $content, 'link' =>  $link );
	
	$GLOBALS['vernav_count']++;
}
add_shortcode( 'vernav', 'alc_vernav' );


/*************************************************/


/*****************Horizontal Navigation***********/
function alc_hornav_group( $atts, $content ){
	extract(shortcode_atts(array(
		'title' => '',
	), $atts));
	$GLOBALS['hornav_count'] = 0;
	do_shortcode( $content );
	$return = '
	<div class="navbar navbar-shortcode">
		<div class="navbar-inner">';
			if (!empty($title)) $return.=' <a class="brand" href="#">'.$title.'</a>';
			$return.='<ul class="nav">';				
				if( is_array( $GLOBALS['hornavs'] ) ){
					foreach( $GLOBALS['hornavs'] as $hornav ){
						$hornavs[] = ' 
						<li><a href="'.$hornav['link'].'">'.$hornav['title'].'</a></li>';	
					}
				}
				$return.=implode( "\n", $hornavs );
				$return.= '
			</ul>
		</div>
	</div>';
	return $return;
}
add_shortcode( 'hornavgroup', 'alc_hornav_group' );


function alc_hornav( $atts, $content ){
	extract(shortcode_atts(array(
	'title' => 'Nav %d',
	'link'	=> ''
	), $atts));
	
	$x = $GLOBALS['hornav_count'];
	$GLOBALS['hornavs'][$x] = array( 'title' => sprintf( $title, $GLOBALS['hornav_count'] ), 'content' =>  $content, 'link' =>  $link );
	
	$GLOBALS['hornav_count']++;
}
add_shortcode( 'hornav', 'alc_hornav' );

/*************************************************/

/****************** TOGGLES *********************/

function alc_toggle_group( $atts, $content ){
	
	$GLOBALS['toggle_count'] = 0;
	
	do_shortcode( $content );
	if( is_array( $GLOBALS['toggles'] ) ){
		foreach( $GLOBALS['toggles'] as $toggle ){
			$toggles[] = '
			<div class="toggle-wrapper">
				<a href="#" class="toggle-trigger">'.$toggle['title'].'</a>                  
				<div class="toggle-container">
					'.do_shortcode($toggle['content']).'
				</div>                  
			</div>';	
		}
		$return = implode( "\n", $toggles );
	}
	return $return;

}
add_shortcode( 'togglegroup', 'alc_toggle_group' );


function alc_toggle( $atts, $content ){
	extract(shortcode_atts(array(
	'title' => 'toggle %d',
	), $atts));
	
	$x = $GLOBALS['toggle_count'];
	$GLOBALS['toggles'][$x] = array( 'title' => sprintf( $title, $GLOBALS['toggle_count'] ), 'content' =>  $content );
	
	$GLOBALS['toggle_count']++;
}
add_shortcode( 'toggle', 'alc_toggle' );
/************************************************/


/***************** ACCORDION ********************/


function alc_accordion_group( $atts, $content ){
	
	$GLOBALS['accordion_count'] = 0;
	$counter = 0;
	do_shortcode( $content );
	if( is_array( $GLOBALS['accordions'] ) ){
		foreach( $GLOBALS['accordions'] as $accordion ){
			$active = $counter == 0 ? ' active' : '';
			$accordions[] = '		
				<h2 class=" accordion-header '.$active.'">'.$accordion['title'].'</h2>                  
				<div  class=" accordion-content '.$active.'">'.do_shortcode($accordion['content']).'</div>
			';	
			$counter++;
		}
		$return = '<div class="accordion" id="accordion-container">'.implode( "\n", $accordions ).'</div>';
	}
	return $return;
}

add_shortcode( 'accordiongroup', 'alc_accordion_group' );
/***************/

function alc_accordion( $atts, $content ){
	extract(shortcode_atts(array(
	'title' => 'accordion %d',
	), $atts));
	
	$x = $GLOBALS['accordion_count'];
	$GLOBALS['accordions'][$x] = array( 'title' => sprintf( $title, $GLOBALS['accordion_count'] ), 'content' =>  $content );
	
	$GLOBALS['accordion_count']++;
}

add_shortcode( 'accordion', 'alc_accordion' );
/************************************************/


/*************** TESTIMONIALS ********************/

function alc_testimonial_group( $atts, $content ){
	
	$GLOBALS['testimonial_count'] = 0;
	$counter = 0;
	do_shortcode( $content );
	
	$return = '<div class="testimonials">';
		if( is_array( $GLOBALS['testimonials'] ) ){
			foreach( $GLOBALS['testimonials'] as $testimonial ){
				$testimonials[] = '		
					<li>
                                        <blockquote class="speech-bubble">
					                <div class="quote-content">
					                    <p class="m0">'.do_shortcode($testimonial['content']).'</p>
					                    <span class="quote-arrow"></span>
					                </div>
					                <div class="quote-meta"><strong>'.$testimonial['title'].'</strong>
					                    <span> '.$testimonial['position'].'</span>
					                </div>
					 </blockquote>						
					</li>';	
				$counter++;
			}
			$return.= '<ul>'.implode( "\n", $testimonials ).'</ul>';
		}
	$return.='</div>';
	return $return;
}

add_shortcode( 'testimonialgroup', 'alc_testimonial_group' );

function alc_testimonial( $atts, $content ){
	extract(shortcode_atts(array(
	'title' => '',
	'position' => ''
	), $atts));
	
	$x = $GLOBALS['testimonial_count'];
	$GLOBALS['testimonials'][$x] = array( 'title' => sprintf( $title, $GLOBALS['testimonial_count'] ), 'position' => $position, 'content' =>  $content );
	
	$GLOBALS['testimonial_count']++;
}

add_shortcode( 'testimonial', 'alc_testimonial' );

/************************************************/

/******************* Alertbox *******************/

function alc_alert( $atts, $content = null ) {
     extract(shortcode_atts(array(
		"type"=>'',
		"title" => ''
	), $atts));	
	$out = '
	<div class="alert '.$type.'">
		<button type="button" class="close" data-dismiss="alert">&times;</button>
		<h4 class="alert-heading">'.$title.'</h4>
		'.do_shortcode($content).'
	</div>';
   return $out;
}
add_shortcode('alert', 'alc_alert');

/************************************************/


/***********  VIDEOS  ****************/

function alc_video($atts, $content=null) {
	extract(
		shortcode_atts(array(
			'site' => 'youtube',
			'id' => '',
			'width' => '',
			'height' => '',
			'autoplay' => '0'
		), $atts)
	);
	if ( $site == "youtube" ) { $src = 'http://www.youtube.com/embed/'.$id.'?autoplay='.$autoplay; }
	else if ( $site == "vimeo" ) { $src = 'http://player.vimeo.com/video/'.$id.'?autoplay='.$autoplay; }
	else if ( $site == "dailymotion" ) { $src = 'http://www.dailymotion.com/embed/video/'.$id.'?autoplay='.$autoplay; }
	else if ( $site == "veoh" ) { $src = 'http://www.veoh.com/static/swf/veoh/SPL.swf?videoAutoPlay='.$autoplay.'&permalinkId='.$id; }
	else if ( $site == "bliptv" ) { $src = 'http://a.blip.tv/scripts/shoggplayer.html#file=http://blip.tv/rss/flash/'.$id; }
	else if ( $site == "viddler" ) { $src = 'http://www.viddler.com/embed/'.$id.'e/?f=1&offset=0&autoplay='.$autoplay; }
	
	if ( $id != '' ) {
		return '<div class="flex-video"><iframe width="'.$width.'" height="'.$height.'" src="'.$src.'" class="vid iframe-'.$site.'"></iframe></div>';
	}
}
add_shortcode('video','alc_video');

/************************************************/


/************ LOCAL AUDIO (HTML 5) **************/

function alc_audio($atts, $content = null) {
    extract(shortcode_atts(array(
            "title" => '',
			"poster" => '',
			"m4a"  => '',
			"mp3"  => '',
			"ogg"	=> ''			
    ), $atts));
 	
	$poster = ($poster == '') ? get_template_directory_uri().'/images/music.jpg' : $poster;
	$randomId = mt_rand(0, 100000);  
	$return = '	<script type="text/javascript">jQuery(document).ready(function($){
		$("#jquery_jplayer_'.$randomId.'").jPlayer({
			ready: function () {
				$(this).jPlayer("setMedia", {
					m4a: "'.$m4a.'",
					mp3: "'. $mp3 .'",
					oga: "'.$ogg.'",
					poster: "'.$poster.'"
				});
			},
			play: function() { // To avoid both jPlayers playing together.
				$(this).jPlayer("pauseOthers");
			},
			repeat: function(event) { // Override the default jPlayer repeat event handler
				if(event.jPlayer.options.loop) {
					$(this).unbind(".jPlayerRepeat").unbind(".jPlayerNext");
					$(this).bind($.jPlayer.event.ended + ".jPlayer.jPlayerRepeat", function() {
						$(this).jPlayer("play");
					});
				} else {
					$(this).unbind(".jPlayerRepeat").unbind(".jPlayerNext");
					$(this).bind($.jPlayer.event.ended + ".jPlayer.jPlayerNext", function() {
						$("#jquery_jplayer_'.$randomId.'").jPlayer("play", 0);
					});
				}
			},
			swfPath: "'.get_template_directory_uri().'/js/jplayer",
			supplied: "m4a, oga",
			wmode: "window",
			size: {width: "100%",height: "auto",cssClass: "jp-audio-standard"},
			cssSelectorAncestor: "#jp_container_'.$randomId.'"
		});
			});
		</script>';
		
		$return.= '	
		<div class="singlesong six columns">     
			<div id="jquery_jplayer_'.$randomId.'" class="jp-jplayer"></div>           
			<div id="jp_container_'.$randomId.'" class="jp-audio">
				<div class="jp-type-single">
					<div class="jp-gui jp-interface">
						<ul class="jp-controls">
							<li><a href="javascript:;" class="jp-play" tabindex="1">play></a></li>
							<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
							<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
							<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
							<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
							<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
						</ul>
						<div class="jp-progress">
							<div class="jp-seek-bar">
								<div class="jp-play-bar"></div>
							</div>
						</div>
						<div class="jp-volume-bar">
							<div class="jp-volume-bar-value"></div>
						</div>
						<div class="jp-time-holder">
							<div class="jp-current-time"></div>
							<div class="jp-duration"></div>
	
							<ul class="jp-toggles">
								<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
								<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
							</ul>
						</div>
					</div>
					<div class="jp-title">
						<ul>
							<li>'.$title.'</li>
						</ul>
					</div>
					<div class="jp-no-solution">
						<span>Update Required</span>
						To play the media you will need to either update your browser to a recent version or update your Flash plugin.
					</div>
				</div>
			</div>
		</div>';
	return $return;
	
}
add_shortcode("audio", "alc_audio"); 

/************************************************/

/************ LOCAL VIDEO (HTML 5) **************/

function alc_sh_video($atts, $content = null) {
    extract(shortcode_atts(array(
            "title" => '',
			"poster" => '',
			"m4v"  => '',
			"mp4"  => '',
			"ogv"	=> ''			
    ), $atts));
 	
	$poster = ($poster == '') ? get_template_directory_uri().'/images/video.jpg' : $poster;
	$randomId = mt_rand(0, 100000);  
	$return = '<script type="text/javascript">jQuery(document).ready(function($){
			$("#jquery_jplayer_'.$randomId.'").jPlayer({
				option: {"fullscreen": true},
				ready: function () {
					$(this).jPlayer("setMedia", {
						m4v: "'.$m4v.'",
						mp4: "'.$mp4.'",
						ogv: "'.$ogv.'",
						poster: "'.$poster.'"
					});
				},
				play: function() { // To avoid both jPlayers playing together.
					$(this).jPlayer("pauseOthers");
				},
				repeat: function(event) { // Override the default jPlayer repeat event handler
					if(event.jPlayer.options.loop) {
						$(this).unbind(".jPlayerRepeat").unbind(".jPlayerNext");
						$(this).bind($.jPlayer.event.ended + ".jPlayer.jPlayerRepeat", function() {
							$(this).jPlayer("play");
						});
					} else {
						$(this).unbind(".jPlayerRepeat").unbind(".jPlayerNext");
						$(this).bind($.jPlayer.event.ended + ".jPlayer.jPlayerNext", function() {
							$("#jquery_jplayer_'.$randomId.'").jPlayer("play", 0);
						});
					}
				},
				swfPath: "'.get_template_directory_uri().'/js/jplayer",
				supplied: "ogv, m4v",
				size: {width: "100%",height: "auto",cssClass: "jp-video-standard"},
				cssSelectorAncestor: "#jp_container_'.$randomId.'"
			});
		});
	</script>';
	
	$return.= '	
	<div class="singlesong featured-image">
		<div id="jp_container_'.$randomId.'" class="jp-video jp-video-standard filterable-2col-videowrap">
			<div class="jp-type-single">
				<div id="jquery_jplayer_'.$randomId.'" class="jp-jplayer"></div>
				<div class="jp-gui">
					<div class="jp-video-play">
						<a href="javascript:;" class="jp-video-play-icon" tabindex="1">play</a>
					</div>
					<div class="jp-interface">
						<div class="jp-progress">
							<div class="jp-seek-bar">
								<div class="jp-play-bar"></div>
							</div>
						</div>
						<div class="jp-current-time"></div>
						<div class="jp-duration"></div>
						<div class="jp-controls-holder">
							<ul class="jp-controls">
								<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
								<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
								<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
								<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
								<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
								<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
							</ul>
							<div class="jp-volume-bar">
								<div class="jp-volume-bar-value"></div>
							</div>
							<ul class="jp-toggles">
								<li><a href="javascript:;" class="jp-full-screen" tabindex="1" title="full screen">full screen</a></li>
								<li><a href="javascript:;" class="jp-restore-screen" tabindex="1" title="restore screen">restore screen</a></li>
								<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
								<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
							</ul>
						</div>
						<div class="jp-title">
							<ul>
								<li>'.$title.'</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="jp-no-solution">
					<span>Update Required</span>
					To play the media you will need to either update your browser to a recent version or update your Flash plugin.
				</div>
			</div>
		</div>
	</div>';
	return $return;	
}
add_shortcode("shvideo", "alc_sh_video"); 

/************************************************/


/****************** SLIDER ********************/
function alc_slider( $atts, $content ){
	$GLOBALS['slideritem_count'] = 0;
	extract(shortcode_atts(array(
		'interval' => '5000',
		'animation' => 'fade'
	), $atts));
	do_shortcode( $content );
		
	if( is_array( $GLOBALS['sitems'] ) ){
		$icount = 0;
		foreach( $GLOBALS['sitems'] as $item ){
			$title = $item['title'] == '' ? '' : '<p class="flex-caption">'.$item['title'].'</p>';
			$panes[] = '<li><img src="'.$item['image'].'" alt="'.$item['title'].'" />'.$title.'</li>';   		
			$icount ++ ;
		}
		$randomId = mt_rand(0, 100000);
		$return ='<div class="flexslider" id="flexslider-'.$randomId.'"><ul class="slides">'.implode( "\n", $panes ).'</ul></div>
		<script type="text/javascript">
			jQuery(document).ready(function() {
				jQuery("#flexslider-'.$randomId.'").flexslider({controlNav:false,slideshowSpeed:'.$interval.', animation: \''.$animation.'\'});
			});
		</script>';	
	}
	return $return;
}
add_shortcode('slider', 'alc_slider' );

/****/



function alc_slideritem( $atts, $content ){
	extract(shortcode_atts(array(
		'image' => '',
		'title' => '',
	), $atts));
	
	$x = $GLOBALS['slideritem_count'];
	$GLOBALS['sitems'][$x] = array( 'image' => $image, 'title' => $title, 'content' =>  $content );
	
	$GLOBALS['slideritem_count']++;
	
}
add_shortcode( 'slideritem', 'alc_slideritem' );

/************************************************/

/****************Orbit Slider********************
function alc_oslider( $atts, $content ){
	$GLOBALS['oslideritem_count'] = 0;
	extract(shortcode_atts(array(
		'interval' => '500'
	), $atts));
	do_shortcode( $content );
		
	if( is_array( $GLOBALS['ositems'] ) ){
		$icount = 0;
		foreach( $GLOBALS['ositems'] as $item ){
			$panes[] = '<li><img src="'.$item['image'].'" alt="'.$item['title'].'" title="'.$item['title'].'" />
                                    <div class="orbit-caption">'.do_shortcode($item['title']).'</div></li>';   		
			$icount ++ ;
		}
		
		$return ='<div class="orbit-container orbit-stack-on-small"><ul class="orbit-slides-conainer" data-orbit="">'.implode( "\n", $panes ).'</ul></div>
                    <script type=text/javascript>
                        jQuery(document).foundation("orbit", {
                        container_class: "orbit-container",
                         next_class: "orbit-next",
                          next_class: "orbit-next",
                          timer_speed: '.$interval.',
                        })
                    </script>';	
	}
	return $return;
}
add_shortcode('oslider', 'alc_oslider' );

/****

function alc_oslideritem( $atts, $content ){
	extract(shortcode_atts(array(
		'image' => '',
		'title' => '',
	), $atts));
	
	$x = $GLOBALS['oslideritem_count'];
	$GLOBALS['ositems'][$x] = array( 'image' => $image, 'title' => $title, 'content' =>  $content );
	
	$GLOBALS['oslideritem_count']++;
	
}
add_shortcode( 'oslideritem', 'alc_oslideritem' );


/************************************************/

function alc_carousel( $atts, $content ){
	$GLOBALS['caritem_count'] = 0;
	extract(shortcode_atts(array(
		'title' => '',
		'type' => 'custom',
		'automatic' => 'false',
		'min' => '1',
		'max' => '6',
                'slwidth'=>'193',
                'slmargin'=>'0'
	), $atts));
	$randomId = mt_rand(0, 100000);
	$panes = array();	
	$return = '';
	do_shortcode ($content);
        if($type=='logo_slide') { $mc='partners';} else{$mc='';}
	if(isset( $GLOBALS['caritems']) && is_array( $GLOBALS['caritems'] ) ){
		$return.='
		<div class="width-carousel '.$mc.'">
                    <h4 class="title-carousel cat-title">'.$title.'</h4>
                        <div class="border"></div>

				<ul class="customcar'.$randomId.'" id="'.$type.'" >';
					foreach( $GLOBALS['caritems'] as $item ){
						$panes[] = '<li>'.$item['content'].'</li>'; 
					}
					$return.=implode( "\n", $panes ).'
				</ul>
		</div>
		<script type="text/javascript">
			jQuery(document).ready(function(){
                            jQuery(".customcar'.$randomId.'").bxSlider({ 
                                slideWidth: '.$slwidth.',
                                minSlides: '.$min.',
                                maxSlides: '.$max.',
                                auto: '.$automatic.',
                                slideMargin: '.$slmargin.'    
                            });
                            })
		</script>';
	}
	return $return;
}

add_shortcode('carousel', 'alc_carousel' );
/***/

function alc_caritem( $atts, $content ){
	extract(shortcode_atts(array(
	'title' => '',
	), $atts));
	$x = $GLOBALS['caritem_count'];
	$GLOBALS['caritems'][$x] = array('title' => $title, 'content' =>  do_shortcode ($content) );
	$GLOBALS['caritem_count']++;	
}
add_shortcode( 'caritem', 'alc_caritem' );

/************************************************/


/*************** Contact details ****************/

function alc_contact( $atts, $content = null ) {
     extract(shortcode_atts(array(
		"address" => '',
		"tel" => '',
		"email" => '',
	), $atts));	
	$out = '
	<ul class="contact2">';
		if ($address) $out.='<li class="home">'.$address.'</li>';
		if ($tel) $out.='<li class="phone2">'.$tel.'</li>';
		if ($email) $out.='<li class="mail"><a href="mailto:'.$email.'">'.$email.'</a></li>';
	$out.='</ul>';
	$out.= '<p>'.do_shortcode($content).'</p>';
   return $out;
}
add_shortcode('contact', 'alc_contact');

/************************************************/


/************ FEATURED BLOCK****************/
function alc_fblock($atts, $content=NULL){
    extract(shortcode_atts(array(
		'title'=>'',
		'icon'=>'',
                'type'=>''
    ), $atts));
	$out='';
        if($type=='2') {
            $class1= "features-items";
            $class2="line";
        }
        else{
           $class1= "service-block";
           $class2="border"; 
        }
		$out.='
		<div class="'.$class1.'">
			<div class="service-item">
                            <a href="#" class="service-img">
                                <i class="fa '.$icon.' "></i>
                            </a>
                        </div>
                        <h4>'.$title.'</h4>
                        <div class="'.$class2.'"></div>
                        <p>'.do_shortcode($content).'</p>
		</div>';

		
	
    return $out;
}
add_shortcode('fblock', 'alc_fblock');


/*********************************************************/

/***************TITLE BLOCK***************************/
function alc_tblock($atts, $content=NULL){
    extract(shortcode_atts(array(
        'title'=>'', 
        'image'=>''
    ), $atts));
    
    $out ='<h4 class="heading title-block">'.$title.'</h4><div class="border"></div>';
    
    return $out;
}

add_shortcode('tblock', 'alc_tblock');

/******************************************************/

/****************************REVEAL BOX****************/

function alc_reveal($atts, $content=NULL){
    extract(shortcode_atts(array(
        'type'=>'',
        'size'=>'',
        'color'=>'',
        'button'=>'', 
        'revtitle'=>'',
    ), $atts));
    $randomId=  mt_rand(0, 100000);
    
    $out='<a href="#myModal'.$randomId.'"  role="button" data-toggle="modal" class="btn '.$type.' '.$color.' '.$size.'">'.$button.'</a>';
    $out.='<div id="myModal'.$randomId.'"  class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<h3 id="myModalLabel">'.$revtitle.'</h3>
	  </div>
	   <div class="modal-body">
		<p>'.do_shortcode($content).'</p>
	  </div>
	  <div class="modal-footer">
		<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
	  </div>
	 </div>';	
return $out;
}

add_shortcode('reveal', 'alc_reveal');

/*************************************************/


/*********************TOOLTIP*********************/
/*function alc_tooltip($atts, $content=NULL){
    extract(shortcode_atts(array(
        'text'=>'',
        'align'=>''       
    ),$atts));
	$randomId = mt_rand(0, 100000);
    $out = '
	<a href="#" data-toggle="tooltip" id="tooltip'.$randomId.'" title="'.do_shortcode($content).'">'.do_shortcode($text).'</a>
	<script type="text/javascript">jQuery(document).ready(function(){jQuery("#tooltip'.$randomId.'").tooltip({placement: \''.$align.'\'})});</script>';
    return $out;
}

add_shortcode('tooltip', 'alc_tooltip');*/
/************************************************/


/************** PORTFOLIO LISTING ***************/
function alc_portlisting($atts, $content=NULL){
    extract(shortcode_atts(array(
            "title" => 'Recent Projects',
            "limit" => 6,
            "featured" => 0
            ), $atts));
 	global $post;
	$return = '';
    $counter = 0; 
	$isActive = '';
	$args = array('post_type' => 'portfolio', 'taxonomy'=> 'portfolio_category', 'showposts' => $limit, 'posts_per_page' => $limit, 'orderby' => 'date','order' => 'DESC');
	
	if ($featured)
	{
		$args['meta_key'] = '_portfolio_featured'; 
		$args['meta_value'] = '1';
	}
	
   	$query = new WP_Query($args);
	
	$return.='
	<section class="recent-projects">
		<h4>'.$title.'</h4><div class="border"></div>
				<div class="carousel-inner">';
					if ($query->have_posts()):  
						while ($query->have_posts()) : 							
						$query->the_post();
						$custom = get_post_custom($post->ID);
						$link = ''; $thumbnail = get_the_post_thumbnail($post->ID, 'portfolio-4-col'); 
						if ($counter == 0 || $counter % 4 == 0): $return.='<div class="item'.$isActive.'">'; endif;
						$return.='<div class="item column3">
                                                            <div class="view view-two">';
                                                
							if (!empty($thumbnail)): 
								$return.=$thumbnail; 
							else :
								 $return.='<img src="'.get_template_directory_uri().'/images/picture.jpg" alt="'.__ ('No preview image', 'Wecare').'" />';
							endif;	
                                                $return.='<div class="mask">';
                                                        if( !empty ( $custom['_portfolio_video'][0] ) ) : $link = $custom['_portfolio_video'][0]; 
									$return.='<a href="'.$link.'" class="button btn-icon fancybox-video fancybox.iframe"  data-fancybox-group="gallery1" title="'.get_the_title().'">
										<i class="fa fa-film fa-lg"></i>
									</a>';
								elseif( isset($custom['_portfolio_link'][0]) && $custom['_portfolio_link'][0] != '' ) : 
									$return.='<a href="'.$custom['_portfolio_link'][0].'" class="button btn-icon" data-fancybox-group="gallery1"  title="'.get_the_title().'">
										<i class="fa fa-external-link fa-lg"></i>
									</a>';
								elseif(isset( $custom['_portfolio_no_lightbox'][0] )  &&  $custom['_portfolio_no_lightbox'][0] !='' ) : $link = get_permalink(get_the_ID()); 
									$return.='<a href="'.$link.'" class="button btn-icon" data-fancybox-group="gallery1" title="'.get_the_title().'">
										<i class="fa fa-location-arrow fa-lg"></i>
									</a>';
								else : 
									$full_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false); 
									$link = $full_image[0];
									$return.='<a href="'.$link.'" class="button btn-icon" data-fancybox-group="gallery1" title="'.get_the_title().'">
										<i class="fa fa-plus-circle fa-lg"></i>
									</a>';
								endif;
							$return.='</div></div>
                                                            <div class="port-span">
								<h3>'.get_the_title().'</h3>                                    
								<span>'.limit_words(get_the_excerpt(), 12).'</span>';
								
								$return.='</div>
						</div>';		
						if ($counter >0 && ($counter+1) % 4 == 0): $return.='</div>'; endif;							
					$counter ++; endwhile; 
					endif;
					$return.='	

		</div>
	</section>';
	
	return $return;
}

add_shortcode('portlist', 'alc_portlisting');
/*************************************************/
/****** SHOW POSTS BY CATEGORY AND COUNT ********/

function alc_list_posts( $atts )
{
	extract( shortcode_atts( array(
		'category' => '',
                'type' => '',
                'title'=>'',
		'limit' => '5',
		'order' => 'DESC',
		'orderby' => 'date',
	), $atts) );

	$return = '';

	$query = array();

	if ( $category != '' )
		$query[] = 'category=' . $category;

	if ( $limit )
		$query[] = 'numberposts=' . $limit;

	if ( $order )
		$query[] = 'order=' . $order;

	if ( $orderby )
		$query[] = 'orderby=' . $orderby;

	$posts_to_show = get_posts( implode( '&', $query ) );
        
    if ($type == 1)
	{
		$counter = 1;
		$return.='<section class="latest-blog">
		<h4>'.$title.'</h4><div class="border"></div>
		<div class="work_slide2">
			<ul id="work_slide22" class="dark">';
				foreach ($posts_to_show as $ps) 
				{
					$day = get_the_time('d', $ps->ID);
					$month = get_the_time('M', $ps->ID);
					if ($counter ==1) $return.='<li>';
							$thumbnail = get_the_post_thumbnail($ps->ID, 'blog-thumb-3'); $postmeta = get_post_custom($ps->ID); 
						if(!empty($thumbnail) && !isset($postmeta['_post_video'])):
							$return.='<a href="'.get_permalink( $ps->ID ).'" class="post-image">'.$thumbnail.'</a>';
							elseif (isset($postmeta['_post_video'])):
							$return.='<iframe src="http://player.vimeo.com/video/'.$postmeta['_post_video'][0].'" width="270" height="180" class="post-image"></iframe>';
						else: 
							$return.='
							<a href="'.get_permalink( $ps->ID ).'" class="post-image">
								<img src = "http://placehold.it/155x112" alt="'.__('No image', 'Wecare').'" />
							</a>';
						endif;
					$return.='<h4>'.$ps->post_title.'</h4>
                                                  <p>'.limit_words(getPageContent($ps->ID), 15).'</p>
                                                  <a href="'.get_permalink( $ps->ID ).'" class="details">'.__('Read More', 'Wecare').'</a>';
					
				}
			$return.='</li> </ul>
                       </div></section>';
                        $return.="<script type=\"text/javascript\">
			jQuery(window).load(function(){
				jQuery('#work_slide22').bxSlider();
			});
		</script>";
	}
	else
	{
		$return = '<section class="latest-blog">
		<h4>'.$title.'</h4><div class="border"></div><ul class="dark blog-noanim">';		
		foreach ($posts_to_show as $ps) 
		{
			$day = get_the_time('d', $ps->ID);
			$month = get_the_time('M', $ps->ID);
			$return.='<li class="column3">';
				$thumbnail = get_the_post_thumbnail($ps->ID, 'blog-thumb-3'); $postmeta = get_post_custom($ps->ID); 
				if(!empty($thumbnail) && !isset($postmeta['_post_video'])):
				$return.='<a href="'.get_permalink( $ps->ID ).'" class="post-image">'.$thumbnail.'</a>';
				elseif (isset($postmeta['_post_video'])):
				$return.='<iframe src="http://player.vimeo.com/video/'.$postmeta['_post_video'][0].'" width="270"  class="post-image"></iframe>';
				else: 
				$return.='<a href="'.get_permalink( $ps->ID ).'" class="post-image">
				<img src = "http://placehold.it/155x112" alt="'.__('No image', 'Wecare').'" />
				</a>';
				endif;
					$return.='<h4>'.$ps->post_title.'</h4>
							<p>'.limit_words(getPageContent($ps->ID), 15).'</p>
							<a href="'.get_permalink( $ps->ID ).'" class="details">'.__('Read More', 'Wecare').'</a>
			
			</li>';
		}
		$return.='</ul></section>';                
	}
	
	return $return;
}

add_shortcode('list_posts', 'alc_list_posts');

/************************************************/

/*************** SOCIAL BUTTONS *****************/
function alc_social($atts, $content=NULL){
    $GLOBALS['socbuttoncount']=0;
	$out = '';
	do_shortcode ($content);
    if(isset($GLOBALS['soc_buttons']) && is_array($GLOBALS['soc_buttons'])){
        foreach ($GLOBALS['soc_buttons'] as $soc){
            $soclink=$soc['link'];
            $socicon=$soc['icon'];
            $soc_buttons[]="<li><a href=\"$soclink\" target=\"_blank\"><i class=\"fa $socicon\"></i></a></li>";
        }
        $out='<ul class="social-list">'.implode("\n", $soc_buttons).'</ul>';
    }
    return $out;
}

add_shortcode('social', 'alc_social');

/*********************/
function alc_soc_button($atts, $content=NULL){
    extract(shortcode_atts(array(
        'icon'=>'',
        'link'=>''
    ), $atts));
    //do_shortcode ($content);
    $x= $GLOBALS['socbuttoncount'];
    $GLOBALS['soc_buttons'][$x]=array('icon'=> $icon, 'link'=>$link);
    $GLOBALS['socbuttoncount']++;

} 

add_shortcode('soc_button', 'alc_soc_button');
/**************************************************/


/***************** TEAM MEMBERS *******************/
function al_teammember($atts, $content=NULL){
    extract(shortcode_atts(array(
        'name'=>'',
        'position'=>'',
        'desc'=>'',
        'link'=>'',
	'photo'=>'',
        'dshort'=>''
    ), $atts));
	$GLOBALS['sbcount']=0;
	
	do_shortcode ($content);
	$out = '
	<div class=" team-member">
        <div class="view view-sixth">
		<img alt="'.$name.'" src="'.$photo.'">              
                <div class="mask">
                    <h2>'.$position.'</h2>
                    <p>'.do_shortcode($content).'</p>
                    <a href="http://'.$link.'" class="info">'.__('Read More', 'Wecare').'</a>
                </div>
                </div>
		<div class="desc">
                    <h4>'.$name.'</h4>
                    <span>'.$dshort.'</span>
		</div>
	</div>';
    return $out;
}

add_shortcode('teammember', 'al_teammember');



/**************************************************/



/********************Side Navigation*************/

function alc_sidenav( $atts, $content ){
	
	$GLOBALS['sideitem_count'] = 0;
	
	do_shortcode( $content );
	if( is_array( $GLOBALS['sideitems'] ) ){
		foreach( $GLOBALS['sideitems'] as $sideitem ){
			$sideitems[] = '<li><a href="'.$sideitem['link'].'"><i class="fa fa-caret-right"></i>'.do_shortcode($sideitem['content']).'</a></li>';	
		}
		$return = '<ul class="nav nav-list bs-docs-sidenav affix">'.implode( "\n", $sideitems ).'</ul>';
	}
	return $return;

}
add_shortcode( 'sidenav', 'alc_sidenav' );
/************/

function alc_sideitem( $atts, $content ){
	extract(shortcode_atts(array(
		'title' => 'sideitem %d',
        'link' => ''    
	), $atts));
	
	$x = $GLOBALS['sideitem_count'];
	$GLOBALS['sideitems'][$x] = array( 'title' => sprintf( $title, $GLOBALS['sideitem_count'] ), 'link'=>$link, 'content' =>  $content );
	
	$GLOBALS['sideitem_count']++;
}
add_shortcode( 'sideitem', 'alc_sideitem' );


/******************* COLUMNS ********************/

function Wecare_one_whole( $atts, $content = null ) {
   return '<div class="column12">' . do_shortcode($content) . '</div>';
}
add_shortcode('one_whole', 'Wecare_one_whole');

function Wecare_one_half( $atts, $content = null ) {
   return '<div class="column6">' . do_shortcode($content) . '</div>';
}
add_shortcode('one_half', 'Wecare_one_half');

function Wecare_one_third( $atts, $content = null ) {
   return '<div class="column4">' . do_shortcode($content) . '</div>';
}
add_shortcode('one_third', 'Wecare_one_third');

function Wecare_two_third( $atts, $content = null ) {
   return '<div class="column8">' . do_shortcode($content) . '</div>';
}
add_shortcode('two_third', 'Wecare_two_third');

function Wecare_one_fourth( $atts, $content = null ) {
   return '<div class="column3">' . do_shortcode($content) . '</div>';
}
add_shortcode('one_fourth', 'Wecare_one_fourth');

function Wecare_three_fourth( $atts, $content = null ) {
   return '<div class="column9">' . do_shortcode($content) . '</div>';
}
add_shortcode('three_fourth', 'Wecare_three_fourth');

function Wecare_one_sixth( $atts, $content = null ) {
   return '<div class="column2">' . do_shortcode($content) . '</div>';
}
add_shortcode('one_sixth', 'Wecare_one_sixth');

function Wecare_five_twelveth( $atts, $content = null ) {
   return '<div class="column5">' . do_shortcode($content) . '</div>';
}
add_shortcode('five_twelveth', 'Wecare_five_twelveth');

function Wecare_seven_twelveth( $atts, $content = null ) {
   return '<div class="column7">' . do_shortcode($content) . '</div>';
}
add_shortcode('seven_twelveth', 'Wecare_seven_twelveth');


function Wecare_one_twelveth( $atts, $content = null ) {
   return '<div class="column1">' . do_shortcode($content) . '</div>';
}
add_shortcode('one_twelveth', 'Wecare_one_twelveth');

function Wecare_eleven_twelveth( $atts, $content = null ) {
   return '<div class="column11">' . do_shortcode($content) . '</div>';
}
add_shortcode('eleven_twelveth', 'Wecare_eleven_twelveth');

function Wecare_five_sixth( $atts, $content = null ) {
   return '<div class="column10">' . do_shortcode($content) . '</div>';
}
add_shortcode('five_sixth', 'Wecare_five_sixth');

function Wecare_row( $atts, $content = null ) {
   return '<div class="row-fluid">' . do_shortcode($content) . '</div>';
}
add_shortcode('row', 'Wecare_row');

/************************************************/



/***************** CLEAR ************************/

function alc_clear($atts, $content = null) {	
	return '<div class="clearfix"></div>';
}
add_shortcode('clear', 'alc_clear');


/******** SHORTCODE SUPPORT FOR WIDGETS *********/

if (function_exists ('shortcode_unautop')) {
	add_filter ('widget_text', 'shortcode_unautop');
}
add_filter ('widget_text', 'do_shortcode');

/************************************************/
?>