jQuery.noConflict();

jQuery(document).ready(function(){
	jQuery(".navigation-pasta-products").hide();
	jQuery("#pasta_navigation li").click(function(){
		var navi_id = jQuery(this).attr('id');
		jQuery("#navigation_pasta_category").hide();
		jQuery(".navigation-pasta-products").hide();
		jQuery( "#nav-"+navi_id ).show();				   
	});
	jQuery("#pasta_navigation h6").click(function(){
		jQuery(".navigation-pasta-products").hide();
		jQuery("#navigation_pasta_category").show();
	});
	
	var current_product = 0;
	jQuery("#popup-box").hide();
	
	//jQuery("#inner-block ul li > a").each(function(index){
	//		jQuery(this).bind("click",function(event){
	//			load_product(index);
	//			jQuery("#popup-box").css('display', 'block');
	//			close_popup();
	//			event.preventDefault();
	//		});
	//	});
	//	
	jQuery('#scrollbar1').tinyscrollbar();
	//jQuery("#popup-box").hide();
	//	  jQuery("#inner-block ul li > a").each(function(index){
	//			jQuery(this).bind("click",function(event){
	//				load_product(index);
	//				jQuery("#popup-box").css('display', 'block');
	//				close_popup();
	//				event.preventDefault();
	//			});
	//	  });
	
	jQuery(".shadow-box a").each(function(index){
			jQuery(this).bind("mouseover",function(event){
				jQuery(".shadow-box label:eq("+index+")").fadeIn(1000);
				event.preventDefault();
			});
			jQuery(this).bind("mouseout",function(event){
				jQuery(".shadow-box label:eq("+index+")").fadeOut(1000);;
				event.preventDefault();
			});
			jQuery(this).bind("click",function(event){
				load_product(index);
				jQuery("#popup-box").fadeIn(1000);
				close_popup();
				event.preventDefault();
			});
	});
	jQuery(".shadow-box1 a").each(function(index){
			jQuery(this).bind("mouseover",function(event){
				jQuery("#popup-box").css('display', 'block');
				event.preventDefault();
			});							  
			jQuery(this).bind("click",function(event){
				load_product(index);
				jQuery("#popup-box").css('display', 'block');
				close_popup();
				event.preventDefault();
			});
	});
	
				
	
	jQuery(".featured-slider").css("width","1000px");
	jQuery(".anyClass").jCarouselLite({
	btnNext: ".next",
	btnPrev: ".prev",
	});
	
	jQuery(".featured_content").hide();
	jQuery(".featured_content:eq(2)").show();
	
	jQuery(".featured_thumb a").mouseover(function(){
	 var id_value = jQuery(this).attr('id');
		
	 jQuery(".featured_content").hide();
	 jQuery("#post-"+id_value).show();
	});
	//jQuery("ul.big-image li").hide();
	jQuery("ul.big-image li:eq(0)").show();
	jQuery(".thumbs a").each(function(index){
		jQuery(this).click(function(event){
			jQuery("ul.big-image li").fadeOut();
			jQuery("ul.big-image li:eq("+index+")").fadeIn();
		});
	});
	//jQuery(".inner-block, .textwidget").height((jQuery("#product-desc, #content").height() -50));
	//alert(jQuery(".fullheight").height());
	
});
function load_product(element_index){
	jQuery(".shadow-box a").each(function(index){
		current_product = element_index;
		if(index == element_index){
			jQuery("#popup-label").html(jQuery(".shadow-box label:eq("+current_product+")").html());
			jQuery("#full-image").html(jQuery(".shadow-box a:eq("+current_product+")").html());
			jQuery("#description").html(jQuery(".short-disc:eq("+current_product+")").html());
		}
	});
			
}
function close_popup(){
	jQuery(".close").bind("click",function(event){
			jQuery("#popup-box").fadeOut(1000);
	});
}
