jQuery(document).ready(function() {
	try {
		var url = window.location;
		var anchor = url.hash;
		
		if(anchor == "#tab2"){
			//Tab - Blog
			var tabShow = "eq(1)";
		}
		else if(anchor == "#tab3"){
			//Tab - Twitter
			var tabShow = "eq(2)";
		}
		else if(anchor == "#tab4"){
			//Tab - News
			var tabShow = "eq(3)";
		}
		else{
			//Tab - Feedback
			var tabShow = "eq(0)";
		}
		
		jQuery(".tab_content").hide(); 
		jQuery("ul.tabs li:"+tabShow).addClass("active").show();
		jQuery(".tab_content:"+tabShow).show();
		
		tabShow = "";

		jQuery("ul.tabs li").live("click",function() {
			jQuery("ul.tabs li").removeClass("active");
			jQuery(this).addClass("active");
			jQuery(".tab_content").hide();
	
			var activeTab = jQuery(this).find("a").attr("href");
			jQuery(activeTab).fadeIn();
		});
	
		// Expand box for benefits (instructor page)
	
        jQuery("div.readmore_studentPage").expander({
                slicePoint: 500,
                expandText: "read more",
                userCollapseText: "hide text"
        });

        jQuery("div.readmore_instructorPage").expander({
                slicePoint: 220,
                expandText: "read more",
                userCollapseText: "hide text"
        });
		// Pop-up Box for course served
		//jQuery("#coursesserved").hide();
		
        jQuery("#messenger-left a").click(function(e){
          var actions = {
              prev : function() {
                testimonials.getPreviousTestimonial();
                clearTestemonialTime();
              },
              next : function() {
                testimonials.getNextTestimonial();
                clearTestemonialTime();
              }
          }
          actions[jQuery(e.target).attr("title")].call();
          showTestimonial();          
        });
	}
	catch(ex) {
        
    }
});
