var FLOWPLAYER_DEFAULTS = {
    key: "#$9130978d32ba1407d0a",

    screen: {
        bottom: 0
    },

    plugins: {
        controls: {
            url: 'flowplayer.controls-3.2.3.swf',
            backgroundColor: "transparent",
            backgroundGradient: "none",
            sliderColor: '#FFFFFF',
            sliderBorder: '1.5px solid rgba(160,160,160,0.7)',
            volumeSliderColor: '#FFFFFF',
            volumeBorder: '1.5px solid rgba(160,160,160,0.7)',
            timeColor: '#ffffff',
            durationColor: '#535353',
            tooltipColor: 'rgba(255, 255, 255, 0.7)',
            tooltipTextColor: '#000000'
        }
    },
    
    canvas: {
    	backgroundColor: 'transparent',
    	backgroundGradient: 'none'
    },

    clip: {
        autoPlay: false,
        autoBuffering: true, 
        scaling: "fit"
    }
};

$(document).ready(function() {
    setupHomePageSplashArea();
});

$(function() {
    setupHomeLink();
    setupMenu();
    setupHomePageFeeds();
    setupExternalLinks();
    setupVideoOverlayLinks();
    setupProductDetailsSplashArea();
    setupTabs();
    setupFAQAccordion();
    setupContactForm();
    setupHowItWorksExplanation();
    setupStorySlideshow();
    setupNewsFeeds();
    setupAboutMoreLinks();
    setupAsDirectedLinks();
    setupRoundedCorners();
    setupTooltips();
  setupKillBoxGPX();
  setupKillBoxHOM();
  setupMoneyBackGuarantee();
  setupVerticalEnterpriseMapHE();
  setupVerticalEnterpriseMapHealthcare();
  setupVerticalEnterpriseMapHospitality();
  setupVerticalEnterpriseMapFoodservice();
  setupVerticalEnterpriseMapK12();
});

function setupHomeLink() {
    $("#logo").click(function() {
        document.location = "/";
    });
}

function setupHomePageFeeds() {
    $("div#blogFeed").jScrollPane({
        verticalDragMinHeight: 81,
        verticalDragMaxHeight: 81
    });

    // Note that we must load the Twitter feed prior to initializing the scroll
    // pane.  If we setup the scroll pane first, the div will be marked with
    // "display: none" and therefore be passed over.  Further, if we don't wait
    // until the results are populated, the scroll pane thinks the DIV is empty.
    $("div#twitterFeed").tweet({
        query: "from:activeion OR @activeion",
        count: 20,
        loading_text: "Loading Twitter feed..."
    }).bind("loaded", function() {
        $("div#twitterFeed").jScrollPane({
            verticalDragMinHeight: 81,
            verticalDragMaxHeight: 81
        });
    });
}

function setupMenu() {
    function showProductsMenu() {
        $("li#productsMenuItem").addClass("active");

        var parentOffset = $("li#productsMenuItem").offset();
        // We can't call .offset() since the element is not visible, so instead
        // we manipulate the CSS offsets.
        $("ul#productsMenu")
            .css("top", (parentOffset.top + 14) + "px")
            .css("left", parentOffset.left + "px")
            .show();
    }

    function hideProductsMenu() {
        $("ul#productsMenu").hide();
        $("li#productsMenuItem").removeClass("active");
    }

    $("li#productsMenuItem").mouseover(function() {
        showProductsMenu();
    }).mouseleave(function(e) {
        hideProductsMenu();
    });

    $("ul#productsMenu").mouseleave(function(e) {
        hideProductsMenu();
    });
}

