function content_56afda72d421f2_45056170($_smarty_tpl)
    {
        ?>
<!-- Share This <?php 
        echo $_smarty_tpl->tpl_vars['type']->value;
        ?>
 -->
<?php 
        if (isset($_smarty_tpl->tpl_vars['type'])) {
            $_smarty_tpl->tpl_vars['type'] = clone $_smarty_tpl->tpl_vars['type'];
            $_smarty_tpl->tpl_vars['type']->value = $_smarty_tpl->tpl_vars['params']->value['type'];
            $_smarty_tpl->tpl_vars['type']->nocache = null;
            $_smarty_tpl->tpl_vars['type']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['type'] = new Smarty_variable($_smarty_tpl->tpl_vars['params']->value['type'], null, 0);
        }
        ?>
<div id="share_form_div" class="action_box share_form clearfix">
    <?php 
        if ($_smarty_tpl->tpl_vars['params']->value['type'] == 'v' || $_smarty_tpl->tpl_vars['params']->value['type'] == 'video' || $_smarty_tpl->tpl_vars['params']->value['type'] == 'Video') {
            ?>
    <div>



        <?php 
            if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['video_embed'] == 1 && $_smarty_tpl->tpl_vars['vdo']->value['allow_embedding'] == 'yes') {
                ?>

        <div class="form-group">
            <label for="embed_code">
                <?php 
                echo smarty_lang(array('code' => 'embed_code'), $_smarty_tpl);
                ?>

            </label>

            <textarea name="embed_code" id="embed_code" onclick="this.select()"  class="form-control"><?php 
                if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_type'] == 'iframe') {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['cbvid']->value->embed_code($_smarty_tpl->tpl_vars['vdo']->value, 'iframe'));
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['cbvid']->value->embed_code($_smarty_tpl->tpl_vars['vdo']->value, 'embed_object'));
                }
                ?>
</textarea>

            <input type="hidden" name="alternate_embed_code" id="alternate_embed_code" value="<?php 
                if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_type'] == 'iframe') {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['cbvid']->value->embed_code($_smarty_tpl->tpl_vars['vdo']->value, 'embed_object'));
                } else {
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['cbvid']->value->embed_code($_smarty_tpl->tpl_vars['vdo']->value, 'iframe'));
                }
                ?>
" />
        </div>

        <div class="form-group">
            <label><?php 
                echo lang('Player size');
                ?>
</label>
            <div></div>

            <label class="radio-inline">
                <input type="radio" name="player_size" value="default" id="player_size_0" checked="checked"
                       onclick="<?php 
                echo $_smarty_tpl->tpl_vars['updateEmbedCode']->value;
                ?>
('<?php 
                echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_player_width'];
                ?>
'
                    ,'<?php 
                echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_player_height'];
                ?>
',autoPlayEmbed)"/>
                <?php 
                echo lang('Default');
                ?>
 (<?php 
                echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_player_width'];
                ?>
x<?php 
                echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_player_height'];
                ?>
)
            </label>

            <label class="radio-inline">
                <input type="radio" name="player_size" value="small" id="player_size_1" onclick="<?php 
                echo $_smarty_tpl->tpl_vars['updateEmbedCode']->value;
                ?>
('440','272',autoPlayEmbed)" />
                <?php 
                echo lang('Small');
                ?>
 (440x272)
            </label>

            <label class="radio-inline">
                <input type="radio" name="player_size" value="medium" id="player_size_2"  onclick="<?php 
                echo $_smarty_tpl->tpl_vars['updateEmbedCode']->value;
                ?>
('540','334',autoPlayEmbed)"/>
                <?php 
                echo lang('Medium');
                ?>
 (540x334)
            </label>

            <label class="radio-inline">
                <input type="radio" name="player_size" value="large" id="player_size_3"  onclick="<?php 
                echo $_smarty_tpl->tpl_vars['updateEmbedCode']->value;
                ?>
('600','370',autoPlayEmbed)"/>
                <?php 
                echo lang('Large');
                ?>
 (600x370)
            </label>


        </div>

        <?php 
                if ($_smarty_tpl->tpl_vars['pakplayer']->value == 'yes') {
                    ?>
        <div>Autoplay video : <label><input type="radio" name="autoplay" value="yes" onclick="<?php 
                    echo $_smarty_tpl->tpl_vars['updateEmbedCode']->value;
                    ?>
(embedPlayerWidth,embedPlayerHeight,'yes')" <?php 
                    if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['autoplay_embed'] == 'yes') {
                        ?>
 checked<?php 
                    }
                    ?>
 />Yes</label>
            <label><input type="radio" name="autoplay" value="no"  onclick="<?php 
                    echo $_smarty_tpl->tpl_vars['updateEmbedCode']->value;
                    ?>
(embedPlayerWidth,embedPlayerHeight,'no')" <?php 
                    if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['autoplay_embed'] != 'yes') {
                        ?>
 checked<?php 
                    }
                    ?>
/>No</label></div>
        <?php 
                }
                ?>

        <div class="form-group">
            <label><?php 
                echo lang('Embed type');
                ?>
</label>
            <div></div>
            <label class="radio-inline">
                <input type="radio" name="embed_type" value="iframe" onclick="switchEmbedCode('iframe')" <?php 
                if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_type'] == 'iframe') {
                    ?>
 checked<?php 
                }
                ?>
 />Iframe
            </label>
            <label class="radio-inline">
                <input type="radio" name="embed_type" value="iframe"  onclick="switchEmbedCode('embed_object')" <?php 
                if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_type'] == 'embed_object') {
                    ?>
 checked<?php 
                }
                ?>
/>Embed Object
            </label>
        </div>

        <?php 
            }
            ?>



    </div>

    <div class="action_box_title"></div>
    <div class="form-group">
        <label for="link_video"><?php 
            echo smarty_lang(array('code' => 'link_this_video'), $_smarty_tpl);
            ?>
</label>
        <input type="text" name="link_video" id="link_video"  value="<?php 
            echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['vdo']->value), $_smarty_tpl);
            ?>
"  onclick="this.select()"  class="form-control" />
    </div>

    <div class="action_box_title"></div>
    <?php 
        }
        ?>


    <div class="form_container">
        <div id="share_form_results" class="form_result" style="display:none"></div>
        <form id="cb_share_item" name="share_form" method="post" action="">
            <div class="form-group">
                <label for="ShareUsers">
                    <?php 
        echo sprintf(lang('share_this_type'), $_smarty_tpl->tpl_vars['type']->value);
        ?>

                </label>

                <input name="users" type="text" class="form-control" id="ShareUsers" placeholder="<?php 
        echo smarty_lang(array('code' => 'seperate_usernames_with_comma'), $_smarty_tpl);
        ?>
"/>
            </div>
            <div class="form-group">
                <label for="message"><?php 
        echo lang('Message');
        ?>
 <span class="example"><?php 
        echo lang('optional');
        ?>
</span></label>
                <textarea name="message" id="message"  rows="5" class="form-control"></textarea>
                <input name="objectid" id="objectid" type="hidden" value="<?php 
        echo $_smarty_tpl->tpl_vars['params']->value['id'];
        ?>
" />
                <div align="right" class="mtm">
                    <input type="submit" name="send_content" value="Send" class="btn btn-primary" />
                </div>
            </div>

        </form>
    </div>


    <?php 
        echo ANCHOR(array('place' => "video_sharing_options", 'data' => $_smarty_tpl->tpl_vars['vdo']->value), $_smarty_tpl);
        ?>

</div>
<!-- Share This <?php 
        echo $_smarty_tpl->tpl_vars['type']->value;
        ?>
 -->

<script>
    $(document).ready(function(){
        $('body').on('submit','#cb_share_item',function(e){
            e.preventDefault();
            _cb.submit_share_form('share_form','<?php 
        echo $_smarty_tpl->tpl_vars['params']->value['type'];
        ?>
');return false;
        })
    })
</script><?php 
    }
    function content_55e44443075054_87310853($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_truncate')) {
            include '/var/www/includes/smartyv3/plugins/modifier.truncate.php';
        }
        ?>
