  jQuery(function(){
        jQuery(".megamenu").megamenu();
        jQuery('.first-and-second-carousel').jcarousel();
        var tangolen = jQuery('.jcarousel-skin-tango').length;
		for (var i=0;i<tangolen;i++)
		{
	       var carWidth = jQuery(".jcarousel-skin-tango").eq(i).find(".jcarousel-item").width() + 10;
	       var carCount = jQuery(".jcarousel-skin-tango").eq(i).find(".jcarousel-item").size();
		   var carousWidth = carWidth * carCount;
	       jQuery(".jcarousel-skin-tango").eq(i).find("ul.first-and-second-carousel").css('width',carousWidth+'px');
		}
  });
  function getProduct(proId,proImgW,proImgH,catId){
	jQuery('.prodNavi'+catId).hide();
	jQuery('.hidelinks'+catId).show();
	jQuery('#loading'+catId).show();
	jQuery.ajax({
		url: megaMenuUrl,
		type: 'GET',
		data: 'id=' + proId + '&proImgW=' + proImgW + '&proImgH=' + proImgH,
		dataType: 'json',
		success: function(response) {
	           jQuery('.prodNavi'+catId+' a.prodLink').html(response.ProdImg);
	           jQuery('.prodNavi'+catId+' .prodName').html(response.ProdName);
	           jQuery('.prodNavi'+catId+' .prodPrice').html(response.ProdPrice);
	           jQuery('.prodNavi'+catId+' .prodSDesc').html(response.ProdSdesc);
	           jQuery('.prodNavi'+catId+' .prodLink').attr('href',response.ProdUrl);
	           jQuery('.prodNavi'+catId+' .prod_details').attr('href',response.ProdUrl);
	           jQuery('.prodNavi'+catId+' .rating-box .rating').css('width',response.RatingSummary);
	           jQuery('.prodNavi'+catId+' .ratings .amount a').html(response.ReviewsCount + " Review(s)");
	           jQuery('.prodNavi'+catId+' .ratings .amount a').attr('href',response.ReviewUrl);
	           jQuery('.prodNavi'+catId+' button.button').click(function() {
	           	window.location= response.ProdCartUrl;
	           });
	           jQuery('.prodNavi'+catId).show();
			   jQuery('#loading'+catId).hide();
			   jQuery('.hidelinks'+catId).hide();
		    }
	 });
  }
