<?php 
function contentbox_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'bgcolor' => 'FFFFFF',
	  'border' => 'CCCCCC',
	  'borderwidth' => '1',
	  'text' => '333333',
	  'corners' => '0',
	  'padding' => '20',
	  'margintop' => '15',
	  'marginbottom' => '15',
	  'marginleft' => '0',
	  'marginright' => '0',
	  'center' => '',
	  'width' => '',
	  'height' => '',
	  'float' => '',
	  'bgfade' => '',
	  'bgfadealign' => 'top',
	  'headerimg' => '',
	  'headerheight' => '',
	  'dropshadow' => '',
	  'rightshadow' => '',
	  'leftshadow' => '',
	  'flareshadow' => '',
	  'roundshadow' => '',
	  'customstyle' => ''
      ), $atts ) );
	$url_base = get_bloginfo('template_directory');

	if ($bgfade) $bgfadeurl = 'background: url('. get_bloginfo('template_directory') . '/images/fades/' . $bgfade .') repeat-x ' . $bgfadealign . ' left;';
	if ($width) $widthcode = 'width: '. $width .'px;';
	if ($height) $heightcode = 'height: '. $height .'px;';
	if ($float) $floatcode = 'float: '. $float .';';
	if ($headerimg) $headcode = 'background: url(\''. $headerimg .'\') no-repeat top;';
	if ($headerheight) $headpad = 'padding-top:'. $headerheight .'px;';
	if ($center) {$align = 'margin: 0 auto;';} else { $align = 'margin:' . $margintop . 'px '. $marginright .'px '. $marginbottom .'px '. $marginleft .'px;';}
	if ($dropshadow) {$dscode = '-webkit-box-shadow: 0px 0px 10px rgba(0,0,0,0.8); -moz-box-shadow: 0px 0px 10px rgba(0,0,0,0.8);';}
	if ($rightshadow) {
		if ($width) { $shadowwidth = $width;} else {$shadowwidth = $rightshadow;};
		$shadowcode = '<div class="scshadow" style="height:31px; width:' . $shadowwidth . 'px; margin: 0px; background: url('.$url_base .'/images/shadows/sp-right-'. $rightshadow .'.png) no-repeat top right;"><!-- --></div>'; };
	if ($leftshadow) {
		if ($width) { $shadowwidth = $width;} else {$shadowwidth = $leftshadow;};
		$shadowcode = '<div class="scshadow" style="height:31px; width:'. $shadowwidth .'px; margin: 0px; background: url('.$url_base .'/images/shadows/sp-left-'. $leftshadow .'.png) no-repeat top left;"><!-- --></div>';};
	
	if ($flareshadow) {
		if ($width) { $shadowwidth = $width;} else {$shadowwidth = $flareshadow;};
		$shadowcode = '<div class="scshadow" style="height:31px; width:'. $shadowwidth .'px; margin: 0px; background: url('.$url_base .'/images/shadows/sp-flare-'. $flareshadow .'.png) no-repeat top;"><!-- --></div>';};
		
	if ($roundshadow) {
		if ($width) { $shadowwidth = $width;} else {$shadowwidth = $roundshadow;};
		$shadowcode = '<div class="scshadow" style="height:31px; width:'. $shadowwidth .'px; margin: 0px; background: url('.$url_base .'/images/shadows/sp-round-'. $roundshadow .'.png) no-repeat top;"><!-- --></div>';};
	
	$search = array ('/<p>/', '/<\/p>/');
	$replace = array ('','');
	$content = preg_replace($search, $replace, $content);
	
   return '<div class="clearfix" style="'. $widthcode . $floatcode . $align . '"><div class="subbox" style="'. $headcode . $heightcode . $bgfadeurl .' background-color:#' . $bgcolor . ';padding:'. $padding .'px; border:' . $borderwidth . 'px solid #' . $border . '; color:#' . $text . '; -moz-border-radius:' . $corners .'px; -webkit-border-radius:' . $corners . 'px;' . $dscode . $customstyle . $headpad .'">' . do_shortcode($content) . '<div style="clear:both;"></div></div>' . $shadowcode .'</div>';
}
add_shortcode('contentbox', 'contentbox_shortcode');