<div class="container">
	<div id="fb-root"></div>
	<script>(function(d, s, id) {
	    var js, fjs = d.getElementsByTagName(s)[0];
	    if (d.getElementById(id)) return;
	    js = d.createElement(s); js.id = id;
	    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=120542078043680";
	    fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
	</script>
	<div class="row cb-box marginBottom">

		<?php 
        if (isset($_smarty_tpl->tpl_vars['row'])) {
            $_smarty_tpl->tpl_vars['row'] = clone $_smarty_tpl->tpl_vars['row'];
            $_smarty_tpl->tpl_vars['row']->value = $_smarty_tpl->tpl_vars['myquery']->value->Get_Website_Details();
            $_smarty_tpl->tpl_vars['row']->nocache = null;
            $_smarty_tpl->tpl_vars['row']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['row'] = new Smarty_variable($_smarty_tpl->tpl_vars['myquery']->value->Get_Website_Details(), null, 0);
        }
        ?>

	    <!--<div class="alert alert-info margin-bottom-10 ">-->
	    <?php 
        echo ANCHOR(array('place' => 'global'), $_smarty_tpl);
        ?>
 
	    <!--	</div> -->
	    <div class="clearfix"></div>
	       
		<?php 
        if (is_installed('editorspick')) {
            ?>
		<?php 
            if ($_smarty_tpl->tpl_vars['editor_picks']->value) {
                ?>
		<div class="row">
	        <div class="col-md-8">
				<!-- Editor Pick Video Main Container START //-->
				<div id="ep_video_container">
					<?php 
                if (is_installed('editorspick')) {
                    ?>
					<?php 
                    if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list'])) {
                        unset($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']);
                    }
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['name'] = 'e_list';
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['editor_picks']->value) ? count($_loop) : max(0, (int) $_loop);
                    unset($_loop);
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max'] = (int) 1;
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show'] = true;
                    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max'] < 0) {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'];
                    }
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] = 1;
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] - 1;
                    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show']) {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] = min(ceil(($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] > 0 ? $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'] : $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'] + 1) / abs($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'])), $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max']);
                        if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] == 0) {
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show'] = false;
                        }
                    } else {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] = 0;
                    }
                    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show']) {
                        for ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration']++) {
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'];
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'];
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'];
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['first'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] == 1;
                            $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['last'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'];
                            ?>
					<?php 
                            echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/editor_pick/video_block.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('video' => $_smarty_tpl->tpl_vars['editor_picks']->value[$_smarty_tpl->getVariable('smarty')->value['section']['e_list']['index']]), 0);
                            ?>

					<?php 
                        }
                    } else {
                        ?>
					There is no video in editor's pick, Please Add Videos In Editor's Pick<br />Videos Manager > Add to editor's pick
					<?php 
                    }
                    ?>
					<?php 
                }
                ?>
				</div>
				
				<!-- Editor Pick Video Main Container END //-->

	        </div>

			<!-- Editor Pick Videos Slider Container START //-->
	        <div class="col-md-4 col-sm-12 col-xs-12 editorpick-holder pull-right custom-elements">
	            <div id="slide" class="scrollable-area">
					<?php 
                if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list'])) {
                    unset($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']);
                }
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['name'] = 'e_list';
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['editor_picks']->value) ? count($_loop) : max(0, (int) $_loop);
                unset($_loop);
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show'] = true;
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'];
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] = 1;
                $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'] - 1;
                if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show']) {
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['loop'];
                    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] == 0) {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show'] = false;
                    }
                } else {
                    $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'] = 0;
                }
                if ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['show']) {
                    for ($_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration']++) {
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'];
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'];
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['step'];
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['first'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] == 1;
                        $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['last'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['e_list']['total'];
                        ?>
	            	<?php 
                        echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/editor_pick/index_featured_video.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('video' => $_smarty_tpl->tpl_vars['editor_picks']->value[$_smarty_tpl->getVariable('smarty')->value['section']['e_list']['index']]), 0);
                        ?>

					<?php 
                    }
                }
                ?>
	        	</div>
				<div class="next_pre_hold">
					<a href="#" class="col-md-6 btn btn-primary" id="slide_prev">
					<span class="glyphicon glyphicon-chevron-up"></span>
					</a>
					<a href="#" class="col-md-6 btn btn-primary" id="slide_next">
					<span class="glyphicon glyphicon-chevron-down"></span>
					</a>
				</div>
			</div>
	        <!-- Editor Pick Videos Slider Container END //-->
		</div>
		<?php 
            }
            ?>
		<?php 
        }
        ?>
	    <!-- ******************************************* //-->
		<!-- ************ EDITORS BLOCK END ************ //-->
	    <!-- ******************************************* //-->
	       
	    
	         
	   <!-- <div align="center" class="margin-bottom-10">
	    	<a href="http://www.arvixe.com/clipbucket_hosting">
	    		<img class="banner" src="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/assets/images/ad-box-728x90.jpg" >

			</a>
		</div>-->
		<div class="ad"><?php 
        echo getAd(array('place' => 'ad_728x90'), $_smarty_tpl);
        ?>
</div>
		<!-- ******************************************* //-->
		<!-- *********** LATEST VIDEOS START *********** //-->
		<!-- ******************************************* //-->
		<div class="row">
			<div class="col-md-12 clearfix">
				<div class="col-md-8 nopadding padding-right-10 featuredvideos-wrapper">
					<h2 class="myHeading theme_color"><?php 
        echo smarty_lang(array('code' => "Featured Videos"), $_smarty_tpl);
        ?>
</h2>
					<?php 
        if (isset($_smarty_tpl->tpl_vars['featured_videos'])) {
            $_smarty_tpl->tpl_vars['featured_videos'] = clone $_smarty_tpl->tpl_vars['featured_videos'];
            $_smarty_tpl->tpl_vars['featured_videos']->value = get_videos(array('featured' => 'yes', 'limit' => 6));
            $_smarty_tpl->tpl_vars['featured_videos']->nocache = null;
            $_smarty_tpl->tpl_vars['featured_videos']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['featured_videos'] = new Smarty_variable(get_videos(array('featured' => 'yes', 'limit' => 6)), null, 0);
        }
        ?>
					<?php 
        if ($_smarty_tpl->tpl_vars['featured_videos']->value) {
            ?>
					<div class="col-md-12 featured-videos nopadding">
						<div class="col-md-12 text-center nopadding ">
							<div class="col-md-8 text-center nopadding mouse_hover featured-imglg">
							
								<?php 
            if (isset($_smarty_tpl->tpl_vars['video_01'])) {
                $_smarty_tpl->tpl_vars['video_01'] = clone $_smarty_tpl->tpl_vars['video_01'];
                $_smarty_tpl->tpl_vars['video_01']->value = $_smarty_tpl->tpl_vars['featured_videos']->value[0];
                $_smarty_tpl->tpl_vars['video_01']->nocache = null;
                $_smarty_tpl->tpl_vars['video_01']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['video_01'] = new Smarty_variable($_smarty_tpl->tpl_vars['featured_videos']->value[0], null, 0);
            }
            ?>
								<div class="col-md-12 text-center nopadding video_thumb_lg">
									<a href="<?php 
            echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['video_01']->value), $_smarty_tpl);
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['video_01']->value['title'];
            ?>
">
										<span class="play-icon fa fa-play"></span>
										<img class="cb_img_thum" src="<?php 
            echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video_01']->value, 'num' => '4', 'size' => 'big'), $_smarty_tpl);
            ?>
" width="500" height="285" border="0" <?php 
            echo ANCHOR(array('place' => "video_thumb", 'data' => $_smarty_tpl->tpl_vars['video_01']->value), $_smarty_tpl);
            ?>
 />
									</a>
									<div class="cbHomeVidTitle cbHomeVidTitle_Big mouse_hover_on"><?php 
            echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video_01']->value['title'], 30);
            ?>
</div>
								</div>
					            <div class="cbHomeVidDuration mouse_hover_on">
					            <?php 
            if ($_smarty_tpl->tpl_vars['video_01']->value['duration'] > 1) {
                echo SetTime($_smarty_tpl->tpl_vars['video_01']->value['duration']);
            } else {
                ?>
00:00ewwew<?php 
            }
            ?>
					            </div>
					            <div class="cbHomeVidDuration_left mouse_hover_on">
					            	<?php 
            echo $_smarty_tpl->tpl_vars['video_01']->value['username'];
            ?>

					            </div>
							</div>
							<div class="col-md-4 col-sm-6 hidden-xs text-center nopadding-right pull-right tumb-sm">
							<?php 
            $_smarty_tpl->tpl_vars['video_02'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['video_02']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['featured_videos']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['video_02']->iteration = 0;
            foreach ($_from as $_smarty_tpl->tpl_vars['video_02']->key => $_smarty_tpl->tpl_vars['video_02']->value) {
                $_smarty_tpl->tpl_vars['video_02']->_loop = true;
                $_smarty_tpl->tpl_vars['video_02']->iteration++;
                ?>
								<?php 
                if ($_smarty_tpl->tpl_vars['video_02']->iteration > 1 && $_smarty_tpl->tpl_vars['video_02']->iteration < 4) {
                    ?>
								<div class="col-md-12 text-center nopadding mouse_hover1 featured-video video_thumb" style="<?php 
                    if (!$_smarty_tpl->getVariable('smarty')->value['foreach']['foo']['last']) {
                        ?>
 <?php 
                    }
                    ?>
 " >
									<a href="<?php 
                    echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['video_02']->value), $_smarty_tpl);
                    ?>
" title="<?php 
                    echo $_smarty_tpl->tpl_vars['video_02']->value['title'];
                    ?>
">
										<span class="play-icon fa fa-play"></span>
										<img class="cb_img_thum" src="<?php 
                    echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video_02']->value, 'size' => '240x133'), $_smarty_tpl);
                    ?>
" width="240" height="133" <?php 
                    echo ANCHOR(array('place' => "video_thumb", 'data' => $_smarty_tpl->tpl_vars['video_02']->value), $_smarty_tpl);
                    ?>
 />
										<div class="cbHomeVidTitle mouse_hover_on1"><?php 
                    echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video_02']->value['title'], 10);
                    ?>
</div>
										<div class="cbHomeVidDuration mouse_hover_on1">
						            		<?php 
                    if ($_smarty_tpl->tpl_vars['video_02']->value['duration'] > 1) {
                        echo SetTime($_smarty_tpl->tpl_vars['video_02']->value['duration']);
                    } else {
                        ?>
00:00<?php 
                    }
                    ?>
						            	</div>
									</a>
								</div>
								<?php 
                }
                ?>

							<?php 
            }
            ?>
							</div>
							<div class="col-lg-12 col-md-12 text-center nopadding">
							<?php 
            $_smarty_tpl->tpl_vars['video_02'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['video_02']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['featured_videos']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['video_02']->iteration = 0;
            foreach ($_from as $_smarty_tpl->tpl_vars['video_02']->key => $_smarty_tpl->tpl_vars['video_02']->value) {
                $_smarty_tpl->tpl_vars['video_02']->_loop = true;
                $_smarty_tpl->tpl_vars['video_02']->iteration++;
                ?>
							<?php 
                if ($_smarty_tpl->tpl_vars['video_02']->iteration > 3) {
                    ?>
								<div class="col-lg-4 col-md-4 col-sm-6 hidden-xs video_thumb text-center nopadding-right mouse_hover featured-video <?php 
                    if ($_smarty_tpl->tpl_vars['video_02']->iteration == 4) {
                        ?>
nopadding<?php 
                    }
                    ?>
 ">
									<a href="<?php 
                    echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['video_02']->value), $_smarty_tpl);
                    ?>
" title="<?php 
                    echo $_smarty_tpl->tpl_vars['video_02']->value['title'];
                    ?>
">
										<span class="play-icon fa fa-play"></span>
										<img class="cb_img_thum" src="<?php 
                    echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video_02']->value, 'size' => '240x133'), $_smarty_tpl);
                    ?>
" width="240" height="133" <?php 
                    echo ANCHOR(array('place' => "video_thumb", 'data' => $_smarty_tpl->tpl_vars['video_02']->value), $_smarty_tpl);
                    ?>
 />
									
										<div class="cbHomeVidTitle mouse_hover_on"><?php 
                    echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video_02']->value['title'], 10);
                    ?>
</div>

										<div class="cbHomeVidDuration mouse_hover_on">
							            <?php 
                    if ($_smarty_tpl->tpl_vars['video_02']->value['duration'] > 1) {
                        echo SetTime($_smarty_tpl->tpl_vars['video_02']->value['duration']);
                    } else {
                        ?>
00:00<?php 
                    }
                    ?>
							            </div>
									</a>
								</div>
							<?php 
                }
                ?>
							<?php 
            }
            ?>
							</div>
			                
			            </div>
					
		        		<div class="clearfix"></div>    
					</div>
					<?php 
        } else {
            ?>
					<div class="col-md-12 nopadding">No featured Video</div>
					<?php 
        }
        ?>
			        <div class="clearfix"></div>
			        <div class="row nopadding">
			        	<h3 class="myHeading theme_color"><?php 
        echo lang('Recent videos');
        ?>
