var dove, mightLikeCarouselwrapCounter = 0 , responseVal = 0;
if (!dove) {
	dove = {};
}
dove.log = function (message, type) {
	type = type || "info";
	if (typeof console !== "undefined" && dove.global.debug) {
		console[type](message);
	}
};
dove.global = {
	debug: true
};
dove.ui = {
    section: {
        topmenu: {
            handle: "#header nav li",
            onMouseOver: function (linkElement) {
                $(linkElement).find("menu").show();
                $(linkElement).addClass("active-link");
            },
            onMouseOut: function (linkElement) {
                $(linkElement).find("menu").hide();
                $(linkElement).removeClass("active-link");
            }
        },
        mightLikeCarouselwrap:
			{
			    element: ".mightLikeCarouselwrap",
			    mightLikeCarouselwrapCounter_initCallback: function (carousel) {
			        var mightLikeCarouselwrapds = this;
			        var mightLikeCarouselwrap = this.element
			        $('.jcarousel-control a', mightLikeCarouselwrap).each(function (i) {
			            $(this)
							.text(i + 1)
							.click(function () {
							    mightLikeCarouselwrapCounter = (jQuery(this).text() - 1);
							    carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
							    $("a.active", mightLikeCarouselwrap).removeClass("active");
							    $(".slideNumber:eq(" + mightLikeCarouselwrapCounter + ") a", mightLikeCarouselwrap).addClass("active");
							    return false;

							})
			        })
			    },
			    init: function () {
			        var mightLikeCarouselwrap = this;
			        $(this.element).each(function (i) {
			            var control = $(".jcarousel-control", this),
								controlWidth = control.innerWidth(),
								carouselWidth = $(this).innerWidth();
			            control.css({ left: ((carouselWidth - controlWidth) / 2) + "px" });

			        })
			        var wrap = this.element;
			        $(".slideNumber:first a", wrap).addClass("active");


			        $("#mycarousel").jcarousel({
			            scroll: 1,
			            initCallback: mightLikeCarouselwrap.mightLikeCarouselwrapCounter_initCallback,
			            onNextClickCallback: function () {
			                mightLikeCarouselwrapCounter = (mightLikeCarouselwrapCounter + 1);
			                $("a.active", wrap).removeClass("active");
			                $(".slideNumber:eq(" + mightLikeCarouselwrapCounter + ") a", wrap).addClass("active");
			            },
			            onPrevClickCallback: function () {
			                mightLikeCarouselwrapCounter = (mightLikeCarouselwrapCounter - 1);
			                $("a.active", wrap).removeClass("active");
			                $(".slideNumber:eq(" + mightLikeCarouselwrapCounter + ") a", wrap).addClass("active");
			            }
			        });
			    }
			},
        relatedOfferCarouselwrap:
			{
			    element: ".relatedOfferCarouselwrap",
			    mightLikeCarouselwrapCounter_initCallback: function (carousel) {
			        var mightLikeCarouselwrapds = this;
			        var mightLikeCarouselwrap = this.element
			        $('.jcarousel-control a', mightLikeCarouselwrap).each(function (i) {
			            $(this)
							.text(i + 1)
							.click(function () {
							    mightLikeCarouselwrapCounter = (jQuery(this).text() - 1);
							    carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
							    $("a.active", mightLikeCarouselwrap).removeClass("active");
							    $(".slideNumber:eq(" + mightLikeCarouselwrapCounter + ") a", mightLikeCarouselwrap).addClass("active");
							    return false;

							})
			        })
			    },
			    init: function () {
			        var mightLikeCarouselwrap = this;
			        $(this.element).each(function (i) {
			            var control = $(".jcarousel-control", this),
								controlWidth = control.innerWidth(),
								carouselWidth = $(this).innerWidth();
			            control.css({ left: ((carouselWidth - controlWidth) / 2) + "px" });

			        })
			        var wrap = this.element;
			        $(".slideNumber:first a", wrap).addClass("active");


			        $("#mycarousel2").jcarousel({
			            scroll: 1,
			            initCallback: mightLikeCarouselwrap.mightLikeCarouselwrapCounter_initCallback,
			            onNextClickCallback: function () {
			                mightLikeCarouselwrapCounter = (mightLikeCarouselwrapCounter + 1);
			                $("a.active", wrap).removeClass("active");
			                $(".slideNumber:eq(" + mightLikeCarouselwrapCounter + ") a", wrap).addClass("active");
			            },
			            onPrevClickCallback: function () {
			                mightLikeCarouselwrapCounter = (mightLikeCarouselwrapCounter - 1);
			                $("a.active", wrap).removeClass("active");
			                $(".slideNumber:eq(" + mightLikeCarouselwrapCounter + ") a", wrap).addClass("active");
			            }
			        });
			    }
			},
        productLike:
			{
			    element: '.productLike',
			    init: function () {
			        var object = this.element;
			        $(object).each(function () {
			            if ($(this).html() != null) {
			                var productLike = $(this).html().replace(/&lt;/g, "<").replace(/&gt;/g, ">");
			                $(this).html(productLike);

			            }
			        })
			    }
			},
        hcpOverlay: {
            element: ".hcpOverlay",
            getParams: function (url, key, _default) {
                key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
                regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
                qs = regex.exec(url);
                if (qs === null) {
                    return _default;
                } else {
                    return qs[1];
                }
            },
            init: function () {
                var object = this;

                $(object.element).each(function () {
                    var url = $(this).attr("href");
                    $(this).attr("data-href", url).attr("href", "#");
                    $(this).click(function (e) {
                        e.preventDefault();
                        var height = object.getParams(url, "height", 200),
							width = object.getParams(url, "width", 200);
                        if (url.replace(/ /, "") !== "" || url === "#") {
                            $.colorbox({
                                iframe: true,
                                innerHeight: height,
                                innerWidth: width,
                                href: url,
                                scrolling: false
                            });
                        }
                    });
                });
            }
        },
        spotlights: {
            handle: ".spotlight",
            onMouseOver: function (linkElement) {
                $(linkElement).addClass("spotLightHover");
                $(linkElement).find(".spotlightText").hide();
                $(linkElement).find(".spotlightTextHidden").show();
            },
            onMouseOut: function (linkElement) {
                $(linkElement).removeClass("spotLightHover");
                $(linkElement).find(".spotlightTextHidden").hide();
                $(linkElement).find(".spotlightText").show();
            }
        },
        recommedLink: {
            element: ".recommendProduct .articleLink",
            init: function () {
                var o = this,
					href = $(o.element).attr("href"),
					categoryName = $("input#categoryName").val();
                $(o.element).attr("href", href + "?category=" + categoryName);
            }
        },
        /*ctaButton : 
        {
        handle : ".CTAButtons",
        onMouseOver : function(linkElement)
        {
        $(linkElement).addClass("CTAButtonsHover");
        }, 
        onMouseOut : function(linkElement)
        {
        $(linkElement).removeClass("CTAButtonsHover");
        }
					
        },*/
        twitterShareButton: {
            element: ".twitter-share-button",
            init: function () {
                $(this.element).each(function () {
                    var text = $(this).attr("data-text") || "";
                    $(this).attr("data-text", text + " " + $("title"));
                });
            }
        },
        pagetile: {
            element: "#pageTitle h1",
            init: function () {
                var title;
                if ($("#pageMasterTitle").length > 0 && $("#pageMasterTitle").text() !== "") {
                    title = $("#pageMasterTitle").text().replace(/&lt;/g, "<").replace(/&gt;/g, ">");
                    this.element.html(title);
                }
            }
        },
        imageSpotlights: {
            element: ".spotlight-44",
            textElement: "h3",
            imageElement: "figure",
            init: function () {
                this.element.each(function () {
                    var object = $(this),
						maxHeight = "";
                    $("figure img").load(function () {
                        if (object.hasClass("centerContentSpotlight")) {
                            maxHeight = Math.max(object.find("h3").height(), object.find("figure").height());
                            object.height(object.find("h3").height() + object.find("figure").height() + 30);
                        } else {
                            maxHeight = Math.max(object.find("h3").height(), object.find("figure").height());
                            object.height(maxHeight + 30);
                        }
                    });
                });
            }
        },
        uiTabs: {
            element: ""
        },

        //For Instant Win
        playnow: {
            element: ".inst-win-section",
            init: function () {



                $("#play_now").live("click", function (e) {
                    e.preventDefault();
                    //Added for Unica Tracking
                    //ntptEventTag('ev=MenInstantWin&action=submit');
                    var pattern = new RegExp(/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/);
                    var value = $('.inst-winFields').val();

                    var chkBox = ($('.checkboxShow')[0].checked);
                    var div = $('#divEmail');

                    if (div.length > 0) {

                        if (value == "undefined" || value == "") {
                            $(".instantWinError").html('Please correct the field(s) denoted in red.').show();
                            $(".instantWinChkError").html("").hide();
                            // $('#<%=txtInstantWinEmail.ClientID %>').addClass("test");
                            $('.inst-winFields').addClass('inst-winInvalid');

                        }
                        else if (value.match(pattern) == null) {

                            $(".instantWinChkError").html("").hide();
                            $(".instantWinError").html('Please enter valid e-mail address.').show();
                            //$('#<%=txtInstantWinEmail.ClientID %>').addClass("test");
                            $('.inst-winFields').addClass('inst-winInvalid');
                        }
                        else {
                            $(".instantWinError").html("").hide()
                            $(".instantWinChkError").html("").hide();
                            $('.inst-winFields').removeClass('inst-winInvalid');
                        }
                    }

                    if (chkBox == false) {
                        $(".instantWinChkError").html('Please read and agree to the Official Rules.').show();
                        $("#lblofficalRules").css({ 'color': 'red' });
                        $("#hypOfficialRule").css({ 'color': 'red' });
                    }
                    else {
                        $("#lblofficalRules").css({ 'color': '' });
                        $("#hypOfficialRule").css({ 'color': '' });
                        if (div.length == 0) {
                            $(".instantWinChkError").html("").hide();
                        }


                        if (div.length > 0) {

                            if (value != "undefined" && value != "" && value.match(pattern) != null && chkBox == true) {
                                dove.ajax.instantWin.checkIfUserExits($('.inst-winFields').val(), "/ProductService.svc/instantWinEngine");
                            }
                        }
                        else {
                            if (chkBox == true) {
                                dove.ajax.instantWin.checkIfUserExits($('.inst-winFields').val(), "/ProductService.svc/instantWinEngine");
                            }
                        }
                    }
                });
            }
        }
    },


    init: function () {
        var o = this;

        $.each(o.section, function (n, v) {
            if (typeof v.element !== "undefined") {
                o.section[n].element = $(v.element);
                if (typeof o.section[n].init !== "undefined" && o.section[n].element.length > 0) {
                    dove.log(n + " Called");

                    o.section[n].init();
                }
            }
            if (typeof v.handle !== "undefined") {
                o.section[n].handle = $(v.handle);
                o.section[n].handle.click(function (e) {
                    if (typeof o.section[n].onClick !== "undefined") {
                        o.section[n].onClick(e, this);
                    }
                }).hoverIntent(function () {
                    if (typeof o.section[n].onMouseOver !== "undefined") {
                        o.section[n].onMouseOver(this);
                    }
                }, function () {
                    if (typeof o.section[n].onMouseOver !== "undefined") {
                        o.section[n].onMouseOut(this);
                    }
                });
            }
        });
    }
};
dove.plugin = {
	init: function () {
		$('.wCurve').curveBorder();
		$('.wCurveWithoutTop').curveBorder({
			withoutTopCurves: true
		});
		$(".spotlight-1,.spotlight-2,.spotlight-3").spotlightCarousel();
		$(".spotlight-7").spotlight7();
		
		
		function getQueryString(key, default_)
			{
				if (default_ == null) default_ = "";
				key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
				var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
				var qs = regex.exec(window.location.href);
				if (qs == null) return default_;
				else return qs[1];	
			}
		
		var shopTab = getQueryString("shop");
		if(shopTab === "1")
			{
				$(".doveUITabs, .UITabPanelCont").doveUITabs({defaultTab : "Shop"});
			}
		else
			{
				$(".doveUITabs, .UITabPanelCont").doveUITabs();
			}
				
			
		if (typeof $.fn.colorbox !== "undefined") {
			$(".articleLink").colorbox({
				iframe: true,
				height: 565,
				width: 640
			});
			$(".recommendProduct .articleLink").colorbox({
				iframe: true,
				height: 705,
				width: 565,
				scrolling: false
			});
			$(".registerPopup, .signInPopup, .forgetPopup").colorbox({
				iframe: true,
				height: 470,
				width: 380
			});
			$(".officialRulePopup").colorbox({
				iframe: true,
				height: 595,
				width: 800,
				scrolling: false
			});
			$(".sendToFriendPopUp").colorbox({
				iframe: true,
				height: 400,
				width:320,
				scrolling: false
			});
			$(".offRulesPopup").colorbox({
				iframe: true,
				height: 556,
				width: 740,
				scrolling: false
			});
		} /* Dove Ask */
		var doveAsk = $(".doveAsk");
		if (doveAsk.length > 0 && typeof dove.social !== "undefined") {
			dove.social.doveask.init();
		}
	}
};
$(document).ready(function () {
	dove.plugin.init();
	dove.ui.init();
});
$(document).ready(function () {
	$(".previewBlock").hide();
	$("#previewImg").hover(function () {
		$(".previewBlock").fadeIn('slow');
	}, function () {
		$(".previewBlock").fadeOut('slow');
	});
});