function subbox_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'bgcolor' => 'FFFFFF',
	  'border' => 'CCCCCC',
	  'borderwidth' => '1',
	  'text' => '333333',
	  'corners' => '0',
	  'padding' => '20',
	  'margintop' => '15',
	  'marginbottom' => '15',
	  'marginleft' => '0',
	  'marginright' => '0',
	  'center' => '',
	  'width' => '',
	  'height' => '',
	  'float' => '',
	  'bgfade' => '',
	  'bgfadealign' => 'top',
	  'headerimg' => '',
	  'headerheight' => '',
	  'dropshadow' => '',
	  'rightshadow' => '',
	  'leftshadow' => '',
	  'flareshadow' => '',
	  'roundshadow' => '',
	  'customstyle' => ''
      ), $atts ) );
	$url_base = get_bloginfo('template_directory');

	if ($bgfade) $bgfadeurl = 'background: url('. get_bloginfo('template_directory') . '/images/fades/' . $bgfade .') repeat-x ' . $bgfadealign . ' left;';
	if ($width) $widthcode = 'width: '. $width .'px;';
	if ($height) $heightcode = 'height: '. $height .'px;';
	if ($float) $floatcode = 'float: '. $float .';';
	if ($headerimg) $headcode = 'background: url(\''. $headerimg .'\') no-repeat top;';
	if ($headerheight) $headpad = 'padding-top:'. $headerheight .'px;';
	if ($center) {$align = 'margin: 0 auto;';} else { $align = 'margin:' . $margintop . 'px '. $marginright .'px '. $marginbottom .'px '. $marginleft .'px;';}
	if ($dropshadow) {$dscode = '-webkit-box-shadow: 0px 0px 10px rgba(0,0,0,0.8); -moz-box-shadow: 0px 0px 10px rgba(0,0,0,0.8);';}
	if ($rightshadow) {
		if ($width) { $shadowwidth = $width;} else {$shadowwidth = $rightshadow;};
		$shadowcode = '<div class="scshadow" style="height:31px; width:' . $shadowwidth . 'px; margin: 0px; background: url('.$url_base .'/images/shadows/sp-right-'. $rightshadow .'.png) no-repeat top right;"><!-- --></div>'; };
	if ($leftshadow) {
		if ($width) { $shadowwidth = $width;} else {$shadowwidth = $leftshadow;};
		$shadowcode = '<div class="scshadow" style="height:31px; width:'. $shadowwidth .'px; margin: 0px; background: url('.$url_base .'/images/shadows/sp-left-'. $leftshadow .'.png) no-repeat top left;"><!-- --></div>';};
	
	if ($flareshadow) {
		if ($width) { $shadowwidth = $width;} else {$shadowwidth = $flareshadow;};
		$shadowcode = '<div class="scshadow" style="height:31px; width:'. $shadowwidth .'px; margin: 0px auto; background: url('.$url_base .'/images/shadows/sp-flare-'. $flareshadow .'.png) no-repeat top;"><!-- --></div>';};
		
	if ($roundshadow) {
		if ($width) { $shadowwidth = $width;} else {$shadowwidth = $roundshadow;};
		$shadowcode = '<div class="scshadow" style="height:31px; width:'. $shadowwidth .'px; margin: 0px; background: url('.$url_base .'/images/shadows/sp-round-'. $roundshadow .'.png) no-repeat top;"><!-- --></div>';};
		
	$search = array ('/<p>/', '/<\/p>/');
	$replace = array ('','');
	$content = preg_replace($search, $replace, $content);
		
   return '<div class="clearfix" style="'. $widthcode . $floatcode . $align . '"><div class="subbox" style="'. $headcode . $heightcode . $bgfadeurl .' background-color:#' . $bgcolor . ';padding:'. $padding .'px; border:' . $borderwidth . 'px solid #' . $border . '; color:#' . $text . '; -moz-border-radius:' . $corners .'px; -webkit-border-radius:' . $corners . 'px;' . $dscode . $customstyle . $headpad .'">' . do_shortcode($content) . '<div style="clear:both;"></div></div>' . $shadowcode . '</div>';
}
add_shortcode('subbox', 'subbox_shortcode');

