function adelante_code($atts, $content = null)
 {
     extract(shortcode_atts(array('theme' => 'default', 'version' => 3, 'lang' => '', 'collapse' => 0, 'classname' => '', 'title' => '', 'toolbar' => 0, 'wraplines' => 1), $atts));
     return "[{$lang} theme=\"{$theme}\" shversion=\"{$version}\" collapse=\"{$collapse}\" classname=\"{$classname}\" title=\"{$title}\" toolbar=\"{$toolbar}\" wraplines=\"{$wraplines}\"]" . adelante_remove_autop($content) . "[/{$lang}]";
 }
function adelante_get_teaser()
{
    global $wp_query;
    $start = '<div id="teaser"><div id="teaser-content" class="inner"><div id="teaser-inner">';
    $end = '</div></div></div><div id="teaser-shadow">&nbsp;</div>';
    // Has a Teaser setting been made at post/page level?
    $teaser_text = get_post_meta($wp_query->queried_object_id, "teaser_text", true);
    $teaser_image = get_post_meta($wp_query->queried_object_id, "teaser_image_custom", true);
    if ($teaser_image != "") {
        $teaser_image = '<div class="teaser-image"><img src="' . $teaser_image . '" alt="teaser-image" /></div>';
    }
    switch ($teaser_text) {
        case "disabled":
            return;
        case "twitter":
            strlen(get_option("adelante_twitter_username")) > 0 ? $output = get_option('adelante_twitter_loading_message') : ($output = "Please specify a Twitter username <a href='" . site_url() . "/wp-admin/admin.php?page=adelante#social" . "'>here</a>");
            break;
        case "custom":
            $custom = get_post_meta($wp_query->queried_object_id, "teaser_text_custom", true);
            if (sizeof($custom) > 0) {
                $output = $custom;
            } else {
                $output = get_bloginfo('description');
            }
            break;
        default:
            $adelante_teaser_text = get_option("adelante_teaser_text");
            switch ($adelante_teaser_text) {
                case "twitter":
                    strlen(get_option("adelante_twitter_username")) > 0 ? $output = get_option('adelante_twitter_loading_message') : ($output = "Please specify a Twitter username <a href='" . site_url() . "/wp-admin/admin.php?page=adelante#social" . "'>here</a>");
                    break;
                case "custom":
                    $custom = get_option('adelante_teaser_custom_text');
                    if (strlen($custom) > 0) {
                        $output = $custom;
                    } else {
                        $output = get_bloginfo('description');
                    }
                    break;
                case "disabled":
                    return;
                default:
                    $output = get_bloginfo('description');
            }
            break;
    }
    $adelante_teaser_image = get_option("adelante_teaser_image");
    $out = $start;
    if ($adelante_teaser_image == 'left' || $adelante_teaser_image == 'both') {
        $out .= $teaser_image;
    }
    $out .= $output;
    if ($adelante_teaser_image == 'right' || $adelante_teaser_image == 'both') {
        $out .= $teaser_image;
    }
    $out .= $end;
    echo adelante_remove_autop($out);
    if ($teaser_text == "twitter" || $adelante_teaser_text == "twitter") {
        ?>
        <script>
            getTwitters('teaser-content', { 
                id: '<?php 
        echo get_option("adelante_twitter_username");
        ?>
', 
                count: 1, 
                enableLinks: true, 
                ignoreReplies: true, 
                clearContents: true,
                template: '<img class="twitterAvatar" src="%user_profile_image_url%" height=24 /> <span class="twitterStatus">%text%</span> <a href="http://twitter.com/%user_screen_name%/statuses/%id_str%/">%time%</a>'
            }); 
        </script>
<?php 
    }
}