$(document).ready(function () {

        $(".navbar-default").css('background-color', '#fff');
        $(".navbar-default").css('border-bottom', '1px solid #dedede');
        $(".navbar-default .navbar-nav > li > a").css('color', '#2ca09c');
        $(".navbar-brand img").css('height', '50px');
    });
</script>
<div style="padding-top: 100px;">
    <div class="col-md-7 col-md-offset-1">

    <?php 
foreach ($posts as $p) {
    //sanitize msg
    $text = strip_tags(tot($p->topic_msg));
    $text = setMaxChar($text, 100);
    $title = str_replace(" ", "_", tot($p->topic_title));
    ?>
    <div class="post-preview">

            <?php 
    if ($p->topic_image != "") {
        ?>
                <div class="col-md-4 col-sm-4 col-xs-4">
                    <a href="<?php 
        echo _LANGPATH;
        ?>
Blog/id/<?php 
        echo $p->topic_id;
        ?>
/<?php 
    function twitterFeed()
    {
        $twitter = new TwitterOAuth(LeapTwitter::API_KEY, LeapTwitter::API_SECRET, LeapTwitter::ACCESS_TOKEN, LeapTwitter::ACCESS_TOKEN_SECRET);
        $url = LeapTwitter::TWITTER_TIMELINE . "screen_name=" . LeapTwitter::TWITTER_DISPLAY_NAME . "&count=" . LeapTwitter::TWITTER_COUNT;
        $urlImg = LeapTwitter::TWITTER_IMG . "screen_name=" . LeapTwitter::TWITTER_DISPLAY_NAME;
        $socmed = new Socmed();
        $feeds = $socmed->getFeed(Socmed::TYPE_TWITTER);
        $profile = $socmed->getFeed(Socmed::TYPE_TWITTER_PROFILE);
        ?>
		<style>
			#twittercarousel {
				height           : 70px;
				overflow         : hidden;
			/ / margin-bottom : 30 px;
				background-color : #deeef8;
			}

			#twittercarousel .carousel-inner .item img {
				width  : 100%;
				height : 100%;
			}

			#twittercarousel .item .thumbnail {
				margin-bottom : 0;
			}

			#twittercarousel .carousel-control.left, .carousel-control.right {
				background-image : none !important;
			}

			#twittercarousel .carousel-control {
				/*background:	#ddd;
				color:#999;
				padding: 4px 0;
				width:26px;
				top:auto;
				left:auto;
				bottom:0;
				opacity:1;
				text-shadow:none;*/
			}

			#twittercarousel .carousel-control.right {
			/ / right : 10 px;
				color : #002c33;
			}

			#twittercarousel .carousel-control.left {
			/ / right : 40 px;
				color : #002c33;
			}

			profile
			.twitterprofile2 {
				float   : left;
				padding : 10px;
			}

			.twitterprofile img {
				width  : 50px;
				height : 50px;
			}

			.twitterprofile img {
				width  : 50px;
				height : 50px;
			}

			#twittercarousel .item {
				font-weight : bold;
				color       : #0882b7;
				font-size   : 12px;
			}

			.twitternametext a {
				font-weight     : bold;
				color           : #0882b7;
				text-decoration : underline;
			}
		</style>
		<div id="twittercarousel">
			<div style="position:absolute; width: 20px; height: 20px; z-index: 1; margin-top: -2px;">
				<img src="<?php 
        echo _SPPATH;
        ?>
images/twitter1.png"
				     width="100%">
			</div>
			<div style="float:left; width: 40%; word-wrap: break-word;">
				<div id="twitterprofile"
				     class="twitterprofile2"
				     style="padding:10px;float: left;">
					<img id="twitterprofilepic"
					     style="height: 50px; width: 50px;"
					     src="<?php 
        echo $profile[0]->socmed_img_url;
        ?>