function greybox_shortcode( $atts, $content = null ) {
   return '<div style="padding:20px;background-color:#F3F3F3;border:1px solid #ccc;margin-bottom:10px;">' . do_shortcode($content) . '</div>';
}
add_shortcode('greybox', 'greybox_shortcode');

function yellowbox_shortcode( $atts, $content = null ) {
   return '<div style="padding:20px;background-color:#FFFFCC;border:1px solid #FFCC33;margin-bottom:10px;">' . do_shortcode($content) . '</div>';
}
add_shortcode('yellowbox', 'yellowbox_shortcode');

function redbox_shortcode( $atts, $content = null ) {
   return '<div style="padding:20px;background-color:#FFE6E6;border:1px solid #FFBBBB;margin-bottom:10px;">' . do_shortcode($content) . '</div>';
}
add_shortcode('redbox', 'redbox_shortcode');

function bluebox_shortcode( $atts, $content = null ) {
   return '<div style="padding:20px;background-color:#E6F2FF;border:1px solid #B3D9FF;margin-bottom:10px;">' . do_shortcode($content) . '</div>';
}
add_shortcode('bluebox', 'bluebox_shortcode');


function shadow_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'width' => '900',
	  'margins' => '',
      ), $atts ) );
	$url_base = get_bloginfo('template_directory');
	if ($margins) { $shadowmargins = $margins."px";} else {$shadowmargins = 'auto';};
   return '<div style="background-image: url(' . $url_base . '/images/shadows/sp-round-' . $width . '.png);width: ' . $width . 'px; height:31px; margin: 0px ' . $shadowmargins . '; text-align:center;"></div>';
}
add_shortcode('shadow', 'shadow_shortcode');

function boxwide_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
      'shadow' => '',
	  'bgcolor' => 'FFF',
	  'border' => 'CCC',
	  'bgfade' => ''
      ), $atts ) );
	if ($bgfade) $bgfadeurl = 'background-image: url('. get_bloginfo('template_directory') . '/images/fades/' . $bgfade .'); background-repeat: repeat-x; background-position: top;';
	$url_base = get_bloginfo('template_directory');
	$csscode = 'style="margin: 0px -20px; padding:20px; '. $bgfadeurl .' border-top:solid 1px #' . $border . '; background-color: #' . $bgcolor . '; border-bottom:solid 1px #' . $border . ';"';
	if ($shadow) $shadowcode = '<div class="scshadow" style="height:50px; margin: 0 -20px 0 -20px; background: url('.$url_base .'/images/shadows/sales-shadow.png) no-repeat top center;"></div>';

	
   return '<div class="widebox" ' . $csscode . '>' . do_shortcode($content) . '<div style="clear:both;"></div></div>' . $shadowcode .'';
}
add_shortcode('boxwide', 'boxwide_shortcode');

function buybutton_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
      'image' => '',
	  'link' => '',
	  'flashing' => '',
	  'width' => '370',
	  'bgcolor' => '', //IE hack to eliminate black areas in transparent PNG images
	  'height' => '93',
	  'target' => '',
	  'addon' => ''
      ), $atts ) );
	if ($flashing) $flashingclass = 'flashing';
	if ($bgcolor) $bgcolorcode = 'background-color: #' . $bgcolor . ';';
	$url_base = get_bloginfo('template_directory');
	
	if($addon) $addoncode = '<div style="width: ' . $width . 'px; text-align:center;margin:0 auto;"><img src="' . $url_base . '/images/button-addon-' . $addon . '.png"/></div>';
	if($target) $windowcode = ' target="_blank"';
	
   return '<div class="' . $flashingclass . ' buybutton" style="' . $bgcolorcode . 'height: ' . $height . 'px; width: ' . $width . 'px; background-position:0 -' . $height . 'px; background-image: url(' . $url_base . '/images/buttons/' . $image .');"><a style="' . $bgcolorcode . 'background-image: url(' . $url_base . '/images/buttons/' . $image .');"  href="' . $link . '" ' . $windowcode . ' onmouseover="this.style.backgroundPosition=\'0  -' . $height . 'px\';" onmouseout="this.style.backgroundPosition=\'0 0\';"></a></div>' . $addoncode .'';
}
add_shortcode('buybutton', 'buybutton_shortcode');