function setupHomePageSplashArea() {
    var playing = false;    
    // Set variables for rotator
	var frames = 48;
	var mpf = 5800/frames  // how many miliseconds in each frame
	var lightbgimage = 'url(Assets/css/images/home/timers/light-timer-animated.png)';
	var darkbgimage = 'url(Assets/css/images/home/timers/dark-timer-animated.png)';
	var lightbgimagestop = 'url(Assets/css/images/home/timers/light-timer-stopped.gif)';
	var darkbgimagestop = 'url(Assets/css/images/home/timers/dark-timer-stopped.gif)';

    $("div#splashArea.home").cycle({
        timeout: 5800,
        speed: 2000,
        before: function(curr, next, opts) {
        	// Initilize Variables
        	var toanni = opts.nextSlide;
			var currentFrame = 0;
			var offset = 0;
		    var currentFrame = 0;
          
            // Function to run to animate
			function animate() {
				offset = currentFrame * 60;
				$("div.splash-frame:eq(" + toanni + ") ul.timer-set li:eq(" + toanni + ")").css('background-position', '-' + offset + 'px 0px');
				currentFrame = (currentFrame == frames) ? 1 : currentFrame + 1;
			}
        	
        	if (!playing) {
                // Handle the first frame specially.
                 $("div.splash-frame:eq(" + opts.currSlide + ") ul.timer-set.light li:eq(" + opts.currSlide + ")").css('background-image', lightbgimage);
            $("div.splash-frame:eq(" + opts.currSlide + ") ul.timer-set.dark li:eq(" + opts.currSlide + ")").css('background-image', darkbgimage);
                playing = true;
                toanni = opts.currSlide;
				animateId = setInterval(animate, mpf);
                return;
            }
            
			// Stop animated progress bar if currently running
            if (typeof animateId != 'undefined') {
            	clearInterval(animateId);
            	$("div.splash-frame ul.timer-set.light li").css('background-image', lightbgimagestop).css('background-position', '0px 0px');
           		$("div.splash-frame ul.timer-set.dark li").css('background-image', darkbgimagestop).css('background-position', '0px 0px');
            }
            
            // Change background image for animated function
            $("div.splash-frame:eq(" + opts.nextSlide + ") ul.timer-set.light li:eq(" + opts.nextSlide + ")").css('background-image', lightbgimage).css('background-position', '0px 0px');
            $("div.splash-frame:eq(" + opts.nextSlide + ") ul.timer-set.dark li:eq(" + opts.nextSlide + ")").css('background-image', darkbgimage).css('background-position', '0px 0px');
        	
			// Start animation with id to stop it
			animateId = setInterval(animate, mpf);
        }
    });

    $("div#splashArea.home ul.timer-set a").click(function() {
        var frame = parseInt(this.hash.substring(6)) - 1;
        if (frame != currentFrame)
            // Only switch the frame if it's different.  This is a workaround
            // for the animation indicator.
            $("div#splashArea.home").cycle(frame);
    });
    
    // Pause if hovering on holiday slide and resume upon exiting slide
    $("div.holiday").bind("mouseenter",function() {
    		$("div#splashArea.home").cycle("pause")
    	}).bind('mouseleave',function() {
    		$('div#splashArea.home').cycle('resume')
    	});
}

function setupProductDetailsSplashArea() {
    $("div#splashArea.product-details").cycle({
        timeout: 0,
        speed: 350,
        fx: "cover",
        after: function(curr, next, opts) {
            $("a.splash-frame-link").each(function() {
                var frame = parseInt(this.hash.substring(6)) - 1;
                if (frame == opts.currSlide)
                    $(this).addClass("active");
                else
                    $(this).removeClass("active");
            });
            // Ensure all players are paused
            $f("*").each(function() {
				this.pause();
			});
        }
    });

    // Set up links to particular frames.
    $("a.splash-frame-link").each(function() {
        // Hash values should be of the form "#frame{N}", and start with an
        // offset of 1 in the HTML.
        var frame = parseInt(this.hash.substring(6)) - 1;
        $(this).click(function() {
            $("div#splashArea").cycle(frame);
        });
    });

    function pauseSplash() { $("div#splashArea").cycle("pause"); }
    function resumeSplash() { $("div#splashArea").cycle("resume"); }

    var mySettings = {
        onStart: pauseSplash,
        onPause: resumeSplash,
        onFinish: resumeSplash
    };

    $.extend(mySettings, FLOWPLAYER_DEFAULTS);
    
    // Note the wmode argument.  This enables the cycle effects to
    // operate correctly, as well as to avoid occluding the products
    // drop-down menu.
    var vidplayer = flowplayer('.flowplayer', { src: "Assets/movies/flowplayer-3.2.5.swf", wmode: "transparent" }, mySettings);
}

