add social buttons to WordPress Embeds

php code: functions.php

<?php
add_filter('embed_oembed_html', 'add_social_share_buttons', 10, 3);

function add_social_share_buttons($data, $url, $args = array()) {

$app_id = '408929209210377';
$thanks_id = al_get_page_by_template('page-thank-you.php');

global $post;
 if (has_post_thumbnail( $post->ID ) ){
	$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail' );
 }

    ob_start();
    ?>
<div class="share_vid_buttons">
    <div class="share" id="shareTop">
        <a data-type="facebook" href="https://www.facebook.com/dialog/feed?app_id=<?php echo $app_id; ?>&name=<?php echo get_the_title($post->ID); ?>&display=popup&link=<?php echo get_permalink($post->ID); ?><?php if($image){echo '&picture='.$image[0];} ?>&redirect_uri=<?php echo get_permalink($thanks_id); ?>" class="btn btn-share facebook_button"  target="_blank" title="Share on Facebook">
		<span class="textNode icon"><span class="hidden-phone">Share On</span>Facebook</span>
		</a>
		<a href="https://twitter.com/intent/tweet?text=<?php echo get_the_title($post->ID); ?>&url=<?php echo get_permalink($post->ID); ?>" class="btn btn-share twitter_button" target="_blank" title="Share on Twitter">
		<span class="textNode icon">Twitter</span>
		</a>
		<a class="pin_it_btn" href="//www.pinterest.com/pin/create/button/?url=<?php echo get_permalink($post->ID); ?><?php if($image){echo '&media='.$image[0];} ?>&description=<?php echo get_the_title($post->ID); ?>"  target="_blank" ><i class="fa fa-pinterest"></i> Pin It</a>
		</div>
    <div class="vid_cont_social">
        <ul class="share hidden-phone" id="shareOverlay">
            <li class="facebook">
                <a href="https://www.facebook.com/dialog/feed?app_id=<?php echo $app_id; ?>&name=<?php echo get_the_title($post->ID); ?>&display=popup&link=<?php echo get_permalink($post->ID); ?><?php if($image){echo '&picture='.$image[0];} ?>&redirect_uri=<?php echo get_permalink($post->ID); ?>" class="btn btn-share facebook_button" target="_blank" title="Share on Facebook">Facebook</a>
            </li>
            <li class="twitter">
                <a class="btn btn-share twitter_button" href="https://twitter.com/intent/tweet?text=<?php echo get_the_title($post->ID); ?>&url=<?php echo get_permalink($post->ID); ?>" class="btn btn-share twitter_button" target="_blank" title="Share on Twitter">Twitter</a>
            </li>
        </ul>

        <?php
        echo wp_oembed_get( $url, $args );
        ?>

    </div>
    <div id="shareRowBottom">
        <a href="https://www.facebook.com/dialog/feed?app_id=<?php echo $app_id; ?>&name=<?php echo get_the_title($post->ID); ?>&display=popup&link=<?php echo get_permalink($post->ID); ?><?php if($image){echo '&picture='.$image[0];} ?>&redirect_uri=<?php echo get_permalink($thanks_id); ?>" target="_blank" class="btn btn-share facebook_button" title="Share on Facebook">
            <span class="textNode icon"><span class="preface">Share on</span> Facebook</span>
        </a>
        <a class="btn btn-share twitter_button" href="https://twitter.com/intent/tweet?text=<?php echo get_the_title($post->ID); ?>&url=<?php echo get_permalink($post->ID); ?>" class="btn btn-share twitter_button" target="_blank" title="Share on Twitter">
            <span class="textNode icon"><span class="preface">Share on</span> Twitter</span>
        </a>
    </div>

	<!-- modal content -->
		<div id="basic-modal-content">

<div class="content">
  <div class="postShareSocial" style="text-align:center;">
    <h3>Want More Stuff Like This?</h3>
    <div class="message facebook">
      <p>Help us strengthen our country by spreading our culture far and wide.</p> 
<p>Like us on Facebook to add daily Awesomeness to your feed.</p>
      <p>
        <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FBahamianTube&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;share=false&amp;height=21&amp;appId=408929209210377" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;width: 95px;" allowTransparency="true"></iframe>

		<a href="https://twitter.com/BahamianTube" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @BahamianTube</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

      </p>
    </div>
  </div>
</div><!-- /content -->

		</div>

		<!-- preload the images -->
		<div style='display:none'>
			<img src='<?php echo dirname( get_bloginfo('stylesheet_url') ) ?>/img/basic/x.png' alt='' />
		</div>

</div>
    <?php
    $out = ob_get_contents();

    ob_end_clean();

$output = str_replace(array("rn", "r", "n"), "", $out);

    return $output;
}