function submitbutton_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
      'image' => '',
	  'flashing' => '',
	  'width' => '254',
	  'bgcolor' => '', //IE hack to eliminate black areas in transparent PNG images
	  'height' => '63',
	  'formid' => 'optinform1'
      ), $atts ) );
	if ($flashing) $flashingclass = 'flashing';
	if ($bgcolor) $bgcolorcode = 'background-color: #' . $bgcolor . ';';
	$url_base = get_bloginfo('template_directory');
	
   return '<div class="' . $flashingclass . ' submitbutton" style="' . $bgcolorcode . 'height: ' . $height . 'px; width: ' . $width . 'px; background-position:0 -' . $height . 'px; background-image: url(' . $url_base . '/images/buttons/' . $image .');"><a href="javascript:void(0);" onclick="submitForm(\'' . $formid . '\');" style="' . $bgcolorcode . 'background-image: url(' . $url_base . '/images/buttons/' . $image .');" onmouseover="this.style.backgroundPosition=\'0  -' . $height . 'px\';" onmouseout="this.style.backgroundPosition=\'0 0\';"></a></div>';
}
add_shortcode('submitbutton', 'submitbutton_shortcode');

function highlight_shortcode( $atts, $content = null ) {

   return '<span style="background-color:#FFFF00;">' . $content . '</span>';
}
add_shortcode('highlight', 'highlight_shortcode');

function list_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'style' => 'greencheck',
      ), $atts ) );
	
	$replace = '<ul class="' . $style . '"';
	$content = preg_replace('/<ul/', $replace, $content);

   return $content;
}
add_shortcode('list', 'list_shortcode');

function testimonial_shortcode( $atts, $content = null ) {
$url_base = get_bloginfo('template_directory');
   return '<div style="width:450px;margin:0 auto 15px auto; text-align:center; background: transparent url(' . $url_base . '/images/testimonial-top.png) no-repeat top center;"><div style="background: transparent url(' . $url_base . '/images/testimonial-bottom.png) no-repeat bottom center;padding: 15px 65px;">' . $content . '</div></div>';
}
add_shortcode('testimonial', 'testimonial_shortcode');

function guarantee_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'color' => 'blue',
      ), $atts ) );
$url_base = get_bloginfo('template_directory');
   return '<table width="508" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td valign="bottom"><img src="' . $url_base . '/images/page-elements/certificate_' . $color . '_top.jpg" width="508" height="193" /></td></tr><tr><td style="background: url(' . $url_base . '/images/page-elements/certificate_' . $color . '_fill.jpg) repeat-y top center;"><table width="392" border="0" cellspacing="0" cellpadding="5" align="center"><tr><td>' . do_shortcode($content) . '</td></tr></table></td></tr><tr><td valign="top"><img src="' . $url_base . '/images/page-elements/certificate_' . $color . '_bottom.jpg" width="508" height="122" /></td></tr></table>';
}
add_shortcode('guarantee', 'guarantee_shortcode');

function testimonialbox_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'color' => 'blue',
      ), $atts ) );
$url_base = get_bloginfo('template_directory');
   return '<table width="508" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td valign="bottom"><img src="' . $url_base . '/images/page-elements/testimonial_' . $color . '_top.jpg" width="510" height="43" /></td></tr><tr><td style="background: url(' . $url_base . '/images/page-elements/testimonial_' . $color . '_fill.jpg) repeat-y top center;"><table width="392" border="0" cellspacing="0" cellpadding="5" align="center"><tr><td>' . do_shortcode($content) . '</td></tr></table></td></tr><tr><td valign="top"><img src="' . $url_base . '/images/page-elements/testimonial_' . $color . '_bottom.jpg" width="510" height="40" /></td></tr></table>';
}
add_shortcode('testimonialbox', 'testimonialbox_shortcode');

function arrows_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'color' => 'orange',
	  'addon' => ''
      ), $atts ) );
