jQuery(document).ready(function(){
        
    $(".item_list img,.item_block img").lazyload({
             placeholder : "images/grey.gif",
             effect      : "fadeIn",
             threshold   : "200"             
          }); 
    
    $('.current_search li ul li').click(function(){ 
        $('.current_item').html($(this).text());       
        $('#fromgroup').val($('input',this).val());                     
    });
    
          
    $('li:last-child').addClass('last');              
    $("#catloglist li:last-child,#subcontainernevigation li:last-child").addClass("last");     
     
     $('.provider .next').click(function(){        
       $(".provider ul").append('<li>'+$('.provider ul li:first').html()+'</li>');                 
       $('.provider ul li:first').remove();       
   });   
   
     $('.provider .prev').click(function(){                 
          $(".provider ul").prepend('<li>'+$('.provider ul li:last').html()+'</li>');          
          $('.provider ul li:last').remove();                                               
     });         
          
     $(".compare").hover(function(){
        $(".compare_item",this).fadeTo("fast", 1.0);
     },function(){
        $(".compare_item",this).fadeTo("fast", 0);
     }); 
     
      $('#subcontainer .checkout').click(function(){
        getContect('','widget/placeOrder.php','#getData',true,'#loader');
        $('#quick_checkout').show('fast');               
        centerThis('.popupWindow');            
     });             
 }); 
function hidetab1(){
    $('#quick_checkout').hide('fast');
 } 
function centerThis(div) {   
     $(div).css("margin-top","-"+$(div).height() / 2+"px");
     $(div).css("margin-left","-"+$(div).width() / 2+"px");      
 }        
function addcredit(id){
    getContect('','reseller.php?action=addcredit&usersId='+id+'&standalone=true','#getData',true,'#loader');
    $('#quick_checkout').show('fast');
    centerThis('.popupWindow');  
}  
function setpricing(id){
    getContect('','reseller.php?action=setpricing&usersId='+id+'&standalone=true','#getData',true,'#loader');
    $('#quick_checkout').show('fast');
    centerThis('.popupWindow');
}  
function editmailSettings(id){
   getContect('',''+id+'&standalone=true','#getData',true,'#loader');
    $('#quick_checkout').show('fast');
    centerThis('.popupWindow');  
}  
function serviceStatus(){
   getContect('','settings.php?action=myservice&standalone=true','#getData',true,'#loader');
    $('#quick_checkout').show('fast');
    centerThis('.popupWindow');  
}  
function lastLogin(){
   getContect('','lastlogin.php','#getData',true,'#loader');
    $('#quick_checkout').show('fast');
    centerThis('.popupWindow');  
} 
function suggestedPrice(id){    
    getContect('','suggestedprice.php?_serviceid='+id,'#getData',true,'#loader');            
    $('#quick_checkout').show('fast');        
    centerThis('.popupWindow');  
} 
function shippingCost(id){    
    getContect('','shippingcost.php?_serviceid='+id,'#getData',true,'#loader');            
    $('#quick_checkout').show('fast');        
    centerThis('.popupWindow');  
} 
function viewcartMini(){    
    getContect('','cart.php?action=viewmini&standalone=true&shop=true','#getData',true,'#loader');            
    $('#quick_checkout').show('fast');        
    centerThis('.popupWindow');  
}
function SelectChildren(element){    
    if($("#"+element).is(':checked')){
        $("."+element).attr('checked',true);
    }else{
        $("."+element).attr('checked',false);
    }
}       
