// POPUP FUNCTION
function popWindow (url,myWidth,myHeight,myScrollbars,myTop,myLeft,myMenubar,myResize) {
	window.open (url, "win","width="+myWidth+",height="+myHeight+",scrollbars="+myScrollbars+",top="+myTop+",left="+myLeft+",menubar="+myMenubar+",resizable="+myResize+",bgcolor=#ffffff");
	}
// END POPUP FUNCTION

var busy = false;
function Add2ShopCart(form) {
	if (!busy) {
		busy = true;
		form.submit();
	}
}

__compete_code = 'b65ef3e20dc7f9f2238e2e155e542f76';
(function () {
    var s = document.createElement('script'),
        d = document.getElementsByTagName('head')[0] ||
            document.getElementsByTagName('body')[0],
        t = 'https:' == document.location.protocol ?
            'https://c.compete.com/bootstrap/' :
            'http://c.compete.com/bootstrap/';
    s.src = t + __compete_code + '/bootstrap.js';
    s.type = 'text/javascript';
    s.async = 'async';
    if (d) { d.appendChild(s); }
}()); 

$(function() {
	var muvee;
	if(window.iFitMovie) muvee = window.document["iFitMovie"];
	if(document.iFitMovie) muvee = document.iFitMovie;

	$(".lightbox a").fancybox({
		'overlayShow': true,
		'zoomSpeedIn': 300,
		'overlayOpacity': .7,
		'callbackOnStart':function() {
			$f().stop();
		}
	});
	$(".iframe a").fancybox({
		'overlayShow': true,
		'zoomSpeedIn': 300,
		'frameWidth': 370,
		'frameHeight': 288,
		'overlayOpacity': .7,
		'callbackOnStart':function() {
			$f().stop();
			$('.left_column').html('<div id="smugplayer" style="visibility:visible" ></div>');
		},
		'callbackOnClose':function() {
			$("#fancy_content").empty();
			swfobject.embedSWF("flash/Testimonials.swf","smugplayer", "320", "660", "8"
			);
		}
	});
	$(".iframe2 a").fancybox({
		'overlayShow': true,
		'zoomSpeedIn': 300,
		'frameWidth': 700,
		'frameHeight': 515,
		'overlayOpacity': .7,
		'callbackOnStart':function() {
			$f().stop();
			$('.left_column').html('<div id="smugplayer" style="visibility:visible" ></div>');
		},
		'callbackOnClose':function() {
			$("#fancy_content").empty();
			swfobject.embedSWF("flash/Testimonials.swf","smugplayer", "320", "660", "8"
			);
		}
	});
});

//Header
var header = '';
	header += '<div id="top">';
	header += '<h1><a class="logo" href="http://www.nordictrack.com" title="Top of the line Exercise Equipment and Fitness Equipment at NordicTrack.com"><span>NordicTrack&reg;</span></a></h1>';
	header += '<h3 id="sales">Sales: <span>1-800-446-4512</span></h3>';
	header += '</div>';

//Title Bar
var titlebar = '';
	titlebar += '<div class="top"><a href="index.html"><img src="images/header_bg.jpg"/></a>';
	titlebar += '<div class="iframe" style="display:inline;"><a href="popup_video_tvspot.html" class="iframe" id="tvspot"><img src="images/view_spot.jpg"/></a></div></div>';

//Form
var form = '';
	form += '<form name="OrderItemAddForm1" action="http://www.nordictrack.com/webapp/wcs/stores/servlet/OrderItemAdd" method="post" id="OrderItemAddForm1" style="padding: 0; margin: 0;">';
	form += '<input type="hidden" name="storeId" value="10301" />';
	form += '<input type="hidden" name="orderId" value="." />';
	form += '<input type="hidden" name="langId" value="-1" />';
	form += '<input type="hidden" name="catalogId" value="12401" />';
	form += '<input type="hidden" name="URL" value="OrderCalculate?URL=OrderItemDisplay&amp;calculationUsageId=-1&amp;calculationUsageId=-2&calculationUsageId=-3&calculationUsageId=-4&calculationUsageId=-5&calculationUsageId=-6&calculationUsageId=-7" />';
	form += '<input type="hidden" name="errorViewName" value="ProductDisplayErrorView" />';
	form += '<input type="hidden" name="catEntryId" value="96453" />';
	form += '<input type="hidden" name="productId" value="96453" />';
	form += '<input type="hidden" name="calculationUsageId" value="-1" />';
	form += '<input type="hidden" name="shouldCachePage" value="false" />';
	form += '<input type="hidden" value="1" name="quantity" size="2" />';
	form += '</form>';

//Col one Capsule one Nav2
var nav2 = '';
	nav2 += '<div id="nav2"><ul>';
	nav2 += '<li id="stride"><a href="stride.html" alt="35&rdquo; Stride Length"><div id="stride-div">&nbsp;</div></a></li>';
	nav2 += '<li id="details"><a href="details.html" alt="FreeStrider Details"><div id="details-div">&nbsp</div></a></li>';
	nav2 += '<li id="natural"><a href="natural.html" alt="Most Efficient Cardio Exercise"><div id="natural-div">&nbsp</div></a></li>';
	nav2 += '<li id="ifit"><a href="ifit.html" alt="iFit Technology"><div id="ifit-div">&nbsp</div></a></li>';
	nav2 += '<li id="testimonial"><a href="testimonials.html" alt="Testimonials"><div id="testimonial-div">&nbsp</div></a></li>';
	nav2 += '</ul></div>';
	
