/**
 * iFrame版ajax
 */
function iframe_ajax(url, callback, type)
{
    var rand = Math.floor(Math.random() * 100000);
    var iframe = $('body').append('<iframe id="frame_' + rand + '"/>').find('> :last-child').hide();
    iframe.load(function() {
        if (type == "input-value") {
            var html = $("body input", $(this).contents()).val();
        } else if (type == "body") {
            var html = $(this).contents();
        } else {
            var html = $("body", $(this).contents()).html();
        }
        callback(html);
        $(iframe).remove();
    });
    iframe.attr("src", url);
}

function init_article_ongesturechange()
{
    $("li[articleid] a").each(function () {
        this.ongesturechange = function (e) {
            if (e.scale < 0.8) {
                $("p.lead", this).slideUp("slow");
            }
            if (e.scale > 1.3) {
                $("p.lead", this).slideDown("slow");
            }
        };
    });
}

function onPC() {
    document.cookie = 'pcsite=1;domain=news.mynavi.jp;path=/'
}


