/*苹果助手 越狱刷机
*Copyright 2012, www.pghelper.com
*/

var optionData = [
             
               { "type": "iPhone 4S", "dataList": [
						  { "name": "iPhone 4S (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/041-1317.20111012.UVTgr/iPhone4,1_5.0_9A334_Restore.ipsw" },
						  { "name": "iPhone 4S (5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3305.20111109.Bghy6/iPhone4,1_5.0.1_9A405_Restore.ipsw" },
						  { "name": "iPhone 4S CDMA(5.0.1/9A406)", "value": "http://appldnld.apple.com/iPhone4/041-3417.20111215.Slnt4/iPhone4,1_5.0.1_9A406_Restore.ipsw" },
						  { "name": "iPhone 4S (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1530.20120307.LDDac/iPhone4,1_5.1_9B179_Restore.ipsw" },
						  { "name": "iPhone 4S (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4346.20120427.1RuDG/iPhone4,1_5.1.1_9B206_Restore.ipsw" }

						]
               },
                { "type": "iPhone 4", "dataList": [
							{ "name": "iPhone 4 (4.0.1/8A306)", "value": "http://appldnld.apple.com/iPhone4/061-8619.20100715.4Pnsx/iPhone3,1_4.0.1_8A306_Restore.ipsw" },
							{ "name": "iPhone 4 (4.0/8A293)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone4/061-7380.20100621,Vfgb5/iPhone3,1_4.0_8A293_Restore.ipsw" },
							{ "name": "iPhone 4 (4.1/8B117)", "value": "http://appldnld.apple.com/iPhone4/061-7939.20100908.Lcyg3/iPhone3,1_4.1_8B117_Restore.ipsw" },
							{ "name": "iPhone 4 (4.2.1/8C148)", "value": "http://appldnld.apple.com/iPhone4/061-9858.20101122.Er456/iPhone3,1_4.2.1_8C148_Restore.ipsw" },
							{ "name": "iPhone 4 (4.3.1/8G4)", "value": "http://appldnld.apple.com/iPhone4/041-0551.20110325.Aw2Dr/iPhone3,1_4.3.1_8G4_Restore.ipsw" },
							{ "name": "iPhone 4 (4.3.2/8H7)", "value": "http://appldnld.apple.com/iPhone4/041-0662.20110414.byQ84/iPhone3,1_4.3.2_8H7_Restore.ipsw" },
							{ "name": "iPhone 4 (4.3/8F190)", "value": "http://appldnld.apple.com/iPhone4/041-0330.20110311.Cswe3/iPhone3,1_4.3_8F190_Restore.ipsw" },
							{ "name": "iPhone 4 (4.3.3/8J2)", "value": "http://appldnld.apple.com/iPhone4/041-1011.20110503.q7fGc/iPhone3,1_4.3.3_8J2_Restore.ipsw" },
							{ "name": "iPhone 4 (4.3.4/8K2)", "value": "http://appldnld.apple.com/iPhone4/041-1923.20110715.BnATg/iPhone3,1_4.3.4_8K2_Restore.ipsw" },
							{ "name": "iPhone 4 (4.3.5/8L1)", "value": "http://appldnld.apple.com/iPhone4/041-1966.20110721.V3Ufe/iPhone3,1_4.3.5_8L1_Restore.ipsw" },
							{ "name": "iPhone 4 (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/041-8358.20111012.FFc34/iPhone3,1_5.0_9A334_Restore.ipsw" },
							{ "name": "iPhone 4 (5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3309.20111109.64rtg/iPhone3,1_5.0.1_9A405_Restore.ipsw" },
                            { "name": "iPhone 4 CDMA(4.2.6/8E200)", "value": "http://appldnld.apple.com/iPhone4/041-0177.20110131.Pyvrz/iPhone3,3_4.2.6_8E200_Restore.ipsw" },
							{ "name": "iPhone 4 CDMA (4.2.7/8E303)", "value": "http://appldnld.apple.com/iPhone4/041-0614.20110414.B47xa/iPhone3,3_4.2.7_8E303_Restore.ipsw" },
							{ "name": "iPhone 4 CDMA (4.2.8/8E401)", "value": "http://appldnld.apple.com/iPhone4/041-1022.20110503.5g8k7/iPhone3,3_4.2.8_8E401_Restore.ipsw" },
							{ "name": "iPhone 4 CDMA (4.2.9/8E50)", "value": "http://appldnld.apple.com/iPhone4/041-1916.20110715.V5rUA/iPhone3,3_4.2.9_8E501_Restore.ipsw" },
							{ "name": "iPhone 4 CDMA (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/041-9743.20111012.vjhfp/iPhone3,3_5.0_9A334_Restore.ipsw" },
						    { "name": "iPhone 4 CDMA (5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3304.20111109.Vgtyh/iPhone3,3_5.0.1_9A405_Restore.ipsw" },
         	                { "name": "iPhone 4 CDMA (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1529.20120307.looTW/iPhone3,3_5.1_9B176_Restore.ipsw" },
						    { "name": "iPhone 4 GSM (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1537.20120307.EJrm4/iPhone3,1_5.1_9B176_Restore.ipsw" },
							
							{ "name": "iPhone 4 CDMA (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4291.20120427.Zs8F0/iPhone3,3_5.1.1_9B206_Restore.ipsw" },
						    { "name": "iPhone 4 GSM (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4293.20120427.3DRyb/iPhone3,1_5.1.1_9B206_Restore.ipsw" }


                            ]
              },
						{ "type": "iPad 3", "dataList": [
							{ "name": "iPad 3 Wi-Fi (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1954.20120307.FFase/iPad3,1_5.1_9B176_Restore.ipsw" },
							{ "name": "iPad 3 Wi-Fi (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4327.20120427.xW6U6/iPad3,1_5.1.1_9B206_Restore.ipsw" },
							{ "name": "iPad 3 4G(AT&T) (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1955.20120307.CQvrt/iPad3,2_5.1_9B176_Restore.ipsw" },
							{ "name": "iPad 3 4G(Verizon) (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1956.20120307.jzugh/iPad3,3_5.1_9B176_Restore.ipsw" },
							{ "name": "iPad 3 Global (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4329.20120427.LTkro/iPad3,3_5.1.1_9B206_Restore.ipsw" },
							{ "name": "iPad 3 CDMA (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4328.20120427.1sCra/iPad3,2_5.1.1_9B206_Restore.ipsw" }
                            ]
						},
						  { "type": "iPad 2", "dataList": [
							{ "name": "iPad 2 CDMA (4.3.1/8G4)", "value": "http://appldnld.apple.com/iPhone4/041-0544.20110325.Dew3r/iPad2,3_4.3.1_8G4_Restore.ipsw" },
							{ "name": "iPad 2 CDMA (4.3.2/8H8)", "value": "http://appldnld.apple.com/iPhone4/041-0665.20110414.MbwVr/iPad2,3_4.3.2_8H8_Restore.ipsw" },
							{ "name": "iPad 2 CDMA (4.3.3/8J2)", "value": "http://appldnld.apple.com/iPhone4/041-1014.20110503.52dap/iPad2,3_4.3.3_8J2_Restore.ipsw" },
							{ "name": "iPad 2 CDMA (4.3.4/8K2)", "value": "http://appldnld.apple.com/iPhone4/041-1917.2011.715.ZbLkn/iPad2,3_4.3.4_8K2_Restore.ipsw " },
							{ "name": "iPad 2 CDMA (4.3.5/8L1)", "value": "http://appldnld.apple.com/iPhone4/041-1962.20110721.rWxrf/iPad2,3_4.3.5_8L1_Restore.ipsw" },
							{ "name": "iPad 2 CDMA (4.3/8F191)", "value": "http://appldnld.apple.com/iPhone4/041-0334.20110311Plgt5/iPad2,3_4.3_8F191_Restore.ipsw" },
							{ "name": "iPad 2 CDMA (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/041-9620.20111012.pnB4r/iPad2,3_5.0_9A334_Restore.ipsw" },
							{ "name": "iPad 2 CDMA (5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3312.20111109.zp3ws/iPad2,3_5.0.1_9A405_Restore.ipsw" },
							{ "name": "iPad 2 CDMA (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1541.20120307.WrbS2/iPad2,3_5.1_9B176_Restore.ipsw" },
							{ "name": "iPad 2 CDMA (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4297.20120427.NAvbf/iPad2,3_5.1.1_9B206_Restore.ipsw" },
							{ "name": "iPad 2 GSM (4.3.1/8G4)", "value": "http://appldnld.apple.com/iPhone4/041-0557.20110325.Jy76y/iPad2,2_4.3.1_8G4_Restore.ipsw" },
							{ "name": "iPad 2 GSM (4.3.2/8H7)", "value": "http://appldnld.apple.com/iPhone4/041-0664.20110414.39vUS/iPad2,2_4.3.2_8H7_Restore.ipsw" },
							{ "name": "iPad 2 GSM (4.3.3/8J2)", "value": "http://appldnld.apple.com/iPhone4/041-1013.20110503.1m73D/iPad2,2_4.3.3_8J2_Restore.ipsw" },
							{ "name": "iPad 2 GSM (4.3.4/8K2)", "value": "http://appldnld.apple.com/iPhone4/041-1914.20110715.Xdw2Q/iPad2,2_4.3.4_8K2_Restore.ipsw" },
							{ "name": "iPad 2 GSM (4.3.5/8L1)", "value": "http://appldnld.apple.com/iPhone4/041-1961.20110721.zigyd/iPad2,2_4.3.5_8L1_Restore.ipsw" },
							{ "name": "iPad 2 GSM (4.3/8F191)", "value": "http://appldnld.apple.com/iPhone4/041-0369.20110311.Xzsew/iPad2,2_4.3_8F191_Restore.ipsw" },
							{ "name": "iPad 2 GSM (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/041-9619.20111012.y34Nx/iPad2,2_5.0_9A334_Restore.ipsw" },
							{ "name": "iPad 2 GSM(5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3311.20111109.Vpr43/iPad2,2_5.0.1_9A405_Restore.ipsw" },
							{ "name": "iPad 2 GSM(5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1540.20120307.tw0go/iPad2,2_5.1_9B176_Restore.ipsw" },
							{ "name": "iPad 2 GSM(5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4296.20120427.dPX6x/iPad2,2_5.1.1_9B206_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (4.3.1/8G4)", "value": "http://appldnld.apple.com/iPhone4/041-0556.20110325.64rfg/iPad2,1_4.3.1_8G4_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (4.3.2/8H7)", "value": "http://appldnld.apple.com/iPhone4/041-0663.20110414.U7bTI/iPad2,1_4.3.2_8H7_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (4.3.3/8J2)", "value": "http://appldnld.apple.com/iPhone4/041-1012.20110503.tmmBc/iPad2,1_4.3.3_8J2_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (4.3.4/8K2)", "value": "http://appldnld.apple.com/iPhone4/041-1924.2011.0715.qP4r3/iPad2,1_4.3.4_8K2_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (4.3/8F191)", "value": "http://appldnld.apple.com/iPhone4/041-0368.20110311.SwtHr/iPad2,1_4.3_8F191_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (4.3.5/8L1)", "value": "http://appldnld.apple.com/iPhone4/041-1960.20110721.UsAO4/iPad2,1_4.3.5_8L1_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/041-9618.20111012.Zxb22/iPad2,1_5.0_9A334_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3310.20111109.Cfp76/iPad2,1_5.0.1_9A405_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1539.20120307.JwD8A/iPad2,1_5.1_9B176_Restore.ipsw" },
							{ "name": "iPad 2 Wi-Fi (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4294.20120427.Pp5qM/iPad2,1_5.1.1_9B206_Restore.ipsw" },
							{ "name": "iPad 2 其他(5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-2052.20120307.5JGht/iPad2,4_5.1_9B176_Restore.ipsw" }
						]
						  },

							{ "type": "iPad 1", "dataList": [
						  { "name": "iPad (3.2.2/7B500)", "value": "http://appldnld.apple.com/iPad/061-8801.20100811.CvfR5/iPad1,1_3.2.2_7B500_Restore.ipsw" },
						  { "name": "iPad (3.2/7B367)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPad/061-7987.20100403.mjiTr/iPad1,1_3.2_7B367_Restore.ipsw" },
						  { "name": "iPad (4.2.1/8C148)", "value": "http://appldnld.apple.com/iPad/061-9857.20101122.VGthy/iPad1,1_4.2.1_8C148_Restore.ipsw" },
                          { "name": "iPad (4.3.1/8G4)", "value": "http://appldnld.apple.com/iPhone4/041-0550.20110325.Zsw6y/iPad1,1_4.3.1_8G4_Restore.ipsw" },
                          { "name": "iPad (4.3.2/8H7)", "value": "http://appldnld.apple.com/iPhone4/041-0661.20110414.W9Q8r/iPad1,1_4.3.2_8H7_Restore.ipsw" },
                          { "name": "iPad (4.3.3/8J2)", "value": "http://appldnld.apple.com/iPhone4/041-1010.20110503.ScEp3/iPad1,1_4.3.3_8J3_Restore.ipsw" },
                          { "name": "iPad (4.3.4/8K2)", "value": "http://appldnld.apple.com/iPhone4/041-1913.20110715.cvTyu/iPad1,1_4.3.4_8K2_Restore.ipsw" },
                          { "name": "iPad (4.3.5/8L1)", "value": "http://appldnld.apple.com/iPhone4/041-1957.20110721.6UHaN/iPad1,1_4.3.5_8L1_Restore.ipsw" },
                          { "name": "iPad (4.3/8F190)", "value": "http://appldnld.apple.com/iPhone4/041-0329.20110311.Cvfre/iPad1,1_4.3_8F190_Restore.ipsw" },
                          { "name": "iPad (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/041-8357.20111012.DTOrM/iPad1,1_5.0_9A334_Restore.ipsw" },
			              { "name": "iPad (5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3308.20111109.Fvgtr/iPad1,1_5.0.1_9A405_Restore.ipsw" },
                          { "name": "iPad (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1536.20120307.XvCtw/iPad1,1_5.1_9B176_Restore.ipsw" },
						  { "name": "iPad (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4292.02120427.Tkk0d/iPad1,1_5.1.1_9B206_Restore.ipsw" }

						]
							},

                        { "type": "iPhone 3GS", "dataList": [
						{ "name": "iPhone 3GS (3.0.1/7A400)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6976.20090731.Vgbt5/iPhone2,1_3.0.1_7A400_Restore.ipsw" },
						{ "name": "iPhone 3GS (3.0/7A341)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6582.20090617.LlI87/iPhone2,1_3.0_7A341_Restore.ipsw" },
						{ "name": "iPhone 3GS (3.1.2/7D11)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7270.20091008.phn32/iPhone2,1_3.1.2_7D11_Restore.ipsw" },
						{ "name": "iPhone 3GS (3.1.3/7E18)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7472.20100202.8tugj/iPhone2,1_3.1.3_7E18_Restore.ipsw" },
						{ "name": "iPhone 3GS (3.1/7C144)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6609.20090909.mwws4/iPhone2,1_3.1_7C144_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.0.1/8A306)", "value": "http://appldnld.apple.com/iPhone4/061-8618.20100715.Zapn4/iPhone2,1_4.0.1_8A306_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.0/8A293)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone4/061-7437.20100621.5urG8/iPhone2,1_4.0_8A293_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.1/8B117)", "value": "http://appldnld.apple.com/iPhone4/061-7938.20100908.F3rCk/iPhone2,1_4.1_8B117_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.2.1/8C148a)", "value": "http://appldnld.apple.com/iPhone4/061-9895.20101122.Cdew2/iPhone2,1_4.2.1_8C148a_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.3.1/8G4)", "value": "http://appldnld.apple.com/iPhone4/041-0549.20110325.ZxP8u/iPhone2,1_4.3.1_8G4_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.3.2/8H7)", "value": "http://appldnld.apple.com/iPhone4/041-0660.20110414.Gwed5/iPhone2,1_4.3.2_8H7_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.3.3/8J2)", "value": "http://appldnld.apple.com/iPhone4/041-1009.20110503.M73Yr/iPhone2,1_4.3.3_8J2_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.3.4/8K2)", "value": "http://appldnld.apple.com/iPhone4/041-1921.20110715.ItuLh/iPhone2,1_4.3.4_8K2_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.3.5/8L1)", "value": "http://appldnld.apple.com/iPhone4/041-1965.20110721.gxUB5/iPhone2,1_4.3.5_8L1_Restore.ipsw" },
						{ "name": "iPhone 3GS (4.3/8F190)", "value": "http://appldnld.apple.com/iPhone4/041-0328.20110311.Lkhy6/iPhone2,1_4.3_8F190_Restore.ipsw" },
						{ "name": "iPhone 3GS (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/041-8356.20111012.SQRDT/iPhone2,1_5.0_9A334_Restore.ipsw" },
						{ "name": "iPhone 3GS (5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3307.20111109.5tGhu/iPhone2,1_5.0.1_9A405_Restore.ipsw" },
						{ "name": "iPhone 3GS (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1535.20120307.Jer6N/iPhone2,1_5.1_9B176_Restore.ipsw" },
						{ "name": "iPhone 3GS (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4347.20120427.o2yov/iPhone2,1_5.1.1_9B206_Restore.ipsw" }
						]
                        },
                        { "type": "iPhone 3G", "dataList": [
							{ "name": "iPhone 3G (2.0.1/5B108)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5134.20080729.Q2W3E/iPhone1,2_2.0.1_5B108_Restore.ipsw" },
							{ "name": "iPhone 3G (2.0.2/5C1)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5241.20080818.t5Fv3/iPhone1,2_2.0.2_5C1_Restore.ipsw" },
							{ "name": "iPhone 3G (2.0/5A347)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4955.20080710.bgt53/iPhone1,2_2.0_5A347_Restore.ipsw" },
							{ "name": "iPhone 3G (2.1/5F136)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5198.20080909.K3294/iPhone1,2_2.1_5F136_Restore.ipsw" },
							{ "name": "iPhone 3G (2.2.1/5H11)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5828.20090127.aQLi8/iPhone1,2_2.2.1_5H11_Restore.ipsw" },
							{ "name": "iPhone 3G (2.2/5G77)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5778.20081120.Aqw4R/iPhone1,2_2.2_5G77_Restore.ipsw" },
							{ "name": "iPhone 3G (3.0.1/7A400)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6972.20090731.Zx3Rr/iPhone1,2_3.0.1_7A400_Restore.ipsw" },
							{ "name": "iPhone 3G (3.0/7A341)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6578.20090617.VfgtU/iPhone1,2_3.0_7A341_Restore.ipsw" },
							{ "name": "iPhone 3G (3.1.2/7D11)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7265.20091008.Xsd32/iPhone1,2_3.1.2_7D11_Restore.ipsw" },
							{ "name": "iPhone 3G (3.1.3/7E18)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7468.20100202.pbnrt/iPhone1,2_3.1.3_7E18_Restore.ipsw" },
							{ "name": "iPhone 3G (3.1/7C144)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6600.20090909.AwndZ/iPhone1,2_3.1_7C144_Restore.ipsw" },
							{ "name": "iPhone 3G (4.0.1/8A306)", "value": "http://appldnld.apple.com/iPhone4/061-8616.20100715.phnt4/iPhone1,2_4.0.1_8A306_Restore.ipsw" },
							{ "name": "iPhone 3G (4.0/8A293)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone4/061-7436.20100621.58Yt4/iPhone1,2_4.0_8A293_Restore.ipsw" },
							{ "name": "iPhone 3G (4.1/8B117)", "value": "http://appldnld.apple.com/iPhone4/061-7932.20100908.3fgt5/iPhone1,2_4.1_8B117_Restore.ipsw" },
							{ "name": "iPhone 3G (4.2.1/8C148)", "value": "http://appldnld.apple.com/iPhone4/061-9853.20101122.Vfgt5/iPhone1,2_4.2.1_8C148_Restore.ipsw" },
							{ "name": "iPhone 3G (4.2/8C148)", "value": "http://appldnld.apple.com/iPhone4/061-9853.20101122.Vfgt5/iPhone1,2_4.2.1_8C148_Restore.ipsw" }
						]
                        },
						{ "type": "iPhone 1", "dataList": [
							{ "name": "iPhone (1.0.1/1C25)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3614.20070731.Nt6Y7/iPhone1,1_1.0.1_1C25_Restore.ipsw" },
							{ "name": "iPhone (1.0.2/1C28)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3823.20070821.vormd/iPhone1,1_1.0.2_1C28_Restore.ipsw" },
							{ "name": "iPhone (1.0/1A543a)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3538.20070629.B7vXa/iPhone1,1_1.0_1A543a_Restore.ipsw" },
							{ "name": "iPhone (1.1.1/3A109a)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3883.20070927.In76t/iPhone1,1_1.1.1_3A109a_Restore.ipsw" },
							{ "name": "iPhone (1.1.2/3B48b)", "value": "=http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4037.20071107.5Bghn/iPhone1,1_1.1.2_3B48b_Restore.ipsw" },
							{ "name": "iPhone (1.1.3/4A93)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4061.20080115.4Fvn7/iPhone1,1_1.1.3_4A93_Restore.ipsw" },
							{ "name": "iPhone (1.1.4/4A102)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4313.20080226.Sw39i/iPhone1,1_1.1.4_4A102_Restore.ipsw" },
							{ "name": "iPhone (2.0.1/5B108)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5135.20080729.Vfgtr/iPhone1,1_2.0.1_5B108_Restore.ipsw" },
							{ "name": "iPhone (2.0.2/5C1)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5246.20080818.2V0hO/iPhone1,1_2.0.2_5C1_Restore.ipsw" },
							{ "name": "iPhone (2.0/5A347)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-4956.20080710.V50OI/iPhone1,1_2.0_5A347_Restore.ipsw" },
							{ "name": "iPhone (2.1/5F136)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5202.20080909.gkbEj/iPhone1,1_2.1_5F136_Restore.ipsw" },
							{ "name": "iPhone (2.2.1/5H11)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5830.20090127.Mmni6/iPhone1,1_2.2.1_5H11_Restore.ipsw" },
							{ "name": "iPhone (2.2/5G77)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5779.20081120.Pt5yH/iPhone1,1_2.2_5G77_Restore.ipsw" },
							{ "name": "iPhone (3.0.1/7A400)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6974.20090731.Cf4Tg/iPhone1,1_3.0.1_7A400_Restore.ipsw" },
							{ "name": "iPhone (3.0/7A341)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6580.20090617.XsP76/iPhone1,1_3.0_7A341_Restore.ipsw" },
							{ "name": "iPhone (3.1.2/7D11)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7268.20091008.32pNe/iPhone1,1_3.1.2_7D11_Restore.ipsw" },
							{ "name": "iPhone (3.1.3/7E18)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7481.20100202.4orot/iPhone1,1_3.1.3_7E18_Restore.ipsw" },
							{ "name": "iPhone (3.1/7C144)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6605.20090909.PQ3ws/iPhone1,1_3.1_7C144_Restore.ipsw" }
						]
						},

						       { "type": "iPod 4", "dataList": [
		{ "name": "iPod Touch 4G (4.1/8B118)", "value": "http://appldnld.apple.com/iPhone4/061-9344.20100922.Urgt43/iPod4,1_4.1_8B118_Restore.ipsw" },
		{ "name": "iPod Touch 4G (4.2.1/8C148)", "value": "http://appldnld.apple.com/iPhone4/061-9859.20101122.$erft/iPod4,1_4.2.1_8C148_Restore.ipsw" },
		{ "name": "iPod Touch 4G (4.3.1/8G4)", "value": "http://appldnld.apple.com/iPhone4/041-0545.20110325.We3Rt/iPod4,1_4.3.1_8G4_Restore.ipsw" },
		{ "name": "iPod Touch 4G (4.3.2/8H7)", "value": "http://appldnld.apple.com/iPhone4/041-0666.20110414.3QvM1/iPod4,1_4.3.2_8H7_Restore.ipsw" },
		{ "name": "iPod Touch 4G (4.3.3/8J2)", "value": "http://appldnld.apple.com/iPhone4/041-1015.20110503.d7i57/iPod4,1_4.3.3_8J2_Restore.ipsw" },
		{ "name": "iPod Touch 4G (4.3.4/8K2)", "value": "http://appldnld.apple.com/iPhone4/041-1918.20110715.MgWsk/iPod4,1_4.3.4_8K2_Restore.ipsw" },
		{ "name": "iPod Touch 4G (4.3.5/8L1)", "value": "http://appldnld.apple.com/iPhone4/041-1963.20110721.Huant/iPod4,1_4.3.5_8L1_Restore.ipsw" },
		{ "name": "iPod Touch 4G (4.3/8F190)", "value": "http://appldnld.apple.com/iPhone4/061-9588.20110311.GtP7y/iPod4,1_4.3_8F190_Restore.ipsw" },
		{ "name": "iPod Touch 4G (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/061-9622.20111012.Evry3/iPod4,1_5.0_9A334_Restore.ipsw" },
		{ "name": "iPod Touch 4G (5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3313.20111109.Azxe3/iPod4,1_5.0.1_9A405_Restore.ipsw" },
		{ "name": "iPod Touch 4G (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1542.20120307.Jyknq/iPod4,1_5.1_9B176_Restore.ipsw" },
		{ "name": "iPod Touch 4G (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4298.20120427.Tzr8w/iPod4,1_5.1.1_9B206_Restore.ipsw" }
		        	]

						       },
						{ "type": "iPod 3", "dataList": [
		{ "name": "iPod Touch 3G (3.1.1/7C145)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPod/SBML/osx/bundles/061-7163.20090909.NtstR/iPod3,1_3.1.1_7C145_Restore.ipsw" },
		{ "name": "iPod Touch 3G (3.1.2/7D11)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7271.20091008.Tch23/iPod3,1_3.1.2_7D11_Restore.ipsw" },
		{ "name": "iPod Touch 3G (3.1.3/7E18)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7473.20100202.4i44t/iPod3,1_3.1.3_7E18_Restore.ipsw" },
		{ "name": "iPod Touch 3G (4.0/8A293)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone4/061-7381.20100621.AzSP9/iPod3,1_4.0_8A293_Restore.ipsw" },
		{ "name": "iPod Touch 3G (4.1/8B117)", "value": "http://appldnld.apple.com/iPhone4/061-7941.20100908.sV9KE/iPod3,1_4.1_8B117_Restore.ipsw" },
		{ "name": "iPod Touch 3G (4.2.1/8C148)", "value": "http://appldnld.apple.com/iPhone4/061-9860.20101122.Xsde3/iPod3,1_4.2.1_8C148_Restore.ipsw" },
		{ "name": "iPod Touch 3G (4.3.1/8G4)", "value": "http://appldnld.apple.com/iPhone4/041-0552.20110325.Yt67u/iPod3,1_4.3.1_8G4_Restore.ipsw" },
		{ "name": "iPod Touch 3G (4.3.2/8H7)", "value": "http://appldnld.apple.com/iPhone4/041-0667.20110414.95hVL/iPod3,1_4.3.2_8H7_Restore.ipsw" },
		{ "name": "iPod Touch 3G (4.3.3/8J2)", "value": "http://appldnld.apple.com/iPhone4/041-1021.20110503.8Lfs1/iPod3,1_4.3.3_8J2_Restore.ipsw" },
		{ "name": "iPod Touch 3G (4.3.4/8K2)", "value": "http://appldnld.apple.com/iPhone4/041-1919.20110715.ShHh4/iPod3,1_4.3.4_8K2_Restore.ipsw" },
		{ "name": "iPod Touch 3G (4.3.5/8L1)", "value": "http://appldnld.apple.com/iPhone4/041-1964.20110721.P9Cg3/iPod3,1_4.3.5_8L1_Restore.ipsw" },
		{ "name": "iPod Touch 3G (4.3/8F190)", "value": "http://appldnld.apple.com/iPhone4/061-8366.20110311.Fr45t/iPod3,1_4.3_8F190_Restore.ipsw" },
	    { "name": "iPod Touch 3G (5.0/9A334)", "value": "http://appldnld.apple.com/iPhone4/061-8360.20111012.New3w/iPod3,1_5.0_9A334_Restore.ipsw" },
		{ "name": "iPod Touch 3G (5.0.1/9A405)", "value": "http://appldnld.apple.com/iPhone4/041-3314.20111109.Mbgh6/iPod3,1_5.0.1_9A405_Restore.ipsw" },
		{ "name": "iPod Touch 3G (5.1/9B176)", "value": "http://appldnld.apple.com/iOS5/041-1547.20120307.KerHy/iPod3,1_5.1_9B176_Restore.ipsw" },
		{ "name": "iPod Touch 3G (5.1.1/9B206)", "value": "http://appldnld.apple.com/iOS5.1.1/041-4300.20120427.WvgGq/iPod3,1_5.1.1_9B206_Restore.ipsw" }
		]
						},
						{ "type": "iPod 2", "dataList": [
		{ "name": "iPod Touch 2G (2.1.1/5F138)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPod/SBML/osx/bundles/061-5494.20080909.8i9o0/iPod2,1_2.1.1_5F138_Restore.ipsw" },
		{ "name": "iPod Touch 2G (2.2.1/5H11a)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5863.20090127.rt56K/iPod2,1_2.2.1_5H11a_Restore.ipsw" },
		{ "name": "iPod Touch 2G (2.2/5G77a)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPod/SBML/osx/061-5358.20081120.Gtghy/iPod2,1_2.2_5G77a_Restore.ipsw" },
		{ "name": "iPod Touch 2G (4.0/8A293)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone4/061-7435.20100621.tr49t/iPod2,1_4.0_8A293_Restore.ipsw" },
		{ "name": "iPod Touch 2G (4.1/8B117)", "value": "http://appldnld.apple.com/iPhone4/061-7937.20100908.ghj4f/iPod2,1_4.1_8B117_Restore.ipsw" },
		{ "name": "iPod Touch 2G (4.2/8C148)", "value": "http://appldnld.apple.com/iPhone4/061-9855.20101122.Lrft6/iPod2,1_4.2.1_8C148_Restore.ipsw" },
		{ "name": "iPod Touch 2G (4.2.1/8C148)", "value": "http://appldnld.apple.com/iPhone4/061-9855.20101122.Lrft6/iPod2,1_4.2.1_8C148_Restore.ipsw" }
						]
						},

						{ "type": "iPod 1", "dataList": [
		{ "name": "iPod Touch 1G (1.1/3A101a)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPod/SBML/osx/bundles/061-3882.20070910.N8uyT/iPod1,1_1.1_3A101a_Restore.ipsw" },
		{ "name": "iPod Touch 1G (1.1.1/3A110a)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPod/SBML/osx/bundles/061-3932.20070927.p23dD/iPod1,1_1.1.1_3A110a_Restore.ipsw" },
		{ "name": "iPod Touch 1G (1.1.2/3B48b)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPod/SBML/osx/bundles/061-4036.20071107.9g3DF/iPod1,1_1.1.2_3B48b_Restore.ipsw" },
		{ "name": "iPod Touch 1G (1.1.3/4A93)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPod/SBML/osx/061-4060.20080115.9Iuh5/iPod1,1_1.1.3_4A93_Restore.ipsw" },
		{ "name": "iPod Touch 1G (1.1.4/4A102)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPod/SBML/osx/bundles/061-4312.20080226.Btu45/iPod1,1_1.1.4_4A102_Restore.ipsw" },
	    { "name": "iPod Touch 1G (1.1.5/4B1)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPod/SBML/osx/bundles/061-4841.20080714.bgy8O/iPod1,1_1.1.5_4B1_Restore.ipsw" }
						]
						},



								   { "type": "Apple TV 2", "dataList": [
                                   { "name": "Apple TV 2G (4.1/8M89)", "value": "http://appldnld.apple.com/AppleTV/061-8940.20100926.Tvtnz/AppleTV2,1_4.1_8M89_Restore.ipsw" },
 	             { "name": "Apple TV 2G (4.1/8M89)", "value": "http://appldnld.apple.com/AppleTV/061-8940.20100926.Tvtnz/AppleTV2,1_4.1_8M89_Restore.ipsw" },
						   { "name": "Apple TV 2G (4.2.1/8C154)", "value": "http://appldnld.apple.com/AppleTV/061-9978.20101214.gmabr/AppleTV2,1_4.2.1_8C154_Restore.ipsw" },
						   { "name": "Apple TV 2G (4.3/8F191m)", "value": "http://appldnld.apple.com/AppleTV/061-9584.20110308.Cxdew/AppleTV2,1_4.3_8F191m_Restore.ipsw" },
						   { "name": "Apple TV 2G (4.4/9A334v)", "value": "http://appldnld.apple.com/AppleTV/061-9621.20111012.Vgijx/AppleTV2,1_4.4_9A334v_Restore.ipsw" },
						   { "name": "Apple TV 2G (5.0/9B176)", "value": "http://appldnld.apple.com/AppleTV/041-1538.20120307.Ve5H3/AppleTV2,1_5.0_9B179b_Restore.ipsw" }
                           ]
								   },
                                     { "type": "Apple TV 3", "dataList": [
                                   { "name": "Apple TV 3G (5.0/9B176)", "value": "http://appldnld.apple.com/AppleTV/041-2855.20120307.SD8A4/AppleTV3,1_5.0_9B179b_Restore.ipsw"}]
                                     }

								  ];