$url_base = get_bloginfo('template_directory');

	if($addon) $addoncode = '<tr><td colspan="3" align="center"><img src="' . $url_base . '/images/button-addon-' . $addon . '.png"/></td></tr>';

   return '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin:15px auto;display:block;"><tr><td width="78"><img src="' . $url_base . '/images/button-arrow-left-' . $color . '.png"/></td><td  width="99%" align="center">' . do_shortcode($content) . '</td><td width="78"><img src="' . $url_base . '/images/button-arrow-right-' . $color . '.png"/></td></tr>' . $addoncode . '</table>';
}
add_shortcode('arrows', 'arrows_shortcode');

function bigarrows_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'color' => 'orange'
      ), $atts ) );
$url_base = get_bloginfo('template_directory');


   return '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin:15px auto 0px auto;display:block;"><tr><td width="80"><img src="' . $url_base . '/images/right-arrow-' . $color . '.png" style="margin-right:15px;"/></td><td width="99%" align="center">' . do_shortcode($content) . '</td><td width="80"><img src="' . $url_base . '/images/left-arrow-' . $color . '.png" style="margin-left:15px;"/></td></tr></table>';
}
add_shortcode('bigarrows', 'bigarrows_shortcode');

function adblock_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'align' => 'left',
	  'adcode' => ''
      ), $atts ) );

   return '<div style="float: ' . $align . '; padding:15px;">' . $adcode . '</div>';
}
add_shortcode('adblock', 'adblock_shortcode');

function wraparrow_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'color' => 'red'
      ), $atts ) );

   return '</div><div class="arrow' . $color . 'left"><div class="arrow' . $color . 'right"><div style="width:500px;margin:0 auto;">' . do_shortcode($content) . '</div></div></div><div style="padding:0 95px;">';
}
add_shortcode('wraparrow', 'wraparrow_shortcode');

function flexsocial_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'size' => '64',
	  'align' => 'left',
	  'target' => ''
      ), $atts ) );

	$url_base = get_bloginfo('template_directory');
	$icons = array("'flex_sm_twitter_link'", "'flex_sm_facebook_link'", "'flex_sm_linkedin_link'");
	if(get_option('flex_sm_title') != "") { $tit = '<p><strong>' . get_option('flex_sm_title') . '</strong></p>'; }
	if ($align == "left") { $aligncode = "left"; }
	elseif ($align == "right") { $aligncode = "right"; }
	else { $aligncode = "center"; }
	if($target) $windowcode = ' target="_blank"';
	if(get_option('flex_sm_twitter_link') != "") { $twit = '<a href="' . get_option('flex_sm_twitter_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Twitter.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_facebook_link') != "") { $fb = '<a href="' . get_option('flex_sm_facebook_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Facebook.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_youtube_link') != "") { $yt = '<a href="' . get_option('flex_sm_youtube_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Youtube.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_linkedin_link') != "") { $li = '<a href="' . get_option('flex_sm_linkedin_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Linkedin.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_myspace_link') != "") { $ms = '<a href="' . get_option('flex_sm_myspace_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Myspace.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_delicious_link') != "") { $del = '<a href="' . get_option('flex_sm_delicious_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Deli.cio.us.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_digg_link') != "") { $digg = '<a href="' . get_option('flex_sm_digg_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Digg.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_furl_link') != "") { $furl = '<a href="' . get_option('flex_sm_furl_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Furl.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_reddit_link') != "") { $reddit = '<a href="' . get_option('flex_sm_reddit_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/reddit.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_stumbleupon_link') != "") { $su = '<a href="' . get_option('flex_sm_stumbleupon_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/StumbleUpon.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_veoh_link') != "") { $veoh = '<a href="' . get_option('flex_sm_veoh_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Veoh.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_viddler_link') != "") { $vid = '<a href="' . get_option('flex_sm_viddler_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Viddler.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_myspacevideo_link') != "") { $msv = '<a href="' . get_option('flex_sm_myspacevideo_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Video.MySpace.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_vimeo_link') != "") { $vim = '<a href="' . get_option('flex_sm_vimeo_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/Vimeo.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }
	if(get_option('flex_sm_rss_link') != "") { $rss = '<a href="' . get_option('flex_sm_rss_link') . '"' . $windowcode . '><img src="' . get_bloginfo('template_directory') . '/images/socialmedia/RSS.png" style="width:' . $size . 'px;margin:0 5px 5px 0;" /></a>'; }

   return  '<table class="flexsocial" width="100%"><tr><td align="' . $aligncode . '">' . stripslashes($tit) . $twit . $fb . $yt . $li . $ms . $del . $digg . $furl . $reddit . $rss . $su . $veoh . $vid . $msv . $vim . '</td></tr></table>';
}
add_shortcode('flexsocial', 'flexsocial_shortcode');


function flexslider_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'width' => '650',
	  'height' => '500',
	  'arrows' => 'orange',
      ), $atts ) );
	
	global $load_slider;
	
	$load_slider = true;

	$url_base = get_bloginfo('template_directory');
	
	if($arrows == "plain") { 
		$buttoncode = '<img class="scrollButtons left" src="' . $url_base . '/images/scroll_left_'. $arrows . '.png" style="top:' . ($height + 30) . 'px;"/><img class="scrollButtons right" src="' . $url_base . '/images/scroll_right_' . $arrows . '.png"  style="top:' . ($height + 30) . 'px;"/>';
		$btmpad = '70px';
	} else if ($arrows == "none") {
		$buttoncode = '';
		$btmpad = '10px';
	} else {
		$buttoncode = '<img class="scrollButtons left" src="' . $url_base . '/images/scroll_left_'. $arrows . '.png" style="top:' . ($height + 40) . 'px;"/><img class="scrollButtons right" src="' . $url_base . '/images/scroll_right_' . $arrows . '.png"  style="top:' . ($height + 40) . 'px;"/>';
		$btmpad = '90px';
	}

   return  '<script type="text/javascript">jQuery(document).ready(function(){ jQuery(".panel").css("height", "' . $height . 'px"); jQuery(".panel").css("width", "' . ($width - 40) . 'px");}); </script> 
   <div style="padding-bottom:' . $btmpad . ';"><div id="slider" style="width:' . $width . 'px;"><ul class="nav">