function setupExternalLinks() {
	// Make sure click is not bound before binding
	$('a[rel=external]').unbind('click');
    $('a[rel=external]').bind('click', function() {
        window.open(this.href);
        return false;
    });
}

function setupVideoOverlayLinks() {
    $("a.youtube-overlay").click(function() {
        $.fancybox({
            titleShow: false,
            transitionIn: "elastic",
            transitionOut: "elastic",
            href: this.href.replace(new RegExp("watch\\?v=", "i"), "v/") + "&autoplay=1",
            type: "swf",
            swf: { wmode: "transparent", allowfullscreen: "true" }
        });

        return false;
    });

    $("a.myfox9-overlay").fancybox({
        width: 410,
        height: 360,
        autoScale: false,
        transitionIn: "none",
        transitionOut: "none",
        type: "iframe"
    });

    $("a.tcl-overlay").fancybox({
        width: 550,
        height: 412,
        autoScale: false,
        transitionIn: "none",
        transitionOut: "none",
        type: "iframe"
    });
}

function setupTabs() {
	$('ul#tabs').tabs("#tabContainer > div.tab-content-container", {current: 'selected', history: true});
	// Fix for IE 7 and lower to prevent page jumping with history plugin
	if ($.browser.msie && $.browser.version < '8') {
		$('#tabs li a').bind('click',function() {
			$($(this).attr('href')).insertAfter('#tabs');
		});
	}
}

function setupFAQAccordion() {
    $("div#productFAQ").microAccordion({
        cssClassOpen: "header-open",
        cssClassClosed: "header-closed",
        cssClassHoverOpen: "header-hover-open",
        cssClassHoverClosed: "header-hover-closed",
        cssClassContent: "content",
        openSingle: true,
        closeFunction: function (obj) { obj.hide(); },
        toggleFunction: function (obj) { obj.toggle(); }
    });
}

function setupContactForm() {

    $("[id$='ddlTopic']").change(showHideContactFields);
}

function showHideContactFields() {
        $("#ProductType").hide();
        $("#Reason").hide();
        $("#Serial").hide();
        $("div#WarrantyProductType").hide();
        $("div#WarrantyFields").hide();
        $("#ProductType").hide();
        $("#Serial").hide();
        $("div#WarrantyProductType").hide();
        $("#TitleField").hide();
        $("#Country").show();
        $("#PhoneRequiredIndicator").hide();
        $("div#Comments").show();
        $("#ProductInterest").show();

        var selectedText = $("[id$='ddlTopic'] :selected").text();
        $("[id$='HiddenFieldSelectedTopic']").attr('value', selectedText);

        if (selectedText == "Distributor and Retailer Opportunities") {
            $("#TitleField").show();
        } else if (selectedText == "Submit Warranty Claim") {
            $("#PhoneRequiredIndicator").show();
            $("div#addressFields").show();
            $("#Country").hide();
            $("div#Comments").hide();
            $("div#WarrantyFields").show();
            $("#ProductType").show();
            $("#Serial").show();
            $("div#WarrantyProductType").show();
            $("#ProductInterest").hide();
            
        } 

        var className = $("[id$='ddlTopic'] :selected")[0].className;
        if (className == "detailed-group" || className == "distributor") {
            $("span#companyRequiredIndicator").show();
            $("div#addressFields").show();
        } else if(className == "default-group") {
            $("span#companyRequiredIndicator").hide();
            $("div#addressFields").hide();
        }
    
}