function theme_name_scripts() {
	wp_enqueue_style( 'jquery-tabs', dirname( get_bloginfo('stylesheet_url') ) . '/css/jquery-tabs.css');
	wp_enqueue_style( 'font-awesome', dirname( get_bloginfo('stylesheet_url') ) . '/css/font-awesome.min.css' );
	wp_enqueue_script( 'popupwindow', dirname( get_bloginfo('stylesheet_url') ) . '/js/jquery.popupwindow.js', array( 'jquery' ), '1.0', false);
	wp_enqueue_script( 'jquery-tabs-js', dirname( get_bloginfo('stylesheet_url') ) . '/js/jquery-tabs.js', array( 'jquery'), '1.0', false);
	wp_enqueue_script( 'jquery.simplemodal.js', dirname( get_bloginfo('stylesheet_url') ) . '/js/jquery.simplemodal.js', array( 'jquery'), '1.0', false);
	//wp_enqueue_script( 'pinit', '//assets.pinterest.com/js/pinit.js', array(), '1.0', true);
	wp_enqueue_script( 'custom-js', dirname( get_bloginfo('stylesheet_url') ) . '/js/custom.js', array( 'jquery', 'popupwindow', 'jquery-tabs-js' ), '1.0', true);

}

add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );

function share_buttons_above( $atts ){

$app_id = '408929209210377';
$thanks_id = al_get_page_by_template('page-thank-you.php');
global $post;
 if (has_post_thumbnail( $post->ID ) ){
	$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail' );
 }

    ob_start();
    ?>
<div class="share_vid_buttons">
    <div class="share" id="shareTop">
        <a data-type="facebook" href="https://www.facebook.com/dialog/feed?app_id=<?php echo $app_id; ?>&name=<?php echo get_the_title($post->ID); ?>&display=popup&link=<?php echo get_permalink($post->ID); ?><?php if($image){echo '&picture='.$image[0];} ?>&redirect_uri=<?php echo get_permalink($thanks_id); ?>" class="btn btn-share facebook_button"  target="_blank" title="Share on Facebook">
		<span class="textNode icon"><span class="hidden-phone">Share On</span>Facebook</span>
		</a>
		<a href="https://twitter.com/intent/tweet?text=<?php echo get_the_title($post->ID); ?>&url=<?php echo get_permalink($post->ID); ?>" class="btn btn-share twitter_button" target="_blank" title="Share on Twitter">
		<span class="textNode icon">Twitter</span>
		</a>
		<a class="pin_it_btn" href="//www.pinterest.com/pin/create/button/?url=<?php echo get_permalink($post->ID); ?><?php if($image){echo '&media='.$image[0];} ?>&description=<?php echo get_the_title($post->ID); ?>"  target="_blank" ><i class="fa fa-pinterest"></i> Pin It</a>
		</div>
</div>

	<!-- modal content -->
		<div id="basic-modal-content">

<div class="content">
  <div class="postShareSocial" style="text-align:center;">
    <h3>Want More Stuff Like This?</h3>
    <div class="message facebook">
      <p>Help us strengthen our country by spreading our culture far and wide.</p> 
<p>Like us on Facebook to add daily Awesomeness to your feed.</p>
      <p>
        <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FBahamianTube&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;share=false&amp;height=21&amp;appId=408929209210377" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;width: 95px;" allowTransparency="true"></iframe>

		<iframe frameborder="0" scrolling="no" id="twitter-widget-0" allowtransparency="true" src="http://platform.twitter.com/widgets/follow_button.1387492107.html#_=1389504017106&amp;id=twitter-widget-0&amp;lang=en&amp;screen_name=BahamianTube&amp;show_count=false&amp;show_screen_name=false&amp;size=m" class="twitter-follow-button twitter-follow-button" title="Twitter Follow Button" data-twttr-rendered="true" style="width: 60px; height: 20px;"></iframe>

      </p>
    </div>
  </div>
</div><!-- /content -->

		</div>

		<!-- preload the images -->
		<div style='display:none'>
			<img src='<?php echo dirname( get_bloginfo('stylesheet_url') ) ?>/img/basic/x.png' alt='' />
		</div>

    <?php
    $out = ob_get_contents();

    ob_end_clean();

$output = str_replace(array("rn", "r", "n"), "", $out);

    return $output;

}
add_shortcode( 'share_buttons_above', 'share_buttons_above' );