</h3>
			        	<?php 
        if (isset($_smarty_tpl->tpl_vars['videos'])) {
            $_smarty_tpl->tpl_vars['videos'] = clone $_smarty_tpl->tpl_vars['videos'];
            $_smarty_tpl->tpl_vars['videos']->value = get_videos(array("order" => "date_added DESC", "limit" => 12));
            $_smarty_tpl->tpl_vars['videos']->nocache = null;
            $_smarty_tpl->tpl_vars['videos']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['videos'] = new Smarty_variable(get_videos(array("order" => "date_added DESC", "limit" => 12)), null, 0);
        }
        ?>
						<div class="clearfix recent-videos row">
				        	<?php 
        $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['video']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['videos']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) {
            $_smarty_tpl->tpl_vars['video']->_loop = true;
            ?>

				        	<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 mbm cb-video-fixed-block">
				        		<!-- <div class="marginBottom grid_view recent-col list_view nopadding-right"> -->
								<?php 
            echo $_smarty_tpl->getSubTemplate((string) $_smarty_tpl->tpl_vars['style_dir']->value . "/blocks/videos/video.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
            ?>

								<!-- </div> -->
							</div>
				        	<?php 
        }
        ?>
			        	</div>
			        </div>
					
	              	<div class="ad"><?php 
        echo getAd(array('place' => 'ad_468x60'), $_smarty_tpl);
        ?>
</div>
			    	<div class="row nopadding">
			    		<?php 
        if ($_smarty_tpl->tpl_vars['row']->value['photosSection'] == 'yes') {
            ?>
						<div class="col-md-12 clearfix nopadding ">
			        		<h2 class="myHeading theme_color"><?php 
            echo smarty_lang(array('code' => "Photos"), $_smarty_tpl);
            ?>
</h2>
							<?php 
            if (isset($_smarty_tpl->tpl_vars['result_photos1_01'])) {
                $_smarty_tpl->tpl_vars['result_photos1_01'] = clone $_smarty_tpl->tpl_vars['result_photos1_01'];
                $_smarty_tpl->tpl_vars['result_photos1_01']->value = get_photos(array('order' => ' RAND() LIMIT 15 '));
                $_smarty_tpl->tpl_vars['result_photos1_01']->nocache = null;
                $_smarty_tpl->tpl_vars['result_photos1_01']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['result_photos1_01'] = new Smarty_variable(get_photos(array('order' => ' RAND() LIMIT 15 ')), null, 0);
            }
            ?>
		
			        		<?php 
            if ($_smarty_tpl->tpl_vars['result_photos1_01']->value) {
                ?>
	        				<!-- *********** FIRST PHOTOS START ************ //-->
	        				<!-- <div class="row clearfix fill-background lg-img"> -->
							<div class="clearfix featured-images">
								<div class="clearfix">
								<?php 
                $_smarty_tpl->tpl_vars['result_photo1_01'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['result_photo1_01']->_loop = false;
                $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable();
                $_from = $_smarty_tpl->tpl_vars['result_photos1_01']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['result_photo1_01']->key => $_smarty_tpl->tpl_vars['result_photo1_01']->value) {
                    $_smarty_tpl->tpl_vars['result_photo1_01']->_loop = true;
                    $_smarty_tpl->tpl_vars['i']->value = $_smarty_tpl->tpl_vars['result_photo1_01']->key;
                    ?>
									
								<?php 
                    if ($_smarty_tpl->tpl_vars['i']->value == 0) {
                        ?>
			

									<div class="ft-img col-md-7">
									

						            	<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            	<?php 
                        echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo1_01']->value, 'output' => 'html', 'size' => "l", 'class' => "cb_img_thum"), $_smarty_tpl);
                        ?>

						            	</a>
						            	<div class="hover">
						            		<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            			<span class="photo-title"><?php 
                        echo $_smarty_tpl->tpl_vars['result_photo1_01']->value['photo_title'];
                        ?>
</span>
						            			<span class="plus">plus</span>
						            		</a>
						            	</div>
						          
						            </div>
						        <?php 
                    } elseif ($_smarty_tpl->tpl_vars['i']->value < 3) {
                        ?>
    

						           
						            
									
									<div class="ft-img col-md-5">
						            	<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_08']->value, 'view_item');
                        ?>
">
						            	<?php 
                        echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo1_01']->value, 'output' => 'html', 'size' => "l", 'class' => 'photoThumbBox moveL cb_img_thum'), $_smarty_tpl);
                        ?>

						            	</a>
						            	<div class="hover">
						            		<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            			<span class="photo-title"><?php 
                        echo $_smarty_tpl->tpl_vars['result_photo1_01']->value['photo_title'];
                        ?>
</span>
						            			<span class="plus">plus</span>
						            		</a>
						            	</div>
						           
						       	    </div>
						           
								<?php 
                    } elseif ($_smarty_tpl->tpl_vars['i']->value < 7) {
                        ?>
						           
									<div class="ft-img col-md-6">
						            	<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_08']->value, 'view_item');
                        ?>
">
						            	<?php 
                        echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo1_01']->value, 'output' => 'html', 'size' => "l", 'class' => 'photoThumbBox moveL cb_img_thum'), $_smarty_tpl);
                        ?>

						            	</a>
						            	<div class="hover">
						            		<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            			<span class="photo-title"><?php 
                        echo $_smarty_tpl->tpl_vars['result_photo1_01']->value['photo_title'];
                        ?>
</span>
						            			<span class="plus">plus</span>
						            		</a>
						            	</div>
						            
						       	    </div>
						            
								<?php 
                    } else {
                        ?>
			
						           
									<div class="ft-img col-md-3" style="height:140px;">
						            	<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_08']->value, 'view_item');
                        ?>
">
						            	<?php 
                        echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo1_01']->value, 'output' => 'html', 'size' => "l", 'class' => 'photoThumbBox moveL cb_img_thum'), $_smarty_tpl);
                        ?>

						            	</a>
						            	<div class="hover">
						            		<a href="<?php 
                        echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo1_01']->value, 'view_item');
                        ?>
">
						            			<span class="photo-title"><?php 
                        echo $_smarty_tpl->tpl_vars['result_photo1_01']->value['photo_title'];
                        ?>
</span>
						            			<span class="plus">plus</span>
						            		</a>
						            	</div>
						            
						       	    </div>
						         <?php 
                    }
                    ?>
   
						        
						        <?php 
                }
                ?>
						        </div>
								<!-- </div> -->
							</div>
					        <!-- *********** FIRST PHOTOS END ************ //-->
				     		<?php 
            }
            ?>

							<?php 
            if (isset($_smarty_tpl->tpl_vars['result_photos2_08'])) {
                $_smarty_tpl->tpl_vars['result_photos2_08'] = clone $_smarty_tpl->tpl_vars['result_photos2_08'];
                $_smarty_tpl->tpl_vars['result_photos2_08']->value = get_photos(array('order' => '  photo_id ASC LIMIT 4 '));
                $_smarty_tpl->tpl_vars['result_photos2_08']->nocache = null;
                $_smarty_tpl->tpl_vars['result_photos2_08']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['result_photos2_08'] = new Smarty_variable(get_photos(array('order' => '  photo_id ASC LIMIT 4 ')), null, 0);
            }
            ?>
						    
						    <?php 
            if ($_smarty_tpl->tpl_vars['result_photos2_08']->value) {
                ?>
 		
					        <!-- *********** SECOND PHOTOS START ************ //-->
							<!-- <div class="col-md-12 fill-background clearfix lg-img">
						        <div class="col-md-5 nopadding sm-imgs clearfix left-aligned">
								<?php 
                $_smarty_tpl->tpl_vars['result_photo2_08'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['result_photo2_08']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['result_photos2_08']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['result_photo2_08']->key => $_smarty_tpl->tpl_vars['result_photo2_08']->value) {
                    $_smarty_tpl->tpl_vars['result_photo2_08']->_loop = true;
                    ?>
									<div class="col-md-6 col-sm-6">
						        	<a href="<?php 
                    echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo2_08']->value, 'view_item');
                    ?>
">
						        	<?php 
                    echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo2_08']->value, 'output' => 'html', 'width' => "128", 'height' => "118", 'size' => "l", 'class' => 'photoThumbBox moveL cb_img_thum'), $_smarty_tpl);
                    ?>

						        	</a>
						        <?php 
                    if ($_smarty_tpl->tpl_vars['photos']->iteration > 1) {
                        break 1;
                    }
                    ?>
						   	    </div>
						        <?php 
                }
                ?>
								</div>
								<?php 
                if (isset($_smarty_tpl->tpl_vars['result_photos2_01'])) {
                    $_smarty_tpl->tpl_vars['result_photos2_01'] = clone $_smarty_tpl->tpl_vars['result_photos2_01'];
                    $_smarty_tpl->tpl_vars['result_photos2_01']->value = get_photos(array('order' => '  RAND() LIMIT 1 '));
                    $_smarty_tpl->tpl_vars['result_photos2_01']->nocache = null;
                    $_smarty_tpl->tpl_vars['result_photos2_01']->scope = 0;
                } else {
                    $_smarty_tpl->tpl_vars['result_photos2_01'] = new Smarty_variable(get_photos(array('order' => '  RAND() LIMIT 1 ')), null, 0);
                }
                ?>
								<div class="col-md-7 big_img">
								<?php 
                $_smarty_tpl->tpl_vars['result_photo2_01'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['result_photo2_01']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['result_photos2_01']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['result_photo2_01']->key => $_smarty_tpl->tpl_vars['result_photo2_01']->value) {
                    $_smarty_tpl->tpl_vars['result_photo2_01']->_loop = true;
                    ?>
						        	<a href="<?php 
                    echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['result_photo2_01']->value, 'view_item');
                    ?>
">
						        	<?php 
                    echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['result_photo2_01']->value, 'output' => 'html', 'width' => "420", 'height' => "235", 'size' => "l", 'class' => "cb_img_thum"), $_smarty_tpl);
                    ?>

						        	</a>
						        <?php 
                }
                ?>
						        </div>
							</div> -->
							<!-- *********** SECOND PHOTOS END ************ //-->
							<?php 
            }
            ?>
						</div>
						<?php 
        } else {
            ?>
						<div class="col-md-12 nopadding">No featured Photo</div>
						<?php 
        }
        ?>
	
					</div>

			        <!-- ******************************************* //-->
			        <!-- *********** PHOTOS END ************ //-->
			        <!-- ******************************************* //-->

				</div>
				<!-- ******************************************* //-->
		        <!-- ******** ADVERTISEMENT BLOCK START ******** //-->
		        <!-- ******************************************* //-->
				<!--<div class="col-md-4" style="background-color:#F2F2F2; padding-top:10px; padding-bottom:10px; margin-bottom:10px;">
				<h2 class="myHeadingBLK" style="margin-top:0;">Advertisement</h2>
					<div class="col-md-12 text-center nopadding" style="font-size:18px; border:1px solid #CCC; background:#FFF; display:block; height: 250px; width: 300px; line-height: 200px; text-align:center; left:7%;">
					Ad Box 300 x 250
					</div>
				</div>-->
				<!-- ******************************************* //-->
		        <!-- ******** ADVERTISEMENT BLOCK END ******** //-->
		        <!-- ******************************************* //-->


				<!-- ******************************************* //-->
		        <!-- ************* USER BLOCK START ************ //-->
		        <!-- ******************************************* //-->
				<?php 
        if (isset($_smarty_tpl->tpl_vars['feature_users'])) {
            $_smarty_tpl->tpl_vars['feature_users'] = clone $_smarty_tpl->tpl_vars['feature_users'];
            $_smarty_tpl->tpl_vars['feature_users']->value = get_users(array('featured' => 'yes', 'limit' => 5));
            $_smarty_tpl->tpl_vars['feature_users']->nocache = null;
            $_smarty_tpl->tpl_vars['feature_users']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['feature_users'] = new Smarty_variable(get_users(array('featured' => 'yes', 'limit' => 5)), null, 0);
        }
        ?>
				<?php 
        if ($_smarty_tpl->tpl_vars['feature_users']->value) {
            ?>
	     		<div class="col-md-4 side_user_home">
					<h2 class="myHeading theme_color"><?php 
            echo smarty_lang(array('code' => "Featured Users"), $_smarty_tpl);
            ?>
</h2>
	               
	               <?php 
            $_smarty_tpl->tpl_vars['user'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['user']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['feature_users']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['user']->key => $_smarty_tpl->tpl_vars['user']->value) {
                $_smarty_tpl->tpl_vars['user']->_loop = true;
                ?>
					
	                <div class="col-md-12 nopadding clearfix user-view-home">
						<div class="col-md-3 nopadding">
							<img src="<?php 
                echo $_smarty_tpl->tpl_vars['userquery']->value->getuserthumb($_smarty_tpl->tpl_vars['user']->value, 'small');
                ?>
" width="56" height="56" class="img-circle" />
						</div>
						<div class="col-md-9 nopadding">
							<h4 class="nopadding "><a href="<?php 
                echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['user']->value);
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['user']->value['username'];
                ?>
</a></h4>

							<div class=" nopadding col-md-6 min-height-20">
								<div class="pull-left small"><span class="bg-eye"></span>&nbsp;<span><?php 
                echo number_format($_smarty_tpl->tpl_vars['user']->value['profile_hits']);
                ?>
 <?php 
                echo smarty_lang(array('code' => 'views'), $_smarty_tpl);
                ?>
</span></div>
								<div class="pull-right small"><span class="bg-videocam"></span>&nbsp;<span><?php 
                echo number_format($_smarty_tpl->tpl_vars['user']->value['total_videos']);
                ?>
 <?php 
                echo smarty_lang(array('code' => 'Videos'), $_smarty_tpl);
                ?>
</span></div>
							</div>
		                    <br>
		                    <div class="row pull-left" style="margin-left: 0px; width: 99%;">
			                    <div class="progres">
			                        <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
			                            <span class="sr-only">40% Complete (success)</span>
			                        </div>
			                    </div>
		                    </div>
							<!--<div class="col-md-12 nopadding progress no-border-radius">
			      				<div style="width: 40%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="40" role="progressbar" class="progress-bar progress-bar-success">
			        			<span class="sr-only">40% Complete (success)</span>
			  					</div>
			    			</div>-->
						</div>
						<div class="user_icon">
							<a href="<?php 
                echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['user']->value);
                ?>