$(document).ready(function () {

    var myiPhoneType, myiPhoneVersion, myiPhoneIOSVersion, myiPhoneTypeFormat, dlDeviceIOS, device, iosherd;
    try {
        myiPhoneType = external.MyiPhoneType();
        myiPhoneVersion = external.MyiPhoneVersion();
        myiPhoneIOSVersion = external.MyIPhoneIOSBuildVersion();
        myiPhoneTypeFormat = external.MyIPhoneProductType();

    }
    catch (e) { }
    //alert(myiPhoneType);
    //alert(myiPhoneVersion);
    //alert(myiPhoneIOSVersion);
    //alert(myiPhoneTypeFormat);

    myiPhoneType = !myiPhoneType ? "iPhone 4" : myiPhoneType;
    myiPhoneVersion = !myiPhoneVersion ? "" : myiPhoneVersion;
    myiPhoneIOSVersion = !myiPhoneIOSVersion ? "" : myiPhoneIOSVersion;
    myiPhoneTypeFormat = !myiPhoneTypeFormat ? "" : myiPhoneTypeFormat;

    device = document.getElementById("device");
    dlDeviceIOS = document.getElementById("dlDeviceIOS");

    iosherd = document.getElementById("iosherd");

    if (myiPhoneVersion != "" && myiPhoneIOSVersion != "" && myiPhoneTypeFormat != "") {
        iosherd.style.display = "block";
        var iosVer = myiPhoneVersion + "/" + myiPhoneIOSVersion.toLocaleUpperCase();
        device.innerHTML = myiPhoneType + "(" + iosVer + ")";

        var iosVer2 = myiPhoneTypeFormat + "_" + myiPhoneVersion + "_" + myiPhoneIOSVersion;
        iosVer2 = iosVer2.toLowerCase().replace(" ", "");

        for (var j = 0; j < optionData.length; j++) {

            if (optionData[j].type == myiPhoneType) {

                for (var k = 0; k < optionData[j].dataList.length; k++) {

                    if (optionData[j].dataList[k].value.toLowerCase().indexOf(iosVer2) > 0) {

                        dlDeviceIOS.href = optionData[j].dataList[k].value;
                    }

                }
            }

        }
    }
    else {
        iosherd.style.display = "none";
    }


    devTypeSelBox = document.getElementById("firmware");
    var divContent = '';
    var show1;
    divContent += '<div style="width:100%; text-align:center;"><select style="width:200px; font-size:14px;line-height:20px; " onchange="a()">';
    for (var jj = 0; jj < optionData.length; jj++) {
        if (myiPhoneType == optionData[jj].type) {
            divContent += '<option  selected="selected"  value=\"' + jj + '">' + optionData[jj].type + '</option>'
            show1 = jj;

        }
        else {
            divContent += '<option  value=\"' + jj + '">' + optionData[jj].type + '</option>'
        }

    }
    divContent += '</select></div><div style="width:100%;height:10px;" ></div><div style="width:800px;height:30px;margin:0px auto;" ><img src="images/ioshead1.png"></div>';

    for (var j = 0; j < optionData.length; j++) {
        if (show1 == j) {
            divContent += '<div  class="ios' + j + '" style="width:780px; border-left:2px solid #bdc0c4; border-right:2px solid #bdc0c4;margin:0 auto;">'
        }
        if (show1 != j) {
            divContent += '<div  class="ios' + j + '" style="width:780px;border-left:2px solid #bdc0c4;display:none; border-right:2px solid #bdc0c4;margin:0 auto;">'
        }

        divContent += '<table cellspacing="0" border="0" cellpadding="0" style="border-collapse:collapse;overflow:hidden;magin:0px auto;">'
        var rows = optionData[j].dataList.length;
        var count1 = Math.ceil(rows / 3);

        for (var i = 0; i < rows; i++) {
            if (i % 3 == 0) {
                divContent += '<tr>';
            }
            divContent += '<td class="isotd"><a class="iosa"  href="' + optionData[j].dataList[i].value + '">' + optionData[j].dataList[i].name + '</a>';
            divContent += '</td>';
            if (i == 0 || i == 1) {
               //divContent += '<td  style="width:2px;height:' + 40 * count1 + 'px" rowspan="' + count1 + '"><div  style="width:100%;height:' + 40 * count1 + 'px"><img src="images/ios_' + count1 + '.png"></div></td>';

  divContent += '<td  style="width:2px;height:' + 40 * count1 + 'px" rowspan="' + count1 + '"><div  style="width:100%;height:' + 40 * count1 + 'px"></div></td>';            }

            if (i % 3 == 2) {
                divContent += '</tr>';
            }
        }
        divContent += '</table>';
        divContent += '</div>';
    }
    divContent += '<div style="width:800px;height:30px;margin:0px auto;" ><img src="images/ioshead2.png"></div>';

    devTypeSelBox.innerHTML = divContent;


}
                          )
function a() {


    for (i = 0; i < $("select option").length; i++) {

        if (i == $("select").val()) {

            $(".ios" + i).show();
        }
        else {

            $(".ios" + i).hide();
        }
    }

}