">
				</div>
				<div class="twittername"
				     style="margin-left: 70px; padding-top: 10px; font-size: 12px;">
					<div class="twitternametext">
						<a target="_blank"
						   href="https://twitter.com/thebodyshopindo">@<?php 
        echo LeapTwitter::TWITTER_DISPLAY_NAME;
        ?>
</a>
					</div>
					<div style="padding-top:10px;">
						<div style="float:left;">
							<a href="#twCarousel"
							   data-slide="prev"><i style="color:#002c33;"
							                        class="glyphicon glyphicon-chevron-left"></i></a>
						</div>
						<div style="float:left;">
							<a href="#twCarousel"
							   data-slide="next"><i style="color:#002c33;"
							                        class="glyphicon glyphicon-chevron-right"></i></a>
						</div>
					</div>
				</div>
			</div>

			<div style="float:left; width: 60%;">

				<div style="padding: 10px;">
					<!-- Carousel
							================================================== -->
					<div id="twCarousel"
					     class="carousel slide"
					     data-ride="carousel">
						<!-- Indicators -->
						<div id="twittercarouselInner"
						     class="carousel-inner">
							<?php 
        for ($i = 0; $i < count($feeds); $i++) {
            $feed = $feeds[$i];
            $class = "item";
            if ($i == 0) {
                $class .= " active";
            }
            ?>
								<div style="cursor: pointer;"
								     class="<?php 
            echo $class;
            ?>
">
									<a target="_blank" href="<?php 
            echo $feed->socmed_url;
            ?>
"><?php 
            echo setMaxChar($feed->socmed_title);
            ?>
</a></div>
							<?php 
        }
        ?>
						</div>
					</div>
					<!-- End Carousel -->
				</div>

			</div>
			<!-- col md 8-->

			<div class="clearfix"></div>
		</div>
	<?php 
    }
    public function youtubeFeed()
    {
        $socmed = new Socmed();
        $feeds = $socmed->getFeed(Socmed::TYPE_YOUTUBE);
        $profile = $socmed->getFeed(Socmed::TYPE_YOUTUBE_PROFILE);
        ?>
		<style>
			#youtubecarousel {
				height           : 70px;
				overflow         : hidden;
				/* margin-bottom : 30 px;*/
				background-color : #ffcccd;
			}

			#youtubecarousel .carousel-inner .item img {
				width  : 100%;
				height : 100%;
			}

			#youtubecarousel .item .thumbnail {
				margin-bottom : 0;
			}

			#youtubecarousel .carousel-control.left, .carousel-control.right {
				background-image : none !important;
			}

			#youtubecarousel .carousel-control {
				/*background:	#ddd;
				color:#999;
				padding: 4px 0;
				width:26px;
				top:auto;
				left:auto;
				bottom:0;
				opacity:1;
				text-shadow:none;*/
			}

			#youtubecarousel .carousel-control.right {
				/* right : 10 px;*/
				color : #002c33;
			}

			#youtubecarousel .carousel-control.left {
				/* right : 40 px;*/
				color : #002c33;
			}

			profile
			.youtubeprofile2 {
				float   : left;
				padding : 10px;
			}

			.youtubeprofile img {
				width  : 50px;
				height : 50px;
			}

			.youtubeprofile img {
				width  : 50px;
				height : 50px;
			}

			#youtubecarousel .item {
				font-weight : bold;
				color       : #0882b7;
				font-size   : 12px;
			}

			.youtubenametext a {
				font-weight     : bold;
				color           : #0882b7;
				text-decoration : underline;
			}
		</style>
		<div id="youtubecarousel">
			<div style="position:absolute; width: 20px; height: 20px; z-index: 1; margin-top: -2px;">
				<img src="<?php 
        echo _SPPATH;
        ?>
images/youtube1.png"
				     width="100%">
			</div>

			<div style="float:left; width: 35%; word-wrap: break-word;">
				<div id="youtubeprofile"
				     class="youtubeprofile2"
				     style="padding:10px;float: left;">
					<img id="youtubeprofilepic"
					     style="height: 50px; width: 50px;"
					     src="<?php 
        echo $profile[0]->socmed_img_url;
        ?>
