Business acquisitions and equity investment transactions (Schedule of Purchase Price Allocation - Anjuke, Inc.) (Details)
¥ in Thousands, $ in Thousands
12 Months Ended
Mar. 02, 2015
CNY (¥)
Mar. 02, 2015
USD ($)
Dec. 31, 2017
CNY (¥)
Dec. 31, 2017
USD ($)
Dec. 31, 2016
CNY (¥)
Dec. 31, 2015
CNY (¥)
Amortizable intangible assets:            
Goodwill     ¥ 15,864,655 $ 2,427,941 ¥ 15,903,677 ¥ 15,982,000
Total purchase price comprised of            
-Cash consideration     2,500,000      
Anjuke Inc. ("Anjuke") [Member]            
Business Acquisition [Line Items]            
Net assets acquired     39,651      
Amortizable intangible assets:            
Goodwill     1,341,760      
Deferred tax liabilities     (60,659)      
Total     1,563,388      
Total purchase price comprised of            
-Cash consideration ¥ 985,400 $ 160,200 985,427      
-Equity consideration     577,961      
Total     1,563,388      
Anjuke Inc. ("Anjuke") [Member] | Technology [Member]            
Amortizable intangible assets:            
Amortizable intangible assets     ¥ 59,681      
Total purchase price comprised of            
Intangible assets, useful live     5 years      
Anjuke Inc. ("Anjuke") [Member] | Customer relationship [Member]            
Amortizable intangible assets:            
Amortizable intangible assets     ¥ 14,676      
Total purchase price comprised of            
Intangible assets, useful live     2 years      
Anjuke Inc. ("Anjuke") [Member] | Domain names and trademarks [Member]            
Amortizable intangible assets:            
Amortizable intangible assets     ¥ 168,279      
Total purchase price comprised of            
Intangible assets, useful live     10 years