       function formatText(index, panel) {
		  return index + "";
	    }

	$(document).ready(function() {

		$("a.youtube").nyroModal();
	    $.nyroModalSettings({
		    processHandler: function(settings) {
		      var from = settings.from;
		      if (from && from.href && from.href.indexOf('http://www.youtube.com/watch?v=') == 0) {
		        $.nyroModalSettings({
		          type: 'swf',
		          height: 355,
		          width: 425,
		          url: from.href.replace(new RegExp("watch\\?v=", "i"), 'v/')
		        });
		      }
		    }
		  });

		$( ".scroll-gallery" ).accessNews({
	        headline : "Candy Coated",
	        speed : "slow",
			slideBy : 4
	    });

		$( "#example_2" ).accessNews({
	        headline : "Business as Usual",
	        speed : "slow",
			slideBy : 3
	    });

			$("a.zoom").fancybox();
			
			function add_watermark() {
				if (document.getElementById('fancy_content') && !document.getElementById('fancybox_watermark')) {
					$("#fancy_content").append('<div id="fancybox_watermark"></div>');
				}
			};
			setInterval(add_watermark, 1000);

			$("a.zoom1").fancybox({
				'overlayOpacity'	:	0.7,
				'overlayColor'		:	'#FFF'
			});

			$("a.zoom2").fancybox({
				'zoomSpeedIn'		:	500,
				'zoomSpeedOut'		:	500
			});

			$('.anythingSlider').anythingSlider({
				easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
				autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
				delay: 8000,                    // How long between slide transitions in AutoPlay mode
				startStopped: false,            // If autoPlay is on, this can force it to start stopped
				animationTime: 1000,             // How long the slide transition takes
				hashTags: false,                 // Should links change the hashtag in the URL?
				buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
				pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
				startText: "Play",             // Start text
				stopText: "Pause",               // Stop text
				navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
			});

			$("#slide-jump").click(function(){
				 $('.anythingSlider').anythingSlider(5);
			});
			function initialize() {
				if(document.getElementById("google_map") != null) {
					if (GBrowserIsCompatible()) {
						var map = new GMap2(document.getElementById("google_map"));
						map.setCenter(new GLatLng(-33.762523, 151.273741), 16);
						var marker = new GMarker(new GLatLng(-33.762523, 151.273741));
						map.addOverlay(marker);
						map.addControl(new GSmallMapControl());
					}
				}
		    };
		    initialize();
		    $("body > div.product-details ul.explore-list li a").click(function(){
		    	//$.scrollTo( {top:'450px', left:'0'}, 2000);
		    });
	});
