jQuery(document).bind(
        'ready',
        function() {

// header iphone link
        jQuery('#iphone_link').hide();

        var agent=navigator.userAgent.toLowerCase();
        var is_iphone = (agent.indexOf('iphone')!=-1);
        if (is_iphone) {
                jQuery('#iphone_link').show();
        }


// pagination
        jQuery('.pageLinks a#iphonePaging').live("click", function() {

            jQuery('.pageLinks').html("<div id='loading' align='center'><img src=/images/iphone/load.gif /><br/>Loading</div>");

            jQuery("<div class='newsPlaceholder'></div>").insertAfter('.pageLinks:last');
            jQuery('div.newsPlaceholder:last').load(this.href + ' .news');
            jQuery('.pageLinks').fadeOut('slow');

            jQuery("<div class='pageLinksPlaceholder'></div>").insertAfter('.newsPlaceholder:last');
            jQuery('div.pageLinksPlaceholder:last').load(this.href + ' .pageLinks');

            return false;
        });

});

