var defines = [
	{ 
		"name" : "product category",
		"copy" : "<b>PRODUCT CATERGORY</b><br />Look through these products to find what you need. If you don't see it, give us a call and we will point you in the right direction!" 
	},
	{ 
		"name" : "design method",
		"copy" : "<b>DESIGN ONLINE</b><br />Is using one of the templates already designed and tweaking it with your own information and photos.<br /><br /><b>UPLOAD PRINT READY DESIGN</b><br />When you have created a design and only need the printing done.<br /><br /><b>ASSISTED CUSTOM DESIGN</b><br />When you want FundamentalMedia to design a custom product for you." 
	},
	{
		"name" : "size",
		"copy" : "<b>PRODUCT SIZES</b><br />This is the size of your product before folding, unless otherwise stated. Most template designs are only available in one size, but can be converted to another size for an additional fee."
	}, 
	{
		"name" : "turnaround",
		"copy" : "<b>TURNAROUND TIMES</b><br />The turnaround times shown are for the printing only and does not include the time it takes to ship.You will have the opportunity to choose your shipping options on the second page of the checkout.<br /><br /><b>CUTOFF TIME</b><br />The cutoff time for orders is 10:00 PST. If your order is placed after the cutoff time then your turnaround starts on the next full day.<br /><br /><b>1-DAY PRINTING</b><br />1-Day Orders do not print on the day they are placed but on the next full day excluding weekends. The order must be placed before 10:00am PST in order to ship at the end of the next full day."
	}, 
	{
		"name" : "finish options",
		"copy" : "<b>Grommets</b><br />Grommets are the metal rings that allow the banner to be hung from a nail, rope, zip tie etc. If you choose the grommet option the banner is automatically hemmed on all four sided to give needed support to the grommets.<br /><br /><b>Pole Pockets</b><br />Pole Pockets can be added on any side of the banner and allows the banner to be held up by a pole or rope that goes through the sleeve created by the pole pocket."
	},
	{
		"name" : "finish options",
		"copy" : "<b>Grommets</b><br />Grommets are the metal rings that allow the banner to be hung from a nail, rope, zip tie etc. If you choose the grommet option the banner is automatically hemmed on all four sided to give needed support to the grommets.<br /><br /><b>Pole Pockets</b><br />Pole Pockets can be added on any side of the banner and allows the banner to be held up by a pole or rope that goes through the sleeve created by the pole pocket."
	},
	{
		"name" : "paper type/download options",
		"copy" : "There are many types of paper and we'll let you have <br />your choice when possible. For an explanation of the <br />different papers, cardstocks, and finishes, please see <br />our FAQ."
	},
	{
		"name" : "pdf proof",
		"copy" : "<b>Proofing</b><br />If you would like to see a PDF proof of your document we can send you a digital low-rez version of your file by way of our online proofing system."
	},
	{
		"name" : "color",
		"copy" : "<b>COLOR</b><br />Check here to see if your product has full-color on one side or both, or to choose how many sides your want printed for custom designs."	
	}

];

function EndRequestHandler(sender, args) {
	$("div.smallTitle").each(function () {
		for (i in defines) {
			if($(this).html().trim().toLowerCase() == defines[i].name) {
				$($(this)).append("<span class='vtip vtipcalc' title=\"" + defines[i].copy.replace("'", "\'") + "\"></span>");
			}
		}
	});
	
	/*$("span.detailsName").each(function () {
		for (i in defines) {
			if($(this).html().trim().toLowerCase() == defines[i].name) {
				$("<span class='vtip' title=\"" + defines[i].copy.replace("'", "\'") + "\"></span>").insertBefore($(this));
			}
		}
	});*/
	vtip();
	return true;
}

$(document).ready(function () {
	//$('#TagsList').insertBefore('#DetailsPanel');

	Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
	EndRequestHandler(null, null);
});

/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/
 
this.vtip = function() {    
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 10; // y distance from mouse       
    
    $(".vtip").unbind().hover(    
        function(e) {
            this.t = this.title;
            this.title = ''; 
            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
            
            $('body').append( '<p id="vtip"><img id="vtipArrow" />' + this.t + '</p>' );
                        
            $('p#vtip #vtipArrow').attr("src", 'App_Themes/Default/img/trans.gif');
            $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");
            
        },
        function() {
            this.title = this.t;
            $("p#vtip").fadeOut("slow").remove();
        }
    ).mousemove(
        function(e) {
            this.top = (e.pageY + yOffset + 5);
            this.left = (e.pageX + xOffset);
                         
            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};

$(document).ready(function(){vtip();}) 
