function prerender(url, type) {
    $("#CatCatcher").val(type);
    if (type == 0) {
        $("#ValCatcher").val(url);
        __doPostBack("LifeUp", "");
    }
    else if (type == 1) {
    $("#ValCatcherx").val(url);
        __doPostBack("GuideUp", "");
    }
}

function lifeapx() {
    samples();
    jQuery('.life').jcarousel({
        auto: 3,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
}

function lifeapy() {
    samplesx();
    jQuery('.guide').jcarousel({
        auto: 4,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
}

function font_resizer(size) {
    if (size == "x") {
        $(".dt_content *").each(function () {
            var que = parseInt($(this).css("font-size").replace("px", ""));
            if (que != 11 && que != 10) {
                que = que - 1;
                $(this).css("font-size", que + "px")
            }
        })
    }
    if (size == "y") {
        $(".dt_content *").each(function () {
            var que = parseInt($(this).css("font-size").replace("px", ""));
            if (que != 18) {
                que = que + 1;
                $(this).css("font-size", que + "px")
            }
        })
    }
}

function write_document() {
    var val = "<h1>"+$(".dt_content h1").html()+"</h1>";
    val += "<h3>" + $(".dt_content h3").html()+"</h3>";
    val += "<div>" + $(".dt_content div.inline_area").html()+"</div>";
    var style = '<style>* { font-size:12px; font-family:Arial; line-height:17px; list-style:none; margin:8px; padding:0px; }</style>';
    var content = window.open('', "TrackHistoryData", "width=600,height=400,top=250,left=345,toolbars=no,scrollbars=no,status=no,resizable=no");
    content.document.write(style + "<div style='width:700px; border:1px solid #b1b1b1;'>" + val + "</div>");
    content.document.close();
    content.focus();
    content.print();
    content.close();
}



$(document).ready(function () {
    $(".fx_videos").click(function () {
        var url = $(this).attr("rel");
        var content = "<div class='fx_box_out'></div><div class='fx_content'>" + url + "<div class='fx_close'><a href='javascript:;' title='Kapat'></a></div></div>";
        $("#fx_box").append(content).fadeIn(0);
        $(".fx_box_out").click(function () {
            $("#fx_box").fadeOut(0).html("");
        });
        $(".fx_close a").click(function () {
            $("#fx_box").fadeOut(0).html("");
        });
    })
})