</ul>
<div class="scroll" style="height:' . $height . 'px;"><div class="scrollContainer">' . do_shortcode($content) . '</div></div>' . $buttoncode . '</div></div>';
}
add_shortcode('flexslider', 'flexslider_shortcode');


function flexpage_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'menu' => ''
      ), $atts ) );
	$menuitemnospace = str_replace(' ', '', $menu);
	$menuitem = strtolower ($menuitemnospace);

   return  '<script type="text/javascript">jQuery("ul.nav").append("<li><a href=\"#' . $menuitem . '\">' . $menu . '<\/a><\/li>"); </script> <div id="' . $menuitem . '" class="panel">' . do_shortcode($content) . '</div>';
}
add_shortcode('flexpage', 'flexpage_shortcode');

function flexsig_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(), $atts ) );
	
	$pre = stripslashes(get_option('flex_sig_pre'));
	$img = get_option('flex_sig_image');
	$post = stripslashes(get_option('flex_sig_post'));

   return  '<div class="flexsig"><p>' . do_shortcode($pre) . '</p><p><img src="' . $img . '" /></p><p>' . do_shortcode($post) . '</p></div>';
}
add_shortcode('flexsig', 'flexsig_shortcode');

function divider_shortcode( $atts, $content = null ) {
   return  '<span class="divider_pad"></span>';
}
add_shortcode('divider', 'divider_shortcode');

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

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

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

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

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

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

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

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

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

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

function dropcap_shortcode( $atts, $content = null ) {
	extract( shortcode_atts( array(
	  'color' => '999999',
	  'font' => 'Georgia',
	  'size' => '60'
      ), $atts ) );
   return  '<span class="dropcap" style="font-family:' . $font . '; color: #' . $color . '; font-size: ' . $size . 'px; line-height: ' . ($size - 20) . 'px;">' . $content . '</span>';
}
add_shortcode('dropcap', 'dropcap_shortcode');


?>