function setupHowItWorksExplanation() {
    var started = false;
    $("div#explanationFrames").cycle({
        timeout: 4000,
        speed: 350,
        before: function(curr, next, opts) {
            $("div#explanationFrameLinks div.frame-link").removeClass("active");
            frame = started ? (opts.nextSlide + 1) : 1;
            $("div#explanationFrameLinks div.frame-link.frame" + frame).addClass("active");
            started = true;
        }
    });

    $("div#explanationFrameLinks div.frame-link").mouseenter(function() {
        var classList = $(this).attr("class").split(/\s+/);
        $.each(classList, function(i, className) {
            var result = className.match(/^frame(\d+)$/);
            if (result !== null) {
                $("div#explanationFrames").cycle(parseInt(result[1]) - 1);
                $("div#explanationFrames").cycle("pause");
            }
        });
    }).mouseleave(function() {
        $("div#explanationFrames").cycle("resume");
    });
}

function setupStorySlideshow() {
    $("div#storySlideshow").cycle({
        timeout: 0,
        speed: 350,
        fx: "cover",
        pager: "#storySlideshowNav",
        pagerAnchorBuilder: function(idx, slide) {
            // return selector string for existing anchor 
            return "#storySlideshowNav li:eq(" + idx + ") a";
        }
    });
}

function linkify(str) {
    var regexp = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;
    return str.replace(regexp, '<a href="$1" rel="external">$1</a>');
}

function setupNewsFeeds() {
    // There is a strange bug in the Tweet library that throws an error if this
    // container does't exist, so we guard with a test.
    if ($("div#twitterNewsFeed").size() > 0) {
        $("div#twitterNewsFeed").tweet({
            query: "from:activeion OR @activeion",
            count: 2,
            loading_text: "Loading Twitter feed..."
        });
    }

    $("div#facebookNewsFeed").html('<p>Loading Facebook feed...</p>');

    $.getJSON("https://graph.facebook.com/activeion/feed?limit=3&access_token=216548738367349|AX-QTjGlGMroiG-je--WBsCsO_8&callback=?", function(json) {
        $("div#facebookNewsFeed").html('');
        $.each(json.data, function(i, item) {
            var ts = new Date();
            ts.setISO8601(item.updated_time);
            var fmtTs = dateFormat(ts, "mmmm dS") + " at " + dateFormat(ts, "h:MM TT");

            var escMessage = $("<span />").text(item.message).html();

            var html = '<div class="status-item">'
                + '<p class="details"><a href="http://www.facebook.com/profile.php?id=' + item.from.id + '" rel="external">' + item.from.name + '</a> ' + fmtTs + '</p>'
                + '<p class="message">' + linkify(escMessage) + '</p>'
                + '</div>';
            $("div#facebookNewsFeed").append(html);
        });
        setupExternalLinks();
    });
}

function setupAboutMoreLinks() {
    $("div#aboutBody div.more").hide().after('<p><a href="#" class="more-link">More</a></p>');
    $("div#aboutBody a.more-link").click(function() {
        $(this).parents("div.leader").find("div.more").slideToggle();
        $(this).text(($(this).text() == "More") ? "Less" : "More");
        return false;
    });
}

function setupAsDirectedLinks() {
	$(".asdirected").fancybox({
        width: 530,
        height: 175,
        padding: 30,
        autoScale: false,
        transitionIn: "elastic",
        transitionOut: "elastic",
        content: "<h3 class='asdirected'>Kills germs effectively</h3><p class='asdirected'>Kills 99.99% of harmful bacteria and the Influenza A (H1N1) virus. To kill germs, spray the nonporous, hard surface at a distance of 3 &ndash; 4 inches (7 &ndash; 10 centimeters) away from surface. Spray at least 6 seconds covering entire surface area to be cleaned. No additional dwell time required.</p></div>"

	});
}