">
							<img class="" src="<?php 
                echo $_smarty_tpl->tpl_vars['imageurl']->value;
                ?>
/user_next_icon.png" width="25" height="25" />
							</a>
						</div>
					</div>
					<?php 
            }
            ?>
				</div>
				<?php 
        }
        ?>
				<!-- ******************************************* //-->
		        <!-- ************* USER BLOCK END ************ //-->
		        <!-- ******************************************* //-->
		        <?php 
        if ($_smarty_tpl->tpl_vars['row']->value['collectionsSection'] == 'yes') {
            ?>
				<?php 
            if (isset($_smarty_tpl->tpl_vars['collections'])) {
                $_smarty_tpl->tpl_vars['collections'] = clone $_smarty_tpl->tpl_vars['collections'];
                $_smarty_tpl->tpl_vars['collections']->value = $_smarty_tpl->tpl_vars['cbcollection']->value->get_collections(array('limit' => 5, 'active' => 'yes'));
                $_smarty_tpl->tpl_vars['collections']->nocache = null;
                $_smarty_tpl->tpl_vars['collections']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['collections'] = new Smarty_variable($_smarty_tpl->tpl_vars['cbcollection']->value->get_collections(array('limit' => 5, 'active' => 'yes')), null, 0);
            }
            ?>
				<div class="col-md-4 comment_home side_user_home" >
					<h2 class="myHeading"><?php 
            echo smarty_lang(array('code' => "Top Collections"), $_smarty_tpl);
            ?>
</h2>
					<?php 
            if (isset($_smarty_tpl->tpl_vars['limit'])) {
                $_smarty_tpl->tpl_vars['limit'] = clone $_smarty_tpl->tpl_vars['limit'];
                $_smarty_tpl->tpl_vars['limit']->value = 10;
                $_smarty_tpl->tpl_vars['limit']->nocache = null;
                $_smarty_tpl->tpl_vars['limit']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['limit'] = new Smarty_variable(10, null, 0);
            }
            ?>
		        	<?php 
            if ($_smarty_tpl->tpl_vars['collections']->value) {
                ?>
        
					<?php 
                $_smarty_tpl->tpl_vars['collection'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['collection']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['collections']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['collection']->key => $_smarty_tpl->tpl_vars['collection']->value) {
                    $_smarty_tpl->tpl_vars['collection']->_loop = true;
                    ?>
					<div class="clearfix collection-section">
						<div class="category-header row clearfix">
							<div class="col-sm-6 clearfix"><?php 
                    echo $_smarty_tpl->tpl_vars['collection']->value['collection_name'];
                    ?>
</div>
							<div class="col-sm-6 clearfix"><span class="total-obj"><?php 
                    echo $_smarty_tpl->tpl_vars['collection']->value['total_objects'];
                    ?>
</span></div>

							<!--  -->
							<!-- <div class="col-sm-6 clearfix"><span class="total-obj"><?php 
                    echo $_smarty_tpl->tpl_vars['limit']->value;
                    ?>
</span></div> -->
						</div>
						<div class="collection-grid clearfix"> 
						<?php 
                    if ($_smarty_tpl->tpl_vars['collection']->value['type'] == 'photos') {
                        ?>
							<?php 
                        if (isset($_smarty_tpl->tpl_vars['items'])) {
                            $_smarty_tpl->tpl_vars['items'] = clone $_smarty_tpl->tpl_vars['items'];
                            $_smarty_tpl->tpl_vars['items']->value = $_smarty_tpl->tpl_vars['cbphoto']->value->collection->get_collection_items_with_details($_smarty_tpl->tpl_vars['collection']->value['collection_id'], 0, $_smarty_tpl->tpl_vars['limit']->value, false);
                            $_smarty_tpl->tpl_vars['items']->nocache = null;
                            $_smarty_tpl->tpl_vars['items']->scope = 0;
                        } else {
                            $_smarty_tpl->tpl_vars['items'] = new Smarty_variable($_smarty_tpl->tpl_vars['cbphoto']->value->collection->get_collection_items_with_details($_smarty_tpl->tpl_vars['collection']->value['collection_id'], 0, $_smarty_tpl->tpl_vars['limit']->value, false), null, 0);
                        }
                        ?>
						<?php 
                    } else {
                        ?>
							<?php 
                        if (isset($_smarty_tpl->tpl_vars['items'])) {
                            $_smarty_tpl->tpl_vars['items'] = clone $_smarty_tpl->tpl_vars['items'];
                            $_smarty_tpl->tpl_vars['items']->value = get_videos_of_collection($_smarty_tpl->tpl_vars['collection']->value['collection_id'], 0, $_smarty_tpl->tpl_vars['limit']->value, false);
                            $_smarty_tpl->tpl_vars['items']->nocache = null;
                            $_smarty_tpl->tpl_vars['items']->scope = 0;
                        } else {
                            $_smarty_tpl->tpl_vars['items'] = new Smarty_variable(get_videos_of_collection($_smarty_tpl->tpl_vars['collection']->value['collection_id'], 0, $_smarty_tpl->tpl_vars['limit']->value, false), null, 0);
                        }
                        ?>
						<?php 
                    }
                    ?>
	



						<?php 
                    if ($_smarty_tpl->tpl_vars['items']->value) {
                        ?>
							<?php 
                        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['item']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['items']->value;
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                            $_smarty_tpl->tpl_vars['item']->_loop = true;
                            ?>
								<div class="collection-item">
									<a href="<?php 
                            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['item']->value, 'view_item');
                            ?>
">
										<?php 
                            if ($_smarty_tpl->tpl_vars['collection']->value['type'] == 'photos') {
                                ?>
											<?php 
                                echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['item']->value, 'output' => 'html', 'size' => "l", 'class' => "cb_img_thum"), $_smarty_tpl);
                                ?>

										<?php 
                            } else {
                                ?>
											<img alt="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['title'];
                                ?>
" title="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['title'];
                                ?>
" class="cb_img_thum" id="photo_<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['ci_id'];
                                ?>
" src="<?php 
                                echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['item']->value), $_smarty_tpl);
                                ?>