">
				</div>
				<div class="youtubename"
				     style="margin-left: 70px; padding-top: 10px; font-size: 12px;">
					<div class="youtubenametext">
						<a target="_blank"
						   href="https://www.youtube.com/user/thebodyshopindo"><?php 
        echo LeapYoutube::YOUTUBE_DISPLAY_NAME;
        ?>
</a>
					</div>
					<div style="padding-top:10px;">
						<div style="float:left;">
							<a href="#youtubeCarousel"
							   data-slide="prev"><i style="color:#002c33;"
							                        class="glyphicon glyphicon-chevron-left"></i></a>
						</div>
						<div style="float:left;">
							<a href="#youtubeCarousel"
							   data-slide="next"><i style="color:#002c33;"
							                        class="glyphicon glyphicon-chevron-right"></i></a>
						</div>
					</div>
				</div>
			</div>

			<div style="float:left; width: 65%;">

				<div style="padding-top: 10px;">
					<!-- Carousel
							================================================== -->
					<div id="youtubeCarousel"
					     class="carousel slide"
					     data-ride="carousel">
						<!-- Indicators -->
						<div id="youtubecarouselInner"
						     class="carousel-inner">

							<?php 
        for ($i = 0; $i < count($feeds); $i++) {
            $feed = $feeds[$i];
            $class = "item";
            if ($i == 0) {
                $class .= " active";
            }
            ?>

								<div style="cursor: pointer;"
								     class="<?php 
            echo $class;
            ?>
">
									<a target="_blank"
									   href="<?php 
            echo $feed->socmed_url;
            ?>
">
										<div id="youtubeprofile"
										     class="youtubeprofile2"
										     style="width: 50px; height: 50px; margin-right: 10px; float:left">
											<img id="youtubeimage"
											     style="width: 100%;"
											     src="<?php 
            echo $feed->socmed_img_url;
            ?>
">
										</div><?php 
            echo setMaxChar($feed->socmed_title);
            ?>
</a></div>
							<?php 
        }
        ?>
						</div>
					</div>
					<!-- End Carousel -->
				</div>

			</div>
			<!-- col md 8-->

			<div class="clearfix"></div>
		</div>
	<?php 
    }
            ?>
CalendarWeb/id/<?php 
            echo tot($e->cal_id);
            ?>
/<?php 
            echo urlencode($e->cal_name);
            ?>
"><?php 
            echo tot($e->cal_name);
            ?>
</a> </h3>


                <p><?php 
            if ($e->cal_descr != "") {
                echo setMaxChar(strip_tags(tot($e->cal_descr))) . "..";
            }
            ?>
</p>
                <?php 
            if ($allDay) {
                ?>
<p>An all day event</p><?php 
            }
            ?>
                <table>
                    <tr>
                        <td>
                            <?php 
            echo Lang::t('from');
            ?>
    function facebookfeed()
    {
        $pageID = "TheBodyShopIndonesia";
        $socmed = new Socmed();
        $feeds = $socmed->getFeed(Socmed::TYPE_FACEBOOK);
        $profile = $socmed->getFeed(Socmed::TYPE_FACEBOOK_PROFILE);
        ?>

		<style>
			#fbcarousel {
				height           : 70px;
				overflow         : hidden;
				/*margin-bottom : 30 px;*/
				background-color : #dfe3ee;
			}

			#fbcarousel .carousel-inner .item img {
				width  : 100%;
				height : 100%;
			}

			#fbcarousel .item .thumbnail {
				margin-bottom : 0;
			}

			#fbcarousel .carousel-control.left, .carousel-control.right {
				background-image : none !important;
			}

			#fbcarousel .carousel-control {
				/*background:	#ddd;
				color:#999;
				padding: 4px 0;
				width:26px;
				top:auto;
				left:auto;
				bottom:0;
				opacity:1;
				text-shadow:none;*/
			}

			#fbcarousel .carousel-control.right {
				/*right : 10 px;8?
				color : #002c33;
			}

			#fbcarousel .carousel-control.left {
				/*right : 40px;*/
				color : #002c33;
			}

			profile .fbprofile2 {
				float   : left;
				padding : 10px;
				width   : 50px;
				height  : 50px;
			}

			.fbprofile img {
				width  : 50px;
				height : 50px;
			}

			#fbcarousel .item {
				font-weight : bold;
				color       : #3b5998;
				font-size   : 12px;
			}

			.fbnametext a {
				font-weight     : bold;
				color           : #3b5998;
				text-decoration : underline;
			}
		</style>
		<div id="fbcarousel">
			<div style="position:absolute; width: 20px; height: 20px; z-index: 1; margin-top: -2px;">
				<img src="<?php 
        echo _SPPATH;
        ?>