function txtBoxSiteSearchValidation(txt, e) {
    if ((e.keyCode >= 65 && e.keyCode <= 90) || (e.keyCode >= 37 && e.keyCode <= 40) || (e.keyCode >= 96 && e.keyCode <= 105) || e.keyCode == 8 || e.keyCode == 127 || e.keyCode == 32 || e.keyCode == 3 || e.keyCode == 46 || e.keyCode == 35 || e.keyCode == 36)
        return true;
    else
        return false;
}

//For Instant Win
/* Flash Callbacks
---------------------------------------*/

dove.flashcallbacks =
	{
	    instantWin:
			{
			    hideSteamAnimation: function () {			        
			    }
			}
	}
/* Ajax Handlers 
---------------------------------------*/


dove.ajax = 
	{	
		server : "ajaxserver.aspx",
		instantWin : 
			{
				closePanels : function()
					{
						$(".thank-box, .thank-box-yoga, .played-box , .sorry-box").css("display" , "none");
					},
				repeatedPlayer : function(email)
					{
						// ntptEventTag('ev=repeatedPlayer&commenttype=instantWin');
						//ntptEventTag('ev=instantWin&gameaction=repeatedPlayer');

						if(typeof window.console != "undefined")
							{
								console.log("instantWinrepeatedPlayer Email : " + email )
							}
					},
				firstTimePlayer : function(email)
					{
						//ntptEventTag('ev=firstTimePlayer&commenttype=instantWin');
						//ntptEventTag('ev=instantWin&gameaction=firstTimePlayer');
						if(typeof window.console != "undefined")
							{
								console.log("instantWinfirstTimePlayer Email : " + email )
							}
					},
				gamePlayed : function(email)
					{
						//ntptEventTag('ev=gamePlayed&commenttype=instantWin');
						//ntptEventTag('ev=instantWin&gameaction=gamePlayed');
						if(typeof window.console != "undefined")
							{
								console.log("instantgamePlayed Email : " + email )
							}
					},
				instantWinWinner: function (email) {
			        //dove.ajax.instantWin.closePanels();
			        //$(".instant-win-flash").hide();
			        //$(".main-box").css("display", "none");
			        //$(".thank-box").css("display", "block");
			        //$("div.inst-win-leftCol").show();
			        //$("div.inst-win-rightCol").show();
			        //$("#divDefault").css("display", "none");			        
			        //$("#divEmail").css("display", "none");			        
			        //$("#divAlreadyPlayed").css("display", "none");
			        //setTimeout("dove.ajax.instantWin.instantWinWinner('" + email + "')", 3500);

			        $("#divWinner").css("display", "block");

			        // ntptEventTag('ev=winner&commenttype=instantWin');
			        //ntptEventTag('ev=InstantWin&action=InstantWinWin');
			        if (typeof window.console != "undefined") {
			            console.log("instantWinWinner Email : " + email)
			        }
			    },
					/*instantWinWinnerYogaMat : function(email)
					{
						dove.ajax.instantWin.closePanels();
						$(".instant-win-flash").hide();
						$(".thank-box-yoga").css("display" , "block");
						$(".win-box").css("display" , "block");
						
						// ntptEventTag('ev=winner&commenttype=instantWin');
						//ntptEventTag('ev=instantWin&gameaction=winneryogamat');
						if(typeof window.console != "undefined")
							{
								console.log("instantWinWinner Email : " + email )
							}
					},*/
				instantWinLoser: function (email) {
			        //dove.ajax.instantWin.closePanels();
			        //$(".main-box").css("display", "none");
			        //$(".sorry-box").css("display", "block");
			        //$("div.inst-win-leftCol").show();
			        //$("div.inst-win-rightCol").show();

			        $("#divLooser").css("display", "block");

			        //ntptEventTag('ev=loser&commenttype=instantWin');
			        //ntptEventTag('ev=InstantWin&action=InstantWinLoss');

			        if (typeof window.console != "undefined") {
			            console.log("instantWinLoser Email : " + email)
			        }
			    },
			    instantWinAlreadyPlayed: function (email) {
			        //dove.ajax.instantWin.closePanels();
			        //$(".instant-win-flash").hide();
			        //$(".main-box").css("display", "none");
			        //$(".played-box").css("display", "block");
			        //$("div.inst-win-leftCol").show();
			        //$("div.inst-win-rightCol").show();
                    
			        //ntptEventTag('ev=alreadyPlayed&commenttype=instantWin');
			        //ntptEventTag('ev=instantWin&gameaction=alreadyPlayed');


			        if (typeof window.console != "undefined") {
			            console.log("instantWinAlreadyPlayed Email : " + email)
			        }
			    },
			    instantWinRegister: function (email) {
			        window.location.href = "/Members/Register.aspx?Source=IJ";
			        //ntptEventTag('ev=instantWin&gameaction=register');

			        //if (typeof window.console != "undefined") {
			            //console.log("instantWinRegister Email : " + email)
			        //}
			    },
				instantWinAnimation : function() {
					$("div.inst-win-leftCol").hide();
					$("div.inst-win-rightCol").hide();
					$(".shutterBoxL").show().animate({left: "+=238"}, 1500).delay(500).animate({left: "-=238"}, 1500);
					$(".shutterBoxR").show().animate({right: "+=238"}, 1500).delay(500).animate({right: "-=238"}, 1500);	
					return false;
				},
				checkIfUserExits : function(email, url)
					{	
						var emailID = email;					
						$.ajax({
							type: "POST",
							url: url,					
							data: "{\"email\" : \"" + emailID + "\"}",
							contentType: "application/json; charset=utf-8",
							dataType: "json",
							success: function(response)
							{				
						
								if (url == "/redirectinstantwin.aspx/instantWinEngine") {
			                    dove.ajax.instantWin.firstTimePlayer(email);
			                }
								responseVal = response.d;
								if (response.d == 0) {
									dove.ajax.instantWin.instantWinRegister(email);
								}
								else if (response.d == 1) {
									$("#flashOverlay").css("display", "none");
									$("#divEmail").css("display", "none");
									$("#divAlreadyPlayed").css("display", "block");
									$("#divWinner").css("display", "none");
									$("#divLooser").css("display", "none");
									
									// Unica for Insider January Already Played
									ntptEventTag('ev=Deoinstantwin/sorryplayedalready');
									
									if (url == "/ProductService.svc/instantWinEngine") {
										//dove.ajax.instantWin.repeatedPlayer(email);
									}

									//$(".instant-win-flash").css("display" , "block");
									//dove.ajax.instantWin.instantWinAnimation();
									//dove.ajax.instantWin.gamePlayed(email);
									//setTimeout('$(".InstantWinAlreadyBg").css("display" , "block")', 1500);
									//setTimeout("dove.ajax.instantWin.instantWinAlreadyPlayed('" + email + "')", 3500);
								}
								else if (response.d == 2) {
									$("#divDefault").css("display", "none");
									$("#flashOverlay").css("display", "block");
									$("#divLooser").css("display", "none");
									
									// Unica for Insider January Win
									ntptEventTag('ev=Deoinstantwin/thankyou/winner');
									
									//setTimeout(function() {$("#divWinner").fadeIn("slow")}, 2600 );
									//$("#flashOverlay").delay(3000).fadeOut("fast");
									//$("#divWinner").css("display", "block");
									//setTimeout("dove.ajax.instantWin.instantWinWinner('" + email + "')", 2000);

									//$("#divEmail").css("display", "none");			                    
									//$("#divAlreadyPlayed").css("display", "none");			                    
									//$("#divWinner").css("display", "block");
									//dove.ajax.instantWin.gamePlayed(email)
									//dove.ajax.instantWin.instantWinAnimation();										
									//dove.ajax.instantWin.gamePlayed(email)
									//if (url == "/ProductService.svc/instantWinEngine") {
										//dove.ajax.instantWin.repeatedPlayer(email);
									//}
									//setTimeout('$(".InstantWinCongratsBg").css("display" , "block")', 1500);
									//setTimeout("dove.ajax.instantWin.instantWinWinner('" + email + "')", 3500);
								}
								
								else if (response.d == 3) {
									$("#divDefault").css("display", "none");
									$("#flashOverlay").css("display", "block");									
									$("#divWinner").css("display", "none");
									
									// Unica for Insider January Lose
									ntptEventTag('ev=Deoinstantwin/thankyou/lose');
									
									//setTimeout(function() {$("#divLooser").fadeIn("slow")}, 2600 );
									//$("#flashOverlay").delay(3000).fadeOut("fast");
									//$("#").css("display", "block");
									//setTimeout("dove.ajax.instantWin.instantWinLoser('" + email + "')", 2000);
									
									//if (url == "/ProductService.svc/instantWinEngine") {
									//dove.ajax.instantWin.repeatedPlayer(email);
									//}
									//dove.ajax.instantWin.instantWinAnimation();
									//dove.ajax.instantWin.gamePlayed(email)
									//setTimeout('$(".InstantWinSorryBg").css("display" , "block")', 1500);
									
								}
							}
						});
					}	
			}
	}
	
	