">
										<?php 
                            }
                            ?>
									</a>
								</div>
							<?php 
                        }
                        ?>
						<?php 
                    }
                    ?>
						</div>
					</div>

					<?php 
                }
                ?>
					<?php 
            } else {
                ?>
					<div class="col-md-12 nopadding">No Collection</div>
					<?php 
            }
            ?>
		    	</div>
		    	<?php 
        }
        ?>
				
				<?php 
        if (isset($_smarty_tpl->tpl_vars['playlists'])) {
            $_smarty_tpl->tpl_vars['playlists'] = clone $_smarty_tpl->tpl_vars['playlists'];
            $_smarty_tpl->tpl_vars['playlists']->value = get_playlists(array('limit' => 5, 'order' => 'total_items DESC'));
            $_smarty_tpl->tpl_vars['playlists']->nocache = null;
            $_smarty_tpl->tpl_vars['playlists']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['playlists'] = new Smarty_variable(get_playlists(array('limit' => 5, 'order' => 'total_items DESC')), null, 0);
        }
        ?>
                <div class="col-md-4 comment_home side_user_home " >
                	<h2 class="myHeading"><?php 
        echo smarty_lang(array('code' => "Top Playlists"), $_smarty_tpl);
        ?>
</h2>
                	<?php 
        if ($_smarty_tpl->tpl_vars['playlists']->value) {
            ?>
					<?php 
            $_smarty_tpl->tpl_vars['playlist'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['playlist']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['playlists']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['playlist']->key => $_smarty_tpl->tpl_vars['playlist']->value) {
                $_smarty_tpl->tpl_vars['playlist']->_loop = true;
                ?>

						<div class="clearfix collection-section">
							<div class="category-header row clearfix">
								<div class="col-sm-6 clearfix"><span class=""><?php 
                echo $_smarty_tpl->tpl_vars['playlist']->value['playlist_name'];
                ?>
</span></div>
								<div class="col-sm-6 clearfix">
									<span class="total-obj">
										<?php 
                echo number_format($_smarty_tpl->tpl_vars['cbvid']->value->action->count_playlist_items($_smarty_tpl->tpl_vars['playlist']->value['playlist_id']));
                ?>

									</span>
								</div>
                            </div>

							<div class="collection-grid clearfix"> 
							<?php 
                if (isset($_smarty_tpl->tpl_vars['items'])) {
                    $_smarty_tpl->tpl_vars['items'] = clone $_smarty_tpl->tpl_vars['items'];
                    $_smarty_tpl->tpl_vars['items']->value = get_playlist_items($_smarty_tpl->tpl_vars['playlist']->value['playlist_id']);
                    $_smarty_tpl->tpl_vars['items']->nocache = null;
                    $_smarty_tpl->tpl_vars['items']->scope = 0;
                } else {
                    $_smarty_tpl->tpl_vars['items'] = new Smarty_variable(get_playlist_items($_smarty_tpl->tpl_vars['playlist']->value['playlist_id']), null, 0);
                }
                ?>
								<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['items']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
								    <div class="collection-item">
										    <?php 
                    if (isset($_smarty_tpl->tpl_vars['videoid'])) {
                        $_smarty_tpl->tpl_vars['videoid'] = clone $_smarty_tpl->tpl_vars['videoid'];
                        $_smarty_tpl->tpl_vars['videoid']->value = $_smarty_tpl->tpl_vars['item']->value['videoid'];
                        $_smarty_tpl->tpl_vars['videoid']->nocache = null;
                        $_smarty_tpl->tpl_vars['videoid']->scope = 0;
                    } else {
                        $_smarty_tpl->tpl_vars['videoid'] = new Smarty_variable($_smarty_tpl->tpl_vars['item']->value['videoid'], null, 0);
                    }
                    ?>
										    <?php 
                    if ($_smarty_tpl->tpl_vars['videoid']->value) {
                        ?>
		                                    <?php 
                        if (isset($_smarty_tpl->tpl_vars['videos'])) {
                            $_smarty_tpl->tpl_vars['videos'] = clone $_smarty_tpl->tpl_vars['videos'];
                            $_smarty_tpl->tpl_vars['videos']->value = get_videos(array('videoid' => $_smarty_tpl->tpl_vars['videoid']->value, 'limit' => '4'));
                            $_smarty_tpl->tpl_vars['videos']->nocache = null;
                            $_smarty_tpl->tpl_vars['videos']->scope = 0;
                        } else {
                            $_smarty_tpl->tpl_vars['videos'] = new Smarty_variable(get_videos(array('videoid' => $_smarty_tpl->tpl_vars['videoid']->value, 'limit' => '4')), null, 0);
                        }
                        ?>
											    <?php 
                        $_smarty_tpl->tpl_vars['video'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['video']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['videos']->value;
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['video']->key => $_smarty_tpl->tpl_vars['video']->value) {
                            $_smarty_tpl->tpl_vars['video']->_loop = true;
                            ?>
				                                    <a href="<?php 
                            echo videoLink($_smarty_tpl->tpl_vars['video']->value);
                            ?>
">
														<?php 
                            if (isset($_smarty_tpl->tpl_vars['thumb'])) {
                                $_smarty_tpl->tpl_vars['thumb'] = clone $_smarty_tpl->tpl_vars['thumb'];
                                $_smarty_tpl->tpl_vars['thumb']->value = get_thumb($_smarty_tpl->tpl_vars['video']->value);
                                $_smarty_tpl->tpl_vars['thumb']->nocache = null;
                                $_smarty_tpl->tpl_vars['thumb']->scope = 0;
                            } else {
                                $_smarty_tpl->tpl_vars['thumb'] = new Smarty_variable(get_thumb($_smarty_tpl->tpl_vars['video']->value), null, 0);
                            }
                            ?>
				                                        <img src="<?php 
                            echo $_smarty_tpl->tpl_vars['thumb']->value;
                            ?>
" />
						                            </a>
												<?php 
                        }
                        ?>
											<?php 
                    } else {
                        ?>
											<span class="label label-default">no items</span>
											<?php 
                    }
                    ?>
                                    </div>
								<?php 
                }
                ?>
							</div>
						</div>	

                    <?php 
            }
            ?>
                    <?php 
        } else {
            ?>
						<div class="col-md-12 nopadding">No Playlists</div>
					<?php 
        }
        ?>
				</div>

			</div>
		</div>
	</div>
	
