$(function(){
    $('.read_more').click(function(e) {
        e.preventDefault();
        $(this).parentsUntil('diag_box_txt').children('.short_text').hide();
        $(this).parentsUntil('diag_box_txt').children('.full_text').show();
    });
    $('.close_more').click(function(e) {
        e.preventDefault();
        $(this).parentsUntil('diag_box_txt').children('.short_text').show();
        $(this).closest('.full_text').hide();
    });

    $(".scrollable").scrollable({
        mousewheel: true
    }).navigator();

    $(".click_thumb").click(function(e){
        var src = $(this).attr("src");
        src = src.replace("maxx=70", "maxx=328");
        src = src.replace("maxy=70", "maxy=300");
        $("#main_img").attr("src", src);;
    });


    $("input[name='payment[billing_sameas]']").change(function(){
        if ($("input[@name='payment[billing_sameas]']:checked").val() == '1'){
            $('#billing_information').hide();
        }
        else if ($("input[@name='payment[billing_sameas]']:checked").val() == '0'){
            $('#billing_information').show();
        }
    });

    $(".slideshow").cycle({fx:"fade",timeout:8000});

});