function callFromFlash()
	{
		var url = '/Tips-Topics-And-Tools/Games-And-Quizzes/EmailToFriend.aspx';	
		var height	= '380';	
		var width = '360';				
			$.colorbox({
				iframe: true,
				innerHeight: height,
				innerWidth: width,
				href: url,
				scrolling: false
			});
	}
	
	
	/* Update Product in database after winning */
function UpdatePrizeCode(prizeId) {
    
    var emailId = $('.inst-winFields').val();

    $.ajax({
        type: "POST",
        url: "/ProductService.svc/UpdatePrizeCode",		
        data: "{\"productCode\" : \"" + prizeId + "\",\"Email\" : \"" + emailId + "\"}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (msg) {           
            $("#divDefault").css("display", "none");            
            $("#divWinner").css("display", "none");
            $("#divLooser").css("display", "none");
            if (msg.d == "5") {
				// Unica for Insider January Choose go sleeveless
				ntptEventTag('ev=Deoinstantwin/winner/confirmation/gosleeveless');
                $("#divChoose1").css("display", "block");
                $("#divChoose2").css("display", "none");
            }
            else if (msg.d == "6") {
				// Unica for Insider January clinical protection
				ntptEventTag('ev=Deoinstantwin/winner/confirmation/clinicalprotection');
                $("#divChoose2").css("display", "block");
                $("#divChoose1").css("display", "none");
            }          
            
        },
        error: function (xhr, status, error) {

        }
    });

}

