$(document).ready(function(){    
        $("#segement_list").change(function(){    
        var segement=$("#segement_list").val();//get the selected segement value\
      
                
        //fetching the product according selected fregement
            $.post("product.php",{segement_id : segement},function(data){
                //alert(data);
                var data_arr=data.split('||');            
                            $("#product_list").html(data_arr[0]);    
                            $("#Segment").html(data_arr[1]);
            } );
        });    

      $("#product_list").change(function (){
          var product_id=$("#product_list").val();       
        $.post("product-detail.php",{id : product_id},function(data){       
              $("#Segment").html(data);   
              
             pager();
        });  
    });


	 $("#inquiry_segement_list").change(function(){    
        var segement=$("#inquiry_segement_list").val();//get the selected segement value\      
                
        //fetching the product according selected fregement
            $.post("inquiry_product.php",{segement_id : segement},function(data){
                //alert(data);
                       
                            $("#product_list").html(data);    
                           
            } );
        });    

    
   
});

function big_image(val){
     
    var product_id=val;       
        $.post("product-detail.php",{id : product_id},function(data){       
              $("#Segment").html(data);   
              pager();
              
        }             
              );   
             
}

function pager(){
    
    //pager more and back start
              $('#pager').pager('div');  
              $("#pager_next").click(function(){
                  $("#pager_next").hide();
                  $("#pager_prev").show();
                  }
              )   ;           
               $("#pager_prev").click(function(){
                  $("#pager_next").show();
                  $("#pager_prev").hide();
                  }
              )   ;           
              //pager more and back end
    
}