//Category Nav
var catNav = '';
	catNav += '<ul id="nav">';
	catNav += '<li id="n_treadmills" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_19051_Y"><span>Treadmills</span></a></li>';
	catNav += '<li id="n_ellipticals" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_19053_Y"><span>Ellipticals</span></a></li>';
	catNav += '<li id="n_incline_trainers" class="incline_trainers-on"><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_42001_Y"><span>Incline_Trainers</span></a></li>';
	catNav += '<li id="n_exercise_bikes" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_19551_Y"><span>Exercise_Bikes</span></a></li>';
	catNav += '<li id="n_strength" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_19552_Y"><span>Strength</span></a></li>';
	catNav += '<li id="n_skiers" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_19554_Y"><span>Skiers</span></a></li>';
	catNav += '<li id="n_steppers" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_19555_Y"><span>Steppers</span></a></li>';
	catNav += '<li id="n_apparel" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_29452_Y"><span>Apparel</span></a></li>';
	catNav += '<li id="n_ifit_cards" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_21053_Y"><span>iFit_Cards</span></a></li>';
	catNav += '<li id="n_accessories" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_19556_Y"><span>Accessories</span></a></li>';
	catNav += '<li id="n_commercial" class=""><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Category2_-1_10301_12401_42002_Y"><span>Commercial</span></a></li>';
	catNav += '</ul>';
	
//Col two Capsule One
var capsuleOne = '';
	capsuleOne += '<div class="capsule one">';
	capsuleOne += '<div class="">';
	capsuleOne += '<a href="javascript:Add2ShopCart(document.OrderItemAddForm1);"><img src="images/buybug.png" alt="buy now" border="0" /></a>';
	capsuleOne += '</div>';
	capsuleOne += '<div class="bot"><span id="logo">&nbsp;</span></div></div>';
	
//Col two Capsule Two
var capsuleTwo = '';
	capsuleTwo += '<div class="capsule two">';
	capsuleTwo += '<h2 class="top">Accessories</h2>';
	capsuleTwo += '<div class="mid">';
	capsuleTwo += '<div class="accessory">';
	capsuleTwo += '<div class="accessory-desc">';
	capsuleTwo += '<a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Product2_12401_10301_22401_-1_19556">';
	capsuleTwo += '<img alt="NordicTrack Floor Mat" src="images/HRMC1098_comp.jpg"/></a>';
	capsuleTwo += '<p><a href="http://www.nordictrack.com/webapp/wcs/stores/servlet/Product2_12401_10301_22401_-1_19556">Floor Mat<br/></a></p>';
	capsuleTwo += '<p class="web bold">$34.00</p>';
	capsuleTwo += '</div></div></div>';
	capsuleTwo += '<div class="bot"> </div></div>';

//Col two Capsule Three
var capsuleThree = '';
	capsuleThree += '<div class="capsule two">';
	capsuleThree += '<div class="iframe"><a class="iframe" href="popup_video_triathletes.html"><img src="images/triathletebug3.png" /></a></div>';
	capsuleThree += '</div>';

var capsuleFour = '';
	capsuleFour += '	<div class="capsule four">';
	capsuleFour += '<h2 class="top lightbox"><a href="images/NTL15008_xl.jpg" rel="productImages" title="Incline Trainer X3 Interactive">View Gallery</a></h2>';
	capsuleFour += '<div class="mid"><div id="view-more" class="lightbox">';
	capsuleFour += '<div class="bot">&nbsp</div></div>';
	
var capsuleFour = ''; // don't display at this time
	
// COPYRIGHT
var copyRight = '';
	copyRight += '<div id="footer-copyright"><p>&copy;2010 ICON Health &amp; Fitness. Pricing valid only within the continental U.S.</p></div>';
// END COPYRIGHT

// FooterLinks
var footerLinks = '';
	footerLinks += '	<div id="footer-links-left">';
	footerLinks += '<img src="images/logo-word-mark-sm.png" />';
	footerLinks += '</div>';
	footerLinks += '<div id="footer-links-right">';
	footerLinks += '<ul class="footone">';
	footerLinks += '<li><a href="sitemap.html" class="bnav">Site Map</a></li>';
	footerLinks += '<li><a href="http://www.nordictrackservice.com" class="bnav">Customer Service</a></li>';
	footerLinks += '<li><a href="javascript:popWindow(\'http://www.iconservice.com/serviceapps/orderQuery.jsp?p=1\',700,340,\'yes\',20,20);" class="bnav">Order Status</a></li>';
	footerLinks += '<li><a shape="rect" href="guarantee.html" class="bnav">Warranty</a></li>';
	footerLinks += '<li><a href="faq.html" class="bnav">FAQ</a></li>';
	footerLinks += '<li><a href="privacy_policy.html" class="bnav">Privacy Policy</a></li>';
	footerLinks += '</ul>';
	footerLinks += '</div>';


