/*
 * STP Common Javascript
 *
 * JUNE 23, 2010
 *
 */

// init the local namespace. All functions should be part of this namespace
var $stp = window.$stp || {};  



$(document).ready(function() {
    $clxcommon.initExternal();
    $clxcommon.initWarning();
    $clxcommon.attachClickAnalytics('clorox-promo');
    $clxcommon.attachClickAnalytics('clorox-video');
    $clxcommon.attachClickAnalytics('clorox-download');
    	
 	//PROMO ID LINKS
 	
 	//HOME
    $clxcommon.createLink('#homePromoThatGuy', 		'http://thatguy.stp.com/');
    $clxcommon.createLink('#homePromoProducts', 	'/products/');
    $clxcommon.createLink('#homePromoCouponPrint', 	'/coupon/stp_coupon_preprint');
	$clxcommon.createLink('#homePromoCouponSignUp', '/user/register/');
   	$clxcommon.createLink('#homePromoGear', 		'https://storefront.promodepot.com/stp/default.aspx?p=viewcat&showpage=1'); 	
   	$clxcommon.createLink('#homePromoGarageVideos', 'http://video.yahoo.com/network/102296478'); 	
   	$clxcommon.createLink('#homePromoWorldofOutlaws',	'/stp-and-racing/stp-world-of-outlaws/');
	$clxcommon.createLink('#homeDifferenceVideo', 	'/maintenance/see-the-difference/'); 	
	$clxcommon.createLink('#homePromoFacebookQuiz',	'http://www.facebook.com/STP?v=app_10442206389');
	$clxcommon.createLink('#homePromoSave',	'http://www.facebook.com/STP#!/STP?sk=app_120667198016545');
	$clxcommon.createLink('#homePromoRacing',		'http://www.facebook.com/stp');
	$clxcommon.createLink('#homePromoConcentrated',		'/products/fuel-additives/concentrated-benefits/');
//	$clxcommon.createLink('#homePromoBoost',		'/products/');
	$clxcommon.createLink('#homePromoFSC',	'/products/fuel-additives/fuel-system-cleaner-for-ethanol/');
	



 	//PRODUCTS
    $clxcommon.createLink('#productGT', 			'/products/fuel-additives/gas-treatment/');
    $clxcommon.createLink('#productSCGT', 			'/products/fuel-additives/super-concentrated-gas-treatment/');
	$clxcommon.createLink('#productFICT', 			'/products/fuel-additives/fuel-injector-and-carburetor-treatment/');
   	$clxcommon.createLink('#productSCFIC',			'/products/fuel-additives/super-concentrated-fuel-injector-cleaner/');
    $clxcommon.createLink('#productCFSC', 			'/products/fuel-additives/complete-fuel-system-cleaner/');
	$clxcommon.createLink('#productEthanol', 		'/products/fuel-additives/fuel-system-cleaner-for-ethanol/');
	$clxcommon.createLink('#productOB', 			'/products/fuel-additives/octane-booster/');
    $clxcommon.createLink('#productASWR', 			'/products/fuel-additives/all-season-water-remover/');
    $clxcommon.createLink('#productDFIT', 			'/products/fuel-additives/diesel-fuel-injector-treatment/');
    $clxcommon.createLink('#productWMF', 			'/products/fuel-additives/winter-maintenance-formula/');
    $clxcommon.createLink('#productBF', 			'/products/functional-fluids/brake-fluid/');
    $clxcommon.createLink('#productPSFSL', 			'/products/functional-fluids/power-steering-fluid-and-stop-leak/');
	$clxcommon.createLink('#productPSF', 			'/products/functional-fluids/power-steering-fluid/');
	$clxcommon.createLink('#productOT', 			'/products/oil-additives/oil-treatment/');
	$clxcommon.createLink('#productESL', 			'/products/oil-additives/engine-stop-leak/');
	$clxcommon.createLink('#productST', 			'/products/oil-additives/smoke-treatment/');
	$clxcommon.createLink('#productGunTireCare',	'/products/appearance-products/son-of-a-gun-one-step-tire-care/');
	$clxcommon.createLink('#productGunProtectant', 	'/products/appearance-products/son-of-a-gun-protectant/');
	$clxcommon.createLink('#productOomph', 			'/products/appearance-products/oomph-multipurpose-cleaner');
	$clxcommon.createLink('#productCapstone', 		'http://www.stptools.com/');
	$clxcommon.createLink('#productMarathon', 		'http://www.marathonpetroleum.com/Stations_and_Stores/Gasoline_with_STP_Additives/');
	$clxcommon.createLink('#groupOil', 				'/products/oil-additives/');
	$clxcommon.createLink('#groupFunctional', 		'/products/functional-fluids/');
	$clxcommon.createLink('#groupAppearance', 		'/products/appearance-products/');
	$clxcommon.createLink('#groupLicensed',			'/products/licensed-products/');




	//RIGHT COL PROMOS
	$clxcommon.createLink('#promoSidePettyPictures', 	'/stp-and-racing/richard-petty/photo-gallery/');
	$clxcommon.createLink('#promoSidePettyInterviews', 	'/stp-and-racing/richard-petty/radio-interview/');
	$clxcommon.createLink('#promoSidePettyArticles', 	'/stp-and-racing/richard-petty/');
	$clxcommon.createLink('#promoGear', 				'https://storefront.promodepot.com/stp/default.aspx?p=viewcat&showpage=1');
	$clxcommon.createLink('#promoThatGuy', 				'http://thatguy.stp.com/');
	$clxcommon.createLink('#promoCoupon', 				'/user/register/');
	$clxcommon.createLink('#promoFuelAdditives', 		'/products/fuel-additives/');
	$clxcommon.createLink('#promoOilAdditives', 		'/products/oil-additives/');
	$clxcommon.createLink('#promoFunctionalFluids', 	'/products/functional-fluids/');
	$clxcommon.createLink('#promoAppearanceProducts',	'/products/appearance-products/');
	$clxcommon.createLink('#promoSeeDifference',		'/maintenance/see-the-difference/');
	$clxcommon.createLink('#promoSidePetty200Wins',		'http://www.200wins.com/');
	$clxcommon.createLink('#promoSideOomph',			'http://stp-oomph.com/');
	$clxcommon.createLink('#promoSideTimeline',			'/stp-and-racing/stp-racing-history/');
	$clxcommon.createLink('#promoSideWorldOfOutlaws',	'/stp-and-racing/stp-world-of-outlaws/');
	$clxcommon.createLink('#promoSideSTPStory',			'/stp-and-racing/stp-history/');
	$clxcommon.createLink('#promoLeadingThePack',		'/stp-and-racing/');
	$clxcommon.createLink('#promoNowConcentrated',		'/products/fuel-additives/concentrated-benefits/');
	$clxcommon.createLink('#promoNowConcentrated2',		'/products/fuel-additives/concentrated-benefits/');
	$clxcommon.createLink('#promoSTPRacing',			'/stp-and-racing/');




	//RICHARD PETTY PAGES
	$clxcommon.createLink('#promoBottomESPN',			'http://sports.espn.go.com/rpm/nascar/cup/columns/story?columnist=mcgee_ryan&id=6343396');
	$clxcommon.createLink('#promoBottomGallery', 		'/stp-and-racing/richard-petty/photo-gallery/');
	$clxcommon.createLink('#promoBottomInterviews', 	'/stp-and-racing/richard-petty/radio-interview/');
	$clxcommon.createLink('#promoBottomNHRA',			'http://www.tonypedregon.com/news/pedregon-racing-and-iconic-stp-armor-all-brands-team-up-in-new-nhra-sponsorship/');
	$clxcommon.createLink('#promoBottomStory', 			'/stp-and-racing/stp-history/');
	$clxcommon.createLink('#promoBottomSTP300',			'http://www.chicagolandspeedway.com/Articles/2011/04/STP-TO-SERVE-AS-TITLE-SPONSOR-OF-CHICAGOLAND-SPEEDWAYS-JUNE-4th-NATIONWIDE-SERIES-RACE.aspx');
	$clxcommon.createLink('#promoBottomSTP400',			'http://www.kansasspeedway.com/Ticket-Center/Events/June-Event-Weekend/STP-400-at-Kansas-Speedway.aspx');
	$clxcommon.createLink('#promoBottomTimeline', 		'/stp-and-racing/stp-racing-history/');
	$clxcommon.createLink('#promoBottomTrackNews',		'http://www.donnyschatzmotorsports.com/index.php?option=com_content&task=view&id=368&Itemid=52');
	$clxcommon.createLink('#promoBottomInterview1',		'/stp-and-racing/richard-petty/the-peoples-choice/');
	$clxcommon.createLink('#promoBottomInterview2',		'/stp-and-racing/richard-petty/always-an-stp-man/');
	$clxcommon.createLink('#promoBottomInterview3',		'/stp-and-racing/richard-petty/NASCAR-hall-of-fame/');
	$clxcommon.createLink('#promoBottomInterview4',		'http://sports.espn.go.com/rpm/nascar/cup/columns/story?columnist=mcgee_ryan&id=5204216');
	$clxcommon.createLink('#promoMain1', 				'/stp-and-racing/stp-nhra-pedregon/');
	$clxcommon.createLink('#promoMain2', 				'/stp-and-racing/richard-petty/');
	$clxcommon.createLink('#promoMain3', 				'/stp-and-racing/stp-world-of-outlaws/');
	$clxcommon.createLink('#promoMain4', 				'/stp-and-racing/stp-bloodhound-ssc/');
	
	
	
	
	$clxcommon.createLink('#bannerSTPman', 				'/stp-and-racing/richard-petty/always-an-stp-man/');
	$clxcommon.createLink('#bannerSTPchanged', 			'http://sports.espn.go.com/rpm/nascar/cup/columns/story?columnist=mcgee_ryan&id=5204216');
	$clxcommon.createLink('#promoSideHailKing', 		'/stp-and-racing/richard-petty/');
	$clxcommon.createLink('#bannerSTPrevolutionized',	'/stp-and-racing/stp-history/');
	$clxcommon.createLink('#bannerNascarHallFame',		'/stp-and-racing/richard-petty/NASCAR-hall-of-fame/');

	$clxcommon.createLink('#articleChoice', 			'/stp-and-racing/richard-petty/the-peoples-choice/');
	$clxcommon.createLink('#articleSTPMan', 			'/stp-and-racing/richard-petty/always-an-stp-man/');
	$clxcommon.createLink('#articleESPN',	 			'http://sports.espn.go.com/rpm/nascar/cup/columns/story?columnist=mcgee_ryan&id=5204216');

	//BANNERS
	$clxcommon.createLink('#bannerFuelChart',	 		'/products/fuel-additives/fuel-additives-comparison/');
	$clxcommon.createLink('#bannerSmallerBottle',		'/products/fuel-additives/concentrated-benefits/');






// accordion effect for FAQ section
if ($('.faqBox').length > 0) {				
    $('.faqBox').accordion({
        header: "dt",
        collapsible: true,
        active: true,
        alwaysOpen: false,
        autoHeight: false
    });
}
	
	
});
