﻿$(document).ready(function () {
    $(".Popup3DLink").click(
        function () {
            SeventyEight.Image360.Show($(this));
        }
	);
    $(".Popup3DLinkHide").click(
        function () {
            SeventyEight.Image360.Show($(this));
        }
	);
    $("#popup3dHolder").hide();
})




$(document).ready(
    function () {
        if ($('#ctl01_ctl00_cphMain_Main_cphMain_SpecAndPrice1_lblOverView').text().length > 300) {
            var regulartext = $('#ctl01_ctl00_cphMain_Main_cphMain_SpecAndPrice1_lblOverView').text().substring(0, 300) + '... ';
            var extratext = $('#ctl01_ctl00_cphMain_Main_cphMain_SpecAndPrice1_lblOverView').text().substring(300, $('#ctl01_ctl00_cphMain_Main_cphMain_SpecAndPrice1_lblOverView').text().length);
            $('#ctl01_ctl00_cphMain_Main_cphMain_SpecAndPrice1_lblOverView').text(regulartext);
            $('<a href="#" id="ctl01_ctl00_cphMain_Main_cphMain_ImageNo3601_SpecAndPrice1_lblOverView-readmore-link">Read more</a>').appendTo('#ctl01_ctl00_cphMain_Main_cphMain_SpecAndPrice1_lblOverView');
            $('<span id="ctl01_ctl00_cphMain_Main_cphMain_ImageNo3601_SpecAndPrice1_lblOverView-readmore"></span>').appendTo('#ctl01_ctl00_cphMain_Main_cphMain_SpecAndPrice1_lblOverView');
            $('#ctl01_ctl00_cphMain_Main_cphMain_ImageNo3601_SpecAndPrice1_lblOverView-readmore').text(extratext);
            $('#ctl01_ctl00_cphMain_Main_cphMain_ImageNo3601_SpecAndPrice1_lblOverView-readmore').hide();
            $('#ctl01_ctl00_cphMain_Main_cphMain_ImageNo3601_SpecAndPrice1_lblOverView-readmore-link').click(function () { $('#ctl01_ctl00_cphMain_Main_cphMain_ImageNo3601_SpecAndPrice1_lblOverView-readmore').show(); $(this).hide(); });
        }
    });




var SeventyEight = {};
SeventyEight.ApplicationRoot = "";

SeventyEight.SetApplicationRoot = function (applicationRoot) {
    SeventyEight.ApplicationRoot = applicationRoot;
}

SeventyEight.Image360 = {};
SeventyEight.Image360.Visible = 0;

SeventyEight.Image360.Show = function (tb) {
    if (SeventyEight.Image360.Visible == 1) {
        SeventyEight.Image360.HideImage();
    }
    else {
        SeventyEight.Image360.Visible = 1;
        $("#popup3d").show();
        $("#popup3d").css("position", "absolute");
        $("#popup3d").css("z-index", "99999");
        $("#popup3d").css("top", "-0px");
        //        $("#popup3d").css("top", $(tb).offset().top - 560);
//        $("#popup3d").css("left", $(tb).offset().left - 320);
    }

}

SeventyEight.Image360.HideImage = function () {
    SeventyEight.Image360.Visible = 0;
    $("#popup3d").hide();
}


$(document).ready(function () {
    $(".orderstatushover:contains('Submitted')").attr("title", "Orders only partially received as payment has not cleared.").tooltip({ position: "center left", effect: "fade" });
    $(".orderstatushover:contains('Credit Cleared')").attr("title", "Order and payment received ok. Order will be delivered on delivery date shown above.").tooltip({ position: "center left", effect: "fade" });
    $(".orderstatushover:contains('In Production')").attr("title", "Order is waiting on one of many things such as, customer to view/collect from store, on stock to arrive from manufacturer.").tooltip({ position: "center left", effect: "fade" });
    $(".orderstatushover:contains('Partially Shipped')").attr("title", " Some but not all the items from your order have been dispatched.").tooltip({ position: "center left", effect: "fade" });
    $(".orderstatushover:contains('Complete')").attr("title", "The order is complete and has been dispatched to you. You should have received an email confirming shipping details.").tooltip({ position: "center left", effect: "fade" });
    $(".orderstatushover:contains('Cancelled')").attr("title", "The order has been cancelled.").tooltip({ position: "center left", effect: "fade" });
})