function setupRoundedCorners() {
	// Only apply if not IE 7 and lower
	if (!$.browser.msie && !$.browser.version < '8') {
		$('#disclaimer').corner();
		$('.disclaimer').corner();
	}
}

function setupTooltips() {
	$("#holiday-partners img[title]").tooltip({
		effect: 'slide',
		offset: [30,0]
	});
}

function addToCart(item) {
	// Add item to cart
    $.ajax({
        url: "/estore/ProductQuickAdd/" + item + ".aspx",
        async: false,
        dataType: 'json',
        success: function (data) {
            //alert('worked ' + data);
        },
        error: function (data) {
            //alert('failed '  + data)
        }
    });
}

/* John Smith's Additions */
$(function () {
    $('.productGrid .productGridRow:first').addClass('topRow');
    $('.productGrid').find('.productGridRow:last').addClass('bottomRow');
    $('.productGridRow').find('ul:first').addClass('firstProductItem');
    //$('.productGridRow').find('ul:last').addClass('lastProductItem');

    $('#tabEXP .productGrid .productGridRow:first').addClass('topRow');
    $('#tabEXP .productGrid').find('.productGridRow:last').addClass('bottomRow');
    $('#tabEXP .productGridRow').find('ul:first').addClass('firstProductItem');
    $('.productGridRow').children('ul:last').addClass('lastProductItem');

    /* Populate You May Also Like
    $('.ymal').children('span').each(function () {    
        var v = '#' + $(this).attr('class');
        var d = $(v).html();
        $(this).append('<ul>' + d + '</ul>');
    });
    */

    /* Product Gallery */
    $('#stage').cycle({
        timeout: 0,
        pager: '#productStageThumbs',
        pagerAnchorBuilder: function (idx, slide) {
            // return sel string for existing anchor
            return '#productStageThumbs li:eq(' + (idx) + ') a';
        },
        after: function() {
        	//console.log($(this).parent().html());
        	//console.log(this.indexOf($(this).parent()));
        }
    }).cycle('pause');
    
    // Update details on click of thumb on detail pages
    $('.stageThumb').bind('click',function(){
    	// Get index and set dropdown, sku, and price
		var idx = $(this).index()
		$(".productQuantity>select").attr('selectedIndex', idx);
    	var s = $('option:selected','.productQuantity').val();
		$('.productSpec').html(s.replace('$','<strong>$').replace(' ','</strong> '));
		
		// Get sku and replace img thumb with skus image
		$('#stage').cycle(idx);
				
		// Resetup modal windows with changes
		$('.buy-button.modal').unbind('click');
		setupBuyButton();
	});
	
	// Populate modal cart buttons and then setup modal
	$('.buy-button.modal').parent().after('<li class="buttons"> <br /><span class="buy-button keepShopping" onClick="$.fancybox.close();">Keep Shopping</span> <a href="/estore/cart.aspx" class="buy-button">View Cart</a></li>');
	setupBuyButton();
    
    /* Change details when dropdown changes */
    $('.productQuantity select').change(function(){
    	// Value from changed dropdown
    	var s = $('option:selected',this).val();
    	// Update label on page with price/sku
		$(this).parent().next('.productSpec').html(s.replace('$','<strong>$').replace(' ','</strong> '));
		// Get sku and replace img thumb with skus image
		var sku = s.replace(/^\$.*\s/,'');
		$(this).parent().siblings('.productThumb').find('img').attr('src','assets/images/accessories/'+sku+'-175px.jpg');
		
		// Change large image on detail page (done twice for modal to apply)
		$('#stage').cycle(this.selectedIndex);
		$('#stage').cycle(this.selectedIndex);
		
		// Resetup modal windows with changes
		$('.buy-button.modal').unbind('click');
		setupBuyButton();
	});
});  
  