function share_buttons_below( $atts ){

$app_id = '408929209210377';
$thanks_id = al_get_page_by_template('page-thank-you.php');
global $post;
 if (has_post_thumbnail( $post->ID ) ){
	$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail' );
 }

    ob_start();
    ?>
<div class="share_vid_buttons">
    <div id="shareRowBottom">
        <a href="https://www.facebook.com/dialog/feed?app_id=<?php echo $app_id; ?>&name=<?php echo get_the_title($post->ID); ?>&display=popup&link=<?php echo get_permalink($post->ID); ?><?php if($image){echo '&picture='.$image[0];} ?>&redirect_uri=<?php echo get_permalink($thanks_id); ?>" target="_blank" class="btn btn-share facebook_button" title="Share on Facebook">
            <span class="textNode icon"><span class="preface">Share on</span> Facebook</span>
        </a>
        <a class="btn btn-share twitter_button" href="https://twitter.com/intent/tweet?text=<?php echo get_the_title($post->ID); ?>&url=<?php echo get_permalink($post->ID); ?>" class="btn btn-share twitter_button" target="_blank" title="Share on Twitter">
            <span class="textNode icon"><span class="preface">Share on</span> Twitter</span>
        </a>
    </div>
</div>
    <?php
    $out = ob_get_contents();

    ob_end_clean();

$output = str_replace(array("rn", "r", "n"), "", $out);

    return $output;

}
add_shortcode( 'share_buttons_below', 'share_buttons_below' );

function share_buttons_over_video( $atts, $content = null ) {
$app_id = '408929209210377';
$thanks_id = al_get_page_by_template('page-thank-you.php');
global $post;
 if (has_post_thumbnail( $post->ID ) ){
	$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail' );
 }

    ob_start();
    ?>
<div class="share_vid_buttons">
    <div class="vid_cont_social">
        <ul class="share hidden-phone" id="shareOverlay">
            <li class="facebook">
                <a href="https://www.facebook.com/dialog/feed?app_id=<?php echo $app_id; ?>&name=<?php echo get_the_title($post->ID); ?>&display=popup&link=<?php echo get_permalink($post->ID); ?><?php if($image){echo '&picture='.$image[0];} ?>&redirect_uri=<?php echo get_permalink($thanks_id); ?>" class="btn btn-share facebook_button" target="_blank" title="Share on Facebook">Facebook</a>
            </li>
            <li class="twitter">
                <a class="btn btn-share twitter_button" href="https://twitter.com/intent/tweet?text=<?php echo get_the_title($post->ID); ?>&url=<?php echo get_permalink($post->ID); ?>" class="btn btn-share twitter_button" target="_blank" title="Share on Twitter">Twitter</a>
            </li>
        </ul>

        <?php
        echo wp_oembed_get( $content, $args = array() );
        ?>

    </div>
</div>
    <?php
    $out = ob_get_contents();

    ob_end_clean();
/*array("rn", "r", "n")*/
$output = str_replace(array("rn", "r", "n"), "", $out);

    return $output;
}
add_shortcode( 'share_buttons_over_video', 'share_buttons_over_video' );

function wpb_set_post_views($postID) {
    $count_key = 'wpb_post_views_count';
    $count = get_post_meta($postID, $count_key, true);
    if($count==''){
        $count = 0;
        delete_post_meta($postID, $count_key);
        add_post_meta($postID, $count_key, '0');
    }else{
        $count++;
        update_post_meta($postID, $count_key, $count);
    }
}
//To keep the count accurate, lets get rid of prefetching
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);

function wpb_track_post_views ($post_id) {
    if ( !is_single() ) return;
    if ( empty ( $post_id) ) {
        global $post;
        $post_id = $post->ID;    
    }
    wpb_set_post_views($post_id);
}
add_action( 'wp_head', 'wpb_track_post_views');

