﻿$("#sideBox1").prettyBorders({ top: 11, right: 11, bottom: 22, left: 11, bgImagePre: imagePath + "image/contentContainerBG_0", bgImageExt: "png", addTitle: false });
$("#didThisAnswer").prettyBorders({ top: 12, right: 1, bottom: 12, left: 1, bgImagePre: imagePath + "Image/greyPanel_", bgImageExt: "gif", addTitle: false });
$(".allFaqLinkBtn").prettyButton({ right: 13, left: 9, top: 30, bottom: 0, bgImagePre: imagePath + "image/GlowButtonSM_0", bgImageExt: "png" });

if ($("#faqDoItOnline").length > 0) {    
    $("#faqDoItOnline").prettyBorders({ top: 19, right: 17, bottom: 27, left: 17, bgImagePre: imagePath + "Image/doItOnline_0", bgImageExt: "png", addTitle: false });
    $("#faqDoItOnline a").removeAttr("target");

    $("#faqDoItOnline a").before("<div class='doItOnlineLeft'>" + $("#faqDoItOnline a").text() + "</div>").wrap("<div class='doItOnlineRight'>").text($("#faqDoItOnline a").attr("title")).toggleClass("doItOnlineBtn");
    $("#faqDoItOnline .pInner").append("<div style='clear:both;'></div>");
    $("#faqDoItOnline .doItOnlineLeft").prepend("<h3>" + $("#faqDoItOnline h3").html() + "</h3>").prev().remove();
    $("#faqDoItOnline .pInner").parent().parent().css("margin", "-5px 0px -10px 0px").next().children().css("overflow", "visible"); 

    $(".doItOnlineBtn").prettyButton({ right: 40, left: 14, top: 48, bottom: 0, bgImagePre: imagePath + "image/GlowButton48_0", bgImageExt: "png" });

    $(document).ready(function() {

        $('[id^=actionLink]').each(
		        function(intIndex) {
		            var s = $(this).attr('id');
		            s = s.replace('actionLink_', '');
		            var al = $(this).attr('href');
		            $(this).attr('href', 'javascript:void(0)').bind(
				        "click",
				        function() {
		                    $('div[id$=' + s + ']').dialog('open', true);
				        }
			        );

		            $('div[id$=' + s +']').applySwiftDialog({ linkMode: "self", actionLink: al });
		        }
	        );
    });
}