</div>

<div style="height:20px;"></div>
<script type="text/javascript">
	$(function() {
				
	    $('#slide').ulslide({
	        width: 350,
	        height: 88,
			effect: {
				type: 'carousel', // slide or fade
	            axis: 'y',        // x, y
				showCount: 5
			},
	        nextButton: '#slide_next',
	        prevButton: '#slide_prev',
	        duration: 800,
	        /*autoslide: 2000*/
			easing: 'easeOutBounce'
	    });
	    $('#slide1').ulslide({
	        width: 150,
	        height: 80,
			effect: {
				type: 'carousel', // slide or fade
	            axis: 'x',        // x, y
				showCount: 5
			},
	        nextButton: '#slide_next1',
	        prevButton: '#slide_prev1',
	        duration: 800,
	        autoslide: 2000
			/*easing: 'easeOutBounce'*/
	    });
	    $('#slide3').ulslide({
	        width: 150,
	        height: 80,
			effect: {
				type: 'carousel', // slide or fade
	            axis: 'x',        // x, y
				showCount: 5
			},
	        nextButton: '#slide_next3',
	        prevButton: '#slide_prev3',
	        duration: 800,
	        autoslide: 2000,
			easing: 'easeOutBounce'
	    });
	});
</script>

<!--<style>

.ad{
    background: none repeat scroll 0 0 #F3F3F3;
    border: 1px solid #CCCCCC;
    font-size: 15px;
    height: 90px;
    margin: 0 auto 25px;
    padding: 0;
    text-align: center;
    width: 728px;
}
</style>--><?php 
    }
    function content_55e44441c21315_45821929($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_replace')) {
            include '/var/www/includes/smartyv3/plugins/modifier.replace.php';
        }
        ?>
<script>
var baseurl = '<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
';
var imageurl = '<?php 
        echo $_smarty_tpl->tpl_vars['imageurl']->value;
        ?>
';
</script>

<script type="text/javascript">
var embedPlayerWidth 	=	'<?php 
        echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_player_width'];
        ?>
';
var embedPlayerHeight 	=	'<?php 
        echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_player_height'];
        ?>
';
var autoPlayEmbed 		=	'<?php 
        echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['autoplay_embed'];
        ?>
';
var embed_type 			=	'<?php 
        echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['embed_type'];
        ?>
';



