/* ------------------------------------------------------------------------
	Class:pagination 
	Use: 
	Author: 
	Version: 
------------------------------------------------------------------------- */
jQuery(document).ready(function(){
    //Display Loading Image
    function Display_Load()
    {
        jQuery("#loading").fadeIn(900,0);
        jQuery("#loading").html("<img src='http://www.otometokei.jp/wp/wp-content/themes/new-york/images/heartLoader.gif' />");
    }
    //Hide Loading Image
    function Hide_Load()
    {
        jQuery("#loading").fadeOut('slow');

    };
function fadeOut() 
{  
    //jQuery('table.fade tr').children().hover(
    jQuery('table.fade tr').hover(
        function() {  
            jQuery(this).siblings().stop().fadeTo(500,0.3);  
            }, function() {  
                jQuery(this).siblings().stop().fadeTo(500,1);  
            }
    );
}; 

    //Default Starting Page Results
    jQuery("#pagination li:first").css({'color' : '#FF0084'}).css({'border' : 'none'});
    
    
    Display_Load();

    jQuery("#pagination_content").load("http://www.otometokei.jp/wp/wp-content/themes/new-york/page_top_data.php?page=1", Hide_Load());

    //AJAX COMPLETE 読み込み完了後、thickboxを初期化
    jQuery("#pagination_content").ajaxComplete(
                    function(){
                        tb_init('a.thickbox');
                        fadeOut();
                    }
    );

    //Pagination Click
    jQuery("#pagination li").click(function(){
        Display_Load();
        //CSS Styles
        jQuery("#pagination li")
        .css({'border' : 'solid #dddddd 1px'})
        .css({'color' : '#0063DC'});
        
        jQuery(this)
        .css({'color' : '#FF0084'})
        .css({'border' : 'none'});

        //Loading Data
        var pageNum = this.id;
        
        jQuery("#pagination_content").load("http://www.otometokei.jp/wp/wp-content/themes/new-york/page_top_data.php?page=" + pageNum, Hide_Load());



    }); 
});