function setupBuyButton() {
	/* Populate the Add To Cart modal */
    $('.buy-button.modal').click().each(function () {
    	var currentProduct = $(this).parent().parent().html();
        //var quantity = $('.productQuantity option:selected').text();
		
		$(this).bind('click',function(){
			// Get sku and add to cart when clicked
			var sku = $(this).parent().siblings('.productSpec').text().replace(/(^\$.*\....)/,'');
			addToCart(sku);
			
			// Update Cart Count
			var cart = $('.cart > a > span').text();
			cart++;
			$('.cart > a > span').text(cart);
		});
		
        $('#fancybox-content .ymal').show();
        $(this).fancybox({
            autoDimensions: false,
            width: 530,
            height: 175,
            padding: 30,
            autoScale: false,
            transitionIn: "elastic",
            transitionOut: "elastic",
            content: "<h3>Added to your cart</h3><ul>" + currentProduct
        });
    });
}

function setupKillBoxGPX()
{
  $(".killboxgpx").fancybox({
    width: 530,
    height: 175,
    padding: 30,
    autoScale: false,
    transitionIn: "elastic",
    transitionOut: "elastic",
    /*
    content: "<h3 class='moneybackguarantee'>Money back guarantee</h3><p class='moneybackguarantee'>Many of our now loyal customers initially thought the ability to clean using only natural tap water sounded too good to be true. If it sounds amazing but you want to see for yourself, try it for 30-days. If you don't like it, send it backfor a full refund. We're certain you'll enjoy cleaning nearly every surface of your house, without dangerous and expensive chemicals.</p><br><img src=\"Assets/images/HOMdetail_BBB.jpg\"></div>"
    */
    content: "<h3 class='killboxgpx'>The Activeion&trade; GPX kills 99.99% of germs.*</h3><p class='killboxgpx'>All tests conducted by an independent, third-party laboratory under U.S. EPA Good Laboratory Practices protocol. (*When used as directed)<br><br></p>" +
"<div id=\"killboxgpxtable\">" +
"<table class=\"gpxkills\">" +
"<tr>" +
"<td class=\"headergermtype\">Germ Type</td><td class=\"headercommonname\">Germ Name</td><td class=\"headerkillsit\">Activeion GPX kills it</td>" +
"</tr>" +
"" +
"<tr class=\"even\">" +
"<td class=\"germtype\">Bacteria</td><td class=\"commonname\">Escherichia coli (E. coli)</td><td class=\"killsit\"><img src=\"assets/images/killgerms/HOMdetail__checksmall.png\"</td>" +
"</tr>" +
"" +
"<tr class=\"odd\">" +
"<td class=\"germtype\">Bacteria</td><td class=\"commonname\">E. coli O157:H7</td><td class=\"killsit\"><img src=\"assets/images/killgerms/HOMdetail__checksmall.png\"</td>" +
"</tr>" +
"" +
"<tr class=\"even\">" +
"<td class=\"germtype\">Bacteria</td><td class=\"commonname\">Pseudomonas aeruginosa</td><td class=\"killsit\"><img src=\"assets/images/killgerms/HOMdetail__checksmall.png\"</td>" +
"</tr>" +
"" +
"<tr class=\"odd\">" +
"<td class=\"germtype\">Bacteria</td><td class=\"commonname\">Staphylococcus aureus (Staph)</td><td class=\"killsit\"><img src=\"assets/images/killgerms/HOMdetail__checksmall.png\"</td>" +
"</tr>" +
"" +
"<tr class=\"even\">" +
"<td class=\"germtype\">Bacteria</td><td class=\"commonname\">Methicillin Resistant Staphylococcus Aureus (MRSA) - (99.9%)</td><td class=\"killsit\"><img src=\"assets/images/killgerms/HOMdetail__checksmall.png\"</td>" +
"</tr>" +
"" +
"<tr class=\"odd\">" +
"<td class=\"germtype\">Bacteria</td><td class=\"commonname\">Salmonella enterica serovar Typhimurium (Salmonella)</td><td class=\"killsit\"><img src=\"assets/images/killgerms/HOMdetail__checksmall.png\"</td>" +
"</tr>" +
"" +
"<tr class=\"even\">" +
"<td class=\"germtype\">Bacteria</td><td class=\"commonname\">Vancomycin Resistant Enterococcus (VRE)</td><td class=\"killsit\"><img src=\"assets/images/killgerms/HOMdetail__checksmall.png\"</td>" +
"</tr>" +
"" +
"<tr class=\"odd\">" +
"<td class=\"germtype\">Bacteria</td><td class=\"commonname\">Listeria monocytogenes (Listeria)</td><td class=\"killsit\"><img src=\"assets/images/killgerms/HOMdetail__checksmall.png\"</td>" +
"</tr>" +
"" +
"<tr class=\"even\">" +
"<td class=\"germtype\">Virus</td><td class=\"commonname\">Influenza A (H1N1) virus</td><td class=\"killsit\"><img src=\"assets/images/killgerms/HOMdetail__checksmall.png\"</td>" +
"</tr>" +
"" +
"</table>" +
"</div>" +
""

  });
}