function wpb_get_post_views($postID){
    $count_key = 'wpb_post_views_count';
    $count = get_post_meta($postID, $count_key, true);
    if($count==''){
        delete_post_meta($postID, $count_key);
        add_post_meta($postID, $count_key, '0');
        return "0 View";
    }
    return $count.' Views';
}

add_image_size( 'featured-thumb', 75, 50, true );

function al_get_page_by_template($template_name) {
    $pages = get_posts(array(
        'post_type' => 'page',
        'meta_key' => '_wp_page_template',
        'meta_value' => $template_name
    ));
    $pagepid = $pages[0]->ID;
    return $pagepid;
}

 

css style code: style.css

/*  share button css */

.share_vid_buttons #shareTop
            {
                list-style: none;
                padding: 0;
                position: relative;
                z-index: 4;
                margin: 0;
                *zoom: 1;
            }

            .share_vid_buttons #shareTop:before, .share_vid_buttons #shareTop:after
            {
                display: table;
                content: "";
                line-height: 0;
            }

            .share_vid_buttons #shareTop:after
            {
                clear: both;
            }

            .share_vid_buttons #shareTop a
            {
                -webkit-user-select: none;
                -moz-user-select: none;
                -ms-user-select: none;
                -o-user-select: none;
                user-select: none;
                display: -moz-inline-stack;
                display: inline-block;
                zoom: 1;
                *display: inline;
                vertical-align: top;
                padding: 9px 18px;
                margin-right: 2px;
				line-height: 15px;
            }

            .share_vid_buttons #shareTop a .textNode
            {
                display: -moz-inline-stack;
                display: inline-block;
                zoom: 1;
                *display: inline;
                vertical-align: top;
                vertical-align: middle;
                line-height: 1em;
                height: 1em;
            }

            .share_vid_buttons #shareTop a.facebook_button .icon:before
            {
                content: 'f09a';
                color: #fff;
                font-size: 1.2em;
                padding: 0;
                line-height: 1em;
                vertical-align: middle;
                position: relative;
                top: -1px;
                margin-right: 6px;
                margin-left: -5px;
                padding-top: 0;
                margin-right: 8px;
            }

            .share_vid_buttons #shareTop a.twitter_button .icon:before
            {
                content: 'f099';
                color: #fff;
                font-size: 1.2em;
                padding: 0;
                line-height: 1em;
                vertical-align: middle;
                position: relative;
                top: -1px;
                margin-right: 6px;
                margin-left: -5px;
                padding-top: 0;
            }

            .share_vid_buttons a.facebook_button
            {
                border-color: #37538d #37538d #213256;
                border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
                color: #ffffff;
                text-shadow: 0 0px 1px #283d68;
                background-color: #3e5ea1;
                background-image: -moz-linear-gradient(top, #4466ae, #37538d);
                background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4466ae), to(#37538d));
                background-image: -webkit-linear-gradient(top, #4466ae, #37538d);
                background-image: -o-linear-gradient(top, #4466ae, #37538d);
                background-image: linear-gradient(to bottom, #4466ae, #37538d);
                background-repeat: repeat-x;
                filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4466ae', endColorstr='#ff37538d', GradientType=0);
                border-color: #283d68;
                *background-color: #37538d;
                filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
                -webkit-user-select: none;
                -moz-user-select: none;
                -ms-user-select: none;
                -o-user-select: none;
                user-select: none;
                border-color: #37538d;
                -webkit-box-shadow: inset 0px 1px 1px rgba(255,255,255,.2);
                -moz-box-shadow: inset 0px 1px 1px rgba(255,255,255,.2);
                box-shadow: inset 0px 1px 1px rgba(255,255,255,.2);
            }

            .share_vid_buttons a.facebook_button:hover, .share_vid_buttons a.facebook_button:focus, .share_vid_buttons a.facebook_button:active,  .share_vid_buttons a.facebook_button.active, .share_vid_buttons a.facebook_button.disabled, .share_vid_buttons a.facebook_button[disabled]
            {
                color: #ffffff;
                background-color: #37538d;
                *background-color: #30487b;
            }

            .share_vid_buttons  a.facebook_button:active, .share_vid_buttons a.facebook_button.active
            {
                background-color: #283d68 9;
            }

            .share_vid_buttons a.facebook_button:hover, .share_vid_buttons a.facebook_button:focus
            {
                -webkit-box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 1px 1px rgba(5,15,30,.3);
                -moz-box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 1px 1px rgba(5,15,30,.3);
                box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 1px 1px rgba(5,15,30,.3);
                border-color: #30487b;
                text-shadow: 0px 1px 1px #213256;
            }

            .share_vid_buttons a.facebook_button:active
            {
                border-color: #2d4373;
                -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15);
                -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15);
                box-shadow: inset 0 2px 4px rgba(0,0,0,.15);
            }

            .share_vid_buttons a.twitter_button
            {
                border-color: #00a6d4 #00a6d4 #006a87;
                border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
                color: #ffffff;
                text-shadow: 0 0px 1px #007ea1;
                background-color: #01bbee;
                background-image: -moz-linear-gradient(top, #02c9ff, #00a6d4);
                background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#02c9ff), to(#00a6d4));
                background-image: -webkit-linear-gradient(top, #02c9ff, #00a6d4);
                background-image: -o-linear-gradient(top, #02c9ff, #00a6d4);
                background-image: linear-gradient(to bottom, #02c9ff, #00a6d4);
                background-repeat: repeat-x;
                filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff02c9ff', endColorstr='#ff00a6d4', GradientType=0);
                border-color: #007ea1;
                *background-color: #00a6d4;
                filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
                -webkit-user-select: none;
                -moz-user-select: none;
                -ms-user-select: none;
                -o-user-select: none;
                user-select: none;
                border-color: #00a6d4;
                -webkit-box-shadow: inset 0px 1px 1px rgba(255,255,255,.2);
                -moz-box-shadow: inset 0px 1px 1px rgba(255,255,255,.2);
                box-shadow: inset 0px 1px 1px rgba(255,255,255,.2);
            }

            .share_vid_buttons  a.twitter_button:hover, .share_vid_buttons a.twitter_button:focus, .share_vid_buttons a.twitter_button:active, .share_vid_buttons a.twitter_button.active, .share_vid_buttons a.twitter_button.disabled, .share_vid_buttons a.twitter_button[disabled]
            {
                color: #ffffff;
                background-color: #00a6d4;
                *background-color: #0092ba;
            }

            .share_vid_buttons a.twitter_button:active, .share_vid_buttons a.twitter_button.active
            {
                background-color: #007ea1 9;
            }

            .share_vid_buttons a.twitter_button:hover, .share_vid_buttons a.twitter_button:focus
            {
                -webkit-box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 1px 1px rgba(5,15,30,.3);
                -moz-box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 1px 1px rgba(5,15,30,.3);
                box-shadow: inset 0 1px 1px rgba(255,255,255,.1), 0 1px 1px rgba(5,15,30,.3);
                border-color: #0092ba;
                text-shadow: 0px 1px 1px #006a87;
            }

            .share_vid_buttons a.twitter_button:active
            {
                border-color: #008ab0;
                -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15);
                -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15);
                box-shadow: inset 0 2px 4px rgba(0,0,0,.15);
            }

            .share_vid_buttons .icon:before, .share_vid_buttons .icon:after
            {
                font-family: 'FontAwesome' !important;
                display: -moz-inline-stack;
                display: inline-block;
                zoom: 1;
                *display: inline;
                vertical-align: top;
                font-weight: normal !important;
                text-align: center;
                text-transform: none;
                font-weight: normal;
                vertical-align: middle;
            }

            .share_vid_buttons .btn
            {
                display: inline-block;
                *display: inline;
                *zoom: 1;
                padding: 4px 12px;
                margin-bottom: 0;
                font-size: 16px;
                line-height: 22px;
                text-align: center;
                vertical-align: middle;
                cursor: pointer;
                border-color: #e6e6e6 #e6e6e6 #bfbfbf;
                border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
                color: #333333;
                text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
                background-color: #f5f5f5;
                background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
                background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
                background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
                background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
                background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
                background-repeat: repeat-x;
                filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
                border-color: #cccccc;
                *background-color: #e6e6e6;
                filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
                border: 1px solid #cccccc;
                *border: 0;
                border-bottom-color: #b3b3b3;
                -webkit-border-radius: 4px;
                -moz-border-radius: 4px;
                border-radius: 4px;
                *margin-left: .3em;
                -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
                -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
                box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
            }

            .share_vid_buttons .btn:hover, .share_vid_buttons .btn:focus, .share_vid_buttons .btn:active, .share_vid_buttons .btn.active, .share_vid_buttons .btn.disabled,.btn[disabled]
            {
                color: #333333;
                background-color: #e6e6e6;
                *background-color: #d9d9d9;
            }

            .share_vid_buttons .btn:active, .share_vid_buttons .btn.active
            {
                background-color: #cccccc 9;
            }

            .share_vid_buttons .btn:first-child
            {
                *margin-left: 0;
            }

            .share_vid_buttons .btn:hover,.btn:focus
            {
                color: #333333;
                text-decoration: none;
                background-position: 0 -15px;
                -webkit-transition: background-position 0.1s linear;
                -moz-transition: background-position 0.1s linear;
                -o-transition: background-position 0.1s linear;
                transition: background-position 0.1s linear;
            }

            .share_vid_buttons .btn:focus
            {
                outline: thin dotted #333;
                outline: 5px auto -webkit-focus-ring-color;
                outline-offset: -2px;
            }

            .share_vid_buttons .btn.active, .share_vid_buttons .btn:active
            {
                background-image: none;
                outline: 0;
                -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
                -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
                box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
            }

            .share_vid_buttons .btn.disabled, .share_vid_buttons .btn[disabled]
            {
                cursor: default;
                background-image: none;
                opacity: 0.65;
                filter: alpha(opacity=65);
                -webkit-box-shadow: none;
                -moz-box-shadow: none;
                box-shadow: none;
            }

            .share_vid_buttons a.btn-share
            {
                cursor: pointer;
                font-weight: normal;
            }

            .share_vid_buttons #shareRowBottom
            {
                text-align: center;
                position: relative;
                padding: 0 0 1em;
                *zoom: 1;
            }

            .share_vid_buttons #shareRowBottom:before, .share_vid_buttons #shareRowBottom:after
            {
                display: table;
                content: "";
                line-height: 0;
            }

            .share_vid_buttons #shareRowBottom:after
            {
                clear: both;
            }

            .share_vid_buttons #shareRowBottom h3
            {
                font-size: 1.5em;
                line-height: 1.2em;
                margin-top: 20px;
                margin-bottom: 10px;
                font-weight: normal;
                color: #333333;
            }

            .share_vid_buttons #shareRowBottom a.btn-share
            {
                width: 49.65%;
                float: left;
                padding: 9px;
            }

            .share_vid_buttons #shareRowBottom a.btn-share.twitter_button
            {
                float: right;
            }

            .share_vid_buttons #shareRowBottom a.btn-share.twitter_button .icon:before
            {
                content: 'f099';
                color: #fff;
                font-size: 1.2em;
                padding: 0;
                line-height: 1em;
                vertical-align: middle;
                position: relative;
                top: -1px;
                margin-right: 6px;
                margin-left: -5px;
                padding-top: 0;
            }

            .share_vid_buttons #shareRowBottom a.btn-share.facebook_button .icon:before
            {
                content: 'f09a';
                color: #fff;
                font-size: 1.2em;
                padding: 0;
                line-height: 1em;
                vertical-align: middle;
                position: relative;
                top: -1px;
                margin-right: 6px;
                margin-left: -5px;
                padding-top: 0;
            }

            .share_vid_buttons #shareRowBottom a.btn-share .textNode
            {
                display: -moz-inline-stack;
                display: inline-block;
                zoom: 1;
                *display: inline;
                vertical-align: top;
            }

            .share_vid_buttons #shareRowBottom *, .share_vid_buttons #shareRowBottom *:before, .share_vid_buttons #shareRowBottom *:after
            {
                -webkit-box-sizing: border-box;
                -moz-box-sizing: border-box;
                box-sizing: border-box;
            }

            .share_vid_buttons .vid_cont_social
            {
                position: relative;
                z-index: 1;
                padding-top: 10px;
            }

            .vid_cont_social #shareOverlay+p
            {
                margin-top: 0;
            }

            .share_vid_buttons #shareOverlay
            {
                list-style: none;
                margin: 0;
                padding: 0;
                position: absolute;
                margin-left: -13px;
                margin-top: 1em;
                top: 7.5em;
                z-index: 500;
                opacity: 0;
                filter: alpha(opacity=0);
                -webkit-transition: opacity .4s, top .25s;
                -moz-transition: opacity .4s, top .25s;
                -o-transition: opacity .4s, top .25s;
                transition: opacity .4s, top .25s;
            }

            .share_vid_buttons #shareOverlay.visible
            {
                opacity: 1;
                filter: alpha(opacity=100);
            }

            .share_vid_buttons #shareOverlay li
            {
                margin-bottom: -1px;
            }

            .share_vid_buttons #shareOverlay li a
            {
                text-decoration: none;
                border: 1px solid #fff;
                -webkit-border-radius: 0 4px 4px 0;
                -moz-border-radius: 0 4px 4px 0;
                border-radius: 0 4px 4px 0;
                -webkit-box-shadow: 3px 3px 4px rgba(58, 45, 30, 0.7);
                -moz-box-shadow: 3px 3px 4px rgba(58, 45, 30, 0.7);
                box-shadow: 3px 3px 4px rgba(58, 45, 30, 0.7);
            }

            .share_vid_buttons #shareOverlay li.email img
            {
                display: none;
            }

            .share_vid_buttons #shareOverlay:after
            {
                content: ' ';
                width: 12px;
                height: 30px;
                background: #ffffff url(img/share.png) no-repeat right top;
                display: block;
                position: absolute;
                left: 0;
                bottom: -31px;
            }

            .share_vid_buttons  ul.share li
            {
                vertical-align: middle;
                margin: 0;
                padding: 0;
                display: block;
            }

            .share_vid_buttons ul.share li a
            {
                font-size: 1em;
                display: -moz-inline-stack;
                display: inline-block;
                zoom: 1;
                *display: inline;
                vertical-align: top;
                padding: 13px 15px;
                -webkit-border-radius: 4px;
                -moz-border-radius: 4px;
                border-radius: 4px;
                color: #fff;
            }

.widget_two_tabs {
  padding: 0;
}
.widget_two_tabs .tabs {
  border: 0 none;
  height: 50px;
}
.widget_two_tabs .tabs li {
  border-radius: 0;
  font-family: 'Oswald',sans-serif;
  font-size: 20px;
  height: 50px;
  line-height: 50px;
  margin: 0;
    width: 50%;
  	-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
	-moz-box-sizing: border-box;    /* Firefox, other Gecko */
	box-sizing: border-box;         /* Opera/IE 8+ */
	border: 0 none;
}
.widget_two_tabs .tabs_active {
  background: none repeat scroll 0 0 #7DDBF5;
}
.widget_two_tabs div.tabs_active {
  background: none repeat scroll 0 0 #F5F4F7;
}
.widget_two_tabs div.tabs-panes a:hover, .widget_two_tabs div.tabs-panes a.current {
  background: none repeat scroll 0 0 #D0EBF6;
  color: #7F7E80;
}
.widget_two_tabs .tabs-panes {
  padding: 0;
}
.widget_two_tabs .featured_thumb {
  float: left;
  margin-right: 15px;
}
.widget_two_tabs a {
  display: block;
  overflow: hidden;
  padding: 15px;
}
.widget_two_tabs ul li {
  margin: 0;
}

a.pin_it_btn { cursor: pointer; display: inline-block; text-align: center; font-family: "Helvetica Neue", Helvetica, sans-serif; text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.33); font-size: 18px; border: 1px solid #980b0e; border-radius: 3px; padding: 0 18px; background: -moz-linear-gradient(top, #FF0303 0%, #D40000 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #FF0303), color-stop(100%, #D40000)); background: -webkit-linear-gradient(top, #FF0303 0%, #D40000 100%); background: -o-linear-gradient(top, #FF0303 0%, #D40000 100%); background: -ms-linear-gradient(top, #FF0303 0%, #D40000 100%); background: linear-gradient(to bottom, #FF0303 0%, #D40000 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF0303', endColorstr='#D40000',GradientType=0 ); color: #fff; }

a.pin_it_btn:hover { box-shadow: 0 1px 3px #aaaaaa; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); background: -moz-linear-gradient(top, #de4348 0%, #D40000 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #de4348), color-stop(100%, #D40000)); background: -webkit-linear-gradient(top, #de4348 0%, #D40000 100%); background: -o-linear-gradient(top, #de4348 0%, #D40000 100%); background: -ms-linear-gradient(top, #de4348 0%, #D40000 100%); background: linear-gradient(to bottom, #de4348 0%, #D40000 100%); color: #fff; }

a.pin_it_btn:active { box-shadow: 0 1px 3px #aaaaaa; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); background: -moz-linear-gradient(top, #961519 0%, #D40000 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #961519), color-stop(100%, #D40000)); background: -webkit-linear-gradient(top, #961519 0%, #D40000 100%); background: -o-linear-gradient(top, #961519 0%, #D40000 100%); background: -ms-linear-gradient(top, #961519 0%, #D40000 100%); background: linear-gradient(to bottom, #961519 0%, #D40000 100%); color: #fff; }

/*
 * SimpleModal Basic Modal Dialog
 * http://simplemodal.com
 *
 * Copyright (c) 2013 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 */

#basic-modal-content {display:none;}

/* Overlay */
#simplemodal-overlay {background-color:#000;}

/* Container */
#simplemodal-container {height:360px; width:600px; color:#bbb; background-color:#4CC6F4; border:4px solid #444; padding:12px;}
#simplemodal-container {
  color: #000000;
}
#simplemodal-container .simplemodal-data {padding:8px;}
#simplemodal-container code {background:#141414; border-left:3px solid #65B43D; color:#bbb; display:block; font-size:12px; margin-bottom:12px; padding:4px 6px 6px;}
#simplemodal-container a {color:#ddd;}
#simplemodal-container a.modalCloseImg {background:url(img/basic/x.png) no-repeat; width:25px; height:29px; display:inline; z-index:3200; position:absolute; top:-15px; right:-16px; cursor:pointer;}
#simplemodal-container h3 {
  color: #EFF15B;
  font-weight: bold;
  margin-bottom: 20px;
}
.message.facebook {
  background: none repeat scroll 0 0 #FFFFFF;
  border-radius: 10px;
  padding: 15px;
}

#navigation {background: rgba(76, 198, 244, 0.8); z-index:9999; width:100%; top:0; position:fixed;}

#footer-widget-area-top .wysija-paragraph {
  display: inline-block;
  margin: 10px;
  width: 39%;
}

#footer-widget-area-top .wysija-paragraph input {
  	-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
	-moz-box-sizing: border-box;    /* Firefox, other Gecko */
	box-sizing: border-box;         /* Opera/IE 8+ */
  border: 4px solid #0196A6;
  color: #000000;
  height: 40px;
  padding: 4px 8px;
  width: 100%;
}
#footer-widget-area-top .widget_wysija_cont .wysija-submit {
  background: none repeat scroll 0 0 #2298A6;
  display: inline-block;
}
#footer-widget-area-top {
  background: none repeat scroll 0 0 #22CEE0;
  overflow: hidden;
  padding-bottom: 20px;
  padding-top: 10px;
  text-align: center;
}
#footer-widget-area-top h3 span {
  color: #006873;
  font-size: 0.7em;
  font-weight: normal;
  margin-left: 12px;
}
#footerwidgets .newsletter {
  background: none repeat scroll 0 0 #22CEE0;
}

 

thank you page to close facebook share window:

<?php /* Template Name: close window */ ?>
<script type='text/javascript'>
       window.open('','_self','');
       window.close();

       // if the window did not close (e.g. in Facebook's IOS native browser) then redirect to homepage
       window.location = '<?php echo get_home_url(); ?>';
     </script>"

javascript code for buttons: custom.js

jQuery(function() {
        jQuery('a.facebook_button, a.twitter_button, a.pin_it_btn').live('click', function(event) {
          event.preventDefault();
		  var link = jQuery(this).attr('href');
		  var link_index = jQuery(this).data('type');
          jQuery.popupWindow(link, {
	onUnload: function() { // callback when window closes

		jQuery('#basic-modal-content').modal();
    } 
});
        });
		});
		jQuery(document).ready(function(){

				 jQuery( ".vid_cont_social" ).hover(
function() {
jQuery('#shareOverlay').addClass('visible');
}, function() {
jQuery('#shareOverlay').removeClass('visible');
}
);

jQuery('.tab_widget').tabs({panes_wrap: '.tab_widget_panes'});

		});

 

str_replace(array(“rn”, “r”, “n”), “”, $out)  to remove all new lines.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *