name : index.tpl.php
<?
if (!defined('SITE'))
    exit('Access Denied');
?>
<? template('html_head'); ?>
<script type="text/javascript">
    $(function () {
        //bg slider
        thebackground();
        $('div.bodyslider').fadeIn(1000); // works for all the browsers other than IE
        $('div.bodyslider img').fadeIn(1000); // IE tweak
    });
    function thebackground() {
        $('div.bodyslider img').css({opacity: 0.0});
        $('div.bodyslider img:first').css({opacity: 1.0});
        setInterval('change()',7000);
    }

    function change() {
        var current = ($('div.bodyslider img.show')? $('div.bodyslider img.show') : $('div.bodyslider img:first'));
        if ( current.length == 0 ) current = $('div.bodyslider img:first');
        var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.bodyslider img:first') :current.next()) : $('div.bodyslider img:first'));
        next.css({opacity: 0.0})
        .addClass('show')
        .animate({opacity: 1.0}, 1000);
        current.animate({opacity: 0.0}, 1000)
        .removeClass('show');
    };
</script>
<? template('page_header'); ?>
<div id="body">
    <div style="position:relative;">
        <div class="bodyslider">
            <?php echo $base['content']['data']; ?>
        </div>
    </div>
</div>
<? template('page_footer'); ?>

© 2024 UnknownSec