function setupKillBoxHOM()
{
  $(".killboxhom").fancybox({
    width: 530,
    height: 175,
    padding: 30,
    autoScale: false,
    transitionIn: "elastic",
    transitionOut: "elastic",
    /*
    content: "<h3 class='moneybackguarantee'>Money back guarantee</h3><p class='moneybackguarantee'>Many of our now loyal customers initially thought the ability to clean using only natural tap water sounded too good to be true. If it sounds amazing but you want to see for yourself, try it for 30-days. If you don't like it, send it backfor a full refund. We're certain you'll enjoy cleaning nearly every surface of your house, without dangerous and expensive chemicals.</p><br><img src=\"Assets/images/HOMdetail_BBB.jpg\"></div>"
    */
    content: "<h3 class='killboxhom'>The ionator HOM&trade; kills 99.9% of germs.*</h3><p class='killboxhom'>All tests conducted by an independent, third-party laboratory under U.S. EPA Good Laboratory Practices protocol. (*When used as directed)<br><br></p>" +
"<div id=\"killboxhomtable\">" +
"<table class=\"homkills\">" +
"<tr>" +
"<td class=\"headergermtype\">Common Name</td><td class=\"headercommonname\">Germ Name</td>" +
"</tr>" +
"" +
"<tr class=\"even\">" +
"<td class=\"germtype\">E.Coli</td><td class=\"commonname\">Escherichia coli</td>" +
"</tr>" +
"" +
"<tr class=\"odd\">" +
"<td class=\"germtype\">E. coli 0157:H7</td><td class=\"commonname\">Escherichia coli O157:H7</td>" +
"</tr>" +
"" +
"<tr class=\"even\">" +
"<td class=\"germtype\">Listeria</td><td class=\"commonname\">Listeria monocytogenes</td>" +
"</tr>" +
"" +
"<tr class=\"odd\">" +
"<td class=\"germtype\">Salmonella</td><td class=\"commonname\">Salmonella enterica serovar Typhimurium (Salmonella)</td>" +
"</tr>" +
"" +
"<tr class=\"even\">" +
"<td class=\"germtype\">Pseudomonas</td><td class=\"commonname\">Pseudomonas aeruginosa</td>" +
"</tr>" +
"" +
"<tr class=\"odd\">" +
"<td class=\"germtype\">Staph</td><td class=\"commonname\">Staphylococcus aureus  (non-resistant)</td>" +
"</tr>" +
"" +
"<tr class=\"even\">" +
"<td class=\"germtype\">VRE</td><td class=\"commonname\">Enterococcus faecalis (including vancomycin resistamt VRE)</td>" +
"</tr>" +
"" +
"<tr class=\"odd\">" +
"<td class=\"germtype\">Influenza A (H1N1) virus</td><td class=\"commonname\">Pandemic 2009 H1N1 Influenza A virus</td>" +
"</tr>" +
"" +
"</table>" +
"</div>" +
""
  });
}





