HERSHEYS.Bliss = {};
HERSHEYS.Bliss.initializations = {
    /* HOMEPAGE */
    'bliss': function () {


    },

    /* PRODUCTS */
    'bliss/products': function () {

        
		HERSHEYS.TabbedBrowsing.init( {
            navSelector: '#home-tabbed-nav .nav a',
            contentSelector: '#home-tabbed-content .tabbedContent'
            //'nextSelector': '.tabbedNext',
            //'previousSelector': '.tabbedPrevious'
									});	
									 
									 
		$(HERSHEYS.TabbedBrowsing).bind('NewItemShowing', function(e, data){	
			var productName = $(data).attr('title');
            HERSHEYS.Analytics.doProductView(productName);
		});
			$(".nav").simplyScroll({
				className: 'horiz',
				horizontal: true,
				frameRate: 20,
				speed: 10
			});
    },

    /* our story*/
    'bliss/our-story': function () {

    },

    /*food pairings*/
    "bliss/experience/pairings/food-pairings": function () {
	   HERSHEYS.TabbedBrowsing.init( {
            navSelector: '#home-tabbed-nav .nav a',
            contentSelector: '#home-tabbed-content .tabbedContent'
            //'nextSelector': '.tabbedNext',
            //'previousSelector': '.tabbedPrevious'
									});

		$(HERSHEYS.TabbedBrowsing).bind('NewItemShowing', function(e, data){

			var name = $(data).attr('title');
            HERSHEYS.Analytics.doPageView('experience:pairings:food-pairings', name);

		});
			$(".nav").simplyScroll({
				className: 'horiz',
				horizontal: true,
				frameRate: 20,
				speed: 10
			});
    },
	
	/*drink pairings*/
    "bliss/experience/pairings/drink-pairings": function () {
	   HERSHEYS.TabbedBrowsing.init( {
            navSelector: '#home-tabbed-nav .nav a',
            contentSelector: '#home-tabbed-content .tabbedContent'
            //'nextSelector': '.tabbedNext',
            //'previousSelector': '.tabbedPrevious'
									});

		$(HERSHEYS.TabbedBrowsing).bind('NewItemShowing', function(e, data){

			var name = $(data).attr('title');
            HERSHEYS.Analytics.doPageView('experience:pairings:drink-pairings', name);

		});
			$(".nav").simplyScroll({
				className: 'horiz',
				horizontal: true,
				frameRate: 20,
				speed: 10
			});
    },
	
	/*recipes*/
    "bliss/experience/recipes/featured-recipes": function () {
	   HERSHEYS.TabbedBrowsing.init( {
            navSelector: '#home-tabbed-nav .nav a',
            contentSelector: '#home-tabbed-content .tabbedContent'
            //'nextSelector': '.tabbedNext',
            //'previousSelector': '.tabbedPrevious'
									});

		$(HERSHEYS.TabbedBrowsing).bind('NewItemShowing', function(e, data){

			var name = $(data).attr('title');
            HERSHEYS.Analytics.doPageView('experience:recipes:featured-recipes', name);

		});
			$(".nav").simplyScroll({
				className: 'horiz',
				horizontal: true,
				frameRate: 20,
				speed: 10
			});
    }

    /* ETC */
};

HERSHEYS.Utility.doPageInits(HERSHEYS.Bliss.initializations);

$(document).ready(function(){
	
	/* Wire up search result button to field and search result page. */
	HERSHEYS.Utility.stealSearchButton({
		'site' : 'bliss'
	});
	
	/* Enable leaving notice binding */
	HERSHEYS.Utility.leavingNotice({
		'transparency' : HERSHEYS.transparency,
		'title' : 'BLISS'
	});
	
	HERSHEYS.ShareThis.init();
	$("label").inFieldLabels();
//	$(document).pngFix({blankgif:'/assets/images/bliss/common/blank.gif',sizingMethod:'crop'} );
	
	/* video bg */
	var flashvars = {videoPath : '/assets/videos/bliss/bg.flv'};
	var attributes = {};
	var param = {wmode : 'transparent'};
	swfobject.embedSWF("/assets/swf/bliss/VideoBG.swf", 
						"bgFlash", "100%", "100%", "10.0.0", 
						"/assets/swf/expressInstall.swf",flashvars, param, attributes);
	
});
