/*
 * Site Common Javascript
 *
 * June 1, 2010
 *
 */

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


$(document).ready(function() {

	
	$clxcommon.initExternal();
    $clxcommon.initWarning();
    $clxcommon.attachClickAnalytics('clorox-promo');
    $clxcommon.attachClickAnalytics('clorox-video');
    $clxcommon.attachClickAnalytics('clorox-download'); 
    	
//PRODUCT PAGE
$clxcommon.createLink('#productRegularChar', 				'/products/kingsford-original-charcoal/');
$clxcommon.createLink('#productRegularHickory', 			'/products/kingsford-charcoal-with-hickory/');
$clxcommon.createLink('#productRegularMesquite', 			'/products/kingsford-charcoal-with-mesquite/');
$clxcommon.createLink('#productMatchLight', 				'/products/kingsford-match-light-charcoal/');
$clxcommon.createLink('#productMatchLightMesquite', 		'/products/kingsford-match-light-with-mesquite/');
$clxcommon.createLink('#productChipsMesquite', 				'/products/kingsford-woodchips-with-mesquite/');
$clxcommon.createLink('#productChipsHickory', 				'/products/kingsford-woodchips-with-hickory/');
$clxcommon.createLink('#productBBQBag', 					'/products/kingsford-bbq-bag-single-use-charcoal-briquets/');
$clxcommon.createLink('#productLighterFluid', 				'/products/kingsford-charcoal-lighter-fluid/');
$clxcommon.createLink('#productCompetition', 				'/products/kingsford-competition-briquets/');

$clxcommon.createLink('#notSureProductPage', 				'/products/kingsford-product-comparison/');



//COMPARISON CHART
$clxcommon.createLink('#chartRegular', 				'/products/kingsford-original-charcoal/');
$clxcommon.createLink('#chartRegularHickory', 		'/products/kingsford-charcoal-with-hickory/');
$clxcommon.createLink('#chartRegularMesquite', 		'/products/kingsford-charcoal-with-mesquite/');
$clxcommon.createLink('#chartMatch', 				'/products/kingsford-match-light-charcoal/');
$clxcommon.createLink('#chartMatchMesquite', 		'/products/kingsford-match-light-charcoal-with-mesquite/');
$clxcommon.createLink('#chartChipsMesquite', 		'/products/kingsford-woodchips-with-mesquite/');
$clxcommon.createLink('#chartChipsHickory', 		'/products/kingsford-woodchips-with-hickory/');
$clxcommon.createLink('#chartBBQBag', 				'/products/kingsford-bbq-bag-single-use-charcoal-briquets/');
$clxcommon.createLink('#chartLighterFluid', 		'/products/kingsford-charcoal-lighter-fluid/');
$clxcommon.createLink('#chartCompetition', 			'/products/kingsford-competition-briquets/');

//SIDE PROMOS
$clxcommon.createLink('#sidepromoGrilling101', 			'/grilling/');
$clxcommon.createLink('#sidepromoCompetition', 			'/grilling/videos/'); 
$clxcommon.createLink('#sidepromoTailgating', 			'/recipes/tailgating/'); 
$clxcommon.createLink('#sidepromoTailgate-tips', 		'/grilling/tailgating-tips/');
$clxcommon.createLink('#sidepromoKing', 				'/products/');
$clxcommon.createLink('#sidepromoRecipes', 				'/recipes/');


//RECIPES
$clxcommon.createLink('#beefRecipes', 				'/recipes/beef/');
$clxcommon.createLink('#poultryRecipes', 			'/recipes/poultry/');
$clxcommon.createLink('#porkRecipes', 				'/recipes/pork/');
$clxcommon.createLink('#seafoodRecipes', 			'/recipes/seafood/');
$clxcommon.createLink('#veggieRecipes', 			'/recipes/veggies/');
$clxcommon.createLink('#sidesRecipes', 				'/recipes/sides/');

//GRILLING PAGE
$clxcommon.createLink('#grillingSafe', 				'/grilling/tips-for-safe-grilling/');
$clxcommon.createLink('#grillingReady', 			'/grilling/getting-ready-to-grill/');
$clxcommon.createLink('#grillingBasics', 			'/grilling/grilling-basics/');

//Slider Links
$clxcommon.createLink('#espnSlide', 				'http://games.espn.go.com/collegeshowdown/en/');
$clxcommon.createLink('#bbqSlide', 					'http://tlc.discovery.com/tv/bbq-pitmasters/');



// accordion effect for homepage widget

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

//SCROLLING COMMENTS IN FOOTER

$(function(){ $("ul#ticker").liScroll({travelocity: .04}); 
}); 



});