function setupMoneyBackGuarantee()
{
  $(".moneybackguarantee").fancybox({
    width: 530,
    height: 175,
    padding: 30,
    autoScale: false,
    transitionIn: "elastic",
    transitionOut: "elastic",
    content: "<h3 class='moneybackguarantee'>Money back guarantee</h3><p class='moneybackguarantee'>Many of our now loyal customers initially thought the ability to clean using only natural tap water sounded too good to be true. If it sounds amazing but you want to see for yourself, try it for 30-days. If you don't like it, send it backfor a full refund. We're certain you'll enjoy cleaning nearly every surface of your house, without dangerous and expensive chemicals.</p><br><img src=\"Assets/images/HOMdetail_BBB.jpg\"></div>"
  });
}



function setupVerticalEnterpriseMapHE()
{
  $(".verticalenterprisemaphe").fancybox({
    width: 940,
    height: 515,
    padding: 10,
    autoScale: false,
    transitionIn: "elastic",
    transitionOut: "elastic",
    content: "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"925px\" height=\"515px\"><tr><td valign=\"top\" align=\"right\"><iframe src=\"http://blackstadvds1.mn2.visi.com/EnterpriseMaps/enterprise_maps/highered.aspx\" width=940 height=2000 frameborder=0 scrolling=1 marginwidth=120></iframe></td></tr></table>"
  });
}

function setupVerticalEnterpriseMapHealthcare()
{
  $(".verticalenterprisemaphealth").fancybox({
    width: 940,
    height: 515,
    padding: 10,
    autoScale: false,
    transitionIn: "elastic",
    transitionOut: "elastic",
    content: "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"925px\" height=\"515px\"><tr><td valign=\"top\" align=\"right\"><iframe src=\"http://blackstadvds1.mn2.visi.com/EnterpriseMaps/enterprise_maps/healthcare.aspx\" width=940 height=2000 frameborder=0 scrolling=1 marginwidth=120></iframe></td></tr></table>"
  });
}

function setupVerticalEnterpriseMapHospitality()
{
  $(".verticalenterprisemaphospitality").fancybox({
    width: 940,
    height: 515,
    padding: 10,
    autoScale: false,
    transitionIn: "elastic",
    transitionOut: "elastic",
    content: "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"925px\" height=\"515px\"><tr><td valign=\"top\" align=\"right\"><iframe src=\"http://blackstadvds1.mn2.visi.com/EnterpriseMaps/enterprise_maps/hospitality.aspx\" width=940 height=2000 frameborder=0 scrolling=1 marginwidth=120></iframe></td></tr></table>"
  });
}


function setupVerticalEnterpriseMapFoodservice()
{
  $(".verticalenterprisemapfoodservice").fancybox({
    width: 940,
    height: 515,
    padding: 10,
    autoScale: false,
    transitionIn: "elastic",
    transitionOut: "elastic",
    content: "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"925px\" height=\"515px\"><tr><td valign=\"top\" align=\"right\"><iframe src=\"http://blackstadvds1.mn2.visi.com/EnterpriseMaps/enterprise_maps/foodservice.aspx\" width=940 height=2000 frameborder=0 scrolling=1 marginwidth=120></iframe></td></tr></table>"
  });
}


function setupVerticalEnterpriseMapK12()
{
  $(".verticalenterprisemapk12").fancybox({
    width: 940,
    height: 515,
    padding: 10,
    autoScale: false,
    transitionIn: "elastic",
    transitionOut: "elastic",
    content: "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"925px\" height=\"515px\"><tr><td valign=\"top\" align=\"right\"><iframe src=\"http://blackstadvds1.mn2.visi.com/EnterpriseMaps/enterprise_maps/k12.aspx\" width=940 height=2000 frameborder=0 scrolling=1 marginwidth=120></iframe></td></tr></table>"
  });
}
