// JavaScript Document
	var categories = new Array();
	var category = 'cat_1';
	$(document).ready(function(){
		$(".browsing").css("display", "none");
		$(".right_content_top_slide").fadeIn(1500);
		$(".buttom_slide_img").slideDown(1500, function(){$(".browsing").css("display", "block");});
	});
	
	$("div#next").click(function(){
		alert('hi');
		var slideName = Next();
		if(slideName != null){
			$(slideName).css("display", "block");
			$(".browsing").css("display", "none");
			$(".right_content_top_slide").fadeIn(1500);
			$(".buttom_slide_img").slideDown(1500, function(){$(".browsing").css("display", "block");});	
		}
	});
	
	function changeVisibilty(objectID){
		var object = document.getElementById(objectID);
		if(object != null){
			if(object.style.display == 'none'){
				object.style.display = 'block';
			}
			else if(object.style.display == 'block'){
				object.style.display = 'none';
			}
		}
	}
	
	function Next(){
		if((current_index + 1) <= categories_count){
			HideAllCategories();
			var catSlide = document.getElementById('cat_' + (current_index + 1));
			var catSlideName = '#cat_' + (current_index + 1);
			if(catSlide != null){
				catSlide.style.display = 'block';
			}
			var catProdutSlide = document.getElementById('catp_' + (current_index + 1));
			if(catProdutSlide != null){
				catProdutSlide.style.display = 'block';
			}
			current_index= current_index + 1;
			return catSlideName;
		}
		return null;
	}
	function Previous(){
		if((current_index - 1) >= 1){
			HideAllCategories();
			var catSlide = document.getElementById('cat_' + (current_index - 1));
			if(catSlide != null){
				catSlide.style.display = 'block';
			}
			var catProdutSlide = document.getElementById('catp_' + (current_index - 1));
			if(catProdutSlide != null){
				catProdutSlide.style.display = 'block';
			}
			current_index= current_index - 1;
		}
		
	}
	
	function HideAllCategories(){
		for(i = 1; i <= categories_count; i++){
			var catSlide = document.getElementById('cat_' + i);
			if(catSlide != null){
				catSlide.style.display = 'none';
			}
			catSlide = document.getElementById('catp_' + i);
			if(catSlide != null){
				catSlide.style.display = 'none';
			}
		}
	}
