// JavaScript Document

function CreateRightTab(){
	var oTabLeft=$('#tdLeftTab')
	var oTabRight=$('#tdRightTab')
	
	var oTabLeftContainer=$('#Right_tab_left_item_container')
	var oTabRightContainer=$('#Right_tab_right_item_container')
	
	if(oTabLeft.length && oTabRight.length && oTabLeftContainer.length && oTabRightContainer.length){
		
		oTabRightContainer.hide()
		
		oTabLeft.click(function(){
			if(oTabLeft.attr('class')=='Right_tab_left_item_normal'){
				oTabLeft.attr('class','Right_tab_left_item_selected')
				oTabRight.attr('class','Right_tab_right_item_normal')
				
				//Show tab contant
				oTabRightContainer.hide()
				oTabLeftContainer.show()
				
			}
		})
		
		oTabRight.click(function(){
			if(oTabRight.attr('class')=='Right_tab_right_item_normal'){
				oTabRight.attr('class','Right_tab_right_item_selected')
				oTabLeft.attr('class','Right_tab_left_item_normal')
				
				//Show tab contant
				oTabLeftContainer.hide()
				oTabRightContainer.show()
			}
		})
		
	}
	
}

$(document).ready(function(){
	CreateRightTab();
	
	//Home page tab	
	$(function() {
        $(".Carousel").jCarouselLite({
            btnNext: ".next",
            btnPrev: ".prev",
		    visible:6,
		    scroll:6,
		    speed:900
        });
    });
    $(function() {
        $(".PhotoCarousel").jCarouselLite({
            btnNext: ".nextAlbum",
            btnPrev: ".prevAlbum",
		    visible:6,
		    scroll:6,
		    speed:900
        });
    });
    $('#divPhotosTab').hide()
})


function clientActiveTabChanged(sender, args) {
    if(sender.get_activeTabIndex()==0){ //Video tab
        $('#divPhotosTab').hide()
        $('#divVideosTab').show()        
    }
    else{   //Photo gallery tab
        $('#divVideosTab').hide()
        $('#divPhotosTab').show()
    }
}