	var J = jQuery.noConflict();
	J(document).ready(function(){
		J("ul.sf-menu").supersubs({
            minWidth:    12, maxWidth:    27,extraWidth:  1 
		}).superfish({animation: {height:'show'},delay: 400,speed: 500});
		J('.buttonCustomize').click(
			function () {
				J(this).next().animate({width: 'toggle'});
		});
		J('#comment_header').click(
			function () {
				J('#comment_content').animate({
  height: 'toggle'}, "slow");;
		});
		J('ul#testimonial').innerfade({
			speed: 1500,
			timeout: 5000,
			type: 'random',
			containerheight: '65px'
		});
		J('#alt-menu-button').click(
			function () {
				J('#alt-menu-container').animate({height: 'toggle'}, "slow");
		});
		J("#contentleft").accordion({ header: "h2" });
		J('.search-div input#search').focus(
			function () {
				var oVal;
				oVal = J('.search-div input#search').val();
				if (oVal=="Search") J('.search-div input#search').attr('value','');
		});
		J('.search-div input#search').blur(
			function () {
				var oLength;
				oLength = J('.search-div input#search').val().length;
				if (oLength==0) J('.search-div input#search').attr('value','Search');
		});
		J('.username-div input#user').focus(
			function () {
				var oVal;
				oVal = J('.username-div input#user').val();
				if (oVal=="Username") J('.username-div input#user').attr('value','');
		})		
		J('.username-div input#user').blur(
			function () {
				var oLength;
				oLength = J('.username-div input#user').val().length;
				if (oLength==0) J('.username-div input#user').attr('value','Username');
		});
		J('.password-div input#pass').focus(
			function () {
				var oVal;
				oVal = J('.password-div input#pass').val();
				if (oVal=="12345") J('.password-div input#pass').attr('value','');
		})		
		J('.password-div input#pass').blur(
			function () {
				var oLength;
				oLength = J('.password-div input#pass').val().length;
				if (oLength==0) J('.password-div input#pass').attr('value','12345');
		});			
		
		initPagination();

   });
   
   		function pageselectCallback(page_index, jq){
				var newcontent = '';
				var num_entries = J('#comment_container #comment_list li').length;
				var items_per_page = 5;
				var max_elem = Math.min((page_index+1) * items_per_page, num_entries);
				for(var i=page_index*items_per_page;i<max_elem;i++)
                {
                	newcontent += (J('#comment_container #comment_list li:eq('+i+')').clone().html());
               	}
 
                J('#comment_container #comment_result').html(newcontent);
                return false;
       }
       
       function initPagination() {
                var num_entries = J('#comment_container #comment_list li').length;
                // Create pagination element
                J("#comment_container #Pagination").pagination(num_entries, {
                    num_edge_entries: 2,
                    num_display_entries: 5,
                    callback: pageselectCallback,
                    items_per_page:5
                });
             }