images/fb1.png"
				     width="100%">
			</div>
			<div style="float:left; width: 40%; word-wrap: break-word;">
				<div id="fbprofile"
				     class="fbprofile2"
				     style="padding:10px;float: left;">
					<img id="fbprofilepic"
					     width="50px"
					     height="50px"
					     src="<?php 
        echo $profile[0]->socmed_img_url;
        ?>
">
				</div>
				<div class="fbname"
				     style="margin-left: 70px; padding-top: 10px; font-size: 12px;">
					<div class="fbnametext">
						<a target="_blank"
						   href="http://www.facebook.com/<?php 
        echo $pageID;
        ?>
"><?php 
        echo $pageID;
        ?>
</a>
					</div>
					<div style="padding-top:10px;">
						<div style="float:left;">
							<a href="#myCarousel"
							   data-slide="prev"><i style="color:#002c33;"
							                        class="glyphicon glyphicon-chevron-left"></i></a>
						</div>
						<div style="float:left;">
							<a href="#myCarousel"
							   data-slide="next"><i style="color:#002c33;"
							                        class="glyphicon glyphicon-chevron-right"></i></a>
						</div>
					</div>
				</div>
			</div>

			<div style="float:left; width: 60%;">

				<div style="padding: 10px;">
					<!-- Carousel
							================================================== -->
					<div id="myCarousel"
					     class="carousel slide" data-ride="carousel">
						<!-- Indicators -->
						<div id="fbCarouselInner"
						     class="carousel-inner">

							<?php 
        for ($i = 0; $i < count($feeds); $i++) {
            $feed = $feeds[$i];
            $class = "item";
            if ($i == 0) {
                $class .= " active";
            }
            ?>
								<div style="cursor: pointer;"
								     class="<?php 
            echo $class;
            ?>
">
									<a target="_blank" href="<?php 
            echo $feed->socmed_url;
            ?>
"><?php 
            echo setMaxChar($feed->socmed_title);
            ?>
</a></div>
							<?php 
        }
        ?>
						</div>
					</div>
					<!-- End Carousel -->
				</div>

			</div>
			<!-- col md 8-->

			<div class="clearfix"></div>
		</div>
	<?php 
    }
if ($pageObj->post_title != "") {
    echo "<h1>" . stripslashes($pageObj->post_title) . "</h1>";
}
if ($pageObj->post_content != "") {
    echo "<div class='pageDescr'>" . stripslashes($pageObj->post_content) . "</div>";
}
if ($pageObj->post_title != "" || $pageObj->post_content != "") {
    ?>
</div><?php 
}
?>
        <?php 
foreach ($posts as $p) {
    //sanitize msg
    $text = strip_tags(tot($p->topic_msg), '<br>');
    $text = setMaxChar($text, 200);
    $title = str_replace(" ", "_", tot($p->topic_title));
    $link = _LANGPATH . "Blog/id/" . $p->topic_id . "/" . $title;
    ?>
            <div class="post post-image">

                <div class="post-wrap">
                    <?php 
    if ($p->topic_image != "") {
        ?>
                    <div class="post-img" ><a title="<?php 
        echo stripslashes($p->topic_title);
        ?>
" href="<?php 
        echo $link;
        ?>