function flashloaded() {
		
		if(responseVal == 2){
			$("#divWinner").css("display", "block");
		}
		else if(responseVal == 3){
			$("#divLooser").css("display", "block");
		}		
    }
	function flashAnimationComplete() {
		//alert("flashAnimationComplete");
		$("#flashOverlay").css("display", "none");
    }
	
	
	
$(document).ready(function () {
	
	//Insider Feb 17 2012


//dove insider email submit button
$("#play_now").click(function(){
 ntptEventTag('ev=DeoInstantWin&action=Submit Instant Win');
})


//Take under arm skin quiz and Save $1.50 
$("#C1TUSQ").click(function (){
  ntptEventTag('ev=DeoInstantWin&action=Take Quiz');
 });


$("#C2TUSQ").click(function (){
  ntptEventTag('ev=DeoInstantWin&action=Take Quiz');
 });

$("#LTUSQ").click(function (){
 ntptEventTag('ev=DeoInstantWin&action=Take Quiz');
 });

$("#C1Share").click(function (){
  ntptEventTag('ev=DeoInstantWin&action=Share Instant Win Click');
 });


$("#C2Share").click(function (){
 ntptEventTag('ev=DeoInstantWin&action=Share Instant Win Click');
 });


$("#LShare").click(function (){
 ntptEventTag('ev=DeoInstantWin&action=Instant Win Lose Coupon Click');
 });


//Choose button left

$(".chooseBtnLeft").live("click", function(){

ntptEventTag('ev=DeoInstantWin&action=Choose Go Sleeveless');

}); 


//Choose button right


$(".chooseBtnRight").live("click", function(){

ntptEventTag('ev=DeoInstantWin&action=Choose Clinical Protection');

}); 


//Login Click 

$(".signInPopup").live("click", function(){

ntptEventTag('ev=DILogin&action=LogInClick');

}); 

//Register click 

$(".registerPopup").live("click", function(){

ntptEventTag('ev=DILogin&action=RegisterClick');

}); 

//Share after choosing 1

$("Div#divChoose1 div p span a").live("click", function(){

ntptEventTag('ev=DeoInstantWin&action=Share Instant Win Click');

}); 



//Share after choosing 2
$("Div#divChoose2 div p a").live("click", function(){

ntptEventTag('ev=DeoInstantWin&action=Share Instant Win Click');

}); 

});