function updateEmbed(width,height,autoplay)
{
	$('#embed_code').val( $('#embed_code').val().replace(/width=\"([0-9]+)\"/g,'width="'+width+'"') );
	$('#embed_code').val( $('#embed_code').val().replace(/height=\"([0-9]+)\"/g,'height="'+height+'"') );
	$('#embed_code').val( $('#embed_code').val().replace(/width=([0-9]+)/g,'width='+width) );
	$('#embed_code').val( $('#embed_code').val().replace(/height=([0-9]+)/g,'height='+height+'') );
}

function switchEmbedCode(type)
{
	if(embed_type==type)
		return false;
	else
	{
		embed_type = type;
		
		var alt_embed =$('#alternate_embed_code').val();
		$('#alternate_embed_code').val($('#embed_code').val());
		$('#embed_code').val(alt_embed);
		
	}
}



</script>


<!-- Including JS Files-->
<?php 
        $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['type']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->JSArray;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value) {
            $_smarty_tpl->tpl_vars['type']->_loop = true;
            ?>
 <?php 
            $_smarty_tpl->tpl_vars['scope'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['scope']->_loop = false;
            $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['type']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['scope']->key => $_smarty_tpl->tpl_vars['scope']->value) {
                $_smarty_tpl->tpl_vars['scope']->_loop = true;
                $_smarty_tpl->tpl_vars['file']->value = $_smarty_tpl->tpl_vars['scope']->key;
                ?>
  <?php 
                echo include_js(array('type' => $_smarty_tpl->tpl_vars['scope']->value, 'file' => $_smarty_tpl->tpl_vars['file']->value), $_smarty_tpl);
                ?>

 <?php 
            }
        }
        ?>
<!-- Including JS Files-->
<script type="text/javascript">
	callURLParser();
</script>
<!-- Including Plugin Headers -->
<?php 
        $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['type']->_loop = false;
        $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->header_files;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value) {
            $_smarty_tpl->tpl_vars['type']->_loop = true;
            $_smarty_tpl->tpl_vars['file']->value = $_smarty_tpl->tpl_vars['type']->key;
            ?>
	<?php 
            echo include_header(array('file' => $_smarty_tpl->tpl_vars['file']->value, 'type' => $_smarty_tpl->tpl_vars['type']->value), $_smarty_tpl);
            ?>

<?php 
        }
        ?>
<!-- Ending Plugin Headers -->



<?php 
        if (@constant('THIS_PAGE') == 'upload') {
            ?>

<link href="<?php 
            echo $_smarty_tpl->tpl_vars['js']->value;
            ?>
/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php 
            echo $_smarty_tpl->tpl_vars['js']->value;
            ?>
/uploadify/swfobject.js"></script>
<script type="text/javascript" src="<?php 
            echo $_smarty_tpl->tpl_vars['js']->value;
            ?>
/uploadify/jquery.uploadify.v2.1.4.js"></script>

<script type="text/javascript">
var jsURL = '<?php 
            echo $_smarty_tpl->tpl_vars['js']->value;
            ?>
';
var uploadError = false;
var file_name = '<?php 
            echo $_smarty_tpl->tpl_vars['file_name']->value;
            ?>
';
var lang = new Array();
lang['saveData'] = '<?php 
            echo smarty_lang(array('code' => 'save_data'), $_smarty_tpl);
            ?>
';
lang['savingData'] = '<?php 
            echo smarty_lang(array('code' => 'saving'), $_smarty_tpl);
            ?>
';
lang['remoteUploadFile'] = '<?php 
            echo smarty_lang(array('code' => "remote_upload_file"), $_smarty_tpl);
            ?>
';
lang['upload_video_button'] = '<?php 
            echo smarty_lang(array('code' => "upload_video_button"), $_smarty_tpl);
            ?>
';
var fileExt = '<?php 
            echo smarty_modifier_replace($_smarty_tpl->tpl_vars['Cbucket']->value->list_extensions(), ",", ";");
            ?>
';

var uploadSwfPath = '<?php 
            echo $_smarty_tpl->tpl_vars['uploaderDetails']->value['uploadSwfPath'];
            ?>
';
var uploadScriptPath = '<?php 
            echo $_smarty_tpl->tpl_vars['uploaderDetails']->value['uploadScriptPath'];
            ?>
';

var time_stamp = <?php 
            echo time();
            ?>
;



  function show_error(msg,ID,fade)
  { $('#file_uploads'+ID+' .percentage')
  	.after('<div class=\"uploadErrorDiv\"><div class=\"uploadErrorMsg\">'+msg+'<\/div><\/div>'); 
	if(fade){$('.uploadSuccessDiv').delay(3000).fadeOut('slow');}
  }
  
  function show_message(msg,ID,fade)
  { $('#uploadForm'+ID)
  	.prepend('<div class=\"uploadSuccessDiv\"><div class=\"uploadSuccessMsg\">'+msg+'<\/div><\/div>');
  if(fade){$('.uploadSuccessDiv').delay(3000).fadeOut('slow');}
  }


function doUpdateVideo(formId,ID)
{
	var formObjectData = $(formId).serialize();
	//alert(serializedData);
	
	$('#updateVideoDataLoading').html('<img src="'+imageurl+'/ajax-loader.gif" />');
	$('#cbSubmitUpload'+ID)
	.attr('disabled','disabled')
	.attr("value",lang.savingData)
	.attr("onClick","return false;");
	
	$.post(
	baseurl+'/actions/file_uploader.php',formObjectData,function(data)
	{
		if(data.msg)
		show_message(data.msg,ID,true);
		if(data.error)
		show_error(data.error,ID,true);
		$('#updateVideoDataLoading').empty();
		$('#cbSubmitUpload'+ID)
		.removeAttr("disabled")
		.attr("value",lang.saveData)
		.attr("onClick","doUpdateVideo('#uploadForm"+ID+"','"+ID+"')")
	},"json"
	)
}

$(document).ready(function()
{
  

  var instanceNumber = 0;
  function showUploadify(object)
  {
  $(object).uploadify({
    'uploader'  : uploadSwfPath,
	'scriptAccess' : 'always',
    'script'    : uploadScriptPath,
    'cancelImg' : imageurl+'/cancel_upload.png',
    'auto'      : true,
	'removeCompleted' : false,
	'displayData' : 'both',
	'fileExt'     : fileExt,
	'multi'		  : true,
	'fileDesc'    : 'Video Files',
	'buttonText' : lang.upload_video_button,
	'queueID' : 'fileUploadQueue',
	'queueLimit' : 2,
	'onOpen'	 : function(event,ID,fileObj) {
		
		uploadError = false;
		filename = new Date().getTime() + Math.round((99977 - 10016) * Math.random() + 1) ;
		$.ajax({
			  url: baseurl+'/actions/file_uploader.php',
			  type: "POST",
			  data:({"getForm":"get_form","title":fileObj.name,"objId":ID}),
			  dataType: "text",
			  success: function(data)
			  {
			    if(!uploadError)
				{
					$('#file_uploads'+ID).append(data);
				}
			  }
			});
			
			return true;
	},
	'onComplete' : function(event, ID, fileObj, response, data)
	{
		var resObj = eval('(' + response + ')');
		var vid  = "";
		if(resObj.success=='yes')
		{
			var file_name = resObj.file_name;
			$.ajax({
				  url: baseurl+'/actions/file_uploader.php',
				  type: "POST",
				  data:({"insertVideo":"yes","title":fileObj.name,"file_name":file_name,'time_stamp' : time_stamp}),
				  dataType: "text",
				  success: function(data)
				  {

				  	if(data.error)
				  	{
				  		show_error(data.error,ID,true);
				  	}else
				  	{


						vid = data.videoid;
						$("#uploadForm"+ID+" #title").after('<input type="hidden" name="videoid" value="'+vid+'" id="videoid" />')
						.after('<input type="hidden" name="updateVideo" value="yes" id="updateVideo" />');
						$('#cbSubmitUpload'+ID)
						.before('<span id="updateVideoDataLoading" style="margin-right:5px"></span>')
						.removeAttr("disabled")
						.attr("value",lang.saveData)
						.attr("onClick","doUpdateVideo('#uploadForm"+ID+"','"+ID+"')");
						
						doUpdateVideo('#uploadForm'+ID,ID);
					}
				  }
				});
		}else
		{
			$("#upload_form"+ID).empty().remove();
			show_error(resObj.error,ID,false);	
			uploadError = true;
			return false;
		}
    }
  });
  }
  
  
  showUploadify('#file_uploads');
});


</script>


<?php 
        } else {
            ?>
<script type="text/javascript">

window.onload = function() {
	<?php 
            if ($_smarty_tpl->tpl_vars['total_quicklist']->value) {
                ?>
		load_quicklist_box();
	<?php 
            }
            ?>
	ini_cookies();
}

</script>
<?php 
        }
        ?>

<?php 
        if (@constant('THIS_PAGE') == 'photo_upload') {
            ?>
<link href="<?php 
            echo $_smarty_tpl->tpl_vars['js']->value;
            ?>
/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php 
            echo $_smarty_tpl->tpl_vars['js']->value;
            ?>
/uploadify/swfobject.js"></script>
<script type="text/javascript" src="<?php 
            echo $_smarty_tpl->tpl_vars['js']->value;
            ?>
/uploadify/jquery.uploadify.v2.1.4.js"></script>

<script type="text/javascript" language="javascript">
	fileExt = '<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->extensions();
            ?>
',
	lang = new Array(),
	pData = new Array(),
	ajaxImage = '<img src="'+imageurl+'/ajax-loader.gif" style="vertical-align:middle;" /> ',
	uploadError = false;
<?php 
            if ($_GET['collection']) {
                ?>
	<?php 
                if (isset($_smarty_tpl->tpl_vars['cid'])) {
                    $_smarty_tpl->tpl_vars['cid'] = clone $_smarty_tpl->tpl_vars['cid'];
                    $_smarty_tpl->tpl_vars['cid']->value = $_smarty_tpl->tpl_vars['cbphoto']->value->decode_key($_GET['collection']);
                    $_smarty_tpl->tpl_vars['cid']->nocache = null;
                    $_smarty_tpl->tpl_vars['cid']->scope = 0;
                } else {
                    $_smarty_tpl->tpl_vars['cid'] = new Smarty_variable($_smarty_tpl->tpl_vars['cbphoto']->value->decode_key($_GET['collection']), null, 0);
                }
                ?>
	<?php 
                if ($_smarty_tpl->tpl_vars['cbphoto']->value->is_addable($_smarty_tpl->tpl_vars['cid']->value)) {
                    ?>
	collectionID = '<?php 
                    echo $_smarty_tpl->tpl_vars['cid']->value;
                    ?>
';
	<?php 
                }
            }
            ?>
	
lang['browsePhrase'] = '<?php 
            echo smarty_lang(array('code' => "browse_photos"), $_smarty_tpl);
            ?>
';
lang['saveData'] = "<?php 
            echo smarty_lang(array('code' => 'save_data'), $_smarty_tpl);
            ?>
";
lang['savingData'] = "<?php 
            echo smarty_lang(array('code' => 'saving'), $_smarty_tpl);
            ?>
";
lang['upPhoto'] = "<?php 
            echo smarty_lang(array('code' => 'update_photo'), $_smarty_tpl);
            ?>
";
var uploadSwfPath = '<?php 
            echo $_smarty_tpl->tpl_vars['photoUploaderDetails']->value['uploadSwfPath'];
            ?>
';
var uploadScriptPath = '<?php 
            echo $_smarty_tpl->tpl_vars['photoUploaderDetails']->value['uploadScriptPath'];
            ?>
';



function photoMessage(message,ID,fade)
{
	if(document.getElementById(ID+"Message"))
		$("#"+ID+"Message").children(":first-child").html(message).end().fadeIn('slow');
	else
	{
		$("#Form"+ID).before('<div id=\"'+ID+'Message\" class=\"uploadSuccessDiv\"><div class=\"uploadSuccessMsg\">'+message+'<\/div><\/div>');	
	}
	
	if(fade)
		$("#"+ID+"Message").delay(300).fadeOut('slow');
}

function photoError(message,ID,fade)
{
	if(document.getElementById(ID+"Error"))
		$("#"+ID+"Error").children(":first-child").html(message).end().fadeIn('slow');
	else
	{
		$("#Form"+ID)
		.before('<div id=\"'+ID+'Error\" class=\"uploadErrorDiv\"><div class=\"uploadErrorMsg\">'+message+'<\/div><\/div>');
	}
	
	if(fade)
		$("#"+ID+"Error").delay(3000).fadeOut('slow');
}

function QueueLimitError(message,fade)
{
	$("#photoUploadQueue")
	.before('<div id=\"QueueError\" style=\"margin-top:6px;\" class=\"uploadErrorDiv\"><div class=\"uploadErrorMsg\">'+message+'<\/div><\/div>');
	if(fade)
		$("#QueueError").delay(5000).fadeOut('slow');	
}

function insertAjaxPhoto(ID,filename,extension,server_url,folder)
{

	var photoFields = $("#Form"+ID).serialize();
	$.ajax({
		url : baseurl+'/actions/photo_uploader.php',
		type : 'POST',
		dataType : 'json',
		data : photoFields+"&filename="+filename+"&ext="+extension+"&insertPhoto=yes&server_url="+server_url+
		"&folder="+folder,
		beforeSend : function()
		{
			$("#cbSubmitUpload"+ID).html(ajaxImage+lang.savingData).attr('disabled','disabled');	
		},
		success : function(data)
		{
			if(data.error)
			{
				photoError(data.error,ID,true);
				$("#cbSubmitUpload"+ID).html("Save Photo")
				.removeAttr('disabled').attr('onClick','insertAjaxPhoto("'+ID+'","'+filename+'","'+extension+'");');	
			}
			
			if(data.success)
			{
				photoMessage(data.success,ID,true);
				showPhotoPreview(ID,data.photoPreview);
				
				$("<input />").attr({
					'id' : 'photo_id',
					'name' : 'photo_id',
					'value' : data.photoID,
					'type' : 'hidden'	
				}).prependTo('#Form'+ID);
				
				$("#cbSubmitUpload"+ID).html(lang.upPhoto)
				.removeAttr('disabled').attr('onClick','updateAjaxPhoto("'+ID+'");');	
			}
		}
	})
}

function updateAjaxPhoto(ID)
{
	var updateFields = $("#Form"+ID).serialize();
	$.ajax({
		url : baseurl+'/actions/photo_uploader.php',
		type : 'POST',
		dataType : 'json',
		data : updateFields+"&updatePhoto=yes",
		beforeSend : function()
		{
			$("#cbSubmitUpload"+ID).html(ajaxImage+lang.upPhoto).attr('disabled','disabled');
		},
		success : function(data)
		{
			if(data.error)
			{
				photoError(data.error,ID,true);
				$("#cbSubmitUpload"+ID).removeAttr('disabled').html(lang.upPhoto);	
			}
			
			if(data.success)
			{
				photoMessage(data.success,ID,true);
				$("#Form"+ID).hide();
				$("#cbSubmitUpload"+ID).removeAttr('disabled').html(lang.upPhoto);
				if(!document.getElementById("toggle"+ID))
				{	
					$("<a></a>")
					.addClass('reUpdateButton')
					.attr({
						"id" : "toggle"+ID,
						"href" : "#reUpdate",
						"onClick" : "$('#Form"+ID+"').toggle(); return false;",
						"title" : "Toggle Photo Form"	
					}).html('Re-'+lang.upPhoto).appendTo("#photo_uploads"+ID+" .percentage").fadeIn(350);
				}
			}
		}
	})
}

function showPhotoPreview(ID,preview)
{
	var object = $("#"+ID+"Preview"), parentObj = object.parent();
	var FinalPreview = new Image();
	FinalPreview.src = preview;
	$(FinalPreview).load(function()
	{
		object.hide();
		$("<img />")
		.addClass(object.attr('class'))
		.attr({ "id" : "FinalPreview"+ID, "src" : preview }).appendTo(parentObj).fadeIn('normal');	
	});
}

function update_collection_selection(obj)
{
	if($("#CollectionResult").css('display') == 'block')
		$("#CollectionResult").slideUp('fast');
		
	var This = $(obj), thisObj = obj;
	This.attr('disabled','disabled');
	This.after(ajaxImage);
	collectionID = thisObj.value;
	
	setTimeout(function(){
		This.next().remove();
		$("#CollectionResult").html("<div class='msg'>Collection Selected</div>").slideDown(350);
		This.removeAttr('disabled');	
	},1000);
}
	
$(document).ready(function() {
	
	function photoUploadify(object)
	{
		$(object).uploadify(
		{
			'uploader'  : uploadSwfPath,
			'script'    : uploadScriptPath,
			'scriptAccess' : 'always',
			'fileDataName' : 'photoUpload',
			'cancelImg' : imageurl+'/cancel_upload.png',
			'auto'      : true,
			'removeCompleted' : false,
			'displayData' : 'both',
			'fileExt'     : fileExt,
			'multi'		  : true,
			'queueSizeLimit':  '<?php 
            echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['photo_multi_upload'];
            ?>
', 
			'fileDesc'    : 'Photo Files',
			'buttonText' : lang.browsePhrase,
			'queueID' : 'photoUploadQueue',
			'sizeLimit' : '<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->max_file_size;
            ?>
',
			'onSelect' : function(event,ID,fileObj)
			{
				uploadError = false;
				$.ajax({
					url : baseurl+'/actions/photo_uploader.php',
					dataType : 'json',
					type : 'POST',
					data : ({ "photoForm":"yes" , "objID":ID , "name":fileObj.name , "collection":collectionID }),
					success : function(data)
					{
						if(!uploadError)
							$("#photo_uploads"+ID).append(data['form']);
					}
				});
			},
			'onComplete' : function(event,ID,fileObj,response,data)
			{
			
				var resObj = $.parseJSON(response);
				if(resObj.success == "yes")
				{
					insertAjaxPhoto(ID,resObj.filename,resObj.extension,resObj.server_url,resObj.folder);	
				}
				
			},
			'onQueueFull' : function(event,queueSizeLimit)
			{
				QueueError = "I'm stuffed, "+queueSizeLimit+" is my limit. Thanks.";
				QueueLimitError(QueueError,true);
				return false;
			},
			'onError' : function(event,ID,fileObj,errorObj)
			{
				uploadError = true;	
			}
		});
	}
		 
	photoUploadify('#photo_uploads'); 
});	

</script>
<?php 
        }
        ?>

<?php 
        if (@constant('THIS_PAGE') == 'view_item') {
            ?>
<script type="text/javascript">
	var Seo = '<?php 
            echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['seo'];
            ?>
';
	onReload_item();
</script>
<?php 
        }
        ?>

<?php 
        if (@constant('THIS_PAGE') == 'watch_video' || $_smarty_tpl->tpl_vars['object']->value['videoid']) {
            ?>
    <?php 
            if ($_smarty_tpl->tpl_vars['object']->value['videoid']) {
                if (isset($_smarty_tpl->tpl_vars['vdo'])) {
                    $_smarty_tpl->tpl_vars['vdo'] = clone $_smarty_tpl->tpl_vars['vdo'];
                    $_smarty_tpl->tpl_vars['vdo']->value = $_smarty_tpl->tpl_vars['object']->value;
                    $_smarty_tpl->tpl_vars['vdo']->nocache = null;
                    $_smarty_tpl->tpl_vars['vdo']->scope = 0;
                } else {
                    $_smarty_tpl->tpl_vars['vdo'] = new Smarty_variable($_smarty_tpl->tpl_vars['object']->value, null, 0);
                }
                ?>
 <?php 
            }
            ?>
    <meta property="og:title" content="<?php 
            echo $_smarty_tpl->tpl_vars['vdo']->value['title'];
            ?>
" />
    <meta property="og:description" content="<?php 
            echo preg_replace('!<[^>]*?>!', ' ', description($_smarty_tpl->tpl_vars['vdo']->value['description']));
            ?>
" />
    <meta property="og:image" content="<?php 
            echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['vdo']->value), $_smarty_tpl);
            ?>
" />
    
    <?php 
            if ($_smarty_tpl->tpl_vars['Cbucket']->value->configs['facebook_embed'] == 'yes') {
                ?>
        <meta property="og:type" content="video">
        <meta property="og:video" content='<?php 
                echo fb_embed_video(array('video' => $_smarty_tpl->tpl_vars['vdo']->value), $_smarty_tpl);
                ?>
'>
        <meta property="og:video:height" content="259" />
        <meta property="og:video:width" content="398" />
        <meta property="og:video:type" content="application/x-shockwave-flash">
    <?php 
            }
            ?>
        <meta property='og:url' content='<?php 
            echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['vdo']->value), $_smarty_tpl);
            ?>
'/>
        <meta property='og:site_name' content='<?php 
            echo $_smarty_tpl->tpl_vars['website_title']->value;
            ?>
'/>
    
<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['object']->value['photo_id']) {
            ?>
<meta property="og:title" content="<?php 
            echo $_smarty_tpl->tpl_vars['object']->value['photo_title'];
            ?>
" />
<meta property="og:description" content="<?php 
            echo description($_smarty_tpl->tpl_vars['object']->value['photo_description']);
            ?>
" />
<meta property="og:image" content="<?php 
            echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['object']->value, 'size' => 'm', 'output' => 'non_html', 'alt' => $_smarty_tpl->tpl_vars['object']->value['photo_title']), $_smarty_tpl);
            ?>
" />
<meta name="medium" content="image" />
<?php 
        }
        ?>

<?php 
        if (@constant('THIS_PAGE') == 'view_channel') {
            ?>
<meta property="og:title" content="<?php 
            echo $_smarty_tpl->tpl_vars['user']->value['username'];
            ?>
" />

<?php 
        }
        ?>


<?php 
        if (@constant('THIS_PAGE') == 'videos') {
            ?>
<meta property="og:description" content="this is a videos page of ClipBucket"/>

<?php 
        }
        ?>


<script>
$(function() {

	/*$( ".date_field" ).datepicker({ 
		dateFormat: 'yy-mm-dd',
		changeMonth: true,
		changeYear: true,
		yearRange : "1901 : c"
		});*/
});

</script>



<?php 
        echo ANCHOR(array('place' => 'cb_head'), $_smarty_tpl);
        ?>


<!-- ClipBucket version <?php 
        echo $_smarty_tpl->tpl_vars['Cbucket']->value->cbinfo['version'];
        ?>
 --><?php 
    }
    function content_55e450c6b42735_58348266($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_truncate')) {
            include '/var/www/includes/smartyv3/plugins/modifier.truncate.php';
        }
        if (!$_smarty_tpl->tpl_vars['videoLink']->value) {
            ?>
	<?php 
            echo videoSmartyLink(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value, 'assign' => 'videoLink'), $_smarty_tpl);
            ?>

<?php 
        }
        ?>
<div class="qlist_item" style="background-color:#<?php 
        echo $_smarty_tpl->tpl_vars['bg']->value;
        ?>
; <?php 
        if ($_smarty_tpl->tpl_vars['selected']->value == $_smarty_tpl->tpl_vars['video']->value['videoid']) {
            ?>
 border:1px solid #999<?php 
        }
        ?>
"  id="<?php 
        echo $_smarty_tpl->tpl_vars['unique_id']->value;
        ?>
playlist_cont_<?php 
        echo $_smarty_tpl->tpl_vars['video']->value['videoid'];
        ?>
">
	<div class="pl_num"><?php 
        echo $_smarty_tpl->getVariable('smarty')->value['section']['item']['iteration'];
        ?>
</div>
    <div class="pl_thumb">
        <a href="<?php 
        echo videoLink($_smarty_tpl->tpl_vars['video']->value);
        ?>
" target="blank">
            <img src="<?php 
        echo getSmartyThumb(array('vdetails' => $_smarty_tpl->tpl_vars['video']->value), $_smarty_tpl);
        ?>
"/>
        </a>
    </div>
    <div class="pl_details" onclick="window.location='<?php 
        echo $_smarty_tpl->tpl_vars['videoLink']->value;
        ?>
'">
        <a href="<?php 
        echo videoLink($_smarty_tpl->tpl_vars['video']->value);
        ?>
" target="blank" ><?php 
        echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['video']->value['title'], 25);
        ?>
</a>
    </div>
    <?php 
        if ($_smarty_tpl->tpl_vars['show_delete']->value == 'yes') {
            ?>
    <div class="ql_delete">
        <img src="<?php 
            echo $_smarty_tpl->tpl_vars['imageurl']->value;
            ?>
/dot.gif" class="cross_icon" onclick="remove_qucklist('#<?php 
            echo $_smarty_tpl->tpl_vars['unique_id']->value;
            ?>
playlist_cont_<?php 
            echo $_smarty_tpl->tpl_vars['video']->value['videoid'];
            ?>
','<?php 
            echo $_smarty_tpl->tpl_vars['video']->value['videoid'];
            ?>
')" title="remove <?php 
            echo $_smarty_tpl->tpl_vars['video']->value['title'];
            ?>
 from qucklist" alt="quicklist">
    </div>
    <?php 
        }
        ?>
    <div class="pl_duration"><?php 
        echo SetTime($_smarty_tpl->tpl_vars['video']->value['duration']);
        ?>
</div>        
    <div class="clearfix"></div>
</div>
    
    <?php 
    }