smarttheme - Version 1.0.0

Version Notes

This basic version is the very first release of the theme and contains all the basic view-only functionality for a magento store. This includes the essential product information of all types of products and a solid interface for navigating across the store with a mobile device. It does not include functionality such as reviews, wishlists, user accounts, cart and checkout. These features will be released shortly after the basic version with the full theme version.

Download this release

Release Info

Developer Cryozonic Ltd
Extension smarttheme
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (196) hide show
  1. app/design/frontend/smarttheme/default/layout/bundle.xml +333 -0
  2. app/design/frontend/smarttheme/default/layout/catalog.xml +446 -0
  3. app/design/frontend/smarttheme/default/layout/catalogsearch.xml +138 -0
  4. app/design/frontend/smarttheme/default/layout/checkout.xml +436 -0
  5. app/design/frontend/smarttheme/default/layout/cms.xml +89 -0
  6. app/design/frontend/smarttheme/default/layout/customer.xml +269 -0
  7. app/design/frontend/smarttheme/default/layout/newsletter.xml +69 -0
  8. app/design/frontend/smarttheme/default/layout/page.xml +203 -0
  9. app/design/frontend/smarttheme/default/layout/wishlist.xml +119 -0
  10. app/design/frontend/smarttheme/default/template/bundle/catalog/product/list/partof.phtml +52 -0
  11. app/design/frontend/smarttheme/default/template/bundle/catalog/product/price.phtml +258 -0
  12. app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/options/notice.phtml +27 -0
  13. app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/price.phtml +93 -0
  14. app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/tierprices.phtml +41 -0
  15. app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle.phtml +45 -0
  16. app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml +51 -0
  17. app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml +51 -0
  18. app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml +60 -0
  19. app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml +51 -0
  20. app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/options.phtml +43 -0
  21. app/design/frontend/smarttheme/default/template/callouts/left_col.phtml +39 -0
  22. app/design/frontend/smarttheme/default/template/catalog/category/view.phtml +71 -0
  23. app/design/frontend/smarttheme/default/template/catalog/left.phtml +59 -0
  24. app/design/frontend/smarttheme/default/template/catalog/navigation/top.phtml +249 -0
  25. app/design/frontend/smarttheme/default/template/catalog/product/list.phtml +89 -0
  26. app/design/frontend/smarttheme/default/template/catalog/product/list/toolbar.phtml +75 -0
  27. app/design/frontend/smarttheme/default/template/catalog/product/new.phtml +59 -0
  28. app/design/frontend/smarttheme/default/template/catalog/product/price.phtml +414 -0
  29. app/design/frontend/smarttheme/default/template/catalog/product/type/configurable.phtml +31 -0
  30. app/design/frontend/smarttheme/default/template/catalog/product/type/default.phtml +36 -0
  31. app/design/frontend/smarttheme/default/template/catalog/product/type/grouped.phtml +91 -0
  32. app/design/frontend/smarttheme/default/template/catalog/product/type/options/configurable.phtml +58 -0
  33. app/design/frontend/smarttheme/default/template/catalog/product/type/simple.phtml +31 -0
  34. app/design/frontend/smarttheme/default/template/catalog/product/type/virtual.phtml +31 -0
  35. app/design/frontend/smarttheme/default/template/catalog/product/view.phtml +165 -0
  36. app/design/frontend/smarttheme/default/template/catalog/product/view/additional.phtml +29 -0
  37. app/design/frontend/smarttheme/default/template/catalog/product/view/addto.phtml +41 -0
  38. app/design/frontend/smarttheme/default/template/catalog/product/view/addtocart.phtml +38 -0
  39. app/design/frontend/smarttheme/default/template/catalog/product/view/attributes.phtml +52 -0
  40. app/design/frontend/smarttheme/default/template/catalog/product/view/description.phtml +39 -0
  41. app/design/frontend/smarttheme/default/template/catalog/product/view/media.phtml +82 -0
  42. app/design/frontend/smarttheme/default/template/catalog/product/view/options.phtml +182 -0
  43. app/design/frontend/smarttheme/default/template/catalog/product/view/options/js.phtml +89 -0
  44. app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/date.phtml +92 -0
  45. app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/default.phtml +30 -0
  46. app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/file.phtml +103 -0
  47. app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/select.phtml +38 -0
  48. app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/text.phtml +41 -0
  49. app/design/frontend/smarttheme/default/template/catalog/product/view/options/wrapper.phtml +33 -0
  50. app/design/frontend/smarttheme/default/template/catalog/product/view/options/wrapper/bottom.phtml +29 -0
  51. app/design/frontend/smarttheme/default/template/catalog/product/view/price.phtml +34 -0
  52. app/design/frontend/smarttheme/default/template/catalog/product/view/price_clone.phtml +28 -0
  53. app/design/frontend/smarttheme/default/template/catalog/product/view/tierprices.phtml +181 -0
  54. app/design/frontend/smarttheme/default/template/catalog/product/view/type/configurable.phtml +31 -0
  55. app/design/frontend/smarttheme/default/template/catalog/product/view/type/default.phtml +36 -0
  56. app/design/frontend/smarttheme/default/template/catalog/product/view/type/grouped.phtml +91 -0
  57. app/design/frontend/smarttheme/default/template/catalog/product/view/type/options/configurable.phtml +58 -0
  58. app/design/frontend/smarttheme/default/template/catalog/product/view/type/simple.phtml +31 -0
  59. app/design/frontend/smarttheme/default/template/catalog/product/view/type/virtual.phtml +31 -0
  60. app/design/frontend/smarttheme/default/template/catalogsearch/form.mini.phtml +42 -0
  61. app/design/frontend/smarttheme/default/template/checkout/cart.phtml +138 -0
  62. app/design/frontend/smarttheme/default/template/checkout/cart/coupon.phtml +59 -0
  63. app/design/frontend/smarttheme/default/template/checkout/cart/crosssell.phtml +59 -0
  64. app/design/frontend/smarttheme/default/template/checkout/cart/item/default.phtml +254 -0
  65. app/design/frontend/smarttheme/default/template/checkout/cart/noItems.phtml +34 -0
  66. app/design/frontend/smarttheme/default/template/checkout/cart/shipping.phtml +143 -0
  67. app/design/frontend/smarttheme/default/template/checkout/cart/totals.phtml +43 -0
  68. app/design/frontend/smarttheme/default/template/checkout/onepage/link.phtml +29 -0
  69. app/design/frontend/smarttheme/default/template/checkout/total/default.phtml +38 -0
  70. app/design/frontend/smarttheme/default/template/customer/account/dashboard.phtml +43 -0
  71. app/design/frontend/smarttheme/default/template/customer/account/dashboard/address.phtml +50 -0
  72. app/design/frontend/smarttheme/default/template/customer/account/dashboard/hello.phtml +30 -0
  73. app/design/frontend/smarttheme/default/template/customer/account/dashboard/info.phtml +62 -0
  74. app/design/frontend/smarttheme/default/template/customer/account/dashboard/newsletter.phtml +31 -0
  75. app/design/frontend/smarttheme/default/template/customer/account/link/back.phtml +29 -0
  76. app/design/frontend/smarttheme/default/template/customer/account/navigation.phtml +46 -0
  77. app/design/frontend/smarttheme/default/template/customer/address.phtml +94 -0
  78. app/design/frontend/smarttheme/default/template/customer/address/book.phtml +105 -0
  79. app/design/frontend/smarttheme/default/template/customer/address/edit.phtml +155 -0
  80. app/design/frontend/smarttheme/default/template/customer/balance.phtml +31 -0
  81. app/design/frontend/smarttheme/default/template/customer/form/address.phtml +141 -0
  82. app/design/frontend/smarttheme/default/template/customer/form/changepassword.phtml +67 -0
  83. app/design/frontend/smarttheme/default/template/customer/form/confirmation.phtml +54 -0
  84. app/design/frontend/smarttheme/default/template/customer/form/edit.phtml +114 -0
  85. app/design/frontend/smarttheme/default/template/customer/form/forgotpassword.phtml +54 -0
  86. app/design/frontend/smarttheme/default/template/customer/form/login.phtml +88 -0
  87. app/design/frontend/smarttheme/default/template/customer/form/mini.login.phtml +40 -0
  88. app/design/frontend/smarttheme/default/template/customer/form/newsletter.phtml +49 -0
  89. app/design/frontend/smarttheme/default/template/customer/form/register.phtml +183 -0
  90. app/design/frontend/smarttheme/default/template/customer/logout.phtml +35 -0
  91. app/design/frontend/smarttheme/default/template/customer/orders.phtml +65 -0
  92. app/design/frontend/smarttheme/default/template/customer/widget/dob.phtml +87 -0
  93. app/design/frontend/smarttheme/default/template/customer/widget/gender.phtml +36 -0
  94. app/design/frontend/smarttheme/default/template/customer/widget/name.phtml +102 -0
  95. app/design/frontend/smarttheme/default/template/customer/widget/taxvat.phtml +30 -0
  96. app/design/frontend/smarttheme/default/template/customer/wishlist.phtml +73 -0
  97. app/design/frontend/smarttheme/default/template/page/1column.phtml +58 -0
  98. app/design/frontend/smarttheme/default/template/page/2columns-left.phtml +59 -0
  99. app/design/frontend/smarttheme/default/template/page/html/breadcrumbs.phtml +61 -0
  100. app/design/frontend/smarttheme/default/template/page/html/footer.phtml +35 -0
  101. app/design/frontend/smarttheme/default/template/page/html/head.phtml +45 -0
  102. app/design/frontend/smarttheme/default/template/page/html/header.phtml +44 -0
  103. app/design/frontend/smarttheme/default/template/page/html/notices.phtml +44 -0
  104. app/design/frontend/smarttheme/default/template/page/html/pager.phtml +117 -0
  105. app/design/frontend/smarttheme/default/template/page/js/calendar.phtml +94 -0
  106. app/design/frontend/smarttheme/default/template/page/js/cookie.phtml +40 -0
  107. app/design/frontend/smarttheme/default/template/page/mobile-product.phtml +36 -0
  108. app/design/frontend/smarttheme/default/template/page/mobile.phtml +67 -0
  109. app/design/frontend/smarttheme/default/template/page/switch/languages.phtml +44 -0
  110. app/design/frontend/smarttheme/default/template/page/switch/stores.phtml +47 -0
  111. app/design/frontend/smarttheme/default/template/page/template/links.phtml +43 -0
  112. app/design/frontend/smarttheme/default/template/pagecache/cookie.phtml +30 -0
  113. app/design/frontend/smarttheme/default/template/reports/home_product_viewed.phtml +65 -0
  114. app/design/frontend/smarttheme/default/template/review/helper/summary.phtml +42 -0
  115. package.xml +25 -0
  116. skin/frontend/smarttheme/default/images/ajax-loader.png +0 -0
  117. skin/frontend/smarttheme/default/images/bkg_add-to.gif +0 -0
  118. skin/frontend/smarttheme/default/images/bkg_block-layered-title.gif +0 -0
  119. skin/frontend/smarttheme/default/images/bkg_body.gif +0 -0
  120. skin/frontend/smarttheme/default/images/bkg_btn-green.gif +0 -0
  121. skin/frontend/smarttheme/default/images/bkg_btn-small.gif +0 -0
  122. skin/frontend/smarttheme/default/images/bkg_btn-small.png +0 -0
  123. skin/frontend/smarttheme/default/images/bkg_btn.gif +0 -0
  124. skin/frontend/smarttheme/default/images/bkg_btn.png +0 -0
  125. skin/frontend/smarttheme/default/images/bkg_cart-totals.gif +0 -0
  126. skin/frontend/smarttheme/default/images/bkg_collapse-gm.gif +0 -0
  127. skin/frontend/smarttheme/default/images/bkg_collapse.gif +0 -0
  128. skin/frontend/smarttheme/default/images/bkg_grid.gif +0 -0
  129. skin/frontend/smarttheme/default/images/bkg_nav_parent.gif +0 -0
  130. skin/frontend/smarttheme/default/images/bkg_nav_top.gif +0 -0
  131. skin/frontend/smarttheme/default/images/bkg_pipe1.gif +0 -0
  132. skin/frontend/smarttheme/default/images/bkg_pipe2.gif +0 -0
  133. skin/frontend/smarttheme/default/images/bkg_pipe3.gif +0 -0
  134. skin/frontend/smarttheme/default/images/bkg_rating.gif +0 -0
  135. skin/frontend/smarttheme/default/images/bkg_subtotal.gif +0 -0
  136. skin/frontend/smarttheme/default/images/bkg_tabs.gif +0 -0
  137. skin/frontend/smarttheme/default/images/bkg_toolbar.gif +0 -0
  138. skin/frontend/smarttheme/default/images/bkg_top-promo.gif +0 -0
  139. skin/frontend/smarttheme/default/images/btn_checkout.gif +0 -0
  140. skin/frontend/smarttheme/default/images/btn_edit.gif +0 -0
  141. skin/frontend/smarttheme/default/images/btn_remove.gif +0 -0
  142. skin/frontend/smarttheme/default/images/btn_trash.gif +0 -0
  143. skin/frontend/smarttheme/default/images/btn_window_close.gif +0 -0
  144. skin/frontend/smarttheme/default/images/calendar.gif +0 -0
  145. skin/frontend/smarttheme/default/images/catalog/product/placeholder/image.jpg +0 -0
  146. skin/frontend/smarttheme/default/images/catalog/product/placeholder/small_image.jpg +0 -0
  147. skin/frontend/smarttheme/default/images/catalog/product/placeholder/thumbnail.jpg +0 -0
  148. skin/frontend/smarttheme/default/images/cvv.gif +0 -0
  149. skin/frontend/smarttheme/default/images/fam_book_open.png +0 -0
  150. skin/frontend/smarttheme/default/images/grid-cal.gif +0 -0
  151. skin/frontend/smarttheme/default/images/i_asc_arrow.gif +0 -0
  152. skin/frontend/smarttheme/default/images/i_availability_only.gif +0 -0
  153. skin/frontend/smarttheme/default/images/i_availability_only_arrow.gif +0 -0
  154. skin/frontend/smarttheme/default/images/i_desc_arrow.gif +0 -0
  155. skin/frontend/smarttheme/default/images/i_msg-error.gif +0 -0
  156. skin/frontend/smarttheme/default/images/i_msg-note.gif +0 -0
  157. skin/frontend/smarttheme/default/images/i_msg-success.gif +0 -0
  158. skin/frontend/smarttheme/default/images/i_notice.gif +0 -0
  159. skin/frontend/smarttheme/default/images/i_pager-next.gif +0 -0
  160. skin/frontend/smarttheme/default/images/i_pager-prev.gif +0 -0
  161. skin/frontend/smarttheme/default/images/i_print.gif +0 -0
  162. skin/frontend/smarttheme/default/images/i_rss-big.png +0 -0
  163. skin/frontend/smarttheme/default/images/i_rss.gif +0 -0
  164. skin/frontend/smarttheme/default/images/icon-search-black.png +0 -0
  165. skin/frontend/smarttheme/default/images/icons-18-black.png +0 -0
  166. skin/frontend/smarttheme/default/images/icons-18-white.png +0 -0
  167. skin/frontend/smarttheme/default/images/icons-36-black.png +0 -0
  168. skin/frontend/smarttheme/default/images/icons-36-white.png +0 -0
  169. skin/frontend/smarttheme/default/images/logo.gif +0 -0
  170. skin/frontend/smarttheme/default/images/logo_email.gif +0 -0
  171. skin/frontend/smarttheme/default/images/logo_print.gif +0 -0
  172. skin/frontend/smarttheme/default/images/magnifier_handle.gif +0 -0
  173. skin/frontend/smarttheme/default/images/media/callout1.jpg +0 -0
  174. skin/frontend/smarttheme/default/images/media/footer_callout.png +0 -0
  175. skin/frontend/smarttheme/default/images/media/fpo_no_crosssell.gif +0 -0
  176. skin/frontend/smarttheme/default/images/media/home_co_bottom.gif +0 -0
  177. skin/frontend/smarttheme/default/images/media/home_co_br.gif +0 -0
  178. skin/frontend/smarttheme/default/images/media/home_co_main.jpg +0 -0
  179. skin/frontend/smarttheme/default/images/media/home_co_tr.gif +0 -0
  180. skin/frontend/smarttheme/default/images/media/left_col_callout.jpg +0 -0
  181. skin/frontend/smarttheme/default/images/opc-ajax-loader.gif +0 -0
  182. skin/frontend/smarttheme/default/images/pager_arrow_left.gif +0 -0
  183. skin/frontend/smarttheme/default/images/pager_arrow_right.gif +0 -0
  184. skin/frontend/smarttheme/default/images/slider_bg.gif +0 -0
  185. skin/frontend/smarttheme/default/images/slider_btn_zoom_in.gif +0 -0
  186. skin/frontend/smarttheme/default/images/slider_btn_zoom_out.gif +0 -0
  187. skin/frontend/smarttheme/default/images/spacer.gif +0 -0
  188. skin/frontend/smarttheme/default/images/validation_advice_bg.gif +0 -0
  189. skin/frontend/smarttheme/default/images/widgets/i_widget-link.gif +0 -0
  190. skin/frontend/smarttheme/default/jquery-1.6.2.min.js +18 -0
  191. skin/frontend/smarttheme/default/jquery.mobile-1.0b3.js +6657 -0
  192. skin/frontend/smarttheme/default/jquery.mobile-1.0b3.min.css +8 -0
  193. skin/frontend/smarttheme/default/jquery.mobile-1.0b3.min.js +169 -0
  194. skin/frontend/smarttheme/default/main.css +7 -0
  195. skin/frontend/smarttheme/default/main.js +30 -0
  196. smarttheme.php +26 -0
app/design/frontend/smarttheme/default/layout/bundle.xml ADDED
@@ -0,0 +1,333 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+
31
+ <!--
32
+ Adding custom product price block
33
+ -->
34
+
35
+ <catalog_category_default>
36
+ <reference name="product_list">
37
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
38
+ </reference>
39
+ </catalog_category_default>
40
+
41
+ <catalog_category_view>
42
+ <reference name="product_list">
43
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
44
+ </reference>
45
+ </catalog_category_view>
46
+
47
+ <catalog_category_layered>
48
+ <reference name="product_list">
49
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
50
+ </reference>
51
+ </catalog_category_layered>
52
+
53
+ <catalog_product_compare_index>
54
+ <reference name="catalog.compare.list">
55
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
56
+ </reference>
57
+ </catalog_product_compare_index>
58
+
59
+ <catalogsearch_result_index>
60
+ <reference name="search_result_list">
61
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
62
+ </reference>
63
+ </catalogsearch_result_index>
64
+
65
+ <catalogsearch_advanced_result>
66
+ <reference name="search_result_list">
67
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
68
+ </reference>
69
+ </catalogsearch_advanced_result>
70
+
71
+ <tag_product_list>
72
+ <reference name="search_result_list">
73
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
74
+ </reference>
75
+ </tag_product_list>
76
+
77
+ <tag_customer_view>
78
+ <reference name="customer_view">
79
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
80
+ </reference>
81
+ </tag_customer_view>
82
+
83
+ <default>
84
+ <reference name="cart_sidebar">
85
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
86
+ </reference>
87
+ <reference name="wishlist_sidebar">
88
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
89
+ </reference>
90
+ <reference name="catalog_product_price_template">
91
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
92
+ </reference>
93
+ </default>
94
+
95
+ <wishlist_index_index>
96
+ <reference name="customer.wishlist">
97
+ <action method="addOptionsRenderCfg"><type>bundle</type><helper>bundle/catalog_product_configuration</helper></action>
98
+ </reference>
99
+ </wishlist_index_index>
100
+
101
+ <catalog_product_view>
102
+ <reference name="catalog.product.related">
103
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
104
+ </reference>
105
+ </catalog_product_view>
106
+
107
+ <!--
108
+ Partof block for simple products
109
+ -->
110
+
111
+ <PRODUCT_TYPE_simple>
112
+ <!--
113
+ <reference name="product.info.additional">
114
+
115
+ <block type="bundle/catalog_product_list_partof" before="-" name="product.info.partof" as="partof_products" template="bundle/catalog/product/list/partof.phtml">
116
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
117
+ </block>
118
+ -->
119
+ <reference name="product.info.upsell">
120
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
121
+ <action method="setItemLimit"><type>bundle</type><limit>4</limit></action>
122
+ </reference>
123
+ </PRODUCT_TYPE_simple>
124
+
125
+ <!--
126
+ Shopping cart item renderer (sidebar)
127
+ -->
128
+
129
+ <customer_account>
130
+ <reference name="cart_sidebar">
131
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
132
+ </reference>
133
+ </customer_account>
134
+
135
+ <!--
136
+ Shopping cart item renderer
137
+ -->
138
+
139
+ <checkout_cart_index>
140
+ <reference name="checkout.cart">
141
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
142
+ </reference>
143
+ <reference name="checkout.cart.crosssell">
144
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
145
+ </reference>
146
+ </checkout_cart_index>
147
+
148
+ <!--
149
+ Onepage Checkout Review Page
150
+ -->
151
+
152
+ <checkout_onepage_review>
153
+ <reference name="root">
154
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
155
+ </reference>
156
+ </checkout_onepage_review>
157
+
158
+ <checkout_multishipping_addresses>
159
+ <reference name="checkout_addresses">
160
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
161
+ </reference>
162
+ </checkout_multishipping_addresses>
163
+
164
+ <checkout_multishipping_shipping>
165
+ <reference name="checkout_shipping">
166
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
167
+ </reference>
168
+ <reference name="checkout_billing_items">
169
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
170
+ </reference>
171
+ </checkout_multishipping_shipping>
172
+
173
+ <checkout_multishipping_overview>
174
+ <reference name="checkout_overview">
175
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
176
+ </reference>
177
+ </checkout_multishipping_overview>
178
+
179
+ <paypal_express_review>
180
+ <reference name="paypal.express.review.details">
181
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
182
+ </reference>
183
+ </paypal_express_review>
184
+ <paypal_express_review_details>
185
+ <reference name="root">
186
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
187
+ </reference>
188
+ </paypal_express_review_details>
189
+
190
+ <paypaluk_express_review>
191
+ <reference name="paypal.express.review.details">
192
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
193
+ </reference>
194
+ </paypaluk_express_review>
195
+ <paypaluk_express_review_details>
196
+ <reference name="root">
197
+ <action method="addItemRender"><type>bundle</type><block>bundle/checkout_cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
198
+ </reference>
199
+ </paypaluk_express_review_details>
200
+
201
+ <!--
202
+ Additional block for bundle product type
203
+ -->
204
+
205
+ <PRODUCT_TYPE_bundle translate="label" module="bundle">
206
+ <label>Catalog Product View (Bundle)</label>
207
+ <reference name="head">
208
+ <!-- @todo action method="addItem"><type>skin_js</type><name>js/bundle.js</name></action-->
209
+ </reference>
210
+ <reference name="product.info">
211
+ <block type="bundle/catalog_product_view_type_bundle" name="product.info.bundle" as="product_type_data" template="bundle/catalog/product/view/type/bundle.phtml">
212
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
213
+ <block type="bundle/catalog_product_price" name="bundle.prices" as="bundle_prices" template="bundle/catalog/product/view/price.phtml" />
214
+ </block>
215
+ </reference>
216
+ <reference name="product.info.options.wrapper">
217
+ <block type="bundle/catalog_product_view_type_bundle" name="product.info.bundle.options" as="type_bundle_options" template="bundle/catalog/product/view/type/bundle/options.phtml">
218
+ <action method="addRenderer"><type>select</type><block>bundle/catalog_product_view_type_bundle_option_select</block></action>
219
+ <action method="addRenderer"><type>multi</type><block>bundle/catalog_product_view_type_bundle_option_multi</block></action>
220
+ <action method="addRenderer"><type>radio</type><block>bundle/catalog_product_view_type_bundle_option_radio</block></action>
221
+ <action method="addRenderer"><type>checkbox</type><block>bundle/catalog_product_view_type_bundle_option_checkbox</block></action>
222
+ </block>
223
+ <action method="insert"><block>product.info.bundle.options</block></action>
224
+ </reference>
225
+ <reference name="product.info.options.wrapper.bottom">
226
+ <remove name="product.tierprices" />
227
+ <block type="bundle/catalog_product_view" name="bundle.tierprices" as="tierprices" before="-" template="bundle/catalog/product/view/tierprices.phtml"/>
228
+ <block type="cataloginventory/qtyincrements" name="product.info.extrahint" as="extrahint" template="cataloginventory/qtyincrements.phtml"/>
229
+ </reference>
230
+ <reference name="product.clone_prices">
231
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/view/price.phtml</template></action>
232
+ </reference>
233
+ </PRODUCT_TYPE_bundle>
234
+
235
+ <sales_order_view>
236
+ <reference name="order_items">
237
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/sales/order/items/renderer.phtml</template></action>
238
+ </reference>
239
+ </sales_order_view>
240
+
241
+ <sales_order_invoice>
242
+ <reference name="invoice_items">
243
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/sales/order/invoice/items/renderer.phtml</template></action>
244
+ </reference>
245
+ </sales_order_invoice>
246
+
247
+ <sales_order_shipment>
248
+ <reference name="shipment_items">
249
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/sales/order/shipment/items/renderer.phtml</template></action>
250
+ </reference>
251
+ </sales_order_shipment>
252
+
253
+ <sales_order_creditmemo>
254
+ <reference name="creditmemo_items">
255
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/sales/order/creditmemo/items/renderer.phtml</template></action>
256
+ </reference>
257
+ </sales_order_creditmemo>
258
+
259
+ <!--
260
+ Print pages
261
+ -->
262
+
263
+ <sales_order_print>
264
+ <reference name="sales.order.print">
265
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/sales/order/items/renderer.phtml</template></action>
266
+ </reference>
267
+ </sales_order_print>
268
+
269
+ <sales_order_printinvoice>
270
+ <reference name="sales.order.print.invoice">
271
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/sales/order/invoice/items/renderer.phtml</template></action>
272
+ </reference>
273
+ </sales_order_printinvoice>
274
+
275
+ <sales_order_printshipment>
276
+ <reference name="sales.order.print.shipment">
277
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/sales/order/shipment/items/renderer.phtml</template></action>
278
+ </reference>
279
+ </sales_order_printshipment>
280
+
281
+ <sales_order_printcreditmemo>
282
+ <reference name="sales.order.print.creditmemo">
283
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/sales/order/creditmemo/items/renderer.phtml</template></action>
284
+ </reference>
285
+ </sales_order_printcreditmemo>
286
+
287
+ <!--
288
+ Emails
289
+ -->
290
+ <sales_email_order_items>
291
+ <reference name="items">
292
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/email/order/items/order/default.phtml</template></action>
293
+ </reference>
294
+ </sales_email_order_items>
295
+
296
+ <sales_email_order_invoice_items>
297
+ <reference name="items">
298
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/email/order/items/invoice/default.phtml</template></action>
299
+ </reference>
300
+ </sales_email_order_invoice_items>
301
+
302
+
303
+ <sales_email_order_shipment_items>
304
+ <reference name="items">
305
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/email/order/items/shipment/default.phtml</template></action>
306
+ </reference>
307
+ </sales_email_order_shipment_items>
308
+
309
+ <sales_email_order_creditmemo_items>
310
+ <reference name="items">
311
+ <action method="addItemRender"><type>bundle</type><block>bundle/sales_order_items_renderer</block><template>bundle/email/order/items/creditmemo/default.phtml</template></action>
312
+ </reference>
313
+ </sales_email_order_creditmemo_items>
314
+
315
+ <!--
316
+ RSS
317
+ -->
318
+ <rss_catalog_category>
319
+ <reference name="rss.catalog.category">
320
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/rss/catalog/product/price.phtml</template></action>
321
+ </reference>
322
+ </rss_catalog_category>
323
+ <rss_catalog_new>
324
+ <reference name="rss.catalog.new">
325
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/rss/catalog/product/price.phtml</template></action>
326
+ </reference>
327
+ </rss_catalog_new>
328
+ <rss_catalog_tag>
329
+ <reference name="rss.catalog.tag">
330
+ <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/rss/catalog/product/price.phtml</template></action>
331
+ </reference>
332
+ </rss_catalog_tag>
333
+ </layout>
app/design/frontend/smarttheme/default/layout/catalog.xml ADDED
@@ -0,0 +1,446 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ Supported layout update handles (action):
29
+ - catalog_product_gallery
30
+ - catalog_product_compare_index
31
+
32
+ Supported layout update handles (special):
33
+ - default
34
+ - catalog_category_default
35
+ - catalog_category_layered
36
+ - catalog_product_view
37
+
38
+ -->
39
+ <layout version="0.1.0">
40
+
41
+ <!--
42
+ Default layout, loads most of the pages
43
+ -->
44
+
45
+ <default>
46
+
47
+ <!-- Mage_Catalog -->
48
+ <reference name="top.menu">
49
+ <block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/>
50
+ </reference>
51
+ <reference name="left">
52
+ <block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
53
+ <action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
54
+ <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>
55
+ <action method="setLinkUrl"><url>checkout/cart</url></action>
56
+ </block>
57
+ </reference>
58
+ <reference name="right">
59
+ <block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
60
+ <block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">
61
+ <action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>
62
+ <action method="setImgAlt" translate="alt" module="catalog"><alt>Keep your eyes open for our special Back to School items and save A LOT!</alt></action>
63
+ </block>
64
+ </reference>
65
+ <reference name="footer_links">
66
+ <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
67
+ </reference>
68
+ <block type="catalog/product_price_template" name="catalog_product_price_template" />
69
+ </default>
70
+
71
+
72
+ <!--
73
+ Category default layout
74
+ -->
75
+
76
+ <catalog_category_default translate="label">
77
+ <label>Catalog Category (Non-Anchor)</label>
78
+ <reference name="left">
79
+ <block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
80
+ </reference>
81
+ <reference name="content">
82
+ <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
83
+ <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
84
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
85
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
86
+ <!-- The following code shows how to set your own pager increments -->
87
+ <!--
88
+ <action method="setDefaultListPerPage"><limit>4</limit></action>
89
+ <action method="setDefaultGridPerPage"><limit>9</limit></action>
90
+ <action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
91
+ <action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
92
+ <action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
93
+ <action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
94
+ <action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
95
+ -->
96
+ </block>
97
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
98
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
99
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
100
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
101
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
102
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
103
+ </block>
104
+ </block>
105
+ </reference>
106
+ </catalog_category_default>
107
+
108
+ <!--
109
+ Category layered navigation layout
110
+ -->
111
+
112
+ <catalog_category_layered translate="label">
113
+ <label>Catalog Category (Anchor)</label>
114
+ <reference name="left">
115
+ <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
116
+ </reference>
117
+ <reference name="content">
118
+ <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
119
+ <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
120
+ <!-- <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/su.phtml</template></action> -->
121
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
122
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
123
+ <!-- The following code shows how to set your own pager increments -->
124
+ <!--
125
+ <action method="setDefaultListPerPage"><limit>4</limit></action>
126
+ <action method="setDefaultGridPerPage"><limit>3</limit></action>
127
+ <action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
128
+ <action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
129
+ <action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
130
+ <action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
131
+ <action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
132
+ <action method="addPagerLimit"><mode>grid</mode><limit>3</limit></action>
133
+ <action method="addPagerLimit"><mode>grid</mode><limit>6</limit></action>
134
+ <action method="addPagerLimit"><mode>grid</mode><limit>9</limit></action>
135
+ <action method="addPagerLimit" translate="label"><mode>grid</mode><limit>all</limit><label>All</label></action>
136
+ -->
137
+ </block>
138
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
139
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
140
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
141
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
142
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
143
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
144
+ </block>
145
+ </block>
146
+ </reference>
147
+ </catalog_category_layered>
148
+
149
+ <catalog_category_layered_nochildren translate="label">
150
+ <label>Catalog Category (Without Subcategories)</label>
151
+ <remove name="right.reports.product.viewed" />
152
+ <reference name="right">
153
+ <block type="reports/product_viewed" before="right.permanent.callout" name="left.reports.product.viewed" template="reports/product_viewed.phtml" />
154
+ </reference>
155
+ </catalog_category_layered_nochildren>
156
+
157
+ <!--
158
+ Compare products page
159
+ -->
160
+
161
+ <catalog_product_compare_index translate="label">
162
+ <label>Catalog Product Compare List</label>
163
+ <!-- Mage_Catalog -->
164
+ <reference name="root">
165
+ <action method="setTemplate"><template>page/popup.phtml</template></action>
166
+ </reference>
167
+ <reference name="head">
168
+ <action method="addJs"><script>scriptaculous/scriptaculous.js</script></action>
169
+ <action method="addJs"><script>varien/product.js</script></action>
170
+ </reference>
171
+ <reference name="content">
172
+ <block type="catalog/product_compare_list" name="catalog.compare.list" template="catalog/product/compare/list.phtml"/>
173
+ </reference>
174
+ </catalog_product_compare_index>
175
+
176
+ <customer_account_index>
177
+ <reference name="right">
178
+ <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
179
+ </reference>
180
+ </customer_account_index>
181
+
182
+ <!--
183
+ Product view
184
+ -->
185
+
186
+ <catalog_product_view translate="label">
187
+ <label>Catalog Product View (Any)</label>
188
+ <!-- Mage_Catalog -->
189
+ <reference name="root">
190
+ <action method="setTemplate"><template>page/mobile-product.phtml</template></action>
191
+ </reference>
192
+ <reference name="head">
193
+ <!--action method="addJs"><script>varien/product.js</script></action>
194
+ <action method="addJs"><script>varien/configurable.js</script></action>
195
+
196
+ <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/></action>
197
+ <action method="addItem"><type>js</type><name>calendar/calendar.js</name></action>
198
+ <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name></action-->
199
+ </reference>
200
+ <reference name="content">
201
+ <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
202
+ <!--
203
+ <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/summary.phtml</template></action>
204
+ <action method="addReviewSummaryTemplate"><type>short</type><template>review/helper/summary_short.phtml</template></action>
205
+ <action method="addReviewSummaryTemplate"><type>...</type><template>...</template></action>
206
+ -->
207
+ <block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml"/>
208
+ <block type="core/text_list" name="alert.urls" as="alert_urls" translate="label">
209
+ <label>Alert Urls</label>
210
+ </block>
211
+
212
+ <action method="setTierPriceTemplate"><template>catalog/product/view/tierprices.phtml</template></action>
213
+
214
+ <block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
215
+ <action method="setColumnCount"><columns>4</columns></action>
216
+ <action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
217
+ </block>
218
+ <block type="catalog/product_view_additional" name="product.info.additional" as="product_additional_data">
219
+ <remove name="product_tag_list"/>
220
+ </block>
221
+
222
+ <block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
223
+ <action method="addToParentGroup"><group>detailed_info</group></action>
224
+ </block>
225
+
226
+ <!-- @todo
227
+ <block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
228
+ <action method="addToParentGroup"><group>detailed_info</group></action>
229
+ </block>
230
+
231
+ <block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
232
+ <block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>
233
+
234
+ <block type="core/text_list" name="product.info.extrahint" as="extrahint" translate="label">
235
+ <label>Product View Extra Hint</label>
236
+ </block-->
237
+
238
+ <block type="catalog/product_view" name="product.info.options.wrapper" as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml" translate="label">
239
+ <label>Info Column Options Wrapper</label>
240
+ <block type="core/template" name="options_js" template="catalog/product/view/options/js.phtml"/>
241
+ <block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
242
+ <action method="addOptionRenderer"><type>text</type><block>catalog/product_view_options_type_text</block><template>catalog/product/view/options/type/text.phtml</template></action>
243
+ <action method="addOptionRenderer"><type>file</type><block>catalog/product_view_options_type_file</block><template>catalog/product/view/options/type/file.phtml</template></action>
244
+ <action method="addOptionRenderer"><type>select</type><block>catalog/product_view_options_type_select</block><template>catalog/product/view/options/type/select.phtml</template></action>
245
+ <action method="addOptionRenderer"><type>date</type><block>catalog/product_view_options_type_date</block><template>catalog/product/view/options/type/date.phtml</template></action>
246
+ </block>
247
+ <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
248
+ </block>
249
+ <block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
250
+ <label>Bottom Block Options Wrapper</label>
251
+ <action method="insert"><block>product.tierprices</block></action>
252
+ <block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/>
253
+ <action method="append"><block>product.info.addtocart</block></action>
254
+ <action method="append"><block>product.info.addto</block></action>
255
+ </block>
256
+
257
+ <block type="core/template_facade" name="product.info.container1" as="container1">
258
+ <action method="setDataByKey"><key>alias_in_layout</key><value>container1</value></action>
259
+ <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
260
+ <action method="append"><block>product.info.options.wrapper</block></action>
261
+ <action method="append"><block>product.info.options.wrapper.bottom</block></action>
262
+ </block>
263
+ <block type="core/template_facade" name="product.info.container2" as="container2">
264
+ <action method="setDataByKey"><key>alias_in_layout</key><value>container2</value></action>
265
+ <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
266
+ <action method="append"><block>product.info.options.wrapper</block></action>
267
+ <action method="append"><block>product.info.options.wrapper.bottom</block></action>
268
+ </block>
269
+ <action method="unsetCallChild"><child>container1</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
270
+ <action method="unsetCallChild"><child>container2</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
271
+ </block>
272
+ </reference>
273
+ <reference name="right">
274
+ <block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
275
+ </reference>
276
+ </catalog_product_view>
277
+
278
+ <!--
279
+ Additional block dependant on product type
280
+ -->
281
+ <PRODUCT_TYPE_simple translate="label" module="catalog">
282
+ <label>Catalog Product View (Simple)</label>
283
+ <reference name="product.info">
284
+ <block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
285
+ <block type="core/text_list" name="product.info.simple.extra" as="product_type_data_extra" translate="label">
286
+ <label>Product Extra Info</label>
287
+ </block>
288
+ </block>
289
+ </reference>
290
+ </PRODUCT_TYPE_simple>
291
+ <PRODUCT_TYPE_configurable translate="label" module="catalog">
292
+ <label>Catalog Product View (Configurable)</label>
293
+ <reference name="product.info">
294
+ <block type="catalog/product_view_type_configurable" name="product.info.configurable" as="product_type_data" template="catalog/product/view/type/default.phtml">
295
+ <block type="core/text_list" name="product.info.configurable.extra" as="product_type_data_extra" translate="label">
296
+ <label>Product Extra Info</label>
297
+ </block>
298
+ </block>
299
+ </reference>
300
+ <reference name="product.info.options.wrapper">
301
+ <block type="catalog/product_view_type_configurable" name="product.info.options.configurable" as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml"/>
302
+ </reference>
303
+ </PRODUCT_TYPE_configurable>
304
+ <PRODUCT_TYPE_grouped translate="label" module="catalog">
305
+ <label>Catalog Product View (Grouped)</label>
306
+ <reference name="product.info">
307
+ <block type="catalog/product_view_type_grouped" name="product.info.grouped" as="product_type_data" template="catalog/product/view/type/grouped.phtml">
308
+ <block type="core/text_list" name="product.info.grouped.extra" as="product_type_data_extra" translate="label">
309
+ <label>Product Extra Info</label>
310
+ </block>
311
+ </block>
312
+ </reference>
313
+ </PRODUCT_TYPE_grouped>
314
+ <PRODUCT_TYPE_virtual translate="label" module="catalog">
315
+ <label>Catalog Product View (Virtual)</label>
316
+ <reference name="product.info">
317
+ <block type="catalog/product_view_type_virtual" name="product.info.virtual" as="product_type_data" template="catalog/product/view/type/default.phtml">
318
+ <block type="core/text_list" name="product.info.virtual.extra" as="product_type_data_extra" translate="label">
319
+ <label>Product Extra Info</label>
320
+ </block>
321
+ </block>
322
+ </reference>
323
+ </PRODUCT_TYPE_virtual>
324
+
325
+
326
+
327
+ <!--
328
+ Product send to friend
329
+ -->
330
+
331
+ <catalog_product_send translate="label">
332
+ <label>Catalog Product Email to a Friend</label>
333
+ <!-- Mage_Catalog -->
334
+ <reference name="root">
335
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
336
+ </reference>
337
+ <reference name="head">
338
+ <action method="addJs"><script>varien/product.js</script></action>
339
+ </reference>
340
+ <reference name="content">
341
+ <block type="catalog/product_send" name="product.send" template="catalog/product/send.phtml">
342
+ </block>
343
+ </reference>
344
+ </catalog_product_send>
345
+
346
+ <!--
347
+ Product additional images gallery popup
348
+ -->
349
+
350
+ <catalog_product_gallery translate="label">
351
+ <label>Catalog Product Image Gallery Popup</label>
352
+ <!-- Mage_Catalog -->
353
+ <reference name="root">
354
+ <action method="setTemplate"><template>page/popup.phtml</template></action>
355
+ </reference>
356
+ <reference name="content">
357
+ <block type="catalog/product_gallery" name="catalog_product_gallery" template="catalog/product/gallery.phtml"/>
358
+ </reference>
359
+ </catalog_product_gallery>
360
+
361
+ <!--
362
+ SEO Site Map
363
+ -->
364
+
365
+ <catalog_seo_sitemap translate="label">
366
+ <label>Catalog Seo Sitemap (Common)</label>
367
+ <remove name="right"/>
368
+ <remove name="left"/>
369
+
370
+ <reference name="root">
371
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
372
+ </reference>
373
+ <reference name="content">
374
+ <block type="page/template_container" name="seo.sitemap.container" template="catalog/seo/sitemap/container.phtml">
375
+ <block type="page/template_links" name="seo.sitemap.links" as="links" template="page/template/links.phtml"/>
376
+ <block type="page/html_pager" name="seo.sitemap.pager.top" as="pager_top" template="page/html/pager.phtml"/>
377
+ <block type="page/html_pager" name="seo.sitemap.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
378
+ </block>
379
+ </reference>
380
+ </catalog_seo_sitemap>
381
+
382
+ <catalog_seo_sitemap_category translate="label">
383
+ <label>Catalog Seo Sitemap (Category List)</label>
384
+ <update handle="catalog_seo_sitemap" />
385
+ <reference name="seo.sitemap.container">
386
+ <action method="setTitle" translate="title" module="catalog"><title>Categories</title></action>
387
+ <block type="catalog/seo_sitemap_category" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
388
+ <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
389
+ <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
390
+ <action method="setItemsTitle" translate="title" module="catalog"><title>categories</title></action>
391
+ </block>
392
+ </reference>
393
+ <reference name="seo.sitemap.links">
394
+ <action method="addLink" translate="label title" module="catalog"><label>Products Sitemap</label><url helper="catalog/map/getProductUrl"/><title>Products Sitemap</title></action>
395
+ </reference>
396
+ </catalog_seo_sitemap_category>
397
+
398
+ <catalog_seo_sitemap_category_tree translate="label">
399
+ <label>Catalog Seo Sitemap (Category Tree)</label>
400
+ <reference name="seo.sitemap.container">
401
+ <remove name="seo.sitemap.pager.top" />
402
+ <remove name="seo.sitemap.pager.bottom" />
403
+ <block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.top" as="pager_top" template="page/html/pager.phtml"/>
404
+ <block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
405
+ <remove name="seo.sitemap.sitemap" />
406
+ <block type="catalog/seo_sitemap_tree_category" name="seo.sitemap.sitemap_tree" as="sitemap" after="pager_top" template="catalog/seo/tree.phtml">
407
+ <action method="bindPager"><pager>seo.sitemap.tree.pager.top</pager></action>
408
+ <action method="bindPager"><pager>seo.sitemap.tree.pager.bottom</pager></action>
409
+ </block>
410
+ </reference>
411
+ </catalog_seo_sitemap_category_tree>
412
+
413
+ <catalog_seo_sitemap_product translate="label">
414
+ <label>Catalog Seo Sitemap (Product List)</label>
415
+ <update handle="catalog_seo_sitemap" />
416
+ <reference name="seo.sitemap.container">
417
+ <action method="setTitle" translate="title" module="catalog"><title>Products</title></action>
418
+ <block type="catalog/seo_sitemap_product" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
419
+ <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
420
+ <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
421
+ <action method="setItemsTitle" translate="title" module="catalog"><title>products</title></action>
422
+ </block>
423
+ </reference>
424
+ <reference name="seo.sitemap.links">
425
+ <action method="addLink" translate="label title" module="catalog"><label>Categories Sitemap</label><url helper="catalog/map/getCategoryUrl"/><title>Categories Sitemap</title></action>
426
+ </reference>
427
+ </catalog_seo_sitemap_product>
428
+
429
+
430
+ <!--
431
+ Catalog search terms block
432
+ -->
433
+
434
+ <catalog_seo_searchterm_popular translate="label">
435
+ <label>Catalog Seo Popular Search Terms</label>
436
+ <remove name="right"/>
437
+ <remove name="left"/>
438
+ <reference name="root">
439
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
440
+ </reference>
441
+ <reference name="content">
442
+ <block type="catalog/seo_searchterm" name="seo.searchterm" template="catalog/seo/searchterm.phtml"/>
443
+ </reference>
444
+ </catalog_seo_searchterm_popular>
445
+
446
+ </layout>
app/design/frontend/smarttheme/default/layout/catalogsearch.xml ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+
31
+ <default>
32
+ <reference name="header">
33
+ <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
34
+ </reference>
35
+ <reference name="footer_links">
36
+ <action method="addLink" translate="label title" module="catalogsearch" ifconfig="catalog/seo/search_terms">
37
+ <label>Search Terms</label>
38
+ <url helper="catalogsearch/getSearchTermUrl" />
39
+ <title>Search Terms</title>
40
+ </action>
41
+ <action method="addLink" translate="label title" module="catalogsearch">
42
+ <label>Advanced Search</label>
43
+ <url helper="catalogsearch/getAdvancedSearchUrl" />
44
+ <title>Advanced Search</title>
45
+ </action>
46
+ </reference>
47
+ </default>
48
+
49
+ <catalogsearch_result_index translate="label">
50
+ <label>Quick Search Form</label>
51
+ <reference name="root">
52
+ <action method="setTemplate"><template>page/3columns.phtml</template></action>
53
+ </reference>
54
+ <reference name="left">
55
+ <block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>
56
+ </reference>
57
+ <reference name="content">
58
+ <block type="catalogsearch/result" name="search.result" template="catalogsearch/result.phtml">
59
+ <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
60
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
61
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
62
+ </block>
63
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
64
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
65
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
66
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
67
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
68
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
69
+ </block>
70
+ <action method="setListOrders"/>
71
+ <action method="setListModes"/>
72
+ <action method="setListCollection"/>
73
+ </block>
74
+ </reference>
75
+ </catalogsearch_result_index>
76
+
77
+ <catalogsearch_advanced_index translate="label">
78
+ <label>Advanced Search Form</label>
79
+ <!-- Mage_Catalogsearch -->
80
+ <reference name="root">
81
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
82
+ </reference>
83
+ <reference name="head">
84
+ <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
85
+ <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
86
+ <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
87
+ </reference>
88
+ <reference name="content">
89
+ <block type="catalogsearch/advanced_form" name="catalogsearch_advanced_form" template="catalogsearch/advanced/form.phtml"/>
90
+ <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
91
+ </reference>
92
+ </catalogsearch_advanced_index>
93
+
94
+ <!--
95
+ Advanced search results
96
+ -->
97
+
98
+ <catalogsearch_advanced_result translate="label">
99
+ <label>Advanced Search Result</label>
100
+ <update handle="page_two_columns_right" />
101
+ <!-- Mage_Catalogsearch -->
102
+ <reference name="root">
103
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
104
+ </reference>
105
+ <reference name="content">
106
+ <block type="catalogsearch/advanced_result" name="catalogsearch_advanced_result" template="catalogsearch/advanced/result.phtml">
107
+ <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
108
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
109
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
110
+ </block>
111
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
112
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
113
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
114
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
115
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
116
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
117
+ </block>
118
+ <action method="setListOrders"/>
119
+ <action method="setListModes"/>
120
+ <action method="setListCollection"/>
121
+ </block>
122
+ </reference>
123
+ </catalogsearch_advanced_result>
124
+
125
+ <catalogsearch_term_popular translate="label">
126
+ <label>Popular Search Terms</label>
127
+ <remove name="right"/>
128
+ <remove name="left"/>
129
+
130
+ <reference name="root">
131
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
132
+ </reference>
133
+ <reference name="content">
134
+ <block type="catalogsearch/term" name="seo.searchterm" template="catalogsearch/term.phtml"/>
135
+ </reference>
136
+ </catalogsearch_term_popular>
137
+
138
+ </layout>
app/design/frontend/smarttheme/default/layout/checkout.xml ADDED
@@ -0,0 +1,436 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+
31
+ <!--
32
+ Default layout, loads most of the pages
33
+ -->
34
+
35
+ <default>
36
+
37
+ <!-- Mage_Checkout -->
38
+ <reference name="top.links">
39
+ <block type="checkout/links" name="checkout_cart_link">
40
+ <action method="addCartLink"></action>
41
+ <action method="addCheckoutLink"></action>
42
+ </block>
43
+ </reference>
44
+ <reference name="right">
45
+ <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
46
+ <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
47
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
48
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
49
+ <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
50
+ <label>Shopping Cart Sidebar Extra Actions</label>
51
+ </block>
52
+ </block>
53
+ </reference>
54
+ </default>
55
+
56
+ <checkout_cart_index translate="label">
57
+ <label>Shopping Cart</label>
58
+ <remove name="right"/>
59
+ <remove name="left"/>
60
+ <!-- Mage_Checkout -->
61
+ <reference name="root">
62
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
63
+ </reference>
64
+ <reference name="content">
65
+ <block type="checkout/cart" name="checkout.cart">
66
+ <action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
67
+ <action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
68
+ <action method="chooseTemplate"/>
69
+ <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
70
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
71
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>
72
+
73
+ <block type="core/text_list" name="checkout.cart.top_methods" as="top_methods" translate="label">
74
+ <label>Payment Methods Before Checkout Button</label>
75
+ <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
76
+ </block>
77
+
78
+ <block type="page/html_wrapper" name="checkout.cart.form.before" as="form_before" translate="label">
79
+ <label>Shopping Cart Form Before</label>
80
+ </block>
81
+
82
+ <block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
83
+ <label>Payment Methods After Checkout Button</label>
84
+ <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
85
+ <block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
86
+ </block>
87
+
88
+ <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
89
+ <block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
90
+ <block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
91
+
92
+ <block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
93
+ </block>
94
+ </reference>
95
+ <block type="core/text_list" name="additional.product.info" translate="label">
96
+ <label>Additional Product Info</label>
97
+ </block>
98
+ </checkout_cart_index>
99
+
100
+ <checkout_cart_configure translate="label">
101
+ <label>Configure Cart Item</label>
102
+ <update handle="catalog_product_view"/>
103
+ <reference name="product.info">
104
+ <block type="checkout/cart_item_configure" name="checkout.cart.item.configure.block"></block>
105
+ </reference>
106
+ </checkout_cart_configure>
107
+
108
+ <!--
109
+ Multi address shipping checkout main layout,
110
+ will be rendered on all checkout pages
111
+ -->
112
+
113
+ <checkout_multishipping translate="label">
114
+ <label>Multishipping Checkout</label>
115
+ <!-- Mage_Checkout -->
116
+ <remove name="right"/>
117
+ <remove name="left"/>
118
+
119
+ <reference name="root">
120
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
121
+ </reference>
122
+ <reference name="content">
123
+ <block type="checkout/multishipping_state" name="checkout_state" template="checkout/multishipping/state.phtml"/>
124
+ </reference>
125
+ </checkout_multishipping>
126
+
127
+ <checkout_multishipping_login>
128
+ <update handle="customer_account_login"/>
129
+ </checkout_multishipping_login>
130
+
131
+ <checkout_multishipping_register>
132
+ <update handle="customer_account_create"/>
133
+ </checkout_multishipping_register>
134
+
135
+ <!--
136
+ Multi address shipping checkout selection of address per item page
137
+ -->
138
+
139
+ <checkout_multishipping_address_select translate="label">
140
+ <label>Multishipping Checkout Shipping Address Selection</label>
141
+ <update handle="checkout_multishipping"/>
142
+ <!-- Mage_Checkout -->
143
+ <reference name="content">
144
+ <block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
145
+ </reference>
146
+ </checkout_multishipping_address_select>
147
+
148
+ <checkout_multishipping_address_selectbilling translate="label">
149
+ <label>Multishipping Checkout Billing Address Selection</label>
150
+ <update handle="checkout_multishipping"/>
151
+ <!-- Mage_Checkout -->
152
+ <reference name="content">
153
+ <block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
154
+ </reference>
155
+ </checkout_multishipping_address_selectbilling>
156
+
157
+
158
+ <checkout_multishipping_address_newshipping translate="label">
159
+ <label>Multishipping Checkout Shipping Address Creation</label>
160
+ <update handle="checkout_multishipping"/>
161
+ <update handle="checkout_multishipping_customer_address"/>
162
+ </checkout_multishipping_address_newshipping>
163
+
164
+ <checkout_multishipping_address_newbilling translate="label">
165
+ <label>Multishipping Checkout Billing Address Creation</label>
166
+ <update handle="checkout_multishipping"/>
167
+ <update handle="checkout_multishipping_customer_address"/>
168
+ </checkout_multishipping_address_newbilling>
169
+
170
+ <checkout_multishipping_address_editshipping translate="label">
171
+ <label>Multishipping Checkout Shipping Address Edit Form</label>
172
+ <update handle="checkout_multishipping"/>
173
+ <update handle="checkout_multishipping_customer_address"/>
174
+ </checkout_multishipping_address_editshipping>
175
+
176
+ <checkout_multishipping_address_editaddress>
177
+ <update handle="checkout_multishipping"/>
178
+ <update handle="checkout_multishipping_customer_address"/>
179
+ </checkout_multishipping_address_editaddress>
180
+
181
+ <checkout_multishipping_address_editbilling translate="label">
182
+ <label>Multishipping Checkout Billing Address Edit Form</label>
183
+ <update handle="checkout_multishipping"/>
184
+ <update handle="checkout_multishipping_customer_address"/>
185
+ </checkout_multishipping_address_editbilling>
186
+
187
+ <checkout_multishipping_customer_address translate="label">
188
+ <label>Multishipping Checkout Customer Address Edit Form</label>
189
+ <reference name="content">
190
+ <block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
191
+ </reference>
192
+ </checkout_multishipping_customer_address>
193
+
194
+ <!--
195
+ Multi address shipping checkout address page
196
+ -->
197
+
198
+ <checkout_multishipping_addresses translate="label">
199
+ <label>Multishipping Checkout Address (Any) Form</label>
200
+ <update handle="checkout_multishipping"/>
201
+ <!-- Mage_Checkout -->
202
+ <reference name="content">
203
+ <block type="checkout/multishipping_addresses" name="checkout_addresses" template="checkout/multishipping/addresses.phtml">
204
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
205
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
206
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
207
+ </block>
208
+ </reference>
209
+ </checkout_multishipping_addresses>
210
+
211
+ <!--
212
+ Multi address shipping checkout shipping information
213
+ -->
214
+
215
+ <checkout_multishipping_shipping translate="label">
216
+ <label>Multishipping Checkout Shipping Information Step</label>
217
+ <update handle="checkout_multishipping"/>
218
+ <!-- Mage_Checkout -->
219
+ <reference name="content">
220
+ <block type="checkout/multishipping_shipping" name="checkout_shipping" template="checkout/multishipping/shipping.phtml">
221
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
222
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
223
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
224
+
225
+ <block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
226
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
227
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
228
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
229
+ </block>
230
+ </block>
231
+ </reference>
232
+ </checkout_multishipping_shipping>
233
+
234
+ <!--
235
+ Multi address shipping checkout billing information
236
+ -->
237
+
238
+ <checkout_multishipping_billing translate="label">
239
+ <label>Multishipping Checkout Billing Information Step</label>
240
+ <update handle="checkout_multishipping"/>
241
+ <!-- Mage_Checkout -->
242
+ <reference name="content">
243
+ <block type="checkout/multishipping_billing" name="checkout_billing" template="checkout/multishipping/billing.phtml">
244
+ <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
245
+
246
+ <!--<block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
247
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
248
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
249
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
250
+ </block>-->
251
+
252
+ </block>
253
+ </reference>
254
+ </checkout_multishipping_billing>
255
+
256
+ <!--
257
+ Multi address shipping checkout overview
258
+ -->
259
+
260
+ <checkout_multishipping_overview translate="label">
261
+ <label>Multishipping Checkout Overview</label>
262
+ <update handle="checkout_multishipping"/>
263
+ <!-- Mage_Checkout -->
264
+ <reference name="content">
265
+ <block type="checkout/multishipping_overview" name="checkout_overview" template="checkout/multishipping/overview.phtml">
266
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
267
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
268
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
269
+ <action method="addRowItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/overview/item.phtml</template></action>
270
+ <action method="addRowItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/overview/item.phtml</template></action>
271
+ <block type="checkout/multishipping_payment_info" name="payment_info">
272
+ <action method="setInfoTemplate"><method></method><template></template></action>
273
+ </block>
274
+ <block type="checkout/agreements" name="checkout.multishipping.agreements" as="agreements" template="checkout/multishipping/agreements.phtml"/>
275
+ <block type="checkout/cart_totals" name="totals" />
276
+ <block type="core/text_list" name="checkout.multishipping.overview.items.after" as="items_after" translate="label">
277
+ <label>Overview Items After</label>
278
+ </block>
279
+ </block>
280
+ </reference>
281
+ </checkout_multishipping_overview>
282
+
283
+ <!--
284
+ Multi address shipping checkout success
285
+ -->
286
+
287
+ <checkout_multishipping_success translate="label">
288
+ <label>Multishipping Checkout Success</label>
289
+ <update handle="checkout_multishipping"/>
290
+ <!-- Mage_Checkout -->
291
+ <reference name="content">
292
+ <block type="checkout/multishipping_success" name="checkout_success" template="checkout/multishipping/success.phtml"/>
293
+ </reference>
294
+ </checkout_multishipping_success>
295
+
296
+ <!--
297
+ One page checkout main layout
298
+ -->
299
+
300
+ <checkout_onepage_index translate="label">
301
+ <label>One Page Checkout</label>
302
+ <!-- Mage_Checkout -->
303
+ <remove name="left"/>
304
+
305
+ <reference name="root">
306
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
307
+ </reference>
308
+ <reference name="right">
309
+ <action method="unsetChildren"></action>
310
+ <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
311
+ <label>Checkout Progress Wrapper</label>
312
+ <action method="setElementId"><value>checkout-progress-wrapper</value></action>
313
+ <block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml"/>
314
+ </block>
315
+ </reference>
316
+ <reference name="content">
317
+ <block type="checkout/onepage" name="checkout.onepage" template="checkout/onepage.phtml">
318
+ <block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml">
319
+ <block type="page/html_wrapper" name="checkout.onepage.login.before" as="login_before" translate="label">
320
+ <label>Login/Registration Before</label>
321
+ <action method="setMayBeInvisible"><value>1</value></action>
322
+ </block>
323
+ </block>
324
+ <block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/>
325
+ <block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="checkout/onepage/shipping.phtml"/>
326
+ <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="checkout/onepage/shipping_method.phtml">
327
+ <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/onepage/shipping_method/available.phtml"/>
328
+ <block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
329
+ </block>
330
+ <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="checkout/onepage/payment.phtml">
331
+ <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml">
332
+ <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
333
+ </block>
334
+ </block>
335
+ <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml"/>
336
+ </block>
337
+ </reference>
338
+ </checkout_onepage_index>
339
+
340
+ <!--
341
+ One page checkout progress block
342
+ -->
343
+
344
+ <checkout_onepage_progress>
345
+ <!-- Mage_Checkout -->
346
+ <remove name="right"/>
347
+ <remove name="left"/>
348
+
349
+ <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress.phtml">
350
+ <block type="checkout/onepage_payment_info" name="payment_info">
351
+ <action method="setInfoTemplate"><method></method><template></template></action>
352
+ </block>
353
+ </block>
354
+ </checkout_onepage_progress>
355
+
356
+ <!--
357
+ One page checkout payment methods block
358
+ -->
359
+ <checkout_onepage_paymentmethod>
360
+ <remove name="right"/>
361
+ <remove name="left"/>
362
+
363
+ <block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml">
364
+ <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
365
+ </block>
366
+ </checkout_onepage_paymentmethod>
367
+
368
+
369
+ <!--
370
+ One page checkout shipping methods block
371
+ -->
372
+
373
+ <checkout_onepage_shippingmethod>
374
+ <!-- Mage_Checkout -->
375
+ <remove name="right"/>
376
+ <remove name="left"/>
377
+
378
+ <block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="checkout/onepage/shipping_method/available.phtml"/>
379
+ </checkout_onepage_shippingmethod>
380
+
381
+ <checkout_onepage_additional>
382
+ <!-- Mage_Checkout -->
383
+ <remove name="right"/>
384
+ <remove name="left"/>
385
+
386
+ <block type="checkout/onepage_shipping_method_additional" name="root" output="toHtml" template="checkout/onepage/shipping_method/additional.phtml">
387
+ <action method="setDontDisplayContainer"><param>1</param></action>
388
+ </block>
389
+ </checkout_onepage_additional>
390
+
391
+ <!--
392
+ One page checkout order review block
393
+ -->
394
+
395
+ <checkout_onepage_review translate="label">
396
+ <label>One Page Checkout Overview</label>
397
+ <!-- Mage_Checkout -->
398
+ <remove name="right"/>
399
+ <remove name="left"/>
400
+
401
+ <block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml">
402
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
403
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
404
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item.phtml</template></action>
405
+ <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
406
+ <block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
407
+ <label>Items Before</label>
408
+ </block>
409
+ <block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
410
+ <label>Items After</label>
411
+ </block>
412
+ <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
413
+ <block type="core/template" name="checkout.onepage.review.button" as="button" template="checkout/onepage/review/button.phtml"/>
414
+ </block>
415
+ </checkout_onepage_review>
416
+
417
+ <checkout_onepage_success translate="label">
418
+ <label>One Page Checkout Success</label>
419
+ <reference name="root">
420
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
421
+ </reference>
422
+ <reference name="content">
423
+ <block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
424
+ </reference>
425
+ </checkout_onepage_success>
426
+ <checkout_onepage_failure translate="label">
427
+ <label>One Page Checkout Failure</label>
428
+ <reference name="root">
429
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
430
+ </reference>
431
+ <reference name="content">
432
+ <block type="checkout/onepage_failure" name="checkout.failure" template="checkout/onepage/failure.phtml"/>
433
+ </reference>
434
+ </checkout_onepage_failure>
435
+ <block type="core/list" name="additional.product.info"/>
436
+ </layout>
app/design/frontend/smarttheme/default/layout/cms.xml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <layout version="0.1.0">
29
+ <!--
30
+ Default layout, loads most of the pages
31
+ -->
32
+
33
+ <default>
34
+ <reference name="footer">
35
+ <block type="cms/block" name="cms_footer_links" before="footer_links">
36
+ <!--
37
+ The content of this block is taken from the database by its block_id.
38
+ You can manage it in admin CMS -> Static Blocks
39
+ -->
40
+ <action method="setBlockId"><block_id>footer_links</block_id></action>
41
+ </block>
42
+ </reference>
43
+ </default>
44
+
45
+ <cms_page translate="label">
46
+ <label>CMS Pages (All)</label>
47
+ <reference name="content">
48
+ <block type="core/template" name="page_content_heading" template="cms/content_heading.phtml"/>
49
+ <block type="page/html_wrapper" name="cms.wrapper" translate="label">
50
+ <label>CMS Content Wrapper</label>
51
+ <action method="setElementClass"><value>std</value></action>
52
+ <block type="cms/page" name="cms_page"/>
53
+ </block>
54
+ </reference>
55
+ </cms_page>
56
+
57
+ <cms_index_index translate="label">
58
+ <label>CMS Home Page</label>
59
+ </cms_index_index>
60
+
61
+ <cms_index_defaultindex>
62
+ <remove name="right"/>
63
+ <remove name="left"/>
64
+
65
+ <reference name="root">
66
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
67
+ </reference>
68
+ <reference name="content">
69
+ <block type="core/template" name="default_home_page" template="cms/default/home.phtml"/>
70
+ </reference>
71
+ </cms_index_defaultindex>
72
+
73
+ <cms_index_noroute translate="label">
74
+ <label>CMS No-Route Page</label>
75
+ </cms_index_noroute>
76
+
77
+ <cms_index_defaultnoroute>
78
+ <remove name="right"/>
79
+ <remove name="left"/>
80
+
81
+ <reference name="root">
82
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
83
+ </reference>
84
+ <reference name="content">
85
+ <block type="core/template" name="default_no_route" template="cms/default/no-route.phtml"/>
86
+ </reference>
87
+ </cms_index_defaultnoroute>
88
+
89
+ </layout>
app/design/frontend/smarttheme/default/layout/customer.xml ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ Supported layout update handles (action):
29
+ - customer_account_index
30
+ - customer_address_index
31
+ - customer_address_view
32
+ - customer_account_login
33
+ - customer_account_logoutsuccess
34
+ - customer_account_create
35
+ - customer_account_forgotpassword
36
+ - customer_account_confirmation
37
+ - customer_account_edit
38
+
39
+ Supported layout update handles (special):
40
+ - default
41
+
42
+ -->
43
+ <layout version="0.1.0">
44
+
45
+ <!--
46
+ Default layout, loads most of the pages
47
+ -->
48
+
49
+ <default>
50
+ <!-- Mage_Customer -->
51
+ <reference name="top.links">
52
+ <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
53
+ </reference>
54
+ </default>
55
+
56
+ <!--
57
+ Load this update on every page when customer is logged in
58
+ -->
59
+
60
+ <customer_logged_in>
61
+ <reference name="top.links">
62
+ <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
63
+ </reference>
64
+ </customer_logged_in>
65
+
66
+ <!--
67
+ Load this update on every page when customer is logged out
68
+ -->
69
+
70
+ <customer_logged_out>
71
+ <!---<reference name="right">
72
+ <block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
73
+ </reference>-->
74
+ <reference name="top.links">
75
+ <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
76
+ </reference>
77
+ <remove name="wishlist_sidebar"></remove>
78
+ <remove name="reorder"></remove>
79
+ </customer_logged_out>
80
+
81
+ <!--
82
+ Layout for customer login page
83
+ -->
84
+
85
+ <customer_account_login translate="label">
86
+ <label>Customer Account Login Form</label>
87
+ <!-- Mage_Customer -->
88
+ <remove name="right"/>
89
+ <remove name="left"/>
90
+
91
+ <reference name="root">
92
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
93
+ </reference>
94
+ <reference name="content">
95
+ <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
96
+ </reference>
97
+ </customer_account_login>
98
+
99
+ <!--
100
+ Layout for customer log out page
101
+ -->
102
+
103
+ <customer_account_logoutsuccess translate="label">
104
+ <label>Customer Account Logout Success</label>
105
+ <!-- Mage_Customer -->
106
+ <remove name="right"/>
107
+ <remove name="left"/>
108
+
109
+ <reference name="root">
110
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
111
+ </reference>
112
+ <reference name="content">
113
+ <block type="core/template" name="customer_logout" template="customer/logout.phtml"/>
114
+ </reference>
115
+ </customer_account_logoutsuccess>
116
+
117
+ <!--
118
+ New customer registration
119
+ -->
120
+
121
+ <customer_account_create translate="label">
122
+ <label>Customer Account Registration Form</label>
123
+ <!-- Mage_Customer -->
124
+ <remove name="right"/>
125
+ <remove name="left"/>
126
+
127
+ <reference name="root">
128
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
129
+ </reference>
130
+ <reference name="content">
131
+ <block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
132
+ <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
133
+ <label>Form Fields Before</label>
134
+ </block>
135
+ </block>
136
+ </reference>
137
+ </customer_account_create>
138
+
139
+ <customer_account_forgotpassword translate="label">
140
+ <label>Customer Forgot Password Form</label>
141
+ <remove name="right"/>
142
+ <remove name="left"/>
143
+
144
+ <reference name="root">
145
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
146
+ <action method="setHeaderTitle" translate="title" module="customer"><title>Password forgotten</title></action>
147
+ </reference>
148
+ <reference name="content">
149
+ <!--<block type="core/template" name="forgotPassword" template="customer/form/forgotpassword.phtml"/>-->
150
+ <block type="customer/account_forgotpassword" name="forgotPassword" template="customer/form/forgotpassword.phtml"/>
151
+ </reference>
152
+ </customer_account_forgotpassword>
153
+
154
+ <customer_account_confirmation>
155
+ <remove name="right"/>
156
+ <remove name="left"/>
157
+
158
+ <reference name="root">
159
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
160
+ <action method="setHeaderTitle" translate="title" module="customer"><title>Send confirmation link</title></action>
161
+ </reference>
162
+ <reference name="content">
163
+ <block type="core/template" name="accountConfirmation" template="customer/form/confirmation.phtml"/>
164
+ </reference>
165
+ </customer_account_confirmation>
166
+
167
+ <customer_account_edit translate="label">
168
+ <label>Customer Account Edit Form</label>
169
+ <update handle="customer_account"/>
170
+ <reference name="root">
171
+ <action method="setHeaderTitle" translate="title" module="customer"><title>Edit Account Info</title></action>
172
+ </reference>
173
+ <reference name="my.account.wrapper">
174
+ <block type="customer/form_edit" name="customer_edit" template="customer/form/edit.phtml"/>
175
+ </reference>
176
+
177
+ <reference name="left">
178
+ <action method="unsetChild"><name>left.permanent.callout</name></action>
179
+ </reference>
180
+ </customer_account_edit>
181
+
182
+ <!--
183
+ Customer account pages, rendered for all tabs in dashboard
184
+ -->
185
+
186
+ <customer_account translate="label">
187
+ <label>Customer My Account (All Pages)</label>
188
+ <!--remove name="catalog.compare.sidebar"/>
189
+ <remove name="sale.reorder.sidebar"/-->
190
+ <!-- Mage_Customer -->
191
+ <reference name="root">
192
+ <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
193
+ </reference>
194
+
195
+ <reference name="content">
196
+ <block type="page/html_wrapper" name="my.account.wrapper" translate="label">
197
+ <label>My Account Wrapper</label>
198
+ <action method="setElementClass"><value>my-account</value></action>
199
+ </block>
200
+ </reference>
201
+
202
+ <reference name="left">
203
+ <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
204
+ <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
205
+ <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
206
+ <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
207
+ </block>
208
+ <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml">
209
+ <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
210
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
211
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
212
+ </block>
213
+ <block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
214
+ <block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/>
215
+ <remove name="tags_popular"/>
216
+
217
+ </reference>
218
+ </customer_account>
219
+
220
+ <!--
221
+ Customer account home dashboard layout
222
+ -->
223
+
224
+ <customer_account_index translate="label">
225
+ <label>Customer My Account Dashboard</label>
226
+ <update handle="customer_account"/>
227
+ <!-- Mage_Customer -->
228
+ <reference name="root">
229
+ <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
230
+ </reference>
231
+ <reference name="my.account.wrapper">
232
+ <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
233
+ <block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
234
+ <block type="core/template" name="customer_account_dashboard_top" as="top" />
235
+ <block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
236
+ <block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
237
+ <block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/>
238
+ </block>
239
+ </reference>
240
+
241
+ </customer_account_index>
242
+
243
+ <!--
244
+ Customer account address book
245
+ -->
246
+
247
+ <customer_address_index translate="label">
248
+ <label>Customer My Account Address Book</label>
249
+ <!-- Mage_Customer -->
250
+ <update handle="customer_account"/>
251
+ <reference name="my.account.wrapper">
252
+ <block type="customer/address_book" name="address_book" template="customer/address/book.phtml"/>
253
+ </reference>
254
+ </customer_address_index>
255
+
256
+ <!--
257
+ Customer account address edit page
258
+ -->
259
+
260
+ <customer_address_form translate="label">
261
+ <label>Customer My Account Address Edit Form</label>
262
+ <!-- Mage_Customer -->
263
+ <update handle="customer_account"/>
264
+ <reference name="my.account.wrapper">
265
+ <block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
266
+ </reference>
267
+ </customer_address_form>
268
+
269
+ </layout>
app/design/frontend/smarttheme/default/layout/newsletter.xml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+
31
+ <!--
32
+ Default layout, loads most of the pages
33
+ -->
34
+
35
+ <default>
36
+
37
+ <!-- Mage_Newsletter -->
38
+ <reference name="left">
39
+ <block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml"/>
40
+ </reference>
41
+
42
+ </default>
43
+
44
+ <!--
45
+ Customer account pages, rendered for all tabs in dashboard
46
+ -->
47
+
48
+ <customer_account>
49
+ <!-- Mage_Newsletter -->
50
+ <reference name="customer_account_navigation">
51
+ <action method="addLink" translate="label" module="newsletter"><name>newsletter</name><path>newsletter/manage/</path><label>Newsletter Subscriptions</label></action>
52
+ </reference>
53
+ <remove name="left.newsletter"/>
54
+ </customer_account>
55
+
56
+ <newsletter_manage_index translate="label">
57
+ <label>Customer My Account Newsletter Subscriptions</label>
58
+ <update handle="customer_account"/>
59
+ <reference name="my.account.wrapper">
60
+ <block type="customer/newsletter" name="customer_newsletter">
61
+ <block type="page/html_wrapper" name="customer.newsletter.form.before" as="form_before" translate="label">
62
+ <label>Newsletter Subscription Form Before</label>
63
+ <action method="setMayBeInvisible"><value>1</value></action>
64
+ </block>
65
+ </block>
66
+ </reference>
67
+ </newsletter_manage_index>
68
+
69
+ </layout>
app/design/frontend/smarttheme/default/layout/page.xml ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <layout version="0.1.0">
29
+ <!--
30
+ Default layout, loads most of the pages
31
+ -->
32
+
33
+ <default translate="label" module="page">
34
+ <label>All Pages</label>
35
+ <block type="page/html" name="root" output="toHtml" template="page/mobile.phtml">
36
+
37
+ <block type="page/html_head" name="head" as="head">
38
+ <action method="addItem"><type>skin_js</type><name>jquery-1.6.2.min.js</name><params/></action>
39
+ <action method="addItem"><type>skin_js</type><name>main.js</name><params/></action>
40
+ <action method="addItem"><type>skin_js</type><name>jquery.mobile-1.0b3.js</name><params/></action>
41
+ <action method="addItem"><type>skin_css</type><name>jquery.mobile-1.0b3.min.css</name><params/></action>
42
+ <action method="addItem"><type>skin_css</type><name>main.css</name><params/></action>
43
+
44
+ <!--action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
45
+ <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
46
+ <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action-->
47
+ </block>
48
+
49
+ <block type="core/text_list" name="after_body_start" as="after_body_start" translate="label">
50
+ <label>Page Top</label>
51
+ </block>
52
+
53
+ <block type="page/html_notices" name="global_notices" as="global_notices" template="page/html/notices.phtml" />
54
+
55
+ <block type="page/html_header" name="header" as="header">
56
+ <block type="page/template_links" name="top.links" as="topLinks"/>
57
+ <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
58
+ <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
59
+ <label>Navigation Bar</label>
60
+ </block>
61
+ <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
62
+ <label>Page Header</label>
63
+ <action method="setElementClass"><value>top-container</value></action>
64
+ </block>
65
+ </block>
66
+
67
+ <!-- Mobile -->
68
+ <block type="page/html_header" name="header" as="header-mobile">
69
+ <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
70
+ </block>
71
+ <block type="page/template_links" name="top.links" as="topLinks"/>
72
+ <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
73
+ <label>Navigation Bar</label>
74
+ </block>
75
+ <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
76
+ <label>Page Header</label>
77
+ <action method="setElementClass"><value>top-container</value></action>
78
+ </block>
79
+ <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
80
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
81
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
82
+ <!-- The following code shows how to set your own pager increments -->
83
+ <!--
84
+ <action method="setDefaultListPerPage"><limit>4</limit></action>
85
+ <action method="setDefaultGridPerPage"><limit>9</limit></action>
86
+ <action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
87
+ <action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
88
+ <action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
89
+ <action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
90
+ <action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
91
+ -->
92
+ </block>
93
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
94
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
95
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
96
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
97
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
98
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
99
+ </block>
100
+ <!-- Mobile -->
101
+
102
+ <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
103
+
104
+ <block type="core/text_list" name="left" as="left" translate="label">
105
+ <label>Left Column</label>
106
+ </block>
107
+
108
+ <block type="core/messages" name="global_messages" as="global_messages"/>
109
+ <block type="core/messages" name="messages" as="messages"/>
110
+
111
+ <block type="core/text_list" name="content" as="content" translate="label">
112
+ <label>Main Content Area</label>
113
+ </block>
114
+
115
+ <block type="core/text_list" name="right" as="right" translate="label">
116
+ <label>Right Column</label>
117
+ </block>
118
+
119
+ <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
120
+ </block>
121
+ <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
122
+
123
+ </block>
124
+
125
+ <block type="core/profiler" output="toHtml" name="core_profiler"/>
126
+ </default>
127
+
128
+ <print translate="label" module="page">
129
+ <label>All Pages (Print Version)</label>
130
+ <!-- Mage_Page -->
131
+ <block type="page/html" name="root" output="toHtml" template="page/print.phtml">
132
+
133
+ <block type="page/html_head" name="head" as="head">
134
+ <action method="addJs"><script>prototype/prototype.js</script></action>
135
+ <action method="addJs"><script>mage/translate.js</script></action>
136
+ <action method="addJs"><script>lib/ccard.js</script></action>
137
+ <action method="addJs"><script>prototype/validation.js</script></action>
138
+ <action method="addJs"><script>varien/js.js</script></action>
139
+
140
+ <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
141
+ <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
142
+ <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
143
+ <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
144
+
145
+ <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
146
+ <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
147
+
148
+ </block>
149
+
150
+ <block type="core/text_list" name="content" as="content" translate="label">
151
+ <label>Main Content Area</label>
152
+ </block>
153
+
154
+ </block>
155
+ </print>
156
+
157
+ <!-- Custom page layout handles -->
158
+ <page_empty translate="label">
159
+ <label>All Empty Layout Pages</label>
160
+ <reference name="root">
161
+ <action method="setTemplate"><template>page/empty.phtml</template></action>
162
+ <!-- Mark root page block that template is applied -->
163
+ <action method="setIsHandle"><applied>1</applied></action>
164
+ </reference>
165
+ </page_empty>
166
+
167
+ <page_one_column translate="label">
168
+ <label>All One-Column Layout Pages</label>
169
+ <reference name="root">
170
+ <action method="setTemplate"><template>page/mobile.phtml</template></action>
171
+ <!-- Mark root page block that template is applied -->
172
+ <action method="setIsHandle"><applied>1</applied></action>
173
+ </reference>
174
+ </page_one_column>
175
+
176
+ <page_two_columns_left translate="label">
177
+ <label>All Two-Column Layout Pages (Left Column)</label>
178
+ <reference name="root">
179
+ <action method="setTemplate"><template>page/mobile.phtml</template></action>
180
+ <!-- Mark root page block that template is applied -->
181
+ <action method="setIsHandle"><applied>1</applied></action>
182
+ </reference>
183
+ </page_two_columns_left>
184
+
185
+ <page_two_columns_right translate="label">
186
+ <label>All Two-Column Layout Pages (Right Column)</label>
187
+ <reference name="root">
188
+ <action method="setTemplate"><template>page/mobile.phtml</template></action>
189
+ <!-- Mark root page block that template is applied -->
190
+ <action method="setIsHandle"><applied>1</applied></action>
191
+ </reference>
192
+ </page_two_columns_right>
193
+
194
+ <page_three_columns translate="label">
195
+ <label>All Three-Column Layout Pages</label>
196
+ <reference name="root">
197
+ <action method="setTemplate"><template>page/mobile.phtml</template></action>
198
+ <!-- Mark root page block that template is applied -->
199
+ <action method="setIsHandle"><applied>1</applied></action>
200
+ </reference>
201
+ </page_three_columns>
202
+
203
+ </layout>
app/design/frontend/smarttheme/default/layout/wishlist.xml ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+
31
+ <!--
32
+ Default layout, loads most of the pages
33
+ -->
34
+
35
+ <default>
36
+
37
+ <reference name="top.links">
38
+ <block type="wishlist/links" name="wishlist_link"/>
39
+ <action method="addLinkBlock"><blockName>wishlist_link</blockName></action>
40
+ </reference>
41
+
42
+ <!-- Mage_Wishlist -->
43
+ <reference name="right">
44
+ <block type="wishlist/customer_sidebar" name="wishlist_sidebar" as="wishlist" after="cart_sidebar" template="wishlist/sidebar.phtml"/>
45
+ </reference>
46
+ </default>
47
+
48
+ <!--
49
+ Customer account pages, rendered for all tabs in dashboard
50
+ -->
51
+
52
+ <customer_account>
53
+ <!-- Mage_Wishlist -->
54
+ <reference name="customer_account_navigation">
55
+ <action method="addLink" translate="label" module="wishlist" ifconfig="wishlist/general/active"><name>wishlist</name><path>wishlist/</path><label>My Wishlist</label></action>
56
+ </reference>
57
+ </customer_account>
58
+
59
+ <!--
60
+ Customer account home dashboard layout
61
+ -->
62
+
63
+ <customer_account_index>
64
+
65
+ <reference name="right">
66
+ <action method="unsetChild"><name>wishlist</name></action>
67
+ </reference>
68
+ </customer_account_index>
69
+
70
+ <!--
71
+ Wishlist pages
72
+ -->
73
+
74
+ <wishlist_index_index translate="label">
75
+ <label>Customer My Account My Wishlist</label>
76
+ <!-- Mage_Wishlist -->
77
+ <update handle="customer_account"/>
78
+ <reference name="my.account.wrapper">
79
+ <block type="wishlist/customer_wishlist" name="customer.wishlist" template="wishlist/view.phtml">
80
+ <block type="wishlist/customer_wishlist_item_options" name="customer.wishlist.item.options" as="item_options"/>
81
+ </block>
82
+ </reference>
83
+ <reference name="right">
84
+ <action method="unsetChild"><name>wishlist_customer_sidebar</name></action>
85
+ </reference>
86
+ </wishlist_index_index>
87
+
88
+ <wishlist_index_share translate="label">
89
+ <label>Customer My Account Wishlist Sharing Form</label>
90
+ <!-- Mage_Wishlist -->
91
+ <update handle="customer_account"/>
92
+ <reference name="my.account.wrapper">
93
+ <block type="wishlist/customer_sharing" name="wishlist.sharing" template="wishlist/sharing.phtml"/>
94
+ </reference>
95
+ <reference name="right">
96
+ <action method="unsetChild"><name>wishlist_customer_sidebar</name></action>
97
+ </reference>
98
+ </wishlist_index_share>
99
+
100
+ <wishlist_index_configure translate="label">
101
+ <label>Configure Wishlist Item</label>
102
+ <update handle="catalog_product_view"/>
103
+ <reference name="product.info">
104
+ <block type="wishlist/item_configure" name="product.info.addto" as="addto" template="wishlist/item/configure/addto.phtml"/>
105
+ </reference>
106
+ <reference name="product.info.options.wrapper.bottom">
107
+ <action method="unsetChild"><name>product.info.addto</name></action>
108
+ <action method="append"><block>product.info.addto</block></action>
109
+ </reference>
110
+ </wishlist_index_configure>
111
+
112
+ <wishlist_shared_index translate="label">
113
+ <label>Customer Shared Wishlist View</label>
114
+ <!-- Mage_Wishlist -->
115
+ <reference name="content">
116
+ <block type="wishlist/share_wishlist" name="customer.wishlist" template="wishlist/shared.phtml"/>
117
+ </reference>
118
+ </wishlist_shared_index>
119
+ </layout>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/list/partof.phtml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($this->getItemCollection()->getSize()): ?>
28
+ <div class="box-collateral box-up-sell">
29
+ <h2><?php echo $this->__('This product is also part of bundle(s)') ?></h2>
30
+ <table class="products-grid" id="bundle-product-table">
31
+ <?php // $this->setColumnCount(4); // uncomment this line if you want to have another number of columns ?>
32
+ <?php $this->resetItemsIterator() ?>
33
+ <?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
34
+ <tr>
35
+ <?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
36
+ <?php if($_bundle=$this->getIterableItem()): ?>
37
+ <td>
38
+ <a href="<?php echo $_bundle->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_bundle->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_bundle, 'small_image')->resize(125) ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_bundle->getName()) ?>" /></a>
39
+ <h3 class="product-name"><a href="<?php echo $_bundle->getProductUrl() ?>"><?php echo $this->htmlEscape($_bundle->getName()) ?></a></h3>
40
+ <?php echo $this->getPriceHtml($_bundle, true) ?>
41
+ <?php echo $this->getReviewsSummaryHtml($_bundle) ?>
42
+ </td>
43
+ <?php else: ?>
44
+ <td class="empty">&nbsp;</td>
45
+ <?php endif; ?>
46
+ <?php endfor; ?>
47
+ </tr>
48
+ <?php endfor; ?>
49
+ </table>
50
+ <script type="text/javascript">decorateTable('bundle-product-table')</script>
51
+ </div>
52
+ <?php endif ?>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/price.phtml ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_product = $this->getProduct() ?>
28
+ <?php list($_minimalPriceTax, $_maximalPriceTax) = $_product->getPriceModel()->getPrices($_product) ?>
29
+ <?php list($_minimalPriceInclTax, $_maximalPriceInclTax) = $_product->getPriceModel()->getPricesDependingOnTax($_product, null, true) ?>
30
+ <?php $_id = $_product->getId() ?>
31
+
32
+ <?php $_weeeTaxAmount = 0; ?>
33
+
34
+ <?php
35
+ if ($_product->getPriceType() == 1) {
36
+ $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product);
37
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) {
38
+ $_minimalPriceTax += $_weeeTaxAmount;
39
+ $_minimalPriceInclTax += $_weeeTaxAmount;
40
+ }
41
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) {
42
+ $_minimalPriceInclTax += $_weeeTaxAmount;
43
+ }
44
+
45
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
46
+ $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
47
+ }
48
+ }
49
+ ?>
50
+
51
+ <div class="price-box">
52
+ <?php if ($_product->getPriceView()): ?>
53
+ <p class="minimal-price">
54
+ <span class="price-label"><?php echo $this->__('As low as') ?>:</span>
55
+ <?php if ($this->displayBothPrices()): ?>
56
+ <span class="price-excluding-tax">
57
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
58
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
59
+ </span>
60
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
61
+ <span class="weee">(<small>
62
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
63
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
64
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
65
+ <?php else: ?>
66
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
67
+ <?php endif; ?>
68
+
69
+ <?php echo $_weeeSeparator; ?>
70
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
71
+ <?php $_weeeSeparator = ' + '; ?>
72
+ <?php endforeach; ?>
73
+ </small>)</span>
74
+ <?php endif; ?>
75
+ <span class="price-including-tax">
76
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
77
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
78
+ </span>
79
+ <?php else: ?>
80
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
81
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
82
+ <span class="weee">(<small>
83
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
84
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
85
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
86
+ <?php else: ?>
87
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
88
+ <?php endif; ?>
89
+
90
+ <?php echo $_weeeSeparator; ?>
91
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
92
+ <?php $_weeeSeparator = ' + '; ?>
93
+ <?php endforeach; ?>
94
+ </small>)</span>
95
+ <?php endif; ?>
96
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
97
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
98
+ <?php endif; ?>
99
+ <?php endif; ?>
100
+ </p>
101
+ <?php else: ?>
102
+ <?php if ($_minimalPriceTax <> $_maximalPriceTax): ?>
103
+ <p class="price-from">
104
+ <span class="price-label"><?php echo $this->__('From') ?>:</span>
105
+ <?php if ($this->displayBothPrices()): ?>
106
+ <span class="price-excluding-tax">
107
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
108
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
109
+ </span>
110
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
111
+ <span class="weee">(<small>
112
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
113
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
114
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
115
+ <?php else: ?>
116
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
117
+ <?php endif; ?>
118
+
119
+ <?php echo $_weeeSeparator; ?>
120
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
121
+ <?php $_weeeSeparator = ' + '; ?>
122
+ <?php endforeach; ?>
123
+ </small>)</span>
124
+ <?php endif; ?>
125
+ <span class="price-including-tax">
126
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
127
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
128
+ </span>
129
+ <?php else: ?>
130
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
131
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
132
+ <span class="weee">(<small>
133
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
134
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
135
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
136
+ <?php else: ?>
137
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
138
+ <?php endif; ?>
139
+
140
+ <?php echo $_weeeSeparator; ?>
141
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
142
+ <?php $_weeeSeparator = ' + '; ?>
143
+ <?php endforeach; ?>
144
+ </small>)</span>
145
+ <?php endif; ?>
146
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
147
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
148
+ <?php endif; ?>
149
+ <?php endif; ?>
150
+ </p>
151
+ <?php
152
+ if ($_product->getPriceType() == 1) {
153
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) {
154
+ $_maximalPriceTax += $_weeeTaxAmount;
155
+ $_maximalPriceInclTax += $_weeeTaxAmount;
156
+ }
157
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) {
158
+ $_maximalPriceInclTax += $_weeeTaxAmount;
159
+ }
160
+ }
161
+ ?>
162
+ <p class="price-to">
163
+ <span class="price-label"><?php echo $this->__('To') ?>:</span>
164
+ <?php if ($this->displayBothPrices()): ?>
165
+ <span class="price-excluding-tax">
166
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
167
+ <?php echo Mage::helper('core')->currency($_maximalPriceTax) ?>
168
+ </span>
169
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
170
+ <span class="weee">(<small>
171
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
172
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
173
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
174
+ <?php else: ?>
175
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
176
+ <?php endif; ?>
177
+
178
+ <?php echo $_weeeSeparator; ?>
179
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
180
+ <?php $_weeeSeparator = ' + '; ?>
181
+ <?php endforeach; ?>
182
+ </small>)</span>
183
+ <?php endif; ?>
184
+ <span class="price-including-tax">
185
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax') ?></span>
186
+ <?php echo Mage::helper('core')->currency($_maximalPriceInclTax) ?>
187
+ </span>
188
+ <?php else: ?>
189
+ <?php echo Mage::helper('core')->currency($_maximalPriceTax) ?>
190
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
191
+ <span class="weee">(<small>
192
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
193
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
194
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
195
+ <?php else: ?>
196
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
197
+ <?php endif; ?>
198
+
199
+ <?php echo $_weeeSeparator; ?>
200
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
201
+ <?php $_weeeSeparator = ' + '; ?>
202
+ <?php endforeach; ?>
203
+ </small>)</span>
204
+ <?php endif; ?>
205
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
206
+ <?php echo Mage::helper('core')->currency($_maximalPriceInclTax) ?>
207
+ <?php endif; ?>
208
+ <?php endif; ?>
209
+ </p>
210
+ <?php else: ?>
211
+ <?php if ($this->displayBothPrices()): ?>
212
+ <span class="price-excluding-tax">
213
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
214
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
215
+ </span>
216
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
217
+ <span class="weee">(<small>
218
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
219
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
220
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
221
+ <?php else: ?>
222
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
223
+ <?php endif; ?>
224
+
225
+ <?php echo $_weeeSeparator; ?>
226
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
227
+ <?php $_weeeSeparator = ' + '; ?>
228
+ <?php endforeach; ?>
229
+ </small>)</span>
230
+ <?php endif; ?>
231
+ <span class="price-including-tax">
232
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
233
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
234
+ </span>
235
+ <?php else: ?>
236
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
237
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
238
+ <span class="weee">(<small>
239
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
240
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
241
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
242
+ <?php else: ?>
243
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
244
+ <?php endif; ?>
245
+
246
+ <?php echo $_weeeSeparator; ?>
247
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
248
+ <?php $_weeeSeparator = ' + '; ?>
249
+ <?php endforeach; ?>
250
+ </small>)</span>
251
+ <?php endif; ?>
252
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
253
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
254
+ <?php endif; ?>
255
+ <?php endif; ?>
256
+ <?php endif; ?>
257
+ <?php endif; ?>
258
+ </div>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/options/notice.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/price.phtml ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_product = $this->getProduct() ?>
28
+ <?php $_finalPrice = Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()); ?>
29
+ <?php $_finalPriceInclTax = Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice(), true); ?>
30
+ <?php $_weeeTaxAmount = 0; ?>
31
+ <?php
32
+ if ($_product->getPriceType() == 1) {
33
+ $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product);
34
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
35
+ $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
36
+ }
37
+ }
38
+ ?>
39
+
40
+ <!-- @todo div class="price-box">
41
+ <p class="price-as-configured">
42
+ <span class="price-label"><?php echo $this->helper('bundle')->__('Price as configured') ?>:</span>
43
+ <?php if ($this->displayBothPrices()): ?>
44
+ <span class="price-tax">
45
+ <span class="price-excluding-tax">
46
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
47
+ <span class="price" id="price-excluding-tax-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
48
+ </span>
49
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
50
+ <span class="weee">(<small>
51
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
52
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
53
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
54
+ <?php else: ?>
55
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
56
+ <?php endif; ?>
57
+
58
+ <?php echo $_weeeSeparator; ?>
59
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
60
+ <?php $_weeeSeparator = ' + '; ?>
61
+ <?php endforeach; ?>
62
+ </small>)</span>
63
+ <?php endif; ?>
64
+ <span class="price-including-tax">
65
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
66
+ <span class="price" id="price-including-tax-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax,true,false) ?></span>
67
+ </span>
68
+ </span>
69
+ <?php else: ?>
70
+ <span class="price" id="product-price-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
71
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
72
+ <span class="weee">(<small>
73
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
74
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
75
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
76
+ <?php else: ?>
77
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
78
+ <?php endif; ?>
79
+
80
+ <?php echo $_weeeSeparator; ?>
81
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
82
+ <?php $_weeeSeparator = ' + '; ?>
83
+ <?php endforeach; ?>
84
+ </small>)</span>
85
+ <?php endif; ?>
86
+ <?php endif; ?>
87
+ </p>
88
+ </div -->
89
+ <?php /* @todo if($_product->isSaleable()): ?>
90
+ <script type="text/javascript">
91
+ bundle.reloadPrice();
92
+ </script>
93
+ <?php endif; */ ?>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/tierprices.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ /**
30
+ * @see Mage_Catalog_Block_Product_View
31
+ */
32
+ $_product = $this->getProduct();
33
+ $_tierPrices = $this->getTierPrices();
34
+ ?>
35
+ <?php if (count($_tierPrices) > 0): ?>
36
+ <ul class="tier-prices product-pricing">
37
+ <?php foreach($_tierPrices as $_price): ?>
38
+ <li><?php echo $this->__('Buy %1$s with %2$s discount each', $_price['price_qty'], '<strong class="benefit">'.($_price['price']*1).'%</strong>') ?></li>
39
+ <?php endforeach ?>
40
+ </ul>
41
+ <?php endif;?>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+ <?php $_product = $this->getProduct() ?>
29
+
30
+ <?php /* @todo if($_product->isSaleable()): ?>
31
+ <script type="text/javascript">
32
+ //<![CDATA[
33
+ var bundle = new Product.Bundle(<?php echo $this->getJsonConfig() ?>);
34
+ //]]>
35
+ </script>
36
+ <?php endif; */ ?>
37
+ <?php if ($_product->isAvailable()): ?>
38
+ <p class="availability in-stock"><?php echo $this->helper('catalog')->__('Availability:') ?> <span><?php echo $this->helper('catalog')->__('In stock') ?></span></p>
39
+ <?php else: ?>
40
+ <p class="availability out-of-stock"><?php echo $this->helper('catalog')->__('Availability:') ?> <span><?php echo $this->helper('catalog')->__('Out of stock') ?></span></p>
41
+ <?php endif; ?>
42
+ <div class="price-box-bundle">
43
+ <?php echo $this->getPriceHtml($_product) ?>
44
+ </div>
45
+ <?php echo $this->getChildHtml('bundle_prices') ?>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+
29
+ <?php /* @var $this Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Checkbox */ ?>
30
+ <?php $_option = $this->getOption() ?>
31
+ <?php $_selections = $_option->getSelections() ?>
32
+
33
+ <div data-role="fieldcontain">
34
+ <fieldset data-role="controlgroup">
35
+ <label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->htmlEscape($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label>
36
+ <?php if (count($_selections) == 1 && $_option->getRequired()): ?>
37
+ <?php echo $this->getSelectionQtyTitlePrice($_selections[0]) ?>
38
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>"/>
39
+ <?php else:?>
40
+ <?php foreach($_selections as $_selection): ?>
41
+ <input onclick="bundle.changeSelection(this)" class="change-container-classname checkbox bundle-option-<?php echo $_option->getId() ?> <?php if ($_option->getRequired()) echo 'validate-one-required-by-name' ?>" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" type="checkbox" name="bundle_option[<?php echo $_option->getId() ?>][]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?> value="<?php echo $_selection->getSelectionId() ?>"/>
42
+ <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionQtyTitlePrice($_selection) ?></label></span>
43
+ <?php if($_option->getRequired()): ?>
44
+ <?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?>
45
+ <?php endif; ?>
46
+ <?php endforeach; ?>
47
+ <div id="bundle-option-<?php echo $_option->getId() ?>-container"></div>
48
+ <?php endif; ?>
49
+
50
+ </fieldset>
51
+ </div>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+
29
+ <?php /* @var $this Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Multi */ ?>
30
+ <?php $_option = $this->getOption() ?>
31
+ <?php $_selections = $_option->getSelections() ?>
32
+
33
+ <div data-role="fieldcontain">
34
+ <fieldset data-role="controlgroup">
35
+ <label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->htmlEscape($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label>
36
+ <?php if (count($_selections) == 1 && $_option->getRequired()): ?>
37
+ <?php echo $this->getSelectionQtyTitlePrice($_selections[0]) ?>
38
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>"/>
39
+ <?php else:?>
40
+ <?php foreach($_selections as $_selection): ?>
41
+ <input class="change-container-classname checkbox bundle-option-<?php echo $_option->getId() ?> <?php if ($_option->getRequired()) echo 'validate-one-required-by-name' ?>" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" type="checkbox" name="bundle_option[<?php echo $_option->getId() ?>][]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?> value="<?php echo $_selection->getSelectionId() ?>"/>
42
+ <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionQtyTitlePrice($_selection) ?></label></span>
43
+ <?php if($_option->getRequired()): ?>
44
+ <?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?>
45
+ <?php endif; ?>
46
+ <?php endforeach; ?>
47
+ <div id="bundle-option-<?php echo $_option->getId() ?>-container"></div>
48
+ <?php endif; ?>
49
+
50
+ </fieldset>
51
+ </div>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+
29
+ <?php /* @var $this Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Radio */ ?>
30
+ <?php $_option = $this->getOption(); ?>
31
+ <?php $_selections = $_option->getSelections(); ?>
32
+ <?php $_default = $_option->getDefaultSelection(); ?>
33
+ <?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
34
+
35
+ <div data-role="fieldcontain" class="options-list">
36
+ <fieldset data-role="controlgroup">
37
+ <label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->htmlEscape($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label>
38
+ <?php if ($this->_showSingle()): ?>
39
+ <?php echo $this->getSelectionTitlePrice($_selections[0]) ?>
40
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>" />
41
+ <?php else:?>
42
+ <?php if (!$_option->getRequired()): ?>
43
+ <input type="radio" onclick="bundle.changeSelection(this)" class="radio" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php echo ($_default && $_default->isSalable())?'':' checked="checked" ' ?> value=""/>
44
+ <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>"><?php echo $this->__('None') ?></label></span>
45
+ <?php endif; ?>
46
+ <?php foreach ($_selections as $_selection): ?>
47
+ <input type="radio" onclick="bundle.changeSelection(this)" class="radio<?php echo $_option->getRequired()?' validate-one-required-by-name':'' ?> change-container-classname" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?>value="<?php echo $_selection->getSelectionId() ?>"/>
48
+ <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionTitlePrice($_selection) ?></label></span>
49
+ <?php if ($_option->getRequired()): ?>
50
+ <?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?>
51
+ <?php endif; ?>
52
+ <?php endforeach; ?>
53
+ <div id="bundle-option-<?php echo $_option->getId() ?>-container"></div>
54
+ <?php endif; ?>
55
+ <!-- @todo span class="qty-holder">
56
+ <label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?>&nbsp;</label><input onkeyup="bundle.changeOptionQty(this, event)" onblur="bundle.changeOptionQty(this, event)" <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/>
57
+ </span -->
58
+
59
+ </fieldset>
60
+ </div>
app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+
29
+ <?php /* @var $this Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Select */ ?>
30
+ <?php $_option = $this->getOption(); ?>
31
+ <?php $_selections = $_option->getSelections(); ?>
32
+ <?php $_default = $_option->getDefaultSelection(); ?>
33
+ <?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
34
+
35
+ <label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->htmlEscape($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label>
36
+ <div class="input-box">
37
+ <?php if ($this->_showSingle()): ?>
38
+ <?php echo $this->getSelectionTitlePrice($_selections[0]) ?>
39
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>"/>
40
+ <?php else:?>
41
+ <select onchange="bundle.changeSelection(this)" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]" class="bundle-option-<?php echo $_option->getId() ?><?php if ($_option->getRequired()) echo ' required-entry' ?> bundle-option-select change-container-classname">
42
+ <option value=""><?php echo $this->__('Choose a selection...') ?></option>
43
+ <?php foreach ($_selections as $_selection): ?>
44
+ <option value="<?php echo $_selection->getSelectionId() ?>"<?php if ($this->_isSelected($_selection)) echo ' selected="selected"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?>><?php echo $this->getSelectionTitlePrice($_selection, false) ?></option>
45
+ <?php endforeach; ?>
46
+ </select>
47
+ <?php endif; ?>
48
+ </div>
49
+ <!-- @todo span class="qty-holder">
50
+ <label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?>&nbsp;</label><input onkeyup="bundle.changeOptionQty(this, event)" onblur="bundle.changeOptionQty(this, event)" <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/>
51
+ </span -->
app/design/frontend/smarttheme/default/template/bundle/catalog/product/view/type/bundle/options.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $_product = $this->getProduct(); ?>
29
+ <?php $_options = Mage::helper('core')->decorateArray($this->getOptions()); ?>
30
+ <?php if ($_product->isSaleable()):?>
31
+ <?php if (count($_options)): ?>
32
+ <dl>
33
+ <?php foreach ($_options as $_option): ?>
34
+ <?php if (!$_option->getSelections()): ?>
35
+ <?php continue; ?>
36
+ <?php endif; ?>
37
+ <?php echo $this->getOptionHtml($_option) ?>
38
+ <?php endforeach; ?>
39
+ </dl>
40
+ <?php else: ?>
41
+ <p><?php echo $this->__('No options of this product are available.') ?></p>
42
+ <?php endif; ?>
43
+ <?php endif;?>
app/design/frontend/smarttheme/default/template/callouts/left_col.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="block block-banner">
28
+ <div class="block-content">
29
+ <?php if(strtolower(substr($this->getLinkUrl(),0,4))==='http'): ?>
30
+ <a href="<?php echo $this->getLinkUrl() ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
31
+ <?php elseif($this->getLinkUrl()): ?>
32
+ <a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
33
+ <?php endif; ?>
34
+ <img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />
35
+ <?php if($this->getLinkUrl()): ?>
36
+ </a>
37
+ <?php endif ?>
38
+ </div>
39
+ </div>
app/design/frontend/smarttheme/default/template/catalog/category/view.phtml ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Category view template
30
+ *
31
+ * @see Mage_Catalog_Block_Category_View
32
+ */
33
+ ?>
34
+ <?php
35
+ $_helper = $this->helper('catalog/output');
36
+ $_category = $this->getCurrentCategory();
37
+ $_imgHtml = '';
38
+ if ($_imgUrl = $_category->getImageUrl()) {
39
+ $_imgHtml = '<p class="category-image"><img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" /></p>';
40
+ $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
41
+ }
42
+ ?>
43
+ <div class="page-title category-title">
44
+ <?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
45
+ <a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
46
+ <?php endif; ?>
47
+ <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
48
+ </div>
49
+
50
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
51
+
52
+ <?php if($_imgUrl): ?>
53
+ <?php echo $_imgHtml ?>
54
+ <?php endif; ?>
55
+
56
+ <?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
57
+ <div class="category-description std">
58
+ <?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
59
+ </div>
60
+ <?php endif; ?>
61
+
62
+ <?php if($this->isContentMode()): ?>
63
+ <?php echo $this->getCmsBlockHtml() ?>
64
+
65
+ <?php elseif($this->isMixedMode()): ?>
66
+ <?php echo $this->getCmsBlockHtml() ?>
67
+ <?php echo $this->getProductListHtml() ?>
68
+
69
+ <?php else: ?>
70
+ <?php echo $this->getProductListHtml() ?>
71
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/catalog/left.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Category left navigation
29
+ *
30
+ * @see Mage_Catalog_Block_Navigation
31
+ */
32
+ ?>
33
+ <?php if (!Mage::registry('current_category')) return ?>
34
+ <?php $_categories = $this->getCurrentChildCategories() ?>
35
+ <?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
36
+ <?php if($_count): ?>
37
+ <div class="block block-layered-nav">
38
+ <div class="block-title">
39
+ <strong><span><?php echo $this->__('Browse By') ?></span></strong>
40
+ </div>
41
+ <div class="block-content">
42
+ <dl id="narrow-by-list2">
43
+ <dt><?php echo $this->__('Category') ?></dt>
44
+ <dd>
45
+ <ol>
46
+ <?php foreach ($_categories as $_category): ?>
47
+ <?php if($_category->getIsActive()): ?>
48
+ <li>
49
+ <a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?php echo $this->htmlEscape($_category->getName()) ?></a> (<?php echo $_category->getProductCount() ?>)
50
+ </li>
51
+ <?php endif; ?>
52
+ <?php endforeach ?>
53
+ </ol>
54
+ </dd>
55
+ </dl>
56
+ <script type="text/javascript">decorateDataList('narrow-by-list2')</script>
57
+ </div>
58
+ </div>
59
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/catalog/navigation/top.phtml ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Top menu for store
30
+ *
31
+ * @see Mage_Catalog_Block_Navigation
32
+ */
33
+ ?>
34
+ <?php
35
+ /**
36
+ * $this->renderCategoriesMenuHtml() supports optional arguments:
37
+ * int Level number for list item class to start from
38
+ * string Extra class of outermost list items
39
+ * string If specified wraps children list in div with this class
40
+ */
41
+ ?>
42
+ <?php
43
+ /* Modified version of _renderCategoryMenuItemHtml, oh yeah. */
44
+ // function _renderCategoryMenuItemHtml2($category, $level = 0, $isLast = false, $isFirst = false,
45
+ // $isOutermost = false, $outermostItemClass = '', $childrenWrapClass = '', $noEventAttributes = false)
46
+ // {
47
+ // if (!$category->getIsActive()) {
48
+ // return '';
49
+ // }
50
+ // $html = array();
51
+ //
52
+ // // get all children
53
+ // if (Mage::helper('catalog/category_flat')->isEnabled()) {
54
+ // $children = (array)$category->getChildrenNodes();
55
+ // $childrenCount = count($children);
56
+ // } else {
57
+ // $children = $category->getChildren();
58
+ // $childrenCount = $children->count();
59
+ // }
60
+ // $hasChildren = ($children && $childrenCount);
61
+ //
62
+ // // select active children
63
+ // $activeChildren = array();
64
+ // foreach ($children as $child) {
65
+ // if ($child->getIsActive()) {
66
+ // $activeChildren[] = $child;
67
+ // }
68
+ // }
69
+ // $activeChildrenCount = count($activeChildren);
70
+ // $hasActiveChildren = ($activeChildrenCount > 0);
71
+ //
72
+ // // prepare list item html classes
73
+ // $classes = array();
74
+ // $classes[] = 'level' . $level;
75
+ // $classes[] = 'nav-' . $this->_getItemPosition($level);
76
+ // if ($this->isCategoryActive($category)) {
77
+ // $classes[] = 'active';
78
+ // }
79
+ // $linkClass = '';
80
+ // if ($isOutermost && $outermostItemClass) {
81
+ // $classes[] = $outermostItemClass;
82
+ // $linkClass = ' class="'.$outermostItemClass.'"';
83
+ // }
84
+ // if ($isFirst) {
85
+ // $classes[] = 'first';
86
+ // }
87
+ // if ($isLast) {
88
+ // $classes[] = 'last';
89
+ // }
90
+ // if ($hasActiveChildren) {
91
+ // $classes[] = 'parent';
92
+ // }
93
+ //
94
+ // // prepare list item attributes
95
+ // $attributes = array();
96
+ // if (count($classes) > 0) {
97
+ // $attributes['class'] = implode(' ', $classes);
98
+ // }
99
+ //
100
+ // // assemble list item with attributes
101
+ // $htmlLi = '<li';
102
+ // foreach ($attributes as $attrName => $attrValue) {
103
+ // $htmlLi .= ' ' . $attrName . '="' . str_replace('"', '\"', $attrValue) . '"';
104
+ // }
105
+ // $htmlLi .= '>';
106
+ // $html[] = $htmlLi;
107
+ //
108
+ // $html[] = '<a href="'.$this->getCategoryUrl($category).'"'.$linkClass.'>';
109
+ // $html[] = '<span>' . $this->escapeHtml($category->getName()) . '</span>';
110
+ // $html[] = '</a>';
111
+ //
112
+ // // render children
113
+ // $htmlChildren = '';
114
+ // $j = 0;
115
+ // foreach ($activeChildren as $child) {
116
+ // $htmlChildren .= $this->_renderCategoryMenuItemHtml2(
117
+ // $child,
118
+ // ($level + 1),
119
+ // ($j == $activeChildrenCount - 1),
120
+ // ($j == 0),
121
+ // false,
122
+ // $outermostItemClass,
123
+ // $childrenWrapClass,
124
+ // $noEventAttributes
125
+ // );
126
+ // $j++;
127
+ // }
128
+ // if (!empty($htmlChildren)) {
129
+ // if ($childrenWrapClass) {
130
+ // $html[] = '<div class="' . $childrenWrapClass . '">';
131
+ // }
132
+ // $html[] = '<ul class="level' . $level . '">';
133
+ // $html[] = $htmlChildren;
134
+ // $html[] = '</ul>';
135
+ // if ($childrenWrapClass) {
136
+ // $html[] = '</div>';
137
+ // }
138
+ // }
139
+ //
140
+ // $html[] = '</li>';
141
+ //
142
+ // $html = implode("\n", $html);
143
+ // return $html;
144
+ // }
145
+ // /* Modified version of renderCategoriesMenuHtml */
146
+ // function renderCategoriesMenuHtml2($level = 0, $outermostItemClass = '', $childrenWrapClass = '')
147
+ // {
148
+ // $activeCategories = array();
149
+ // foreach ($this->getStoreCategories() as $child) {
150
+ // if ($child->getIsActive()) {
151
+ // $activeCategories[] = $child;
152
+ // }
153
+ // }
154
+ // $activeCategoriesCount = count($activeCategories);
155
+ // $hasActiveCategoriesCount = ($activeCategoriesCount > 0);
156
+ //
157
+ // if (!$hasActiveCategoriesCount) {
158
+ // $html = '';
159
+ // } else {
160
+ // $html = '';
161
+ // $j = 0;
162
+ // foreach ($activeCategories as $category) {
163
+ // $html .= $this->_renderCategoryMenuItemHtml(
164
+ // $category,
165
+ // $level,
166
+ // ($j == $activeCategoriesCount - 1),
167
+ // ($j == 0),
168
+ // true,
169
+ // $outermostItemClass,
170
+ // $childrenWrapClass,
171
+ // true
172
+ // );
173
+ // $j++;
174
+ // }
175
+ // }
176
+ // }
177
+ $categories = $this->getStoreCategories();
178
+ $categoryName = "Select a category from below:";
179
+ $keepDigging = true;
180
+ $menuItems = '';
181
+ while ($keepDigging) {
182
+ if ($categories->count() == 0) {
183
+ $keepDigging = false;
184
+ break;
185
+ }
186
+ $nextLevel = false;
187
+ foreach ($categories as $category) {
188
+ if ($category->getIsActive() && $this->isCategoryActive($category)) {
189
+ $categoryName = $category->getName() . ' - Select a subcategory';
190
+ // get all children
191
+ if (Mage::helper('catalog/category_flat')->isEnabled()) {
192
+ $children = (array)$category->getChildrenNodes();
193
+ $childrenCount = count($children);
194
+ } else {
195
+ $children = $category->getChildren();
196
+ $childrenCount = $children->count();
197
+ }
198
+ $hasChildren = ($children && $childrenCount);
199
+
200
+ // select active children
201
+ $hasActiveChildren = false;
202
+ foreach ($children as $child) {
203
+ if ($child->getIsActive()) {
204
+ $hasActiveChildren = true;
205
+ if (Mage::helper('catalog/category_flat')->isEnabled()) {
206
+ $nextLevel = (array)$category->getChildrenNodes();
207
+ } else {
208
+ $nextLevel = $category->getChildren();
209
+ }
210
+ break;
211
+ }
212
+ }
213
+
214
+ if ($hasActiveChildren) {
215
+ break;
216
+ }
217
+ }
218
+ }
219
+ if ($nextLevel) {
220
+ $categories = $nextLevel;
221
+ continue;
222
+ }
223
+
224
+ // no active selected children, so lets render this
225
+ $keepDigging = false;
226
+ $activeChildren = array();
227
+ foreach ($categories as $category) {
228
+ if ($category->getIsActive()) {
229
+ $html = array();
230
+ // assemble list item with attributes
231
+ $html[] = '<li>';
232
+ $html[] = '<a href="'.$this->getCategoryUrl($category).'">';
233
+ $html[] = '<span>' . $this->escapeHtml($category->getName()) . '</span>';
234
+ $html[] = '</a>';
235
+ $html[] = '</li>';
236
+
237
+ $menuItems .= implode("\n", $html);
238
+ }
239
+ }
240
+ }
241
+ ?>
242
+ <?php if($menuItems): ?>
243
+ <div class="nav-container">
244
+ <ul id="nav" data-role="listview" data-inset="true">
245
+ <li data-role="list-divider"><?php echo $categoryName; ?></li>
246
+ <?php echo $menuItems ?>
247
+ </ul>
248
+ </div>
249
+ <?php endif ?>
app/design/frontend/smarttheme/default/template/catalog/product/list.phtml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Product list template
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List
32
+ */
33
+ ?>
34
+ <?php
35
+ $_productCollection=$this->getLoadedProductCollection();
36
+ $_helper = $this->helper('catalog/output');
37
+ ?>
38
+ <?php if(!$_productCollection->count()): ?>
39
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
40
+ <?php else: ?>
41
+
42
+ <?php // List mode ?>
43
+ <?php $_iterator = 0; ?>
44
+ <ul class="products-list" id="products-list" data-role="listview" data-inset="true">
45
+ <li data-role="divider"><?php echo $this->getToolbarHtml() ?></li>
46
+ <?php foreach ($_productCollection as $_product): ?>
47
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
48
+ <?php // Product Image ?>
49
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
50
+ <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
51
+ <h3 class="product-name"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></h3>
52
+ <p class="product-shop">
53
+ <?php /* @todo echo $this->getPriceHtml($_product, true) ?>
54
+ <?php if($_product->getRatingSummary()): ?>
55
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
56
+ <?php endif; ?>
57
+ <?php if($_product->isSaleable()): ?>
58
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
59
+ <?php else: ?>
60
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
61
+ <?php endif; */ ?>
62
+ <?php
63
+ $short_description = strip_tags($_product->getShortDescription(),"<p>,<div>,<span>");
64
+ echo $_helper->productAttribute($_product, $short_description, 'short_description')
65
+ ?>
66
+ <?php /* @todo
67
+ <ul class="add-to-links">
68
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
69
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
70
+ <?php endif; ?>
71
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
72
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
73
+ <?php endif; ?>
74
+ </ul>
75
+ */ ?>
76
+ </p>
77
+ </a>
78
+ </li>
79
+ <?php endforeach; ?>
80
+ </ul>
81
+
82
+ <div class="toolbar-bottom">
83
+ <?php
84
+ $toolbar = $this->getToolbarBlock();
85
+ $toolbar->setCollection($this->getLoadedProductCollection());
86
+ echo $toolbar->getPagerHtml();
87
+ ?>
88
+ </div>
89
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/catalog/product/list/toolbar.phtml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Product list toolbar
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List_Toolbar
32
+ */
33
+ ?>
34
+ <?php if($this->getCollection()->getSize()): ?>
35
+ <?php if($this->getLastPageNum()>1): ?>
36
+ <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
37
+ <?php else: ?>
38
+ <strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
39
+ <?php endif; ?>
40
+ <?php /* @todo
41
+ <div class="limiter">
42
+ <label><?php echo $this->__('Show') ?></label>
43
+ <select onchange="setLocation(this.value)">
44
+ <?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
45
+ <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
46
+ <?php echo $_limit ?>
47
+ </option>
48
+ <?php endforeach; ?>
49
+ </select> <?php echo $this->__('per page') ?>
50
+ </div>
51
+ <?php echo $this->getPagerHtml(); ?>
52
+ */ ?>
53
+
54
+
55
+ <?php /* @todo if( $this->isExpanded() ): ?>
56
+ <div class="sorter">
57
+
58
+ <div class="sort-by">
59
+ <label><?php echo $this->__('Sort By') ?></label>
60
+ <select onchange="setLocation(this.value)">
61
+ <?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
62
+ <option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
63
+ <?php echo $this->__($_order) ?>
64
+ </option>
65
+ <?php endforeach; ?>
66
+ </select>
67
+ <?php if($this->getCurrentDirection() == 'desc'): ?>
68
+ <a href="<?php echo $this->getOrderUrl(null, 'asc') ?>" title="<?php echo $this->__('Set Ascending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_desc_arrow.gif') ?>" alt="<?php echo $this->__('Set Ascending Direction') ?>" class="v-middle" /></a>
69
+ <?php else: ?>
70
+ <a href="<?php echo $this->getOrderUrl(null, 'desc') ?>" title="<?php echo $this->__('Set Descending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_asc_arrow.gif') ?>" alt="<?php echo $this->__('Set Descending Direction') ?>" class="v-middle" /></a>
71
+ <?php endif; ?>
72
+ </div>
73
+ </div>
74
+ <?php endif; */ ?>
75
+ <?php endif ?>
app/design/frontend/smarttheme/default/template/catalog/product/new.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
28
+ <h2 class="subtitle"><?php echo $this->__('New Products') ?></h2>
29
+ <?php $_columnCount = $this->getColumnCount(); ?>
30
+ <?php $i=0; foreach ($_products->getItems() as $_product): ?>
31
+ <?php if ($i++%$_columnCount==0): ?>
32
+ <ul class="products-grid">
33
+ <?php endif ?>
34
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
35
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135) ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" /></a>
36
+ <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h3>
37
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
38
+ <?php echo $this->getPriceHtml($_product, true, '-new') ?>
39
+ <div class="actions">
40
+ <?php if($_product->isSaleable()): ?>
41
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
42
+ <?php else: ?>
43
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
44
+ <?php endif; ?>
45
+ <ul class="add-to-links">
46
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
47
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
48
+ <?php endif; ?>
49
+ <?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
50
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
51
+ <?php endif; ?>
52
+ </ul>
53
+ </div>
54
+ </li>
55
+ <?php if ($i%$_columnCount==0 || $i==count($_products)): ?>
56
+ </ul>
57
+ <?php endif ?>
58
+ <?php endforeach; ?>
59
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/catalog/product/price.phtml ADDED
@@ -0,0 +1,414 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ /**
30
+ * Template for displaying product price in different places (products grid, product view page etc)
31
+ *
32
+ * @see Mage_Catalog_Block_Product_Abstract
33
+ */
34
+ ?>
35
+ <?php
36
+ $_coreHelper = $this->helper('core');
37
+ $_weeeHelper = $this->helper('weee');
38
+ $_taxHelper = $this->helper('tax');
39
+ /* @var $_coreHelper Mage_Core_Helper_Data */
40
+ /* @var $_weeeHelper Mage_Weee_Helper_Data */
41
+ /* @var $_taxHelper Mage_Tax_Helper_Data */
42
+
43
+ $_product = $this->getProduct();
44
+ $_id = $_product->getId();
45
+ $_weeeSeparator = '';
46
+ $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
47
+ $_minimalPriceValue = $_product->getMinimalPrice();
48
+ $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
49
+ ?>
50
+
51
+ <?php if (!$_product->isGrouped()): ?>
52
+ <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
53
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(1,2,4))): ?>
54
+ <?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product); ?>
55
+ <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForDisplay($_product); ?>
56
+ <?php endif; ?>
57
+
58
+ <div class="price-box">
59
+ <?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>
60
+ <?php $_regularPrice = $_taxHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
61
+ <?php $_finalPrice = $_taxHelper->getPrice($_product, $_product->getFinalPrice()) ?>
62
+ <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
63
+ <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
64
+ <?php if ($_finalPrice == $_price): ?>
65
+ <?php if ($_taxHelper->displayBothPrices()): ?>
66
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
67
+ <span class="price-excluding-tax">
68
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
69
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
70
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,false) ?>
71
+ </span>
72
+ </span>
73
+ <span class="price-including-tax">
74
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
75
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
76
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
77
+ </span>
78
+ </span>
79
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
80
+ <span class="price-excluding-tax">
81
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
82
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
83
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,false) ?>
84
+ </span>
85
+ </span>
86
+ <span class="price-including-tax">
87
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
88
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
89
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
90
+ </span>
91
+ <span class="weee">(
92
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
93
+ <?php echo $_weeeSeparator; ?>
94
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
95
+ <?php $_weeeSeparator = ' + '; ?>
96
+ <?php endforeach; ?>
97
+ )</span>
98
+ </span>
99
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
100
+ <span class="price-excluding-tax">
101
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
102
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
103
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,false) ?>
104
+ </span>
105
+ </span>
106
+ <span class="price-including-tax">
107
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
108
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
109
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
110
+ </span>
111
+ <span class="weee">(
112
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
113
+ <?php echo $_weeeSeparator; ?>
114
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
115
+ <?php $_weeeSeparator = ' + '; ?>
116
+ <?php endforeach; ?>
117
+ )</span>
118
+ </span>
119
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
120
+ <span class="price-excluding-tax">
121
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
122
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
123
+ <?php echo $_coreHelper->currency($_price,true,false) ?>
124
+ </span>
125
+ </span>
126
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
127
+ <span class="weee">
128
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
129
+ </span>
130
+ <?php endforeach; ?>
131
+ <span class="price-including-tax">
132
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
133
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
134
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
135
+ </span>
136
+ </span>
137
+ <?php else: ?>
138
+ <span class="price-excluding-tax">
139
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
140
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
141
+ <?php echo $_coreHelper->currency($_price,true,false) ?>
142
+ </span>
143
+ </span>
144
+ <span class="price-including-tax">
145
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
146
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
147
+ <?php echo $_coreHelper->currency($_finalPriceInclTax,true,false) ?>
148
+ </span>
149
+ </span>
150
+ <?php endif; ?>
151
+ <?php else: ?>
152
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
153
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
154
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,true) ?>
155
+ </span>
156
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
157
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
158
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,true) ?>
159
+ </span>
160
+ <span class="weee">(
161
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
162
+ <?php echo $_weeeSeparator; ?>
163
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
164
+ <?php $_weeeSeparator = ' + '; ?>
165
+ <?php endforeach; ?>
166
+ )</span>
167
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
168
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
169
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,true) ?>
170
+ </span>
171
+ <span class="weee">(
172
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
173
+ <?php echo $_weeeSeparator; ?>
174
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
175
+ <?php $_weeeSeparator = ' + '; ?>
176
+ <?php endforeach; ?>
177
+ )</span>
178
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
179
+ <span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br />
180
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
181
+ <span class="weee">
182
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
183
+ </span>
184
+ <?php endforeach; ?>
185
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
186
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,true) ?>
187
+ </span>
188
+ <?php else: ?>
189
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
190
+ <?php echo $_coreHelper->currency($_price,true,true) ?>
191
+ </span>
192
+ <?php endif; ?>
193
+ <?php endif; ?>
194
+ <?php else: /* if ($_finalPrice == $_price): */ ?>
195
+ <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
196
+
197
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
198
+ <p class="old-price">
199
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
200
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
201
+ <?php echo $_coreHelper->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?>
202
+ </span>
203
+ </p>
204
+
205
+ <?php if ($_taxHelper->displayBothPrices()): ?>
206
+ <p class="special-price">
207
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
208
+ <span class="price-excluding-tax">
209
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
210
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
211
+ <?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false) ?>
212
+ </span>
213
+ </span>
214
+ <span class="price-including-tax">
215
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
216
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
217
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
218
+ </span>
219
+ </span>
220
+ </p>
221
+ <?php else: ?>
222
+ <p class="special-price">
223
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
224
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
225
+ <?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false) ?>
226
+ </span>
227
+ </p>
228
+ <?php endif; ?>
229
+
230
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
231
+ <p class="old-price">
232
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
233
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
234
+ <?php echo $_coreHelper->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?>
235
+ </span>
236
+ </p>
237
+
238
+ <p class="special-price">
239
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
240
+ <span class="price-excluding-tax">
241
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
242
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
243
+ <?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false) ?>
244
+ </span>
245
+ </span>
246
+ <span class="weee">(
247
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
248
+ <?php echo $_weeeSeparator; ?>
249
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
250
+ <?php $_weeeSeparator = ' + '; ?>
251
+ <?php endforeach; ?>
252
+ )</span>
253
+ <span class="price-including-tax">
254
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
255
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
256
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
257
+ </span>
258
+ </span>
259
+ </p>
260
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
261
+ <p class="old-price">
262
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
263
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
264
+ <?php echo $_coreHelper->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?>
265
+ </span>
266
+ </p>
267
+
268
+ <p class="special-price">
269
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
270
+ <span class="price-excluding-tax">
271
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
272
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
273
+ <?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false) ?>
274
+ </span>
275
+ </span>
276
+ <span class="weee">(
277
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
278
+ <?php echo $_weeeSeparator; ?>
279
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
280
+ <?php $_weeeSeparator = ' + '; ?>
281
+ <?php endforeach; ?>
282
+ )</span>
283
+ <span class="price-including-tax">
284
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
285
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
286
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
287
+ </span>
288
+ </span>
289
+ </p>
290
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
291
+ <p class="old-price">
292
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
293
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
294
+ <?php echo $_coreHelper->currency($_regularPrice,true,false) ?>
295
+ </span>
296
+ </p>
297
+
298
+ <p class="special-price">
299
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
300
+ <span class="price-excluding-tax">
301
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
302
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
303
+ <?php echo $_coreHelper->currency($_finalPrice,true,false) ?>
304
+ </span>
305
+ </span>
306
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
307
+ <span class="weee">
308
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
309
+ </span>
310
+ <?php endforeach; ?>
311
+ <span class="price-including-tax">
312
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
313
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
314
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
315
+ </span>
316
+ </span>
317
+ </p>
318
+ <?php else: // excl. ?>
319
+ <p class="old-price">
320
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
321
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
322
+ <?php echo $_coreHelper->currency($_regularPrice,true,false) ?>
323
+ </span>
324
+ </p>
325
+
326
+ <?php if ($_taxHelper->displayBothPrices()): ?>
327
+ <p class="special-price">
328
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
329
+ <span class="price-excluding-tax">
330
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
331
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
332
+ <?php echo $_coreHelper->currency($_finalPrice,true,false) ?>
333
+ </span>
334
+ </span>
335
+ <span class="price-including-tax">
336
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
337
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
338
+ <?php echo $_coreHelper->currency($_finalPriceInclTax,true,false) ?>
339
+ </span>
340
+ </span>
341
+ </p>
342
+ <?php else: ?>
343
+ <p class="special-price">
344
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
345
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
346
+ <?php echo $_coreHelper->currency($_finalPrice,true,false) ?>
347
+ </span>
348
+ </p>
349
+ <?php endif; ?>
350
+ <?php endif; ?>
351
+
352
+ <?php endif; /* if ($_finalPrice == $_price): */ ?>
353
+
354
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
355
+
356
+ <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
357
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
358
+ <?php $_minimalPriceDisplayValue = $_minimalPrice+$_weeeTaxAmount; ?>
359
+ <?php endif; ?>
360
+
361
+ <?php if ($this->getUseLinkForAsLowAs()):?>
362
+ <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
363
+ <?php else:?>
364
+ <span class="minimal-price-link">
365
+ <?php endif?>
366
+ <span class="label"><?php echo $this->__('As low as:') ?></span>
367
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
368
+ <?php echo $_coreHelper->currency($_minimalPriceDisplayValue,true,false) ?>
369
+ </span>
370
+ <?php if ($this->getUseLinkForAsLowAs()):?>
371
+ </a>
372
+ <?php else:?>
373
+ </span>
374
+ <?php endif?>
375
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
376
+ </div>
377
+
378
+ <?php else: /* if (!$_product->isGrouped()): */ ?>
379
+ <?php
380
+ $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax = null);
381
+ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax = true);
382
+ ?>
383
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
384
+ <div class="price-box">
385
+ <p class="minimal-price">
386
+ <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
387
+ <?php if ($_taxHelper->displayBothPrices()): ?>
388
+ <span class="price-excluding-tax">
389
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
390
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
391
+ <?php echo $_coreHelper->currency($_exclTax, true, false) ?>
392
+ </span>
393
+ </span>
394
+ <span class="price-including-tax">
395
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
396
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
397
+ <?php echo $_coreHelper->currency($_inclTax, true, false) ?>
398
+ </span>
399
+ </span>
400
+ <?php else: ?>
401
+ <?php
402
+ $_showPrice = $_inclTax;
403
+ if (!$_taxHelper->displayPriceIncludingTax()) {
404
+ $_showPrice = $_exclTax;
405
+ }
406
+ ?>
407
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
408
+ <?php echo $_coreHelper->currency($_showPrice, true, false) ?>
409
+ </span>
410
+ <?php endif; ?>
411
+ </p>
412
+ </div>
413
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
414
+ <?php endif; /* if (!$_product->isGrouped()): */ ?>
app/design/frontend/smarttheme/default/template/catalog/product/type/configurable.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @deprecated after 1.4.1.0 in favor of default.phtml
30
+ */
31
+ ?>
app/design/frontend/smarttheme/default/template/catalog/product/type/default.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php /* @var $this Mage_Catalog_Block_Product_View_Abstract */?>
28
+ <?php $_product = $this->getProduct() ?>
29
+
30
+ <?php if ($_product->isAvailable()): ?>
31
+ <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
32
+ <?php else: ?>
33
+ <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
34
+ <?php endif; ?>
35
+ <?php echo $this->getChildHtml('product_type_data_extra') ?>
36
+ <?php echo $this->getPriceHtml($_product) ?>
app/design/frontend/smarttheme/default/template/catalog/product/type/grouped.phtml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Grouped product data template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Media
31
+ * @see Mage_Catalog_Block_Product_View_Type_Grouped
32
+ */
33
+ ?>
34
+ <?php $this->setPreconfiguredValue(); ?>
35
+ <?php $_product = $this->getProduct(); ?>
36
+ <?php $_associatedProducts = $this->getAssociatedProducts(); ?>
37
+ <?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
38
+ <?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
39
+ <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
40
+ <?php else: ?>
41
+ <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
42
+ <?php endif; ?>
43
+ <?php echo $this->getChildHtml('product_type_data_extra') ?>
44
+ <table class="data-table grouped-items-table" id="super-product-table">
45
+ <col />
46
+ <col />
47
+ <col width="1" />
48
+ <thead>
49
+ <tr>
50
+ <th><?php echo $this->__('Product Name') ?></th>
51
+ <?php if ($this->getCanShowProductPrice($_product)): ?>
52
+ <th class="a-right"><?php echo $this->__('Price') ?></th>
53
+ <?php endif; ?>
54
+ <?php if ($_product->isSaleable()): ?>
55
+ <th class="a-center"><?php echo $this->__('Qty') ?></th>
56
+ <?php endif; ?>
57
+ </tr>
58
+ </thead>
59
+ <tbody>
60
+ <?php if ($_hasAssociatedProducts): ?>
61
+ <?php foreach ($_associatedProducts as $_item): ?>
62
+ <?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
63
+ <tr>
64
+ <td><?php echo $this->htmlEscape($_item->getName()) ?></td>
65
+ <?php if ($this->getCanShowProductPrice($_product)): ?>
66
+ <td class="a-right">
67
+ <?php if ($this->getCanShowProductPrice($_item)): ?>
68
+ <?php echo $this->getPriceHtml($_item, true) ?>
69
+ <?php echo $this->getTierPriceHtml($_item) ?>
70
+ <?php endif; ?>
71
+ </td>
72
+ <?php endif; ?>
73
+ <?php if ($_product->isSaleable()): ?>
74
+ <td class="a-center">
75
+ <?php if ($_item->isSaleable()) : ?>
76
+ <input type="text" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
77
+ <?php else: ?>
78
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
79
+ <?php endif; ?>
80
+ </td>
81
+ <?php endif; ?>
82
+ </tr>
83
+ <?php endforeach; ?>
84
+ <?php else: ?>
85
+ <tr>
86
+ <td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
87
+ </tr>
88
+ <?php endif; ?>
89
+ </tbody>
90
+ </table>
91
+ <script type="text/javascript">decorateTable('super-product-table')</script>
app/design/frontend/smarttheme/default/template/catalog/product/type/options/configurable.phtml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ $_product = $this->getProduct();
30
+ $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
31
+ ?>
32
+ <?php if ($_product->isSaleable() && count($_attributes)):?>
33
+ <?php foreach($_attributes as $_attribute): ?>
34
+ <br/>
35
+ <label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label>
36
+ <div class="input-box">
37
+ <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
38
+ <option><?php echo $this->__('Choose an Option...') ?></option>
39
+ <?php
40
+ // @todo - Check price changes by option
41
+ $options = false;
42
+ try {
43
+ $json = json_decode($this->getJsonConfig());
44
+ $options = $json->attributes->{$_attribute->getAttributeId()}->options;
45
+ } catch (Exception $e) {}
46
+ if (is_array($options) && count($options) > 0) {
47
+ foreach ($options as $option) {
48
+ ?><option value="<?php echo $option->id; ?>" price="<?php echo $option->price; ?>"><?php echo $option->label; ?></option><?php
49
+ }
50
+ }
51
+ ?>
52
+ </select>
53
+ </div>
54
+ <?php endforeach; ?>
55
+ <!-- @todo snez important coalesce script type="text/javascript">
56
+ var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
57
+ </script -->
58
+ <?php endif;?>
app/design/frontend/smarttheme/default/template/catalog/product/type/simple.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @deprecated after 1.4.1.0 in favor of default.phtml
30
+ */
31
+ ?>
app/design/frontend/smarttheme/default/template/catalog/product/type/virtual.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @deprecated after 1.4.1.0 in favor of default.phtml
30
+ */
31
+ ?>
app/design/frontend/smarttheme/default/template/catalog/product/view.phtml ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product view template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View
31
+ * @see Mage_Review_Block_Product_View
32
+ */
33
+ ?>
34
+ <?php $_helper = $this->helper('catalog/output'); ?>
35
+ <?php $_product = $this->getProduct(); ?>
36
+ <script type="text/javascript">
37
+ //var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
38
+ $('#productname').html('<?php echo addslashes($_product->getName()); ?>');
39
+ </script>
40
+ <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
41
+ <div class="product-view">
42
+ <div class="product-essential">
43
+ <form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
44
+ <div class="no-display">
45
+ <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
46
+ <input type="hidden" name="related_product" id="related-products-field" value="" />
47
+ </div>
48
+
49
+ <div class="product-shop">
50
+ <div class="product-name">
51
+ <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
52
+ </div>
53
+
54
+ <?php /* @todo
55
+ <?php if ($this->canEmailToFriend()): ?>
56
+ <p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
57
+ <?php endif; ?>
58
+
59
+ <?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
60
+ <?php echo $this->getChildHtml('alert_urls') ?>
61
+ */ ?>
62
+ <?php echo $this->getChildHtml('product_type_data') ?>
63
+ <?php echo $this->getTierPriceHtml() ?>
64
+ <?php echo $this->getChildHtml('extrahint') ?>
65
+
66
+ <?php /* @todo
67
+ <?php if (!$this->hasOptions()):?>
68
+ <div class="add-to-box">
69
+ <?php if($_product->isSaleable()): ?>
70
+ <?php echo $this->getChildHtml('addtocart') ?>
71
+ <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
72
+ <span class="or"><?php echo $this->__('OR') ?></span>
73
+ <?php endif; ?>
74
+ <?php endif; ?>
75
+ <?php echo $this->getChildHtml('addto') ?>
76
+ </div>
77
+ <?php echo $this->getChildHtml('extra_buttons') ?>
78
+ <?php endif; ?>
79
+ */ ?>
80
+
81
+ <?php if ($_product->getShortDescription()):?>
82
+ <div class="short-description">
83
+ <h2><?php echo $this->__('Quick Overview') ?></h2>
84
+ <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
85
+ </div>
86
+ <?php endif;?>
87
+
88
+ <?php echo $this->getChildHtml('other');?>
89
+
90
+ <?php if ($_product->isSaleable() && $this->hasOptions()):?>
91
+ <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
92
+ <?php endif;?>
93
+
94
+ </div>
95
+
96
+ <div class="product-img-box">
97
+ <?php echo $this->getChildHtml('media') ?>
98
+ </div>
99
+
100
+ <div class="clearer"></div>
101
+ <?php if ($_product->isSaleable() && $this->hasOptions()):?>
102
+ <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
103
+ <?php endif;?>
104
+ </form>
105
+ <!--script type="text/javascript">
106
+ //<![CDATA[
107
+ var productAddToCartForm = new VarienForm('product_addtocart_form');
108
+ productAddToCartForm.submit = function(button, url) {
109
+ if (this.validator.validate()) {
110
+ var form = this.form;
111
+ var oldUrl = form.action;
112
+
113
+ if (url) {
114
+ form.action = url;
115
+ }
116
+ var e = null;
117
+ try {
118
+ this.form.submit();
119
+ } catch (e) {
120
+ }
121
+ this.form.action = oldUrl;
122
+ if (e) {
123
+ throw e;
124
+ }
125
+
126
+ if (button && button != 'undefined') {
127
+ button.disabled = true;
128
+ }
129
+ }
130
+ }.bind(productAddToCartForm);
131
+
132
+ productAddToCartForm.submitLight = function(button, url){
133
+ if(this.validator) {
134
+ var nv = Validation.methods;
135
+ delete Validation.methods['required-entry'];
136
+ delete Validation.methods['validate-one-required'];
137
+ delete Validation.methods['validate-one-required-by-name'];
138
+ if (this.validator.validate()) {
139
+ if (url) {
140
+ this.form.action = url;
141
+ }
142
+ this.form.submit();
143
+ }
144
+ Object.extend(Validation.methods, nv);
145
+ }
146
+ }.bind(productAddToCartForm);
147
+ //]]>
148
+ </script-->
149
+ </div>
150
+
151
+ <div class="product-collateral">
152
+ <?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
153
+ <div class="box-collateral <?php echo "box-{$alias}"?>">
154
+ <?php if ($title = $this->getChildData($alias, 'title')):?>
155
+ <h2><?php echo $this->escapeHtml($title); ?></h2>
156
+ <?php endif;?>
157
+ <?php echo $html; ?>
158
+ </div>
159
+ <?php endforeach;?>
160
+ <?php /* @todo
161
+ <?php echo $this->getChildHtml('upsell_products') ?>
162
+ <?php echo $this->getChildHtml('product_additional_data') ?>
163
+ */ ?>
164
+ </div>
165
+ </div>
app/design/frontend/smarttheme/default/template/catalog/product/view/additional.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php foreach ($this->getChildHtmlList() as $_html): ?>
28
+ <?php echo $_html ?>
29
+ <?php endforeach; ?>
app/design/frontend/smarttheme/default/template/catalog/product/view/addto.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $_product = $this->getProduct(); ?>
29
+ <?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>
30
+
31
+ <ul class="add-to-links">
32
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
33
+ <li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, '<?php echo $_wishlistSubmitUrl ?>'); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
34
+ <?php endif; ?>
35
+ <?php
36
+ $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
37
+ ?>
38
+ <?php if($_compareUrl) : ?>
39
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
40
+ <?php endif; ?>
41
+ </ul>
app/design/frontend/smarttheme/default/template/catalog/product/view/addtocart.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_product = $this->getProduct(); ?>
28
+ <?php $buttonTitle = $this->__('Add to Cart'); ?>
29
+ <?php if($_product->isSaleable()): ?>
30
+ <div class="add-to-cart">
31
+ <?php if(!$_product->isGrouped()): ?>
32
+ <label for="qty"><?php echo $this->__('Qty:') ?></label>
33
+ <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
34
+ <?php endif; ?>
35
+ <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
36
+ <?php echo $this->getChildHtml('', true, true) ?>
37
+ </div>
38
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/catalog/product/view/attributes.phtml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product additional attributes template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Attributes
31
+ */
32
+ ?>
33
+ <?php
34
+ $_helper = $this->helper('catalog/output');
35
+ $_product = $this->getProduct()
36
+ ?>
37
+ <?php if($_additional = $this->getAdditionalData()): ?>
38
+ <h2><?php echo $this->__('Additional Information') ?></h2>
39
+ <table class="data-table" id="product-attribute-specs-table">
40
+ <col width="25%" />
41
+ <col />
42
+ <tbody>
43
+ <?php foreach ($_additional as $_data): ?>
44
+ <tr>
45
+ <th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th>
46
+ <td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
47
+ </tr>
48
+ <?php endforeach; ?>
49
+ </tbody>
50
+ </table>
51
+ <script type="text/javascript">decorateTable('product-attribute-specs-table')</script>
52
+ <?php endif;?>
app/design/frontend/smarttheme/default/template/catalog/product/view/description.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product description template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Description
31
+ */
32
+ ?>
33
+ <?php $_description = $this->getProduct()->getDescription(); ?>
34
+ <?php if ($_description): ?>
35
+ <h2><?php echo $this->__('Details') ?></h2>
36
+ <div class="std">
37
+ <?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description') ?>
38
+ </div>
39
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/catalog/product/view/media.phtml ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product media data template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Media
31
+ */
32
+ ?>
33
+ <?php
34
+ $_product = $this->getProduct();
35
+ $_helper = $this->helper('catalog/output');
36
+ ?>
37
+ <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
38
+ <p class="product-image">
39
+ <?php
40
+ $_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
41
+ echo $_helper->productAttribute($_product, $_img, 'image');
42
+ ?>
43
+ </p>
44
+ <?php /* @todo-
45
+ <div class="zoom">
46
+ <img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" />
47
+ <div id="track">
48
+ <div id="handle"></div>
49
+ </div>
50
+ <img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" />
51
+ </div> */ ?>
52
+ <!--script type="text/javascript">
53
+ //<![CDATA[
54
+ Event.observe(window, 'load', function() {
55
+ product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
56
+ });
57
+ //]]>
58
+ </script-->
59
+ <?php else: ?>
60
+ <p class="product-image">
61
+ <?php
62
+ $_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
63
+ echo $_helper->productAttribute($_product, $_img, 'image');
64
+ ?>
65
+ </p>
66
+ <?php endif; ?>
67
+ <?php if (count($this->getGalleryImages()) > 0): ?>
68
+ <p class="zoom-notice" id="track_hint"><?php echo $this->__('More images:') ?></p>
69
+ <div class="more-views">
70
+ <div data-role="controlgroup" data-type="horizontal">
71
+ <a class="thumbnail" data-role="button" href="#" onclick="switchImage('<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize(265) ?>'); return false;" title="<?php echo $this->htmlEscape($this->getImageLabel()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize(56); ?>" width="56" height="56" alt="<?php echo $this->htmlEscape($this->getImageLabel()) ?>" /></a>
72
+ <?php foreach ($this->getGalleryImages() as $_image): ?>
73
+ <a class="thumbnail" data-role="button" href="#" onclick="switchImage('<?php echo $_image->getUrl() ?>'); return false;" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" width="56" height="56" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a>
74
+ <?php endforeach; ?>
75
+ </div>
76
+ </div>
77
+ <script type="text/javascript">
78
+ function switchImage(link){
79
+ $("#image").attr("src",link);
80
+ }
81
+ </script>
82
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/catalog/product/view/options.phtml ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $_options = Mage::helper('core')->decorateArray($this->getOptions()) ?>
29
+ <?php if (count($_options)):?>
30
+ <!-- @todo script type="text/javascript">
31
+ //<![CDATA[
32
+ var optionFileUpload = {
33
+ productForm : $('product_addtocart_form'),
34
+ formAction : '',
35
+ formElements : {},
36
+ upload : function(element){
37
+ this.formElements = this.productForm.select('input', 'select', 'textarea', 'button');
38
+ this.removeRequire(element.readAttribute('id').sub('option_', ''));
39
+
40
+ template = '<iframe id="upload_target" name="upload_target" style="width:0; height:0; border:0;"><\/iframe>';
41
+
42
+ Element.insert($('option_'+element.readAttribute('id').sub('option_', '')+'_uploaded_file'), {after: template});
43
+
44
+ this.formAction = this.productForm.action;
45
+
46
+ var baseUrl = '<?php echo $this->getUrl('*/product/upload') ?>';
47
+ var urlExt = 'option_id/'+element.readAttribute('id').sub('option_', '');
48
+
49
+ this.productForm.action = parseSidUrl(baseUrl, urlExt);
50
+ this.productForm.target = 'upload_target';
51
+ this.productForm.submit();
52
+ this.productForm.target = '';
53
+ this.productForm.action = this.formAction;
54
+ },
55
+ removeRequire : function(skipElementId){
56
+ for(var i=0; i<this.formElements.length; i++){
57
+ if (this.formElements[i].readAttribute('id') != 'option_'+skipElementId+'_file' && this.formElements[i].type != 'button') {
58
+ this.formElements[i].disabled='disabled';
59
+ }
60
+ }
61
+ },
62
+ addRequire : function(skipElementId){
63
+ for(var i=0; i<this.formElements.length; i++){
64
+ if (this.formElements[i].readAttribute('name') != 'options_'+skipElementId+'_file' && this.formElements[i].type != 'button') {
65
+ this.formElements[i].disabled='';
66
+ }
67
+ }
68
+ },
69
+ uploadCallback : function(data){
70
+ this.addRequire(data.optionId);
71
+ $('upload_target').remove();
72
+
73
+ if (data.error) {
74
+
75
+ } else {
76
+ $('option_'+data.optionId+'_uploaded_file').value = data.fileName;
77
+ $('option_'+data.optionId+'_file').value = '';
78
+ $('option_'+data.optionId+'_file').hide();
79
+ $('option_'+data.optionId+'').hide();
80
+ template = '<div id="option_'+data.optionId+'_file_box"><a href="#"><img src="var/options/'+data.fileName+'" alt=""><\/a><a href="#" onclick="optionFileUpload.removeFile('+data.optionId+')" title="Remove file" \/>Remove file<\/a>';
81
+
82
+ Element.insert($('option_'+data.optionId+'_uploaded_file'), {after: template});
83
+ }
84
+ },
85
+ removeFile : function(optionId)
86
+ {
87
+ $('option_'+optionId+'_uploaded_file').value= '';
88
+ $('option_'+optionId+'_file').show();
89
+ $('option_'+optionId+'').show();
90
+
91
+ $('option_'+optionId+'_file_box').remove();
92
+ }
93
+ }
94
+ var optionTextCounter = {
95
+ count : function(field,cntfield,maxlimit){
96
+ if (field.value.length > maxlimit){
97
+ field.value = field.value.substring(0, maxlimit);
98
+ } else {
99
+ cntfield.innerHTML = maxlimit - field.value.length;
100
+ }
101
+ }
102
+ }
103
+
104
+ Product.Options = Class.create();
105
+ Product.Options.prototype = {
106
+ initialize : function(config){
107
+ this.config = config;
108
+ this.reloadPrice();
109
+ document.observe("dom:loaded", this.reloadPrice.bind(this));
110
+ },
111
+ reloadPrice : function(){
112
+ price = new Number();
113
+ config = this.config;
114
+ skipIds = [];
115
+ $$('.product-custom-option').each(function(element){
116
+ var optionId = 0;
117
+ element.name.sub(/[0-9]+/, function(match){
118
+ optionId = match[0];
119
+ });
120
+ if (this.config[optionId]) {
121
+ if (element.type == 'checkbox' || element.type == 'radio') {
122
+ if (element.checked) {
123
+ if (config[optionId][element.getValue()]) {
124
+ price += parseFloat(config[optionId][element.getValue()]);
125
+ }
126
+ }
127
+ } else if(element.hasClassName('datetime-picker') && !skipIds.include(optionId)) {
128
+ dateSelected = true;
129
+ $$('.product-custom-option[id^="options_' + optionId + '"]').each(function(dt){
130
+ if (dt.getValue() == '') {
131
+ dateSelected = false;
132
+ }
133
+ });
134
+ if (dateSelected) {
135
+ price += parseFloat(this.config[optionId]);
136
+ skipIds[optionId] = optionId;
137
+ }
138
+ } else if(element.type == 'select-one' || element.type == 'select-multiple') {
139
+ if (element.options) {
140
+ $A(element.options).each(function(selectOption){
141
+ if (selectOption.selected) {
142
+ if (this.config[optionId][selectOption.value]) {
143
+ price += parseFloat(this.config[optionId][selectOption.value]);
144
+ }
145
+ }
146
+ });
147
+ }
148
+ } else {
149
+ if (element.getValue().strip() != '') {
150
+ price += parseFloat(this.config[optionId]);
151
+ }
152
+ }
153
+ }
154
+ });
155
+ try {
156
+ optionsPrice.changePrice('options', price);
157
+ optionsPrice.changePrice('optionsPriceInclTax', price);
158
+ optionsPrice.reload();
159
+ } catch (e) {
160
+
161
+ }
162
+ }
163
+ }
164
+ function validateOptionsCallback(elmId, result){
165
+ var container = $(elmId).up('ul.options-list');
166
+ if (result == 'failed') {
167
+ container.removeClassName('validation-passed');
168
+ container.addClassName('validation-failed');
169
+ } else {
170
+ container.removeClassName('validation-failed');
171
+ container.addClassName('validation-passed');
172
+ }
173
+ }
174
+ var opConfig = new Product.Options(<?php echo $this->getJsonConfig() ?>);
175
+ //]]>
176
+ </script-->
177
+ <dl>
178
+ <?php foreach($_options as $_option): ?>
179
+ <?php echo $this->getOptionHtml($_option) ?>
180
+ <?php endforeach; ?>
181
+ </dl>
182
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/catalog/product/view/options/js.phtml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <!-- @todo script type="text/javascript">
28
+ //<![CDATA[
29
+ var DateOption = Class.create({
30
+
31
+ getDaysInMonth: function(month, year)
32
+ {
33
+ var curDate = new Date();
34
+ if (!month) {
35
+ month = curDate.getMonth();
36
+ }
37
+ if (2 == month && !year) { // leap year assumption for unknown year
38
+ return 29;
39
+ }
40
+ if (!year) {
41
+ year = curDate.getFullYear();
42
+ }
43
+ return 32 - new Date(year, month - 1, 32).getDate();
44
+ },
45
+
46
+ reloadMonth: function(event)
47
+ {
48
+ var selectEl = event.findElement();
49
+ var idParts = selectEl.id.split("_");
50
+ if (idParts.length != 3) {
51
+ return false;
52
+ }
53
+ var optionIdPrefix = idParts[0] + "_" + idParts[1];
54
+ var month = parseInt($(optionIdPrefix + "_month").value);
55
+ var year = parseInt($(optionIdPrefix + "_year").value);
56
+ var dayEl = $(optionIdPrefix + "_day");
57
+
58
+ var days = this.getDaysInMonth(month, year);
59
+
60
+ //remove days
61
+ for (var i = dayEl.options.length - 1; i >= 0; i--) {
62
+ if (dayEl.options[i].value > days) {
63
+ dayEl.remove(dayEl.options[i].index);
64
+ }
65
+ }
66
+
67
+ // add days
68
+ var lastDay = parseInt(dayEl.options[dayEl.options.length-1].value);
69
+ for (i = lastDay + 1; i <= days; i++) {
70
+ this.addOption(dayEl, i, i);
71
+ }
72
+ },
73
+
74
+ addOption: function(select, text, value)
75
+ {
76
+ var option = document.createElement('OPTION');
77
+ option.value = value;
78
+ option.text = text;
79
+
80
+ if (select.options.add) {
81
+ select.options.add(option);
82
+ } else {
83
+ select.appendChild(option);
84
+ }
85
+ }
86
+ });
87
+ dateOption = new DateOption();
88
+ //]]>
89
+ </script -->
app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/date.phtml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_option = $this->getOption() ?>
28
+ <?php $_optionId = $_option->getId() ?>
29
+ <dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
30
+ <?php echo $this->getFormatedPrice() ?></dt>
31
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
32
+
33
+ <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME
34
+ || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE): ?>
35
+
36
+ <?php echo $this->getDateHtml() ?>
37
+
38
+ <?php if (!$this->useCalendar()): ?>
39
+ <script type="text/javascript">
40
+ //<![CDATA[
41
+ Event.observe('options_<?php echo $_optionId ?>_month', 'change', dateOption.reloadMonth.bind(dateOption));
42
+ Event.observe('options_<?php echo $_optionId ?>_year', 'change', dateOption.reloadMonth.bind(dateOption));
43
+ //]]>
44
+ </script>
45
+ <?php endif; ?>
46
+
47
+ <?php endif; ?>
48
+
49
+ <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME
50
+ || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_TIME): ?>
51
+ <span class="time-picker"><?php echo $this->getTimeHtml() ?></span>
52
+ <?php endif; ?>
53
+
54
+ <input type="hidden" name="validate_datetime_<?php echo $_optionId ?>" class="validate-datetime-<?php echo $_optionId ?>" value="" />
55
+ <script type="text/javascript">
56
+ //<![CDATA[
57
+ <?php if ($_option->getIsRequire()): ?>
58
+ Validation.addAllThese(
59
+ [
60
+ ['validate-datetime-<?php echo $_optionId ?>', '<?php echo $this->jsQuoteEscape( Mage::helper('catalog')->__('This is a required option') )?>', function(v) {
61
+ var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
62
+ for (var i=0; i < dateTimeParts.length; i++) {
63
+ if (dateTimeParts[i].value == "") return false;
64
+ }
65
+ return true;
66
+ }]
67
+ ]
68
+ );
69
+ <?php else: ?>
70
+ Validation.add(
71
+ 'validate-datetime-<?php echo $_optionId ?>',
72
+ '<?php echo $this->jsQuoteEscape( Mage::helper('catalog')->__('Field is not complete') )?>',
73
+ function(v) {
74
+ var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
75
+ var hasWithValue = false, hasWithNoValue = false;
76
+ var pattern = /day_part$/i;
77
+ for (var i=0; i < dateTimeParts.length; i++) {
78
+ if (! pattern.test(dateTimeParts[i].id)) {
79
+ if (dateTimeParts[i].value === "") {
80
+ hasWithValue = true;
81
+ } else {
82
+ hasWithNoValue = true;
83
+ }
84
+ }
85
+ }
86
+ return hasWithValue ^ hasWithNoValue;
87
+ }
88
+ );
89
+ <?php endif; ?>
90
+ //]]>
91
+ </script>
92
+ </dd>
app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/default.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_option = $this->getOption() ?>
28
+ <dt>
29
+ <label><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
30
+ </dt>
app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/file.phtml ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_option = $this->getOption(); ?>
28
+ <?php $_fileInfo = $this->getFileInfo(); ?>
29
+ <?php $_fileExists = $_fileInfo->hasData() ? true : false; ?>
30
+ <?php $_fileName = 'options_' . $_option->getId() . '_file'; ?>
31
+ <?php $_fieldNameAction = $_fileName . '_action'; ?>
32
+ <?php $_fieldValueAction = $_fileExists ? 'save_old' : 'save_new'; ?>
33
+ <?php $_fileNamed = $_fileName . '_name'; ?>
34
+ <?php $_rand = rand(); ?>
35
+
36
+ <script type="text/javascript">
37
+ //<![CDATA[
38
+ opFile<?php echo $_rand; ?> = {
39
+ initializeFile: function(inputBox) {
40
+ this.inputFile = inputBox.select('input[name="<?php echo $_fileName; ?>"]')[0];
41
+ this.inputFileAction = inputBox.select('input[name="<?php echo $_fieldNameAction; ?>"]')[0];
42
+ this.fileNameBox = inputBox.up('dd').select('.<?php echo $_fileNamed ?>')[0];
43
+ },
44
+
45
+ toggleFileChange: function(inputBox) {
46
+ this.initializeFile(inputBox);
47
+ inputBox.toggle();
48
+ this.fileChangeFlag = this.fileChangeFlag ? false : true;
49
+ if (!this.fileDeleteFlag) {
50
+ if (this.fileChangeFlag) {
51
+ this.inputFileAction.value = 'save_new';
52
+ this.inputFile.disabled = false;
53
+ } else {
54
+ this.inputFileAction.value = 'save_old';
55
+ this.inputFile.disabled = true;
56
+ }
57
+ }
58
+ },
59
+
60
+ toggleFileDelete: function(fileDeleteFlag, inputBox) {
61
+ this.initializeFile(inputBox);
62
+ this.fileDeleteFlag = fileDeleteFlag.checked ? true : false;
63
+ if (this.fileDeleteFlag) {
64
+ this.inputFileAction.value = '';
65
+ this.inputFile.disabled = true;
66
+ this.fileNameBox.setStyle({'text-decoration': 'line-through'});
67
+ } else {
68
+ this.inputFileAction.value = this.fileChangeFlag ? 'save_new' : 'save_old';
69
+ this.inputFile.disabled = (this.fileChangeFlag == 'save_old');
70
+ this.fileNameBox.setStyle({'text-decoration': 'none'});
71
+ }
72
+ }
73
+ };
74
+ //]]>
75
+ </script>
76
+
77
+ <dt><label <?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
78
+ <?php echo $this->getFormatedPrice() ?></dt>
79
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
80
+ <?php if ($_fileExists): ?>
81
+ <span class="<?php echo $_fileNamed ?>"><?php echo $_fileInfo->getTitle(); ?></span>
82
+ <a href="javascript:void(0)" class="label" onclick="opFile<?php echo $_rand; ?>.toggleFileChange($(this).next('.input-box'))">
83
+ <?php echo Mage::helper('catalog')->__('Change') ?>
84
+ </a>&nbsp;
85
+ <?php if (!$_option->getIsRequire()): ?>
86
+ <input type="checkbox" onclick="opFile<?php echo $_rand; ?>.toggleFileDelete($(this), $(this).next('.input-box'))" />
87
+ <span class="label"><?php echo Mage::helper('catalog')->__('Delete') ?></span>
88
+ <?php endif; ?>
89
+ <?php endif; ?>
90
+ <div class="input-box" <?php echo $_fileExists ? 'style="display:none"' : '' ?>>
91
+ <input type="file" name="<?php echo $_fileName; ?>" class="product-custom-option<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?>" <?php echo $_fileExists ? 'disabled="disabled"' : '' ?> onchange="opConfig.reloadPrice()" />
92
+ <input type="hidden" name="<?php echo $_fieldNameAction; ?>" value="<?php echo $_fieldValueAction; ?>" />
93
+ <?php if ($_option->getFileExtension()): ?>
94
+ <p class="no-margin"><?php echo Mage::helper('catalog')->__('Allowed file extensions to upload')?>: <strong><?php echo $_option->getFileExtension() ?></strong></p>
95
+ <?php endif; ?>
96
+ <?php if ($_option->getImageSizeX() > 0): ?>
97
+ <p class="no-margin"><?php echo Mage::helper('catalog')->__('Maximum image width')?>: <strong><?php echo $_option->getImageSizeX() ?> <?php echo Mage::helper('catalog')->__('px.')?></strong></p>
98
+ <?php endif; ?>
99
+ <?php if ($_option->getImageSizeY() > 0): ?>
100
+ <p class="no-margin"><?php echo Mage::helper('catalog')->__('Maximum image height')?>: <strong><?php echo $_option->getImageSizeY() ?> <?php echo Mage::helper('catalog')->__('px.')?></strong></p>
101
+ <?php endif; ?>
102
+ </div>
103
+ </dd>
app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/select.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php /* @var $this Mage_Catalog_Block_Product_View_Options_Type_Select */ ?>
29
+ <?php /* todo snez important acer ferrari $_option = $this->getOption() ?>
30
+ <label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
31
+ <div class="input-box">
32
+ <?php echo $this->getValuesHtml() ?>
33
+ <?php if ($_option->getIsRequire()): ?>
34
+ <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?>
35
+ <span id="options-<?php echo $_option->getId() ?>-container"></span>
36
+ <?php endif; ?>
37
+ <?php endif;?>
38
+ </div>*/?>
app/design/frontend/smarttheme/default/template/catalog/product/view/options/type/text.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_option = $this->getOption(); ?>
28
+ <dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
29
+ <?php echo $this->getFormatedPrice() ?></dt>
30
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
31
+ <div class="input-box">
32
+ <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD): ?>
33
+ <input type="text" onchange="opConfig.reloadPrice()" id="options_<?php echo $_option->getId() ?>_text" class="input-text<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-'.$_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" value="<?php echo $this->escapeHtml($this->getDefaultValue()) ?>" />
34
+ <?php elseif ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA): ?>
35
+ <textarea id="options_<?php echo $_option->getId() ?>_text" onchange="opConfig.reloadPrice()" class="<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-'.$_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" rows="5" cols="25"><?php echo $this->escapeHtml($this->getDefaultValue()) ?></textarea>
36
+ <?php endif; ?>
37
+ <?php if ($_option->getMaxCharacters()): ?>
38
+ <p class="note"><?php echo Mage::helper('catalog')->__('Maximum number of characters:')?> <strong><?php echo $_option->getMaxCharacters() ?></strong></p>
39
+ <?php endif; ?>
40
+ </div>
41
+ </dd>
app/design/frontend/smarttheme/default/template/catalog/product/view/options/wrapper.phtml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="product-options" id="product-options-wrapper">
28
+ <?php echo $this->getChildHtml('', true, true);?>
29
+ <?php if ($this->hasRequiredOptions()):?>
30
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
31
+ <?php endif;?>
32
+ </div>
33
+ <!-- @todo script type="text/javascript">decorateGeneric($$('#product-options-wrapper dl'), ['last']);</script -->
app/design/frontend/smarttheme/default/template/catalog/product/view/options/wrapper/bottom.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="product-options-bottom">
28
+ <?php echo $this->getChildHtml('', true, true);?>
29
+ </div>
app/design/frontend/smarttheme/default/template/catalog/product/view/price.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @deprecated after 1.4.0.0-alpha3
29
+ */
30
+ ?>
31
+ <div class="price-box" id="product_price">
32
+ <p class="old-price"><?php echo $this->__('Old Price:') ?> <?php echo $this->getPrice() ?></p>
33
+ <p class="special-price"><?php echo $this->getPrice() ?></p>
34
+ </div>
app/design/frontend/smarttheme/default/template/catalog/product/view/price_clone.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_product = $this->getProduct() ?>
28
+ <?php echo $this->getPriceHtml($_product, false, '_clone') ?>
app/design/frontend/smarttheme/default/template/catalog/product/view/tierprices.phtml ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ /**
30
+ * @see Mage_Catalog_Block_Product_View
31
+ */
32
+ $_product = $this->getProduct();
33
+ $_tierPrices = $this->getTierPrices();
34
+ $_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true);
35
+
36
+ $_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product);
37
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
38
+ $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
39
+ }
40
+
41
+ ?>
42
+ <?php if (count($_tierPrices) > 0): ?>
43
+ <ul class="<?php echo ($this->getInGrouped() ? 'tier-prices-grouped product-pricing-grouped' : 'tier-prices product-pricing'); ?>">
44
+ <?php if ($this->getInGrouped()): ?>
45
+ <?php $_tierPrices = $this->getTierPrices($_product); ?>
46
+ <?php endif; ?>
47
+ <?php Mage::helper('weee')->processTierPrices($_product, $_tierPrices); ?>
48
+
49
+ <?php foreach ($_tierPrices as $_price): ?>
50
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
51
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
52
+ <li><?php echo $this->__('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price_incl_weee_only'], $_price['formated_price_incl_weee']) ?>
53
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
54
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
55
+ <?php if ($_weeeTaxAttributes): ?>
56
+ (<small>
57
+ <?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
58
+ <?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
59
+ <?php echo $separator; ?>
60
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
61
+ <?php endforeach; ?>
62
+ </small>)
63
+ <?php endif; ?>
64
+ <?php echo $this->__('each') ?>
65
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
66
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
67
+ <?php if ($_weeeTaxAttributes): ?>
68
+ (<small>
69
+ <?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
70
+ <?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
71
+ <?php echo $separator; ?>
72
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
73
+ <?php endforeach; ?>
74
+ </small>)
75
+ <?php endif; ?>
76
+ <?php echo $this->__('each') ?>
77
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
78
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
79
+ <?php if ($_weeeTaxAttributes): ?>
80
+ (<small>
81
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
82
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
83
+ <?php endforeach; ?>
84
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
85
+ </small>)
86
+ <?php endif; ?>
87
+ <?php echo $this->__('each') ?>
88
+ <?php else: ?>
89
+ <li><?php echo $this->__('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price'], $_price['formated_price_incl_tax']) ?>
90
+ <?php endif; ?>
91
+ <?php else: ?>
92
+ <?php if ($this->helper('tax')->displayPriceIncludingTax()): ?>
93
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
94
+ <li><?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee']) ?>
95
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
96
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?>
97
+ <?php if ($_weeeTaxAttributes): ?>
98
+ (</small>
99
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
100
+ <?php echo $separator; ?>
101
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
102
+ <?php $separator = ' + '; endforeach; ?>
103
+ <small>)
104
+ <?php endif; ?>
105
+ <?php echo $this->__('each') ?>
106
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
107
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?>
108
+ <?php if ($_weeeTaxAttributes): ?>
109
+ (</small>
110
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
111
+ <?php echo $separator; ?>
112
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
113
+ <?php $separator = ' + '; endforeach; ?>
114
+ <small>)
115
+ <?php endif; ?>
116
+ <?php echo $this->__('each') ?>
117
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
118
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_tax']); ?>
119
+ <?php if ($_weeeTaxAttributes): ?>
120
+ (<small>
121
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
122
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
123
+ <?php endforeach; ?>
124
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
125
+ </small>)
126
+ <?php endif; ?>
127
+ <?php echo $this->__('each') ?>
128
+ <?php else: ?>
129
+ <li><?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_tax']) ?>
130
+ <?php endif; ?>
131
+ <?php else: ?>
132
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
133
+ <li><?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) ?>
134
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
135
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
136
+ <?php if ($_weeeTaxAttributes): ?>
137
+ (<small>
138
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
139
+ <?php echo $separator; ?>
140
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
141
+ <?php $separator = ' + '; endforeach; ?>
142
+ </small>)
143
+ <?php endif; ?>
144
+ <?php echo $this->__('each') ?>
145
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
146
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
147
+ <?php if ($_weeeTaxAttributes): ?>
148
+ (<small>
149
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
150
+ <?php echo $separator; ?>
151
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
152
+ <?php $separator = ' + '; endforeach; ?>
153
+ </small>)
154
+ <?php endif; ?>
155
+ <?php echo $this->__('each') ?>
156
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
157
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
158
+ <?php if ($_weeeTaxAttributes): ?>
159
+ (<small>
160
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
161
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
162
+ <?php endforeach; ?>
163
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee_only']); ?>
164
+ </small>)
165
+ <?php endif; ?>
166
+ <?php echo $this->__('each') ?>
167
+ <?php else: ?>
168
+ <li><?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price']) ?>
169
+ <?php endif; ?>
170
+ <?php endif; ?>
171
+ <?php endif; ?>
172
+ <?php if (!$this->getInGrouped()): ?>
173
+ <?php if(($_product->getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price'])
174
+ || ($_product->getPrice() != $_product->getFinalPrice() && $_product->getFinalPrice() > $_price['price'])): ?>
175
+ <?php echo $this->__('and') ?>&nbsp;<strong class="benefit"><?php echo $this->__('save')?>&nbsp;<?php echo $_price['savePercent']?>%
176
+ <?php endif ?></strong>
177
+ <?php endif; ?>
178
+ </li>
179
+ <?php endforeach ?>
180
+ </ul>
181
+ <?php endif;?>
app/design/frontend/smarttheme/default/template/catalog/product/view/type/configurable.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @deprecated after 1.4.1.0 in favor of default.phtml
30
+ */
31
+ ?>
app/design/frontend/smarttheme/default/template/catalog/product/view/type/default.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php /* @var $this Mage_Catalog_Block_Product_View_Abstract */?>
28
+ <?php $_product = $this->getProduct() ?>
29
+
30
+ <?php if ($_product->isAvailable()): ?>
31
+ <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
32
+ <?php else: ?>
33
+ <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
34
+ <?php endif; ?>
35
+ <?php echo $this->getChildHtml('product_type_data_extra') ?>
36
+ <?php echo $this->getPriceHtml($_product) ?>
app/design/frontend/smarttheme/default/template/catalog/product/view/type/grouped.phtml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Grouped product data template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Media
31
+ * @see Mage_Catalog_Block_Product_View_Type_Grouped
32
+ */
33
+ ?>
34
+ <?php $this->setPreconfiguredValue(); ?>
35
+ <?php $_product = $this->getProduct(); ?>
36
+ <?php $_associatedProducts = $this->getAssociatedProducts(); ?>
37
+ <?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
38
+ <?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
39
+ <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
40
+ <?php else: ?>
41
+ <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
42
+ <?php endif; ?>
43
+ <?php echo $this->getChildHtml('product_type_data_extra') ?>
44
+ <table class="data-table grouped-items-table" id="super-product-table">
45
+ <col />
46
+ <col />
47
+ <col width="1" />
48
+ <thead>
49
+ <tr>
50
+ <th><?php echo $this->__('Product Name') ?></th>
51
+ <?php if ($this->getCanShowProductPrice($_product)): ?>
52
+ <th class="a-right"><?php echo $this->__('Price') ?></th>
53
+ <?php endif; ?>
54
+ <?php /* @todo if ($_product->isSaleable()): ?>
55
+ <th class="a-center"><?php echo $this->__('Qty') ?></th>
56
+ <?php endif; */ ?>
57
+ </tr>
58
+ </thead>
59
+ <tbody>
60
+ <?php if ($_hasAssociatedProducts): ?>
61
+ <?php foreach ($_associatedProducts as $_item): ?>
62
+ <?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
63
+ <tr>
64
+ <td><?php echo $this->htmlEscape($_item->getName()) ?></td>
65
+ <?php if ($this->getCanShowProductPrice($_product)): ?>
66
+ <td class="a-right">
67
+ <?php if ($this->getCanShowProductPrice($_item)): ?>
68
+ <?php echo $this->getPriceHtml($_item, true) ?>
69
+ <?php echo $this->getTierPriceHtml($_item) ?>
70
+ <?php endif; ?>
71
+ </td>
72
+ <?php endif; ?>
73
+ <?php if ($_product->isSaleable()): ?>
74
+ <td class="a-center">
75
+ <?php /* @todo if ($_item->isSaleable()) : ?>
76
+ <input type="text" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
77
+ <?php else: ?>
78
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
79
+ <?php endif; */ ?>
80
+ </td>
81
+ <?php endif; ?>
82
+ </tr>
83
+ <?php endforeach; ?>
84
+ <?php else: ?>
85
+ <tr>
86
+ <td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
87
+ </tr>
88
+ <?php endif; ?>
89
+ </tbody>
90
+ </table>
91
+ <!-- @todo script type="text/javascript">decorateTable('super-product-table')</script -->
app/design/frontend/smarttheme/default/template/catalog/product/view/type/options/configurable.phtml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ $_product = $this->getProduct();
30
+ $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
31
+ ?>
32
+ <?php if ($_product->isSaleable() && count($_attributes)):?>
33
+ <?php foreach($_attributes as $_attribute): ?>
34
+ <br/>
35
+ <label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label>
36
+ <div class="input-box">
37
+ <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
38
+ <option><?php echo $this->__('Choose an Option...') ?></option>
39
+ <?php
40
+ // @todo - Check price changes by option
41
+ $options = false;
42
+ try {
43
+ $json = json_decode($this->getJsonConfig());
44
+ $options = $json->attributes->{$_attribute->getAttributeId()}->options;
45
+ } catch (Exception $e) {}
46
+ if (is_array($options) && count($options) > 0) {
47
+ foreach ($options as $option) {
48
+ ?><option value="<?php echo $option->id; ?>" price="<?php echo $option->price; ?>"><?php echo $option->label; ?></option><?php
49
+ }
50
+ }
51
+ ?>
52
+ </select>
53
+ </div>
54
+ <?php endforeach; ?>
55
+ <!-- @todo snez important coalesce script type="text/javascript">
56
+ var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
57
+ </script-->
58
+ <?php endif;?>
app/design/frontend/smarttheme/default/template/catalog/product/view/type/simple.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @deprecated after 1.4.1.0 in favor of default.phtml
30
+ */
31
+ ?>
app/design/frontend/smarttheme/default/template/catalog/product/view/type/virtual.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @deprecated after 1.4.1.0 in favor of default.phtml
30
+ */
31
+ ?>
app/design/frontend/smarttheme/default/template/catalogsearch/form.mini.phtml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php /* @todo
28
+ <form id="search_mini_form" action="<?php echo $this->helper('catalogsearch')->getResultUrl() ?>" method="get">
29
+ <div class="form-search">
30
+ <label for="search"><?php echo $this->__('Search:') ?></label>
31
+ <input id="search" type="text" name="<?php echo $this->helper('catalogsearch')->getQueryParamName() ?>" value="<?php echo $this->helper('catalogsearch')->getEscapedQueryText() ?>" class="input-text" />
32
+ <button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
33
+ <div id="search_autocomplete" class="search-autocomplete"></div>
34
+ <script type="text/javascript">
35
+ //<![CDATA[
36
+ var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo $this->__('Search entire store here...') ?>');
37
+ searchForm.initAutocomplete('<?php echo $this->helper('catalogsearch')->getSuggestUrl() ?>', 'search_autocomplete');
38
+ //]]>
39
+ </script>
40
+ </div>
41
+ </form>
42
+ */ ?>
app/design/frontend/smarttheme/default/template/checkout/cart.phtml ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Shopping cart template
30
+ *
31
+ * @see Mage_Checkout_Block_Cart
32
+ */
33
+ ?>
34
+ <div class="cart">
35
+ <div class="page-title title-buttons">
36
+ <h1><?php echo $this->__('Shopping Cart') ?></h1>
37
+ <?php if(!$this->hasError()): ?>
38
+ <ul class="checkout-types">
39
+ <?php foreach ($this->getMethods('top_methods') as $method): ?>
40
+ <?php if ($methodHtml = $this->getMethodHtml($method)): ?>
41
+ <li><?php echo $methodHtml; ?></li>
42
+ <?php endif; ?>
43
+ <?php endforeach; ?>
44
+ </ul>
45
+ <?php endif; ?>
46
+ </div>
47
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
48
+ <?php echo $this->getChildHtml('form_before') ?>
49
+ <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">
50
+ <fieldset>
51
+ <table id="shopping-cart-table" class="data-table cart-table">
52
+ <col width="1" />
53
+ <col />
54
+ <col width="1" />
55
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
56
+ <col width="1" />
57
+ <?php endif ?>
58
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
59
+ <col width="1" />
60
+ <?php endif; ?>
61
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
62
+ <col width="1" />
63
+ <?php endif; ?>
64
+ <col width="1" />
65
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
66
+ <col width="1" />
67
+ <?php endif; ?>
68
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
69
+ <col width="1" />
70
+ <?php endif; ?>
71
+ <col width="1" />
72
+
73
+ <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
74
+ <thead>
75
+ <tr>
76
+ <th rowspan="<?php echo $mergedCells; ?>">&nbsp;</th>
77
+ <th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Product Name') ?></span></th>
78
+ <th rowspan="<?php echo $mergedCells; ?>"></th>
79
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
80
+ <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><span class="nobr"><?php echo $this->__('Move to Wishlist') ?></span></th>
81
+ <?php endif ?>
82
+ <th class="a-center" colspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Unit Price') ?></span></th>
83
+ <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
84
+ <th class="a-center" colspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Subtotal') ?></th>
85
+ <th rowspan="<?php echo $mergedCells; ?>" class="a-center">&nbsp;</th>
86
+ </tr>
87
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
88
+ <tr>
89
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
90
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
91
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
92
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
93
+ </tr>
94
+ <?php endif; ?>
95
+ </thead>
96
+ <tfoot>
97
+ <tr>
98
+ <td colspan="50" class="a-right">
99
+ <?php if($this->getContinueShoppingUrl()): ?>
100
+ <button type="button" title="<?php echo $this->__('Continue Shopping') ?>" class="button btn-continue" onclick="setLocation('<?php echo $this->getContinueShoppingUrl() ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
101
+ <?php endif; ?>
102
+ <button type="submit" title="<?php echo $this->__('Update Shopping Cart') ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart') ?></span></span></button>
103
+ </td>
104
+ </tr>
105
+ </tfoot>
106
+ <tbody>
107
+ <?php foreach($this->getItems() as $_item): ?>
108
+ <?php echo $this->getItemHtml($_item) ?>
109
+ <?php endforeach ?>
110
+ </tbody>
111
+ </table>
112
+ <script type="text/javascript">decorateTable('shopping-cart-table')</script>
113
+ </fieldset>
114
+ </form>
115
+ <div class="cart-collaterals">
116
+ <div class="col2-set">
117
+ <div class="col-1">
118
+ <?php echo $this->getChildHtml('crosssell') ?>
119
+ </div>
120
+ <div class="col-2">
121
+ <?php echo $this->getChildHtml('coupon') ?>
122
+ <?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>
123
+ </div>
124
+ </div>
125
+ <div class="totals">
126
+ <?php echo $this->getChildHtml('totals'); ?>
127
+ <?php if(!$this->hasError()): ?>
128
+ <ul class="checkout-types">
129
+ <?php foreach ($this->getMethods('methods') as $method): ?>
130
+ <?php if ($methodHtml = $this->getMethodHtml($method)): ?>
131
+ <li><?php echo $methodHtml; ?></li>
132
+ <?php endif; ?>
133
+ <?php endforeach; ?>
134
+ </ul>
135
+ <?php endif; ?>
136
+ </div>
137
+ </div>
138
+ </div>
app/design/frontend/smarttheme/default/template/checkout/cart/coupon.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post">
28
+ <div class="discount">
29
+ <h2><?php echo $this->__('Discount Codes') ?></h2>
30
+ <div class="discount-form">
31
+ <label for="coupon_code"><?php echo $this->__('Enter your coupon code if you have one.') ?></label>
32
+ <input type="hidden" name="remove" id="remove-coupone" value="0" />
33
+ <div class="input-box">
34
+ <input class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->htmlEscape($this->getCouponCode()) ?>" />
35
+ </div>
36
+ <div class="buttons-set">
37
+ <button type="button" title="<?php echo $this->__('Apply Coupon') ?>" class="button" onclick="discountForm.submit(false)" value="<?php echo $this->__('Apply Coupon') ?>"><span><span><?php echo $this->__('Apply Coupon') ?></span></span></button>
38
+ <?php if(strlen($this->getCouponCode())): ?>
39
+ &nbsp; <button type="button" title="<?php echo $this->__('Cancel Coupon') ?>" class="button" onclick="discountForm.submit(true)" value="<?php echo $this->__('Cancel Coupon') ?>"><span><span><?php echo $this->__('Cancel Coupon') ?></span></span></button>
40
+ <?php endif;?>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </form>
45
+ <script type="text/javascript">
46
+ //<![CDATA[
47
+ var discountForm = new VarienForm('discount-coupon-form');
48
+ discountForm.submit = function (isRemove) {
49
+ if (isRemove) {
50
+ $('coupon_code').removeClassName('required-entry');
51
+ $('remove-coupone').value = "1";
52
+ } else {
53
+ $('coupon_code').addClassName('required-entry');
54
+ $('remove-coupone').value = "0";
55
+ }
56
+ return VarienForm.prototype.submit.bind(discountForm)();
57
+ }
58
+ //]]>
59
+ </script>
app/design/frontend/smarttheme/default/template/checkout/cart/crosssell.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Cart cross sell items template
30
+ *
31
+ * @see Mage_Checkout_Block_Cart_Crosssell
32
+ */
33
+ ?>
34
+ <?php if($this->getItemCount()): ?>
35
+ <div class="crosssell">
36
+ <h2><?php echo $this->__('Based on your selection, you may be interested in the following items:') ?></h2>
37
+ <ul id="crosssell-products-list">
38
+ <?php foreach ($this->getItems() as $_item): ?>
39
+ <li class="item">
40
+ <a class="product-image" href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(75); ?>" width="75" height="75" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" /></a>
41
+ <div class="product-details">
42
+ <h3 class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->htmlEscape($_item->getName()) ?></a></h3>
43
+ <?php echo $this->getPriceHtml($_item, true) ?>
44
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
45
+ <ul class="add-to-links">
46
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
47
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
48
+ <?php endif; ?>
49
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_item)): ?>
50
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
51
+ <?php endif; ?>
52
+ </ul>
53
+ </div>
54
+ </li>
55
+ <?php endforeach; ?>
56
+ </ul>
57
+ <script type="text/javascript">decorateList('crosssell-products-list', 'none-recursive')</script>
58
+ </div>
59
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/checkout/cart/item/default.phtml ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $_item = $this->getItem();
29
+ $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
30
+ ?>
31
+ <tr>
32
+ <td><?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getProductName()) ?>" class="product-image"><?php endif;?><img src="<?php echo $this->getProductThumbnail()->resize(75); ?>" width="75" height="75" alt="<?php echo $this->htmlEscape($this->getProductName()) ?>" /><?php if ($this->hasProductUrl()):?></a><?php endif;?></td>
33
+ <td>
34
+ <h2 class="product-name">
35
+ <?php if ($this->hasProductUrl()):?>
36
+ <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->htmlEscape($this->getProductName()) ?></a>
37
+ <?php else: ?>
38
+ <?php echo $this->htmlEscape($this->getProductName()) ?>
39
+ <?php endif; ?>
40
+ </h2>
41
+ <?php if ($_options = $this->getOptionList()):?>
42
+ <dl class="item-options">
43
+ <?php foreach ($_options as $_option) : ?>
44
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
45
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
46
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
47
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
48
+ <div class="truncated_full_value">
49
+ <dl class="item-options">
50
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
51
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
52
+ </dl>
53
+ </div>
54
+ <?php endif; ?>
55
+ </dd>
56
+ <?php endforeach; ?>
57
+ </dl>
58
+ <?php endif;?>
59
+ <?php if ($messages = $this->getMessages()): ?>
60
+ <?php foreach ($messages as $message): ?>
61
+ <p class="item-msg <?php echo $message['type'] ?>">* <?php echo $message['text'] ?></p>
62
+ <?php endforeach; ?>
63
+ <?php endif; ?>
64
+ <?php if ($addtInfoBlock = $this->getProductAdditionalInformationBlock()):?>
65
+ <?php echo $addtInfoBlock->setItem($_item)->toHtml() ?>
66
+ <?php endif;?>
67
+ </td>
68
+ <td class="a-center">
69
+ <?php if ($isVisibleProduct): ?>
70
+ <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item parameters') ?>"><?php echo $this->__('Edit') ?></a>
71
+ <?php endif ?>
72
+ </td>
73
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
74
+ <td class="a-center">
75
+ <?php if ($isVisibleProduct): ?>
76
+ <input type="checkbox" value="1" name="cart[<?php echo $_item->getId() ?>][wishlist]" title="<?php echo $this->__('Move to Wishlist') ?>" class="checkbox" />
77
+ <?php endif ?>
78
+ </td>
79
+ <?php endif ?>
80
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
81
+ <td class="a-right">
82
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
83
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
84
+ <?php else: ?>
85
+ <span class="cart-price">
86
+ <?php endif; ?>
87
+
88
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
89
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
90
+ <?php else: ?>
91
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
92
+ <?php endif; ?>
93
+
94
+ </span>
95
+
96
+
97
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
98
+
99
+ <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
100
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
101
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
102
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
103
+ <?php endforeach; ?>
104
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
105
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
106
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
107
+ <?php endforeach; ?>
108
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
109
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
110
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
111
+ <?php endforeach; ?>
112
+ <?php endif; ?>
113
+ </div>
114
+
115
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
116
+ <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
117
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
118
+ </div>
119
+ <?php endif; ?>
120
+ <?php endif; ?>
121
+ </td>
122
+ <?php endif; ?>
123
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
124
+ <td>
125
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
126
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
127
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
128
+ <?php else: ?>
129
+ <span class="cart-price">
130
+ <?php endif; ?>
131
+
132
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
133
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
134
+ <?php else: ?>
135
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
136
+ <?php endif; ?>
137
+
138
+ </span>
139
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
140
+
141
+ <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
142
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
143
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
144
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
145
+ <?php endforeach; ?>
146
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
147
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
148
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
149
+ <?php endforeach; ?>
150
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
151
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
152
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
153
+ <?php endforeach; ?>
154
+ <?php endif; ?>
155
+ </div>
156
+
157
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
158
+ <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
159
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
160
+ </div>
161
+ <?php endif; ?>
162
+ <?php endif; ?>
163
+ </td>
164
+ <?php endif; ?>
165
+ <td class="a-center">
166
+ <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo $this->__('Qty') ?>" class="input-text qty" maxlength="12" />
167
+ </td>
168
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
169
+ <td class="a-right">
170
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
171
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
172
+ <?php else: ?>
173
+ <span class="cart-price">
174
+ <?php endif; ?>
175
+
176
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
177
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
178
+ <?php else: ?>
179
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
180
+ <?php endif; ?>
181
+
182
+ </span>
183
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
184
+
185
+ <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
186
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
187
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
188
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
189
+ <?php endforeach; ?>
190
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
191
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
192
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
193
+ <?php endforeach; ?>
194
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
195
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
196
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
197
+ <?php endforeach; ?>
198
+ <?php endif; ?>
199
+ </div>
200
+
201
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
202
+ <div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
203
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
204
+ </div>
205
+ <?php endif; ?>
206
+ <?php endif; ?>
207
+ </td>
208
+ <?php endif; ?>
209
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
210
+ <td>
211
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
212
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
213
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
214
+ <?php else: ?>
215
+ <span class="cart-price">
216
+ <?php endif; ?>
217
+
218
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
219
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
220
+ <?php else: ?>
221
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
222
+ <?php endif; ?>
223
+
224
+ </span>
225
+
226
+
227
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
228
+
229
+ <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
230
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
231
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
232
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
233
+ <?php endforeach; ?>
234
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
235
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
236
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
237
+ <?php endforeach; ?>
238
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
239
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
240
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
241
+ <?php endforeach; ?>
242
+ <?php endif; ?>
243
+ </div>
244
+
245
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
246
+ <div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
247
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
248
+ </div>
249
+ <?php endif; ?>
250
+ <?php endif; ?>
251
+ </td>
252
+ <?php endif; ?>
253
+ <td class="a-center"><a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo $this->__('Remove item')?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove item')?></a></td>
254
+ </tr>
app/design/frontend/smarttheme/default/template/checkout/cart/noItems.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Shopping Cart is Empty') ?></h1>
29
+ </div>
30
+ <div class="cart-empty">
31
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
32
+ <p><?php echo $this->__('You have no items in your shopping cart.') ?></p>
33
+ <p><?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p>
34
+ </div>
app/design/frontend/smarttheme/default/template/checkout/cart/shipping.phtml ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Mage_Checkout_Block_Cart_Shipping
30
+ */
31
+ ?>
32
+ <div class="shipping">
33
+ <h2><?php echo $this->__('Estimate Shipping and Tax') ?></h2>
34
+ <div class="shipping-form">
35
+ <form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form">
36
+ <p><?php echo $this->__('Enter your destination to get a shipping estimate.') ?></p>
37
+ <ul class="form-list">
38
+ <li>
39
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
40
+ <div class="input-box">
41
+ <?php echo Mage::getBlockSingleton('directory/data')->getCountryHtmlSelect($this->getEstimateCountryId()) ?>
42
+ </div>
43
+ </li>
44
+ <?php //if($this->getStateActive()): ?>
45
+ <li>
46
+ <label for="region_id"<?php if ($this->isStateProvinceRequired()) echo ' class="required"' ?>><?php if ($this->isStateProvinceRequired()) echo '<em>*</em>' ?><?php echo $this->__('State/Province') ?></label>
47
+ <div class="input-box">
48
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>>
49
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
50
+ </select>
51
+ <script type="text/javascript">
52
+ //<![CDATA[
53
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getEstimateRegionId() ?>");
54
+ //]]>
55
+ </script>
56
+ <input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getEstimateRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
57
+ </div>
58
+ </li>
59
+ <?php //endif; ?>
60
+ <?php if($this->getCityActive()): ?>
61
+ <li>
62
+ <label for="city"<?php if ($this->isCityRequired()) echo ' class="required"' ?>><?php if ($this->isCityRequired()) echo '<em>*</em>' ?><?php echo $this->__('City') ?></label>
63
+ <div class="input-box">
64
+ <input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->htmlEscape($this->getEstimateCity()) ?>" />
65
+ </div>
66
+ </li>
67
+ <?php endif; ?>
68
+ <li>
69
+ <label for="postcode"<?php if ($this->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($this->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo $this->__('Zip/Postal Code') ?></label>
70
+ <div class="input-box">
71
+ <input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->htmlEscape($this->getEstimatePostcode()) ?>" />
72
+ </div>
73
+ </li>
74
+ </ul>
75
+ <div class="buttons-set">
76
+ <button type="button" title="<?php echo $this->__('Get a Quote') ?>" onclick="coShippingMethodForm.submit()" class="button"><span><span><?php echo $this->__('Get a Quote') ?></span></span></button>
77
+ </div>
78
+ </form>
79
+ <script type="text/javascript">
80
+ //<![CDATA[
81
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>);
82
+ //]]>
83
+ </script>
84
+
85
+ <?php if (($_shippingRateGroups = $this->getEstimateRates())): ?>
86
+ <form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>">
87
+ <dl class="sp-methods">
88
+ <?php foreach ($_shippingRateGroups as $code => $_rates): ?>
89
+ <dt><?php echo $this->getCarrierName($code) ?></dt>
90
+ <dd>
91
+ <ul>
92
+ <?php foreach ($_rates as $_rate): ?>
93
+ <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>>
94
+ <?php if ($_rate->getErrorMessage()): ?>
95
+ <?php echo $_rate->getErrorMessage() ?>
96
+ <?php else: ?>
97
+ <input name="estimate_method" type="radio" value="<?php echo $this->htmlEscape($_rate->getCode()) ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
98
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
99
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
100
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
101
+ <?php echo $_excl; ?>
102
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
103
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
104
+ <?php endif; ?>
105
+ </label>
106
+ <?php endif ?>
107
+ </li>
108
+ <?php endforeach; ?>
109
+ </ul>
110
+ </dd>
111
+ <?php endforeach; ?>
112
+ </dl>
113
+ <div class="buttons-set">
114
+ <button type="submit" title="<?php echo $this->__('Update Total') ?>" class="button" name="do" value="<?php echo $this->__('Update Total') ?>"><span><span><?php echo $this->__('Update Total') ?></span></span></button>
115
+ </div>
116
+ </form>
117
+ <?php endif; ?>
118
+ <script type="text/javascript">
119
+ //<![CDATA[
120
+ var coShippingMethodForm = new VarienForm('shipping-zip-form');
121
+ var countriesWithOptionalZip = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
122
+
123
+ coShippingMethodForm.submit = function () {
124
+ var country = $F('country');
125
+ var optionalZip = false;
126
+
127
+ for (i=0; i < countriesWithOptionalZip.length; i++) {
128
+ if (countriesWithOptionalZip[i] == country) {
129
+ optionalZip = true;
130
+ }
131
+ }
132
+ if (optionalZip) {
133
+ $('postcode').removeClassName('required-entry');
134
+ }
135
+ else {
136
+ $('postcode').addClassName('required-entry');
137
+ }
138
+ return VarienForm.prototype.submit.bind(coShippingMethodForm)();
139
+ }
140
+ //]]>
141
+ </script>
142
+ </div>
143
+ </div>
app/design/frontend/smarttheme/default/template/checkout/cart/totals.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Shopping cart totals template
30
+ *
31
+ * @see Mage_Checkout_Block_Cart_Totals
32
+ */
33
+ ?>
34
+ <table id="shopping-cart-totals-table">
35
+ <col />
36
+ <col width="1" />
37
+ <tfoot>
38
+ <?php echo $this->renderTotals('footer'); ?>
39
+ </tfoot>
40
+ <tbody>
41
+ <?php echo $this->renderTotals(); ?>
42
+ </tbody>
43
+ </table>
app/design/frontend/smarttheme/default/template/checkout/onepage/link.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->isPossibleOnepageCheckout()):?>
28
+ <button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>
29
+ <?php endif?>
app/design/frontend/smarttheme/default/template/checkout/total/default.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <tr>
28
+ <th colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
29
+ <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
30
+ <?php echo $this->getTotal()->getTitle() ?>
31
+ <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
32
+ </th>
33
+ <td style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
34
+ <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
35
+ <?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()) ?>
36
+ <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
37
+ </td>
38
+ </tr>
app/design/frontend/smarttheme/default/template/customer/account/dashboard.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="dashboard">
28
+ <div class="page-title">
29
+ <h1><?php echo $this->__('My Dashboard') ?></h1>
30
+ </div>
31
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
32
+ <?php echo $this->getChildHtml('hello') ?>
33
+ <?php echo $this->getChildHtml('top') ?>
34
+ <div class="box-account box-info">
35
+ <div class="box-head">
36
+ <h2><?php echo $this->__('Account Information') ?></h2>
37
+ </div>
38
+ <?php echo $this->getChildHtml('info') ?>
39
+ <?php echo $this->getChildHtml('address') ?>
40
+ </div>
41
+ <?php echo $this->getChildHtml('info1') ?>
42
+ <?php echo $this->getChildHtml('info2') ?>
43
+ </div>
app/design/frontend/smarttheme/default/template/customer/account/dashboard/address.phtml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="col2-set">
28
+ <div class="box">
29
+ <div class="box-title">
30
+ <h3><?php echo $this->__('Address Book') ?></h3>
31
+ <a href="<?php echo $this->getAddressBookUrl() ?>"><?php echo $this->__('Manage Addresses') ?></a>
32
+ </div>
33
+ <div class="box-content">
34
+ <div class="col-1">
35
+ <h4><?php echo $this->__('Default Billing Address') ?></h4>
36
+ <address>
37
+ <?php echo $this->getPrimaryBillingAddressHtml() ?><br />
38
+ <a href="<?php echo $this->getPrimaryBillingAddressEditUrl() ?>"><?php echo $this->__('Edit Address') ?></a>
39
+ </address>
40
+ </div>
41
+ <div class="col-2">
42
+ <h4><?php echo $this->__('Default Shipping Address') ?></h4>
43
+ <address>
44
+ <?php echo $this->getPrimaryShippingAddressHtml() ?><br />
45
+ <a href="<?php echo $this->getPrimaryShippingAddressEditUrl() ?>"><?php echo $this->__('Edit Address') ?></a>
46
+ </address>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
app/design/frontend/smarttheme/default/template/customer/account/dashboard/hello.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="welcome-msg">
28
+ <p class="hello"><strong><?php echo $this->__('Hello, %s!', $this->htmlEscape($this->getCustomerName())) ?></strong></p>
29
+ <p><?php echo $this->__('From your My Account Dashboard you have the ability to view a snapshot of your recent account activity and update your account information. Select a link below to view or edit information.') ?></p>
30
+ </div>
app/design/frontend/smarttheme/default/template/customer/account/dashboard/info.phtml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="col2-set">
28
+ <div class="col-1">
29
+ <div class="box">
30
+ <div class="box-title">
31
+ <h3><?php echo $this->__('Contact Information') ?></h3>
32
+ <a href="<?php echo $this->getUrl('customer/account/edit') ?>"><?php echo $this->__('Edit') ?></a>
33
+ </div>
34
+ <div class="box-content">
35
+ <p>
36
+ <?php echo $this->htmlEscape($this->getCustomer()->getName()) ?><br />
37
+ <?php echo $this->htmlEscape($this->getCustomer()->getEmail()) ?><br />
38
+ <a href="<?php echo $this->getChangePasswordUrl() ?>"><?php echo $this->__('Change Password') ?></a>
39
+ </p>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <?php if( $this->isNewsletterEnabled() ): ?>
44
+ <div class="col-2">
45
+ <div class="box">
46
+ <div class="box-title">
47
+ <h3><?php echo $this->__('Newsletters') ?></h3>
48
+ <a href="<?php echo $this->getUrl('newsletter/manage') ?>"><?php echo $this->__('Edit') ?></a>
49
+ </div>
50
+ <div class="box-content">
51
+ <p>
52
+ <?php if( $this->getIsSubscribed() ): ?>
53
+ <?php echo $this->__("You are currently subscribed to 'General Subscription'.") ?>
54
+ <?php else: ?>
55
+ <?php echo $this->__('You are currently not subscribed to any newsletter.') ?>
56
+ <?php endif; ?>
57
+ </p>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <?php endif; ?>
62
+ </div>
app/design/frontend/smarttheme/default/template/customer/account/dashboard/newsletter.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="col-2">
28
+ <h4><?php echo $this->__('Newsletters') ?></h4>
29
+ <a href="<?php echo $this->getUrl('newsletter/manage') ?>"><?php echo $this->__('Edit Newsletters') ?></a>
30
+ <p><?php echo $this->__('You are currently subscribed to our newsletter.') ?></p>
31
+ </div>
app/design/frontend/smarttheme/default/template/customer/account/link/back.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="buttons-set">
28
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
29
+ </div>
app/design/frontend/smarttheme/default/template/customer/account/navigation.phtml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="block block-account">
28
+ <div class="block-title">
29
+ <strong><span><?php echo $this->__('My Account'); ?></span></strong>
30
+ </div>
31
+ <div class="block-content">
32
+ <ul>
33
+ <?php $_links = $this->getLinks(); ?>
34
+ <?php $_index = 1; ?>
35
+ <?php $_count = count($_links); ?>
36
+ <?php foreach ($_links as $_link): ?>
37
+ <?php $_last = ($_index++ >= $_count); ?>
38
+ <?php if ($this->isActive($_link)): ?>
39
+ <li class="current<?php echo ($_last ? ' last' : '') ?>"><strong><?php echo $_link->getLabel() ?></strong></li>
40
+ <?php else: ?>
41
+ <li<?php echo ($_last ? ' class="last"' : '') ?>><a href="<?php echo $_link->getUrl() ?>"><?php echo $_link->getLabel() ?></a></li>
42
+ <?php endif; ?>
43
+ <?php endforeach; ?>
44
+ </ul>
45
+ </div>
46
+ </div>
app/design/frontend/smarttheme/default/template/customer/address.phtml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Address Books') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <table width="100%">
32
+ <tr>
33
+ <td style="width:50%;"><h3>Default</h3>
34
+ <table width="100%">
35
+ <?php if(!empty($primaryAddresses)): ?>
36
+ <?php foreach($primaryAddresses as $_address): ?>
37
+ <tr>
38
+ <td>
39
+ <address>
40
+ <?php echo $_address->format('html') ?>
41
+ </address>
42
+ <p>
43
+ <strong><a href="<?php echo $this->getUrl('customer/address/form', array('address'=>$_address->getAddressId())) ?>" class="red-link"><?php echo $this->__('Edit Address') ?></a></strong>
44
+ </p>
45
+ </td>
46
+ </tr>
47
+ <?php endforeach; ?>
48
+ <?php else: ?>
49
+ <tr>
50
+ <td>
51
+ <p><?php echo $this->__('You have no default entries in your address book.') ?></p>
52
+ </td>
53
+ </tr>
54
+ <?php endif ?>
55
+ </table>
56
+ </td>
57
+ <td style="width:50%;"><h3><?php echo $this->__('Additional Address Entries') ?></h3>
58
+ <table width="100%">
59
+ <?php if(!empty($alternativeAddresses)): ?>
60
+ <?php foreach($alternativeAddresses as $_address): ?>
61
+ <tr>
62
+ <td>
63
+ <address>
64
+ <?php echo $_address->format('html') ?>
65
+ </address>
66
+ <p>
67
+ <strong><a href="<?php echo $this->getUrl('customer/address/form', array('address'=>$_address->getAddressId())) ?>" class="red-link"><?php echo $this->__('Edit Address') ?></a></strong><span class="separator">&nbsp;|&nbsp;</span><strong><a href="#" onclick="return deleteAddress('<?php echo $_address->getAddressId() ?>');" class="red-link"><?php echo $this->__('Delete Address') ?></a></strong>
68
+ </p>
69
+ </td>
70
+ </tr>
71
+ <?php endforeach; ?>
72
+ <?php else: ?>
73
+ <tr>
74
+ <td>
75
+ <p><?php echo $this->__('You have no additional entries in your address book.') ?></p>
76
+ </td>
77
+ </tr>
78
+ <?php endif ?>
79
+ </table>
80
+ </td>
81
+ </tr>
82
+ </table>
83
+ <div class="buttons-set">
84
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/account/') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
85
+ <button type="button" onclick="window.location='<?php echo $this->getUrl('customer/address/form') ?>';" class="button"><span><span><?php echo $this->__('New Address') ?></span></span></button>
86
+ </div>
87
+ <script type="text/javascript">
88
+ function deleteAddress(addressId) {
89
+ if(confirm('<?php echo $this->__('Are you sure you want to delete this address?') ?>')) {
90
+ window.location='<?php echo $this->getUrl("customer/address/delete") ?>address/'+addressId;
91
+ }
92
+ return false;
93
+ }
94
+ </script>
app/design/frontend/smarttheme/default/template/customer/address/book.phtml ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Temlate for Mage_Customer_Block_Address_Book block
30
+ * @var $test Mage_Customer_Block_Address_Book
31
+ */
32
+ ?>
33
+ <div class="page-title title-buttons">
34
+ <h1><?php echo $this->__('Address Book') ?></h1>
35
+ <button type="button" title="<?php echo $this->__('Add New Address') ?>" class="button" onclick="window.location='<?php echo $this->getAddAddressUrl() ?>';"><span><span><?php echo $this->__('Add New Address') ?></span></span></button>
36
+ </div>
37
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
38
+ <div class="col2-set addresses-list">
39
+ <div class="col-1 addresses-primary">
40
+ <h2><?php echo $this->__('Default Addresses') ?></h2>
41
+ <ol>
42
+ <?php if($_pAddsses = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling()): ?>
43
+ <li class="item">
44
+ <h3><?php echo $this->__('Default Billing Address') ?></h3>
45
+ <address>
46
+ <?php echo $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
47
+ </address>
48
+ <p><a href="<?php echo $this->getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>"><?php echo $this->__('Change Billing Address') ?></a></p>
49
+ </li>
50
+ <?php else: ?>
51
+ <li class="item">
52
+ <h3><?php echo $this->__('Default Billing Address') ?></h3>
53
+ <?php echo $this->__('You have no default billing address in your address book.') ?>
54
+ </li>
55
+ <?php endif ?>
56
+
57
+ <?php if($_pAddsses = Mage::getSingleton('customer/session')->getCustomer()->getDefaultShipping()): ?>
58
+ <li class="item">
59
+ <h3><?php echo $this->__('Default Shipping Address') ?></h3>
60
+ <address>
61
+ <?php echo $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
62
+ </address>
63
+ <p><a href="<?php echo $this->getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>"><?php echo $this->__('Change Shipping Address') ?></a></p>
64
+ </li>
65
+ <?php else: ?>
66
+ <li class="item empty">
67
+ <h3><?php echo $this->__('Default Shipping Address') ?></h3>
68
+ <p><?php echo $this->__('You have no default shipping address in your address book.') ?></p>
69
+ </li>
70
+ <?php endif ?>
71
+ </ol>
72
+ </div>
73
+ <div class="col-2 addresses-additional">
74
+ <h2><?php echo $this->__('Additional Address Entries') ?></h2>
75
+ <ol>
76
+ <?php if($_pAddsses = $this->getAdditionalAddresses()): ?>
77
+ <?php foreach($_pAddsses as $_address): ?>
78
+ <li class="item">
79
+ <address>
80
+ <?php echo $this->getAddressHtml($_address) ?>
81
+ </address>
82
+ <p><a href="<?php echo $this->getUrl('customer/address/edit', array('id'=>$_address->getId())) ?>"><?php echo $this->__('Edit Address') ?></a> <span class="separator">|</span> <a href="#" class="link-remove" onclick="return deleteAddress('<?php echo $_address->getId() ?>');"><?php echo $this->__('Delete Address') ?></a></p>
83
+ </li>
84
+ <?php endforeach; ?>
85
+ <?php else: ?>
86
+ <li class="item empty">
87
+ <p><?php echo $this->__('You have no additional address entries in your address book.') ?></p>
88
+ </li>
89
+ <?php endif ?>
90
+ </ol>
91
+ </div>
92
+ </div>
93
+ <div class="buttons-set">
94
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
95
+ </div>
96
+ <script type="text/javascript">
97
+ //<![CDATA[
98
+ function deleteAddress(addressId) {
99
+ if(confirm('<?php echo $this->__('Are you sure you want to delete this address?') ?>')) {
100
+ window.location='<?php echo $this->getDeleteUrl() ?>id/'+addressId;
101
+ }
102
+ return false;
103
+ }
104
+ //]]>
105
+ </script>
app/design/frontend/smarttheme/default/template/customer/address/edit.phtml ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Edit customer address template
30
+ *
31
+ * @see Mage_Customer_Block_Address_Edit
32
+ */
33
+ ?>
34
+ <?php if($this->getTitle()): ?>
35
+ <div class="page-title">
36
+ <h1><?php echo $this->getTitle() ?></h1>
37
+ </div>
38
+ <?php endif; ?>
39
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
40
+ <form action="<?php echo $this->getSaveUrl() ?>" method="post" id="form-validate">
41
+ <div class="fieldset">
42
+ <?php echo $this->getBlockHtml('formkey')?>
43
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
44
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
45
+ <h2 class="legend"><?php echo $this->__('Contact Information') ?></h2>
46
+ <ul class="form-list">
47
+ <li class="fields">
48
+ <?php echo $this->getNameBlockHtml() ?>
49
+ </li>
50
+ <li class="wide">
51
+ <label for="company"><?php echo $this->__('Company') ?></label>
52
+ <div class="input-box">
53
+ <input type="text" name="company" id="company" title="<?php echo $this->__('Company') ?>" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" class="input-text" />
54
+ </div>
55
+ </li>
56
+ <li class="fields">
57
+ <div class="field">
58
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
59
+ <div class="input-box">
60
+ <input type="text" name="telephone" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="telephone" />
61
+ </div>
62
+ </div>
63
+ <div class="field">
64
+ <label for="fax"><?php echo $this->__('Fax') ?></label>
65
+ <div class="input-box">
66
+ <input type="text" name="fax" id="fax" title="<?php echo $this->__('Fax') ?>" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" class="input-text" />
67
+ </div>
68
+ </div>
69
+ </li>
70
+ </ul>
71
+ </div>
72
+ <div class="fieldset">
73
+ <h2 class="legend"><?php echo $this->__('Address') ?></h2>
74
+ <ul class="form-list">
75
+ <li class="wide">
76
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
77
+ <div class="input-box">
78
+ <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
79
+ </div>
80
+ </li>
81
+ <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
82
+ <li class="wide">
83
+ <div class="input-box">
84
+ <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
85
+ </div>
86
+ </li>
87
+ <?php endfor ?>
88
+ <li class="fields">
89
+ <div class="field">
90
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
91
+ <div class="input-box">
92
+ <input type="text" name="city" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
93
+ </div>
94
+ </div>
95
+ <div class="field">
96
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
97
+ <div class="input-box">
98
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
99
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
100
+ </select>
101
+ <script type="text/javascript">
102
+ //<![CDATA[
103
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
104
+ //]]>
105
+ </script>
106
+ <input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" />
107
+ </div>
108
+ </div>
109
+ </li>
110
+ <li class="fields">
111
+ <div class="field">
112
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
113
+ <div class="input-box">
114
+ <input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
115
+ </div>
116
+ </div>
117
+ <div class="field">
118
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
119
+ <div class="input-box">
120
+ <?php echo $this->getCountryHtmlSelect() ?>
121
+ </div>
122
+ </div>
123
+ </li>
124
+ <li<?php if($this->canSetAsDefaultBilling()) echo ' class="control"' ?>>
125
+ <?php if($this->isDefaultBilling()): ?>
126
+ <strong><?php echo $this->__('Default Billing Address') ?></strong>
127
+ <?php elseif($this->canSetAsDefaultBilling()): ?>
128
+ <input type="checkbox" id="primary_billing" name="default_billing" value="1" title="<?php echo $this->__('Use as My Default Billing Address') ?>" class="checkbox" /><label for="primary_billing"><?php echo $this->__('Use as my default billing address') ?></label>
129
+ <?php else: ?>
130
+ <input type="hidden" name="default_billing" value="1" />
131
+ <?php endif; ?>
132
+ </li>
133
+ <li<?php if($this->canSetAsDefaultShipping()) echo ' class="control"' ?>>
134
+ <?php if($this->isDefaultShipping()): ?>
135
+ <strong><?php echo $this->__('Default Shipping Address') ?></strong>
136
+ <?php elseif($this->canSetAsDefaultShipping()): ?>
137
+ <input type="checkbox" id="primary_shipping" name="default_shipping" value="1" title="<?php echo $this->__('Use as My Default Shipping Address') ?>" class="checkbox" /><label for="primary_shipping"><?php echo $this->__('Use as my default shipping address') ?></label>
138
+ <?php else: ?>
139
+ <input type="hidden" name="default_shipping" value="1" />
140
+ <?php endif; ?>
141
+ </li>
142
+ </ul>
143
+ </div>
144
+ <div class="buttons-set">
145
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
146
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
147
+ <button type="submit" title="<?php echo $this->__('Save Address') ?>" class="button"><span><span><?php echo $this->__('Save Address') ?></span></span></button>
148
+ </div>
149
+ </form>
150
+ <script type="text/javascript">
151
+ //<![CDATA[
152
+ var dataForm = new VarienForm('form-validate', true);
153
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
154
+ //]]>
155
+ </script>
app/design/frontend/smarttheme/default/template/customer/balance.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
28
+ <?php echo $this->__('Your account balance is: %s', $customer->getStoreBalance()) ?>
29
+ <div class="buttons-set">
30
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/account') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
31
+ </div>
app/design/frontend/smarttheme/default/template/customer/form/address.phtml ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <script type="text/javascript">countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?></script>
28
+
29
+ <div class="page-title">
30
+ <h1><?php if($data->getAddressId()): ?><?php echo $this->__('Edit Address Entry') ?><?php else: ?><?php echo $this->__('New Address Entry') ?><?php endif ?></h1>
31
+ </div>
32
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
33
+ <form action="<?php echo $action ?>" method="post" id="form-validate">
34
+ <div class="fieldset">
35
+ <input type="hidden" name="address_id" value="<?php echo $data->getAddressId() ?>" />
36
+ <input type="hidden" name="customer_id" id="address_id" value="<?php echo $data->getCustomerId() ?>" />
37
+ <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
38
+ <ul class="form-list">
39
+ <li class="fields">
40
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($data)->toHtml() ?>
41
+ </li>
42
+ <li>
43
+ <label for="company"><?php echo $this->__('Company') ?></label>
44
+ <div class="input-box">
45
+ <input type="text" name="company" id="company" title="<?php echo $this->__('Company') ?>" value="<?php echo $this->htmlEscape($data->getCompany()) ?>" class="input-text" />
46
+ </div>
47
+ </li>
48
+ </ul>
49
+ </div>
50
+ <div class="fieldset">
51
+ <h2 class="legend"><?php echo $this->__('Address') ?></h2>
52
+ <ul class="form-list">
53
+ <li class="wide">
54
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
55
+ <div class="input-box">
56
+ <input type="text" name="street[]" value="<?php echo $this->htmlEscape($data->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
57
+ </div>
58
+ </li>
59
+ <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
60
+ <li class="wide">
61
+ <div class="input-box">
62
+ <input type="text" name="street[]" value="<?php echo $this->htmlEscape($data->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address '.$_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
63
+ </div>
64
+ </li>
65
+ <?php endfor ?>
66
+ <li class="fields">
67
+ <div class="field">
68
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
69
+ <div class="input-box">
70
+ <input type="text" name="city" value="<?php echo $this->htmlEscape($data->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
71
+ </div>
72
+ </div>
73
+ <div class="field">
74
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
75
+ <div class="input-box">
76
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
77
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
78
+ </select>
79
+ <script type="text/javascript">
80
+ //<![CDATA[
81
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
82
+ //]]>
83
+ </script>
84
+ <input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text required-entry" style="display:none;" />
85
+ </div>
86
+ </div>
87
+ </li>
88
+ <li class="fields">
89
+ <div class="field">
90
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
91
+ <div class="input-box">
92
+ <input type="text" name="postcode" value="<?php echo $this->htmlEscape($data->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
93
+ </div>
94
+ </div>
95
+ <div class="field">
96
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
97
+ <div class="input-box">
98
+ <select name="country_id" id="country" title="<?php echo $this->__('Country') ?>" class="validate-select">
99
+ <?php echo $countries->toHtmlOptions($data->getCountryId()) ?>
100
+ </select>
101
+ </div>
102
+ </div>
103
+ </li>
104
+ <li class="fields">
105
+ <div class="field">
106
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
107
+ <div class="input-box">
108
+ <input type="text" name="telephone" value="<?php echo $this->htmlEscape($data->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text" id="telephone" />
109
+ </div>
110
+ </div>
111
+ <div class="field">
112
+ <label for="fax"><?php echo $this->__('Fax') ?></label>
113
+ <div class="input-box">
114
+ <input type="text" name="fax" value="<?php echo $this->htmlEscape($data->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="fax" />
115
+ </div>
116
+ </div>
117
+ </li>
118
+ <?php foreach ($primaryTypes as $code=>$type): ?>
119
+ <li<?php if (!$address->isPrimary($type['address_type_id'])) echo ' class="control"' ?>>
120
+ <?php if ($address->isPrimary($type['address_type_id'])): ?>
121
+ <strong><?php echo $this->__("This is My Default %s Address", ucfirst($type['name'])) ?></strong>
122
+ <?php else: ?>
123
+ <input type="checkbox" id="primary_<?php echo $code ?>" name="primary_types[]" value="<?php echo $type['address_type_id'] ?>" class="checkbox" /><label for="primary_<?php echo $code ?>"><?php echo $this->__("Use as My Default %s Address", ucfirst($type['name'])) ?></label>
124
+ <?php endif ?>
125
+ </li>
126
+ <?php endforeach ?>
127
+ </ul>
128
+ </div>
129
+ <div class="buttons-set">
130
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
131
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/address/') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
132
+ <button type="submit" class="button" title="<?php echo $this->__('Save Address') ?>"><span><span><?php echo $this->__('Save Address') ?></span></span></button>
133
+ </div>
134
+ </form>
135
+ <script type="text/javascript">
136
+ //<![CDATA[
137
+ var dataForm = new VarienForm('form-validate', true);
138
+ //dataForm.setElementsRelation('country', 'state', '<?php echo $this->getUrl('directory/json/childRegion') ?>');
139
+ new RegionUpdater('country', 'region', 'region_id', countryRegions, undefined, 'zip');
140
+ //]]>
141
+ </script>
app/design/frontend/smarttheme/default/template/customer/form/changepassword.phtml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Change Account Password') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <form action="<?php echo $action ?>" method="post" id="form-validate">
32
+ <div class="fieldset">
33
+ <h2 class="legend"><?php echo $this->__('Change Account Password') ?></h2>
34
+ <ul class="form-list">
35
+ <li>
36
+ <label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
37
+ <div class="input-box">
38
+ <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text required-entry" name="current_password" id="current_password" />
39
+ </div>
40
+ </li>
41
+ <li class="fields">
42
+ <div class="field">
43
+ <label for="password" class="required"><em>*</em><?php echo $this->__('New Password') ?></label>
44
+ <div class="input-box">
45
+ <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text required-entry validate-password" name="password" id="password" />
46
+ </div>
47
+ </div>
48
+ <div class="field">
49
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label>
50
+ <div class="input-box">
51
+ <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" />
52
+ </div>
53
+ </div>
54
+ </li>
55
+ </ul>
56
+ </div>
57
+ <div class="buttons-set">
58
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
59
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/account') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
60
+ <button type="submit" title="<?php echo $this->__('Save Password') ?>" class="button"><span><span><?php echo $this->__('Save Password') ?></span></span></button>
61
+ </div>
62
+ </form>
63
+ <script type="text/javascript">
64
+ //<![CDATA[
65
+ var dataForm = new VarienForm('form-validate');
66
+ //]]>
67
+ </script>
app/design/frontend/smarttheme/default/template/customer/form/confirmation.phtml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Send confirmation link') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <form action="" method="post" id="form-validate">
32
+ <div class="fieldset">
33
+ <h2 class="legend"><?php echo $this->__('Retrieve your confirmation link here') ?></h2>
34
+ <p><?php echo $this->__('Please enter your email below and we\'ll send you confirmation link for it.') ?></p>
35
+ <ul class="form-list">
36
+ <li>
37
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
38
+ <div class="input-box">
39
+ <input type="text" name="email" id="email_address" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" value="<?php echo $this->htmlEscape($this->getEmail()) ?>" />
40
+ </div>
41
+ </li>
42
+ </ul>
43
+ </div>
44
+ <div class="buttons-set">
45
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
46
+ <p class="back-link"><a href="<?php echo $this->helper('customer')->getLoginUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Login') ?></a></p>
47
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
48
+ </div>
49
+ </form>
50
+ <script type="text/javascript">
51
+ //<![CDATA[
52
+ var dataForm = new VarienForm('form-validate', true);
53
+ //]]>
54
+ </script>
app/design/frontend/smarttheme/default/template/customer/form/edit.phtml ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Edit Account Information') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <form action="<?php echo $this->getUrl('customer/account/editPost') ?>" method="post" id="form-validate">
32
+ <div class="fieldset">
33
+ <?php echo $this->getBlockHtml('formkey')?>
34
+ <h2 class="legend"><?php echo $this->__('Account Information') ?></h2>
35
+ <ul class="form-list">
36
+ <li class="fields">
37
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getCustomer())->toHtml() ?>
38
+ </li>
39
+ <li>
40
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
41
+ <div class="input-box">
42
+ <input type="text" name="email" id="email" value="<?php echo $this->htmlEscape($this->getCustomer()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" />
43
+ </div>
44
+ </li>
45
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
46
+ <?php if ($_dob->isEnabled()): ?>
47
+ <li><?php echo $_dob->setDate($this->getCustomer()->getDob())->toHtml() ?></li>
48
+ <?php endif ?>
49
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
50
+ <?php if ($_taxvat->isEnabled()): ?>
51
+ <li><?php echo $_taxvat->setTaxvat($this->getCustomer()->getTaxvat())->toHtml() ?></li>
52
+ <?php endif ?>
53
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
54
+ <?php if ($_gender->isEnabled()): ?>
55
+ <li><?php echo $_gender->setGender($this->getCustomer()->getGender())->toHtml() ?></li>
56
+ <?php endif ?>
57
+ <li class="control">
58
+ <input type="checkbox" name="change_password" id="change_password" value="1" onclick="setPasswordForm(this.checked)" title="<?php echo $this->__('Change Password') ?>"<?php if($this->getCustomer()->getChangePassword()==1): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="change_password"><?php echo $this->__('Change Password') ?></label>
59
+ </li>
60
+ </ul>
61
+ </div>
62
+ <div class="fieldset" style="display:none;">
63
+ <h2 class="legend"><?php echo $this->__('Change Password') ?></h2>
64
+ <ul class="form-list">
65
+ <li>
66
+ <label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
67
+ <div class="input-box">
68
+ <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current_password" />
69
+ </div>
70
+ </li>
71
+ <li class="fields">
72
+ <div class="field">
73
+ <label for="password" class="required"><em>*</em><?php echo $this->__('New Password') ?></label>
74
+ <div class="input-box">
75
+ <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text validate-password" name="password" id="password" />
76
+ </div>
77
+ </div>
78
+ <div class="field">
79
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label>
80
+ <div class="input-box">
81
+ <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text validate-cpassword" name="confirmation" id="confirmation" />
82
+ </div>
83
+ </div>
84
+ </li>
85
+ </ul>
86
+ </div>
87
+ <div class="buttons-set">
88
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
89
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
90
+ <button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
91
+ </div>
92
+ </form>
93
+ <script type="text/javascript">
94
+ //<![CDATA[
95
+ var dataForm = new VarienForm('form-validate', true);
96
+ function setPasswordForm(arg){
97
+ if(arg){
98
+ $('current_password').up(3).show();
99
+ $('current_password').addClassName('required-entry');
100
+ $('password').addClassName('required-entry');
101
+ $('confirmation').addClassName('required-entry');
102
+
103
+ }else{
104
+ $('current_password').up(3).hide();
105
+ $('current_password').removeClassName('required-entry');
106
+ $('password').removeClassName('required-entry');
107
+ $('confirmation').removeClassName('required-entry');
108
+ }
109
+ }
110
+ <?php if($this->getCustomer()->getChangePassword()): ?>
111
+ setPasswordForm(true);
112
+ <?php endif; ?>
113
+ //]]>
114
+ </script>
app/design/frontend/smarttheme/default/template/customer/form/forgotpassword.phtml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Forgot Your Password?') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <form action="<?php echo $this->getUrl('*/*/forgotpasswordpost') ?>" method="post" id="form-validate">
32
+ <div class="fieldset">
33
+ <h2 class="legend"><?php echo $this->__('Retrieve your password here') ?></h2>
34
+ <p><?php echo $this->__('Please enter your email below and we will send you a new password.') ?></p>
35
+ <ul class="form-list">
36
+ <li>
37
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
38
+ <div class="input-box">
39
+ <input type="text" name="email" alt="email" id="email_address" class="input-text required-entry validate-email" value="<?php echo $this->htmlEscape($this->getEmailValue()) ?>" />
40
+ </div>
41
+ </li>
42
+ </ul>
43
+ </div>
44
+ <div class="buttons-set">
45
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
46
+ <p class="back-link"><a href="<?php echo $this->helper('customer')->getLoginUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Login') ?></a></p>
47
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
48
+ </div>
49
+ </form>
50
+ <script type="text/javascript">
51
+ //<![CDATA[
52
+ var dataForm = new VarienForm('form-validate', true);
53
+ //]]>
54
+ </script>
app/design/frontend/smarttheme/default/template/customer/form/login.phtml ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Customer login form template
30
+ *
31
+ * @see Mage_Customer_Block_Form_Login
32
+ */
33
+ ?>
34
+ <div class="account-login">
35
+ <div class="page-title">
36
+ <h1><?php echo $this->__('Login or Create an Account') ?></h1>
37
+ </div>
38
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
39
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
40
+ <div class="col2-set">
41
+ <div class="col-1 new-users">
42
+ <div class="content">
43
+ <h2><?php echo $this->__('New Customers') ?></h2>
44
+ <p><?php echo $this->__('By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.') ?></p>
45
+ </div>
46
+ </div>
47
+ <div class="col-2 registered-users">
48
+ <div class="content">
49
+ <h2><?php echo $this->__('Registered Customers') ?></h2>
50
+ <p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
51
+ <ul class="form-list">
52
+ <li>
53
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
54
+ <div class="input-box">
55
+ <input type="text" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
56
+ </div>
57
+ </li>
58
+ <li>
59
+ <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
60
+ <div class="input-box">
61
+ <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
62
+ </div>
63
+ </li>
64
+ </ul>
65
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ <div class="col2-set">
70
+ <div class="col-1 new-users">
71
+ <div class="buttons-set">
72
+ <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo $this->getCreateAccountUrl() ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>
73
+ </div>
74
+ </div>
75
+ <div class="col-2 registered-users">
76
+ <div class="buttons-set">
77
+ <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
78
+ <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </form>
83
+ <script type="text/javascript">
84
+ //<![CDATA[
85
+ var dataForm = new VarienForm('login-form', true);
86
+ //]]>
87
+ </script>
88
+ </div>
app/design/frontend/smarttheme/default/template/customer/form/mini.login.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="block block-login">
28
+ <div class="block-title">
29
+ <strong><span><?php echo $this->__('Login') ?></span></strong>
30
+ </div>
31
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post">
32
+ <div class="block-content">
33
+ <label for="mini-login"><?php echo $this->__('Email:') ?></label><input type="text" name="login[username]" id="mini-login" class="input-text" />
34
+ <label for="mini-password"><?php echo $this->__('Password:') ?></label><input type="password" name="login[password]" id="mini-password" class="input-text" />
35
+ <div class="actions">
36
+ <button type="submit" class="button"><span><span><?php echo $this->__('Login') ?></span></span></button>
37
+ </div>
38
+ </div>
39
+ </form>
40
+ </div>
app/design/frontend/smarttheme/default/template/customer/form/newsletter.phtml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Newsletter Subscription') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <?php echo $this->getChildHtml('form_before')?>
32
+ <form action="<?php echo $this->getAction() ?>" method="post" id="form-validate">
33
+ <div class="fieldset">
34
+ <?php echo $this->getBlockHtml('formkey')?>
35
+ <h2 class="legend"><?php echo $this->__('Newsletter Subscription') ?></h2>
36
+ <ul class="form-list">
37
+ <li class="control"><input type="checkbox" name="is_subscribed" id="subscription" value="1" title="<?php echo $this->__('General Subscription') ?>"<?php if($this->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="subscription"><?php echo $this->__('General Subscription') ?></label></li>
38
+ </ul>
39
+ </div>
40
+ <div class="buttons-set">
41
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
42
+ <button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
43
+ </div>
44
+ </form>
45
+ <script type="text/javascript">
46
+ //<![CDATA[
47
+ var dataForm = new VarienForm('form-validate', true);
48
+ //]]>
49
+ </script>
app/design/frontend/smarttheme/default/template/customer/form/register.phtml ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Create account form template
30
+ *
31
+ * @see Mage_Customer_Block_Form_Register
32
+ */
33
+ ?>
34
+ <div class="account-create">
35
+ <div class="page-title">
36
+ <h1><?php echo $this->__('Create an Account') ?></h1>
37
+ </div>
38
+ <?php echo $this->getChildHtml('form_fields_before')?>
39
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
40
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
41
+ <div class="fieldset">
42
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
43
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
44
+ <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
45
+ <ul class="form-list">
46
+ <li class="fields">
47
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?>
48
+ </li>
49
+ <li>
50
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
51
+ <div class="input-box">
52
+ <input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
53
+ </div>
54
+ </li>
55
+ <?php if ($this->isNewsletterEnabled()): ?>
56
+ <li class="control">
57
+ <div class="input-box">
58
+ <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
59
+ </div>
60
+ <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
61
+ </li>
62
+ <?php endif ?>
63
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
64
+ <?php if ($_dob->isEnabled()): ?>
65
+ <li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
66
+ <?php endif ?>
67
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
68
+ <?php if ($_taxvat->isEnabled()): ?>
69
+ <li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
70
+ <?php endif ?>
71
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
72
+ <?php if ($_gender->isEnabled()): ?>
73
+ <li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
74
+ <?php endif ?>
75
+ </ul>
76
+ </div>
77
+ <?php if($this->getShowAddressFields()): ?>
78
+ <div class="fieldset">
79
+ <input type="hidden" name="create_address" value="1" />
80
+ <h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
81
+ <ul class="form-list">
82
+ <li class="fields">
83
+ <div class="field">
84
+ <label for="company"><?php echo $this->__('Company') ?></label>
85
+ <div class="input-box">
86
+ <input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
87
+ </div>
88
+ </div>
89
+ <div class="field">
90
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
91
+ <div class="input-box">
92
+ <input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
93
+ </div>
94
+ </div>
95
+ </li>
96
+ <li class="wide">
97
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
98
+ <div class="input-box">
99
+ <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
100
+ </div>
101
+ </li>
102
+ <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
103
+ <li class="wide">
104
+ <div class="input-box">
105
+ <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
106
+ </div>
107
+ </li>
108
+ <?php endfor ?>
109
+ <li class="fields">
110
+ <div class="field">
111
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
112
+ <div class="input-box">
113
+ <input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
114
+ </div>
115
+ </div>
116
+ <div class="field">
117
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
118
+ <div class="input-box">
119
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
120
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
121
+ </select>
122
+ <script type="text/javascript">
123
+ //<![CDATA[
124
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
125
+ //]]>
126
+ </script>
127
+ <input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
128
+ </div>
129
+ </div>
130
+ </li>
131
+ <li class="fields">
132
+ <div class="field">
133
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
134
+ <div class="input-box">
135
+ <input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
136
+ </div>
137
+ </div>
138
+ <div class="field">
139
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
140
+ <div class="input-box">
141
+ <?php echo $this->getCountryHtmlSelect() ?>
142
+ </div>
143
+ </div>
144
+ </li>
145
+ </ul>
146
+ <input type="hidden" name="default_billing" value="1" />
147
+ <input type="hidden" name="default_shipping" value="1" />
148
+ </div>
149
+ <?php endif; ?>
150
+ <div class="fieldset">
151
+ <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
152
+ <ul class="form-list">
153
+ <li class="fields">
154
+ <div class="field">
155
+ <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
156
+ <div class="input-box">
157
+ <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
158
+ </div>
159
+ </div>
160
+ <div class="field">
161
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
162
+ <div class="input-box">
163
+ <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
164
+ </div>
165
+ </div>
166
+ </li>
167
+ </ul>
168
+ </div>
169
+ <div class="buttons-set">
170
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
171
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
172
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
173
+ </div>
174
+ </form>
175
+ <script type="text/javascript">
176
+ //<![CDATA[
177
+ var dataForm = new VarienForm('form-validate', true);
178
+ <?php if($this->getShowAddressFields()): ?>
179
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
180
+ <?php endif; ?>
181
+ //]]>
182
+ </script>
183
+ </div>
app/design/frontend/smarttheme/default/template/customer/logout.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo Mage::helper('customer')->__('You are now logged out') ?></h1>
29
+ </div>
30
+ <p><?php echo Mage::helper('customer')->__('You have logged out and will be redirected to our homepage in 5 seconds.') ?></p>
31
+ <script type="text/javascript">
32
+ //<![CDATA[
33
+ setTimeout(function(){ location.href = '<?php echo $this->getUrl() ?>'},5000);
34
+ //]]>
35
+ </script>
app/design/frontend/smarttheme/default/template/customer/orders.phtml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @deprecated after 1.4.0.0-alpha3
29
+ */
30
+ ?>
31
+ <div class="page-title">
32
+ <h1><?php echo $this->__('My Orders') ?></h1>
33
+ </div>
34
+ <?php if($orders->getSize()): ?>
35
+ <table class="data-table" id="my-orders-table" >
36
+ <thead>
37
+ <tr>
38
+ <th><?php echo $this->__('Order #') ?></th>
39
+ <th><?php echo $this->__('Date') ?></th>
40
+ <!--<th class="a-center">Shipped To</th>-->
41
+ <th><?php echo $this->__('Total') ?></th>
42
+ <th><?php echo $this->__('Status') ?></th>
43
+ <th><?php echo $this->__('Details') ?></th>
44
+ </tr>
45
+ </thead>
46
+ <tbody>
47
+ <?php foreach ($orders as $order): ?>
48
+ <tr>
49
+ <td><?php echo $order->getRealOrderId() ?>&nbsp;</td>
50
+ <td><?php echo date("D, j M, Y", strtotime($order->getCreatedAt())) ?>&nbsp;</td>
51
+ <!--<td class="a-center">{$page.orders[io].customer}</td>-->
52
+ <td><?php echo $order->getGrandTotal() ?>&nbsp;</td>
53
+ <td><?php echo $order->getStatus() ?>&nbsp;</td>
54
+ <td><a href="<?php echo $this->getUrl('customer/order/view', array('order'=>$order->getOrderId())) ?>"><?php echo $this->__('View Order') ?></a>&nbsp;</td>
55
+ </tr>
56
+ <?php endforeach ?>
57
+ </tbody>
58
+ </table>
59
+ <script type="text/javascript">decorateTable('my-orders-table')</script>
60
+ <?php else: ?>
61
+ <p><?php echo $this->__('You have placed no orders yet.') ?></p>
62
+ <?php endif ?>
63
+ <div class="buttons-set">
64
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/account') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
65
+ </div>
app/design/frontend/smarttheme/default/template/customer/widget/dob.phtml ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ USAGE:
29
+
30
+ Simple:
31
+
32
+ <?php echo $this->getLayout()->createBlock('customer/widget_dob')
33
+ ->setDate($this->getCustomer()->getDob())
34
+ ->toHtml() ?>
35
+
36
+ For checkout/onepage/billing.phtml:
37
+
38
+ <?php echo $this->getLayout()->createBlock('customer/widget_dob')
39
+ ->setDate($this->getCustomer()->getDob())
40
+ ->setFieldIdFormat('billing:%s')
41
+ ->setFieldNameFormat('billing[%s]')
42
+ ->toHtml() ?>
43
+
44
+ NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css
45
+ Alternatively we could calculate widths automatically using block input parameters.
46
+ */
47
+
48
+ /**
49
+ * @see Mage_Customer_Block_Widget_Dob
50
+ */
51
+ ?>
52
+ <label for="<?php echo $this->getFieldId('month')?>"<?php if ($this->isRequired()) echo ' class="required"' ?>><?php if ($this->isRequired()) echo '<em>*</em>' ?><?php echo $this->__('Date of Birth') ?></label>
53
+ <div class="input-box customer-dob">
54
+ <?php
55
+ $this->setDateInput('d',
56
+ '<div class="dob-day">
57
+ <input type="text" id="' . $this->getFieldId('day') . '" name="' . $this->getFieldName('day') . '" value="' . $this->getDay() . '" title="' . $this->__('Day') . '" class="input-text validate-custom" ' . $this->getFieldParams() . ' />
58
+ <label for="' . $this->getFieldId('day') . '">' . $this->__('DD') . '</label>
59
+ </div>'
60
+ );
61
+
62
+ $this->setDateInput('m',
63
+ '<div class="dob-month">
64
+ <input type="text" id="' . $this->getFieldId('month') . '" name="' . $this->getFieldName('month') . '" value="' . $this->getMonth() . '" title="' . $this->__('Month') . '" class="input-text validate-custom" ' . $this->getFieldParams() . ' />
65
+ <label for="' . $this->getFieldId('month') . '">' . $this->__('MM') . '</label>
66
+ </div>'
67
+ );
68
+
69
+ $this->setDateInput('y',
70
+ '<div class="dob-year">
71
+ <input type="text" id="' . $this->getFieldId('year') . '" name="' . $this->getFieldName('year') . '" value="' . $this->getYear() . '" title="' . $this->__('Year') . '" class="input-text validate-custom" ' . $this->getFieldParams() . ' />
72
+ <label for="' . $this->getFieldId('year') . '">' . $this->__('YYYY') . '</label>
73
+ </div>'
74
+ );
75
+ ?>
76
+ <?php echo $this->getSortedDateInputs() ?>
77
+ <div class="dob-full" style="display:none;">
78
+ <input type="hidden" id="<?php echo $this->getFieldId('dob')?>" name="<?php echo $this->getFieldName('dob')?>" />
79
+ </div>
80
+
81
+ <div class="validation-advice" style="display:none;"></div>
82
+ </div>
83
+ <script type="text/javascript">
84
+ //<![CDATA[
85
+ var customer_dob = new Varien.DOB('.customer-dob', <?php echo $this->isRequired() ? 'true' : 'false' ?>, '<?php echo $this->getDateFormat() ?>');
86
+ //]]>
87
+ </script>
app/design/frontend/smarttheme/default/template/customer/widget/gender.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <label for="<?php echo $this->getFieldId('gender')?>"<?php if ($this->isRequired()) echo ' class="required"' ?>><?php if ($this->isRequired()) echo '<em>*</em>' ?><?php echo $this->__('Gender') ?></label>
28
+ <div class="input-box">
29
+ <select id="<?php echo $this->getFieldId('gender')?>" name="<?php echo $this->getFieldName('gender')?>" title="<?php echo $this->__('Gender') ?>"<?php if ($this->isRequired()):?> class="validate-select"<?php endif; ?> <?php echo $this->getFieldParams() ?>>
30
+ <?php $options = Mage::getResourceSingleton('customer/customer')->getAttribute('gender')->getSource()->getAllOptions();?>
31
+ <?php $value = $this->getGender();?>
32
+ <?php foreach ($options as $option):?>
33
+ <option value="<?php echo $option['value'] ?>"<?php if ($option['value'] == $value) echo ' selected="selected"' ?>><?php echo $option['label'] ?></option>
34
+ <?php endforeach;?>
35
+ </select>
36
+ </div>
app/design/frontend/smarttheme/default/template/customer/widget/name.phtml ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ USAGE:
29
+
30
+ Simple:
31
+
32
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')
33
+ ->setObject($this->getAddress())
34
+ ->toHtml() ?>
35
+
36
+ For checkout/onepage/shipping.phtml:
37
+
38
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')
39
+ ->setObject($this->getAddress())
40
+ ->setFieldIdFormat('shipping:%s')
41
+ ->setFieldNameFormat('shipping[%s]')
42
+ ->setFieldParams('onchange="shipping.setSameAsBilling(false);"')
43
+ ->toHtml() ?>
44
+ */
45
+ /**
46
+ * @var Mage_Customer_Block_Widget_Name $this
47
+ */
48
+ ?>
49
+ <div class="<?php echo $this->getContainerClassName()?>">
50
+ <?php if ($this->showPrefix()): ?>
51
+ <div class="field name-prefix">
52
+ <label for="<?php echo $this->getFieldId('prefix')?>"<?php if ($this->isPrefixRequired()) echo ' class="required"' ?>><?php if ($this->isPrefixRequired()) echo '<em>*</em>' ?><?php echo $this->__('Prefix') ?></label>
53
+ <div class="input-box">
54
+ <?php if ($this->getPrefixOptions()===false): ?>
55
+ <input type="text" id="<?php echo $this->getFieldId('prefix')?>" name="<?php echo $this->getFieldName('prefix')?>" value="<?php echo $this->htmlEscape($this->getObject()->getPrefix()) ?>" title="<?php echo $this->__('Prefix') ?>" class="input-text<?php if ($this->isPrefixRequired()):?> required-entry<?php endif; ?>" <?php echo $this->getFieldParams() ?> />
56
+ <?php else: ?>
57
+ <select id="<?php echo $this->getFieldId('prefix')?>" name="<?php echo $this->getFieldName('prefix')?>" title="<?php echo $this->__('Prefix') ?>"<?php if ($this->isPrefixRequired()):?> class="required-entry"<?php endif; ?> <?php echo $this->getFieldParams() ?>>
58
+ <?php foreach ($this->getPrefixOptions() as $_option): ?>
59
+ <option value="<?php echo $_option?>"<?php if ($this->getObject()->getPrefix()==$_option):?> selected="selected"<?php endif; ?>><?php echo $this->__($_option)?></option>
60
+ <?php endforeach ?>
61
+ </select>
62
+ <?php endif; ?>
63
+ </div>
64
+ </div>
65
+ <?php endif; ?>
66
+ <div class="field name-firstname">
67
+ <label for="<?php echo $this->getFieldId('firstname')?>" class="required"><em>*</em><?php echo $this->__('First Name') ?></label>
68
+ <div class="input-box">
69
+ <input type="text" id="<?php echo $this->getFieldId('firstname')?>" name="<?php echo $this->getFieldName('firstname')?>" value="<?php echo $this->htmlEscape($this->getObject()->getFirstname()) ?>" title="<?php echo $this->__('First Name') ?>" class="input-text required-entry" <?php echo $this->getFieldParams() ?> />
70
+ </div>
71
+ </div>
72
+ <?php if ($this->showMiddlename()): ?>
73
+ <div class="field name-middlename">
74
+ <label for="<?php echo $this->getFieldId('middlename')?>"><?php echo $this->__('M.I.') ?></label>
75
+ <div class="input-box">
76
+ <input type="text" id="<?php echo $this->getFieldId('middlename')?>" name="<?php echo $this->getFieldName('middlename')?>" value="<?php echo $this->htmlEscape($this->getObject()->getMiddlename()) ?>" title="<?php echo $this->__('M.I.') ?>" class="input-text" <?php echo $this->getFieldParams() ?> />
77
+ </div>
78
+ </div>
79
+ <?php endif; ?>
80
+ <div class="field name-lastname">
81
+ <label for="<?php echo $this->getFieldId('lastname')?>" class="required"><em>*</em><?php echo $this->__('Last Name') ?></label>
82
+ <div class="input-box">
83
+ <input type="text" id="<?php echo $this->getFieldId('lastname')?>" name="<?php echo $this->getFieldName('lastname')?>" value="<?php echo $this->htmlEscape($this->getObject()->getLastname()) ?>" title="<?php echo $this->__('Last Name') ?>" class="input-text required-entry" <?php echo $this->getFieldParams() ?> />
84
+ </div>
85
+ </div>
86
+ <?php if ($this->showSuffix()): ?>
87
+ <div class="field name-suffix">
88
+ <label for="<?php echo $this->getFieldId('suffix')?>"<?php if ($this->isSuffixRequired()) echo ' class="required"' ?>><?php if ($this->isSuffixRequired()) echo '<em>*</em>' ?><?php echo $this->__('Suffix') ?></label>
89
+ <div class="input-box">
90
+ <?php if ($this->getSuffixOptions()===false): ?>
91
+ <input type="text" id="<?php echo $this->getFieldId('suffix')?>" name="<?php echo $this->getFieldName('suffix')?>" value="<?php echo $this->htmlEscape($this->getObject()->getSuffix()) ?>" title="<?php echo $this->__('Suffix') ?>" class="input-text<?php if ($this->isSuffixRequired()):?> required-entry<?php endif; ?>" <?php echo $this->getFieldParams() ?> />
92
+ <?php else: ?>
93
+ <select id="<?php echo $this->getFieldId('suffix')?>" name="<?php echo $this->getFieldName('suffix')?>" title="<?php echo $this->__('Suffix') ?>"<?php if ($this->isSuffixRequired()):?> class="required-entry"<?php endif; ?> <?php echo $this->getFieldParams() ?>>
94
+ <?php foreach ($this->getSuffixOptions() as $_option): ?>
95
+ <option value="<?php echo $_option?>"<?php if ($this->getObject()->getSuffix()==$_option):?> selected="selected"<?php endif; ?>><?php echo $this->__($_option)?></option>
96
+ <?php endforeach ?>
97
+ </select>
98
+ <?php endif; ?>
99
+ </div>
100
+ </div>
101
+ <?php endif; ?>
102
+ </div>
app/design/frontend/smarttheme/default/template/customer/widget/taxvat.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <label for="<?php echo $this->getFieldId('taxvat')?>"<?php if ($this->isRequired()) echo ' class="required"' ?>><?php if ($this->isRequired()) echo '<em>*</em>' ?><?php echo $this->__('Tax/VAT number') ?></label>
28
+ <div class="input-box">
29
+ <input type="text" id="<?php echo $this->getFieldId('taxvat')?>" name="<?php echo $this->getFieldName('taxvat')?>" value="<?php echo $this->htmlEscape($this->getTaxvat()) ?>" title="<?php echo $this->__('Tax/VAT number') ?>" class="input-text<?php if ($this->isRequired()):?> required-entry<?php endif; ?>" <?php echo $this->getFieldParams() ?> />
30
+ </div>
app/design/frontend/smarttheme/default/template/customer/wishlist.phtml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @deprecated after 1.4.0.0-alpha3
29
+ */
30
+ ?>
31
+ <div class="page-title">
32
+ <h1><?php echo $this->__('Wishlist') ?></h1>
33
+ </div>
34
+ <?php if($wishlist->getSize()): ?>
35
+ <form action="<?php echo $this->getUrl('customer/wishlist/updatePost') ?>" method="post">
36
+ <table class="data-table">
37
+ <col />
38
+ <col width="60" />
39
+ <col width="60" />
40
+ <col width="60" />
41
+ <thead>
42
+ <tr>
43
+ <th><?php echo $this->__('Product') ?></th>
44
+ <th><?php echo $this->__('Status') ?></th>
45
+ <th><?php echo $this->__('To Cart') ?></th>
46
+ <th><?php echo $this->__('Remove') ?></th>
47
+ </tr>
48
+ </thead>
49
+ <tbody>
50
+ <?php foreach($wishlist as $item): ?>
51
+ <tr>
52
+ <td>
53
+ <input type="hidden" value="1" name="wishlist[<?php echo $item->getItemId() ?>]" />
54
+ <a href="<?php echo $this->getUrl('catalog/product/view/id/'.$item->getProduct()->getId()) ?>"><?php echo $this->htmlEscape($item->getProduct()->getName()) ?></a>
55
+ </td>
56
+ <td><?php echo $item->getStatus() ?></td>
57
+ <td><input type="checkbox" value="1" name="to_cart[<?php echo $item->getItemId() ?>]" class="checkbox" /></td>
58
+ <td><input type="checkbox" value="1" name="remove[<?php echo $item->getItemId() ?>]" class="checkbox" /></td>
59
+ </tr>
60
+ <?php endforeach ?>
61
+ </tbody>
62
+ </table>
63
+ <div class="buttons-set">
64
+ <a href="<?php echo Mage::getBaseUrl() ?>">&laquo; <?php echo $this->__('Continue Shopping') ?></a>
65
+ <input type="submit" value="<?php echo $this->__('Update') ?>" class="input-button" name="do" />
66
+ </div>
67
+ </form>
68
+ <?php else: ?>
69
+ <p><?php echo $this->__('You have placed no products yet.') ?></p>
70
+ <div class="buttons-set">
71
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/account') ?>"><small>&laquo; </small><?php echo $this->__('Back - link to the previously viewed page') ?></a></p>
72
+ </div>
73
+ <?php endif ?>
app/design/frontend/smarttheme/default/template/page/1column.phtml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Template for Mage_Page_Block_Html
30
+ */
31
+ ?>
32
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
33
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
34
+ <head>
35
+ <?php echo $this->getChildHtml('head') ?>
36
+ </head>
37
+ <body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
38
+ <?php echo $this->getChildHtml('after_body_start') ?>
39
+ <div class="wrapper">
40
+ <?php echo $this->getChildHtml('global_notices') ?>
41
+ <div class="page">
42
+ <?php echo $this->getChildHtml('header') ?>
43
+ <div class="main-container col1-layout">
44
+ <div class="main">
45
+ <?php echo $this->getChildHtml('breadcrumbs') ?>
46
+ <div class="col-main">
47
+ <?php echo $this->getChildHtml('global_messages') ?>
48
+ <?php echo $this->getChildHtml('content') ?>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <?php echo $this->getChildHtml('footer') ?>
53
+ <?php echo $this->getChildHtml('before_body_end') ?>
54
+ </div>
55
+ </div>
56
+ <?php echo $this->getAbsoluteFooter() ?>
57
+ </body>
58
+ </html>
app/design/frontend/smarttheme/default/template/page/2columns-left.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Template for Mage_Page_Block_Html
30
+ */
31
+ ?>
32
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
33
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
34
+ <head>
35
+ <?php echo $this->getChildHtml('head') ?>
36
+ </head>
37
+ <body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
38
+ <?php echo $this->getChildHtml('after_body_start') ?>
39
+ <div class="wrapper">
40
+ <?php echo $this->getChildHtml('global_notices') ?>
41
+ <div class="page">
42
+ <?php echo $this->getChildHtml('header') ?>
43
+ <div class="main-container col2-left-layout">
44
+ <div class="main">
45
+ <?php echo $this->getChildHtml('breadcrumbs') ?>
46
+ <div class="col-main">
47
+ <?php echo $this->getChildHtml('global_messages') ?>
48
+ <?php echo $this->getChildHtml('content') ?>
49
+ </div>
50
+ <div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
51
+ </div>
52
+ </div>
53
+ <?php echo $this->getChildHtml('footer') ?>
54
+ <?php echo $this->getChildHtml('before_body_end') ?>
55
+ </div>
56
+ </div>
57
+ <?php echo $this->getAbsoluteFooter() ?>
58
+ </body>
59
+ </html>
app/design/frontend/smarttheme/default/template/page/html/breadcrumbs.phtml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ $length = 0;
27
+ foreach($crumbs as $_crumbName=>$_crumbInfo) {
28
+ $lastlength = strlen($_crumbInfo['label']);
29
+ $length += $lastlength;
30
+ }
31
+ $displayLabel = true;
32
+ $chars = 15;
33
+ if ($length > $chars && ($length-$lastlength) > $chars) $orientation = 'vertical';
34
+ else if ($length > $chars) { $orientation = 'horizontal'; $displayLabel = false; }
35
+ else $orientation = 'horizontal';
36
+
37
+ if ($orientation == 'horizontal') {
38
+ if($crumbs && is_array($crumbs)): ?>
39
+ <div class="breadcrumbs" data-role="controlgroup" data-type="horizontal">
40
+ <?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?>
41
+ <?php if($_crumbInfo['link']): ?>
42
+ <a data-direction="reverse" data-icon="arrow-l" data-role="button" href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->htmlEscape($_crumbInfo['title']) ?>">&nbsp;&nbsp;<?php echo $this->htmlEscape($_crumbInfo['label']) ?></a>
43
+ <?php elseif ($displayLabel): ?>
44
+ <a data-direction="reverse" data-role="button" href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->htmlEscape($_crumbInfo['title']) ?>"><?php echo $this->htmlEscape($_crumbInfo['label']) ?></a>
45
+ <?php endif; ?>
46
+ <?php endforeach; ?>
47
+ </div>
48
+ <?php endif;
49
+ } else {
50
+ if($crumbs && is_array($crumbs)): ?>
51
+ <ul class="breadcrumbs" data-role="listview" data-inset="true">
52
+ <?php foreach(array_reverse($crumbs,true) as $_crumbName=>$_crumbInfo): ?>
53
+ <?php if($_crumbInfo['link']): ?>
54
+ <li data-icon="arrow-l" class="ui-btn-icon-left">
55
+ <a data-direction="reverse" href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->htmlEscape($_crumbInfo['title']) ?>">&nbsp;&nbsp;<?php echo $this->htmlEscape($_crumbInfo['label']) ?></a>
56
+ </li>
57
+ <?php endif; ?>
58
+ <?php endforeach; ?>
59
+ </ul>
60
+ <?php endif;
61
+ }
app/design/frontend/smarttheme/default/template/page/html/footer.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php /* @todo
28
+ <div class="footer-container">
29
+ <div class="footer">
30
+ <?php echo $this->getChildHtml() ?>
31
+ <p class="bugs"><?php echo $this->__('Help Us to Keep Magento Healthy') ?> - <a href="http://www.magentocommerce.com/bug-tracking" onclick="this.target='_blank'"><strong><?php echo $this->__('Report All Bugs') ?></strong></a> <?php echo $this->__('(ver. %s)', Mage::getVersion()) ?></p>
32
+ <address><?php echo $this->getCopyright() ?></address>
33
+ </div>
34
+ </div>
35
+ */ ?>
app/design/frontend/smarttheme/default/template/page/html/head.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" />
28
+ <title><?php echo $this->getTitle() ?></title>
29
+ <meta name="description" content="<?php echo htmlspecialchars($this->getDescription()) ?>" />
30
+ <meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
31
+ <meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>" />
32
+ <link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
33
+ <link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
34
+ <!--[if lt IE 7]>
35
+ <script type="text/javascript">
36
+ //<![CDATA[
37
+ var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
38
+ var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
39
+ //]]>
40
+ </script>
41
+ <![endif]-->
42
+ <?php echo $this->getCssJsHtml() ?>
43
+ <?php echo $this->getChildHtml() ?>
44
+ <?php // @todo echo $this->helper('core/js')->getTranslatorScript() ?>
45
+ <?php echo $this->getIncludes() ?>
app/design/frontend/smarttheme/default/template/page/html/header.phtml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ /**
27
+ * @var Mage_Page_Block_Html_Header $this
28
+ */
29
+ ?>
30
+ <div class="header-container">
31
+ <div class="header">
32
+ <?php if ($this->getIsHomePage()):?>
33
+ <h1 class="logo"><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
34
+ <?php else:?>
35
+ <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
36
+ <?php endif?>
37
+ <div class="quick-access">
38
+ <?php echo $this->getChildHtml('topSearch') ?>
39
+ <?php echo $this->getChildHtml('topLinks') ?>
40
+ <?php echo $this->getChildHtml('store_language') ?>
41
+ </div>
42
+ <?php echo $this->getChildHtml('topContainer'); ?>
43
+ </div>
44
+ </div>
app/design/frontend/smarttheme/default/template/page/html/notices.phtml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Mage_Page_Block_Html_Notices
30
+ */
31
+ ?>
32
+ <?php if ($this->displayNoscriptNotice()): ?>
33
+ <noscript>
34
+ <div class="noscript">
35
+ <div class="noscript-inner">
36
+ <p><strong><?php echo $this->__('JavaScript seem to be disabled in your browser.'); ?></strong></p>
37
+ <p><?php echo $this->__('You must have JavaScript enabled in your browser to utilize the functionality of this website.'); ?></p>
38
+ </div>
39
+ </div>
40
+ </noscript>
41
+ <?php endif; ?>
42
+ <?php if ($this->displayDemoNotice()): ?>
43
+ <p class="demo-notice"><?php echo $this->__('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?></p>
44
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/page/html/pager.phtml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Pager template
30
+ *
31
+ * @see Mage_Page_Block_Html_Pager
32
+ */
33
+ ?>
34
+ <?php if($this->getCollection()->getSize()): ?>
35
+
36
+ <?php /* if($this->getUseContainer()): ?>
37
+ <div class="pager">
38
+ <?php endif */ ?>
39
+
40
+ <?php /* if($this->getShowAmounts()): ?>
41
+ <p class="amount">
42
+ <?php if($this->getLastPageNum()>1): ?>
43
+ <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
44
+ <?php else: ?>
45
+ <strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
46
+ <?php endif; ?>
47
+ </p>
48
+ <?php endif */ ?>
49
+
50
+ <?php /* if($this->getShowPerPage()): ?>
51
+ <div class="limiter">
52
+ <label><?php echo $this->__('Show') ?></label>
53
+ <select onchange="setLocation(this.value)">
54
+ <?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
55
+ <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
56
+ <?php echo $_limit ?>
57
+ </option>
58
+ <?php endforeach; ?>
59
+ </select> <?php echo $this->__('per page') ?>
60
+ </div>
61
+ <?php endif */ ?>
62
+
63
+ <?php if($this->getLastPageNum()>1): ?>
64
+ <div data-role="controlgroup" data-type="horizontal">
65
+ <?php if (!$this->isFirstPage()): ?>
66
+ <a data-role="button" data-icon="arrow-l" class="previous<?php if(!$this->getAnchorTextForPrevious()): ?> i-previous<?php endif;?>" href="<?php echo $this->getPreviousPageUrl() ?>" title="<?php echo $this->__('Previous') ?>">
67
+ <?php if(!$this->getAnchorTextForPrevious()): ?>
68
+ &nbsp;Prev
69
+ <?php else: ?>
70
+ <?php echo $this->getAnchorTextForPrevious() ?>
71
+ <?php endif;?>
72
+ </a>
73
+ <?php endif;?>
74
+
75
+ <?php /* if ($this->canShowFirst()): ?>
76
+ <li><a class="first" href="<?php echo $this->getFirstPageUrl() ?>">1</a></li>
77
+ <?php endif; */ ?>
78
+
79
+ <?php if ($this->canShowPreviousJump()): ?>
80
+ <a data-role="button" class="previous_jump" title="" href="<?php echo $this->getPreviousJumpUrl() ?>">...</a>
81
+ <?php endif;?>
82
+
83
+ <?php /* foreach ($this->getFramePages() as $_page): ?>
84
+ <?php if ($this->isPageCurrent($_page)): ?>
85
+ <li class="current"><?php echo $_page ?></li>
86
+ <?php else: ?>
87
+ <li><a href="<?php echo $this->getPageUrl($_page) ?>"><?php echo $_page ?></a></li>
88
+ <?php endif;?>
89
+ <?php endforeach; */ ?>
90
+
91
+
92
+ <?php if ($this->canShowNextJump()): ?>
93
+ <a data-role="button" class="next_jump" title="" href="<?php echo $this->getNextJumpUrl() ?>">...</a>
94
+ <?php endif;?>
95
+
96
+ <?php /* if ($this->canShowLast()): ?>
97
+ <li><a class="last" href="<?php echo $this->getLastPageUrl() ?>"><?php echo $this->getLastPageNum() ?></a></li>
98
+ <?php endif; */ ?>
99
+
100
+ <?php if (!$this->isLastPage()): ?>
101
+ <a data-role="button" data-icon="arrow-r" data-iconpos="right" class="next<?php if(!$this->getAnchorTextForNext()): ?> i-next<?php endif; ?>" href="<?php echo $this->getNextPageUrl() ?>" title="<?php echo $this->__('Next') ?>">
102
+ <?php if(!$this->getAnchorTextForNext()): ?>
103
+ Next&nbsp;
104
+ <?php else: ?>
105
+ <?php echo $this->getAnchorTextForNext() ?>
106
+ <?php endif;?>
107
+ </a>
108
+ <?php endif;?>
109
+
110
+ </div>
111
+ <?php endif; ?>
112
+
113
+ <?php /* if($this->getUseContainer()): ?>
114
+ </div>
115
+ <?php endif */ ?>
116
+
117
+ <?php endif ?>
app/design/frontend/smarttheme/default/template/page/js/calendar.phtml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Calendar localization script. Should be put into page header.
30
+ *
31
+ * @see Mage_Core_Block_Html_Calendar
32
+ */
33
+ ?>
34
+
35
+ <!-- @todo script type="text/javascript">
36
+ //<![CDATA[
37
+ enUS = <?php echo $enUS?>; // en_US locale reference
38
+ Calendar._DN = <?php echo $days['wide']?>; // full day names
39
+ Calendar._SDN = <?php echo $days['abbreviated']?>; // short day names
40
+ Calendar._FD = <?php echo $firstDay?>; // First day of the week. "0" means display Sunday first, "1" means display Monday first, etc.
41
+ Calendar._MN = <?php echo $months['wide']?>; // full month names
42
+ Calendar._SMN = <?php echo $months['abbreviated']?>; // short month names
43
+ Calendar._am = <?php echo $am ?>; // am/pm
44
+ Calendar._pm = <?php echo $pm ?>;
45
+
46
+ // tooltips
47
+ Calendar._TT = {};
48
+ Calendar._TT["INFO"] = "<?php echo $this->jsQuoteEscape( $this->__('About the calendar') );?>";
49
+
50
+ Calendar._TT["ABOUT"] =
51
+ "<?php echo $this->jsQuoteEscape( $this->__('DHTML Date/Time Selector') )?>\n" +
52
+ "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
53
+ "<?php echo $this->jsQuoteEscape( $this->__('For latest version visit: %s', 'http://www.dynarch.com/projects/calendar/') )?>\n" +
54
+ "<?php echo $this->jsQuoteEscape( $this->__('Distributed under GNU LGPL. See %s for details.', 'http://gnu.org/licenses/lgpl.html') )?>" +
55
+ "\n\n" +
56
+ "<?php echo $this->jsQuoteEscape( $this->__('Date selection:') )?>\n" +
57
+ "<?php echo $this->jsQuoteEscape( $this->__('- Use the %s, %s buttons to select year', '\\xab', '\xbb') )?>\n" +
58
+ "<?php echo $this->jsQuoteEscape( $this->__('- Use the %s buttons to select month', '" + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "') )?>\n" +
59
+ "<?php echo $this->jsQuoteEscape( $this->__('- Hold mouse button on any of the above buttons for faster selection.') )?>";
60
+ Calendar._TT["ABOUT_TIME"] = "\n\n" +
61
+ "<?php echo $this->jsQuoteEscape( $this->__('Time selection:') )?>\n" +
62
+ "<?php echo $this->jsQuoteEscape( $this->__('- Click on any of the time parts to increase it') )?>\n" +
63
+ "<?php echo $this->jsQuoteEscape( $this->__('- or Shift-click to decrease it') )?>\n" +
64
+ "<?php echo $this->jsQuoteEscape( $this->__('- or click and drag for faster selection.') )?>";
65
+
66
+ Calendar._TT["PREV_YEAR"] = "<?php echo $this->jsQuoteEscape( $this->__('Prev. year (hold for menu)') );?>";
67
+ Calendar._TT["PREV_MONTH"] = "<?php echo $this->jsQuoteEscape( $this->__('Prev. month (hold for menu)') );?>";
68
+ Calendar._TT["GO_TODAY"] = "<?php echo $this->jsQuoteEscape( $this->__('Go Today') );?>";
69
+ Calendar._TT["NEXT_MONTH"] = "<?php echo $this->jsQuoteEscape( $this->__('Next month (hold for menu)') );?>";
70
+ Calendar._TT["NEXT_YEAR"] = "<?php echo $this->jsQuoteEscape( $this->__('Next year (hold for menu)') );?>";
71
+ Calendar._TT["SEL_DATE"] = "<?php echo $this->jsQuoteEscape( $this->__('Select date') );?>";
72
+ Calendar._TT["DRAG_TO_MOVE"] = "<?php echo $this->jsQuoteEscape( $this->__('Drag to move') );?>";
73
+ Calendar._TT["PART_TODAY"] = ' (' + <?php echo $today ?> + ')';
74
+
75
+ // the following is to inform that "%s" is to be the first day of week
76
+ Calendar._TT["DAY_FIRST"] = "<?php echo $this->jsQuoteEscape( $this->__('Display %s first', '%s') );?>";
77
+
78
+ // This may be locale-dependent. It specifies the week-end days, as an array
79
+ // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
80
+ // means Monday, etc.
81
+ Calendar._TT["WEEKEND"] = <?php echo $weekendDays?>;
82
+
83
+ Calendar._TT["CLOSE"] = "<?php echo $this->jsQuoteEscape( $this->__('Close') );?>";
84
+ Calendar._TT["TODAY"] = <?php echo $today ?>;
85
+ Calendar._TT["TIME_PART"] = "<?php echo $this->jsQuoteEscape( $this->__('(Shift-)Click or drag to change value') );?>";
86
+
87
+ // date formats
88
+ Calendar._TT["DEF_DATE_FORMAT"] = <?php echo $defaultFormat?>;
89
+ Calendar._TT["TT_DATE_FORMAT"] = <?php echo $toolTipFormat?>;
90
+
91
+ Calendar._TT["WK"] = <?php echo $week ?>;
92
+ Calendar._TT["TIME"] = "<?php echo $this->jsQuoteEscape( $this->__('Time:') );?>";
93
+ //]]>
94
+ </script-->
app/design/frontend/smarttheme/default/template/page/js/cookie.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Cookie settings initialization script
30
+ *
31
+ * @see Mage_Page_Block_Js_Cookie
32
+ */
33
+ ?>
34
+
35
+ <!--script type="text/javascript">
36
+ //<![CDATA[
37
+ Mage.Cookies.path = '<?php echo $this->getPath()?>';
38
+ Mage.Cookies.domain = '<?php echo $this->getDomain()?>';
39
+ //]]>
40
+ </script-->
app/design/frontend/smarttheme/default/template/page/mobile-product.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
3
+ <head>
4
+ <meta name="viewport" id="vport" content="width=device-width, initial-scale=1" />
5
+ <?php echo $this->getChildHtml('head') ?>
6
+ </head>
7
+ <body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
8
+ <?php echo $this->getChildHtml('after_body_start') ?>
9
+
10
+ <div data-role="page">
11
+ <div data-role="header" data-theme="c">
12
+ <h1 id="productname">Product</h1>
13
+ </div>
14
+ <div class="wrapper" data-role="content">
15
+ <?php echo $this->getChildHtml('global_notices') ?>
16
+ <div class="page">
17
+ <?php echo $this->getChildHtml('header') ?>
18
+ <div class="main-container">
19
+ <div class="main">
20
+ <?php echo $this->getChildHtml('global_messages') ?>
21
+ <?php echo $this->getChildHtml('content') ?>
22
+ <br/>
23
+ <?php echo $this->getChildHtml('breadcrumbs') ?>
24
+ <?php /*
25
+ <div class="col-right sidebar"><?php echo $this->getChildHtml('right') ?></div>
26
+ */ ?>
27
+ </div>
28
+ </div>
29
+ <?php //echo $this->getChildHtml('footer') ?>
30
+ <?php //echo $this->getChildHtml('before_body_end') ?>
31
+ </div>
32
+ </div>
33
+ <?php echo $this->getAbsoluteFooter() ?>
34
+ </div>
35
+ </body>
36
+ </html>
app/design/frontend/smarttheme/default/template/page/mobile.phtml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
4
+ <head>
5
+ <?php
6
+ global $d;
7
+ if (isset($d['scale'])) $scale = $d['scale'];
8
+ else $scale = 1.0;
9
+ if (isset($_COOKIE['scale'])) $scale = $_COOKIE['scale'];
10
+ ?>
11
+ <meta name="viewport" id="vport" content="width=device-width, initial-scale=<?php echo $scale; ?>" />
12
+ <?php echo $this->getChildHtml('head') ?>
13
+ <script type="text/javascript">
14
+ if (<?php if (!isset($_COOKIE['breakloop'])) echo 'true'; else echo 'false'; ?>) {
15
+ setCookie('breakloop',1,1);
16
+ var width = $(window).width();
17
+ if (width < 480 && <?php echo $scale; ?> >= 1.0) {
18
+ var scale = roundNumber(width/480,2);
19
+ setCookie('scale',scale,1);
20
+ location.reload();
21
+ //var v = "width=device-width, minimum-scale="+scale+", maximum-scale="+scale;
22
+ //document.getElementById("vport").setAttribute('content',v);
23
+ } else if (width >= 480 && <?php echo $scale;?> < 1.0) {
24
+ var scale = 1.0;
25
+ setCookie('scale',scale,1);
26
+ location.reload();
27
+ }
28
+ }
29
+ <?php if (isset($_COOKIE['breakloop'])): ?>
30
+ setCookie('breakloop',1,-1); // expire it
31
+ <?php endif; ?>
32
+ </script>
33
+ </head>
34
+ <body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
35
+ <div data-role="page">
36
+ <div data-role="header" data-theme="c">
37
+ <h1 id="category">Catalog</h1>
38
+ </div>
39
+ <div class="wrapper" data-role="content">
40
+ <?php echo $this->getChildHtml('global_notices') ?>
41
+ <div class="page">
42
+ <?php echo $this->getChildHtml('header-mobile') ?>
43
+ <?php $head = $this->getLayout()->getBlock('header'); $welcome = $head->getWelcome(); if ($welcome): ?>
44
+ <p class="welcome-msg"><?php echo $welcome; ?></p>
45
+ <?php endif; ?>
46
+ <div class="main-container col1-layout">
47
+ <div class="main">
48
+
49
+ <div class="col-main">
50
+ <?php echo $this->getChildHtml('global_messages') ?>
51
+ <?php echo $this->getChildHtml('product_list') ?>
52
+ <?php echo $this->getChildHtml('topMenu') ?>
53
+ <?php echo $this->getChildHtml('breadcrumbs') ?>
54
+ <?php /* todo
55
+ <?php echo $this->getChildHtml('topLinks') ?>
56
+ <?php echo $this->getChildHtml('footer_links') ?>
57
+ */ ?>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <?php echo $this->getChildHtml('footer') ?>
62
+ </div>
63
+ </div>
64
+ <?php echo $this->getAbsoluteFooter() ?>
65
+ </div>
66
+ </body>
67
+ </html>
app/design/frontend/smarttheme/default/template/page/switch/languages.phtml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Language switcher template
30
+ *
31
+ * @see Mage_Page_Block_Switch
32
+ */
33
+ ?>
34
+ <?php /* @todo if(count($this->getStores())>1): ?>
35
+ <div class="form-language">
36
+ <label for="select-language"><?php echo $this->__('Your Language:') ?></label>
37
+ <select id="select-language" title="<?php echo $this->__('Your Language') ?>" onchange="window.location.href=this.value">
38
+ <?php foreach ($this->getStores() as $_lang): ?>
39
+ <?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' : '' ?>
40
+ <option value="<?php echo $_lang->getCurrentUrl() ?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>
41
+ <?php endforeach; ?>
42
+ </select>
43
+ </div>
44
+ <?php endif; */ ?>
app/design/frontend/smarttheme/default/template/page/switch/stores.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Store switcher template
30
+ *
31
+ * @see Mage_Core_Block_Store_Switcher
32
+ */
33
+ ?>
34
+ <?php if(count($this->getGroups())>1): ?>
35
+ <div class="store-switcher">
36
+ <label for="select-store"><?php echo $this->__('Select Store:') ?></label>
37
+ <select id="select-store" title="<?php echo $this->__('Select Store') ?>" onchange="location.href=this.value">
38
+ <?php /*foreach ($this->getStores() as $_store): ?>
39
+ <option value="<?php echo $_store->getUrl('') ?>"<?php if($_store->getId()==$this->getCurrentStoreId()): ?> selected="selected"<?php endif; ?>><?php echo $_store->getName() ?></option>
40
+ <?php endforeach;*/ ?>
41
+ <?php foreach ($this->getGroups() as $_group): ?>
42
+ <?php $_selected = ($_group->getId()==$this->getCurrentGroupId()) ? ' selected="selected"' : '' ?>
43
+ <option value="<?php echo $_group->getHomeUrl() ?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($_group->getName()) ?></option>
44
+ <?php endforeach; ?>
45
+ </select>
46
+ </div>
47
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/page/template/links.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Mage_Page_Block_Template_Links
30
+ */
31
+ ?>
32
+ <?php $_links = $this->getLinks(); ?>
33
+ <?php if(count($_links)>0): ?>
34
+ <ul class="links"<?php if($this->getName()): ?> id="<?php echo $this->getName() ?>"<?php endif;?>>
35
+ <?php foreach($_links as $_link): ?>
36
+ <?php if ($_link instanceof Mage_Core_Block_Abstract):?>
37
+ <?php echo $_link->toHtml() ?>
38
+ <?php else: ?>
39
+ <li<?php if($_link->getIsFirst()||$_link->getIsLast()): ?> class="<?php if($_link->getIsFirst()): ?>first<?php endif; ?><?php if($_link->getIsLast()): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?></a><?php echo $_link->getAfterText() ?></li>
40
+ <?php endif;?>
41
+ <?php endforeach; ?>
42
+ </ul>
43
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/pagecache/cookie.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <!--script type="text/javascript">
29
+ Mage.Cookies.set('<?php echo Mage_PageCache_Helper_Data::NO_CACHE_COOKIE; ?>', 1);
30
+ </script-->
app/design/frontend/smarttheme/default/template/reports/home_product_viewed.phtml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ /* @var $this Mage_Reports_Block_Product_Viewed */
27
+ ?>
28
+ <?php
29
+ /**
30
+ * @see Mage_Reports_Block_Product_Viewed
31
+ */
32
+ ?>
33
+ <?php if ($_products = $this->getRecentlyViewedProducts()): ?>
34
+ <h2 class="subtitle"><?php echo $this->__('Your Recently Viewed') ?></h2>
35
+ <?php $_columnCount = $this->getColumnCount(); ?>
36
+ <?php $i=0; foreach ($_products as $_product): ?>
37
+ <?php if ($i++%$_columnCount==0): ?>
38
+ <ul class="products-grid">
39
+ <?php endif; ?>
40
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
41
+ <a href="<?php echo $this->getProductUrl($_product) ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135) ?>" width="135" height="135" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
42
+ <h3 class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></h3>
43
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
44
+ <?php echo $this->getPriceHtml($_product, true, '-home-viewed') ?>
45
+ <div class="actions">
46
+ <?php if($_product->isSaleable()): ?>
47
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
48
+ <?php else: ?>
49
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
50
+ <?php endif; ?>
51
+ <ul class="add-to-links">
52
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
53
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
54
+ <?php endif; ?>
55
+ <?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
56
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
57
+ <?php endif; ?>
58
+ </ul>
59
+ </div>
60
+ </li>
61
+ <?php if ($i%$_columnCount==0 || $i==count($_products)): ?>
62
+ </ul>
63
+ <?php endif; ?>
64
+ <?php endforeach; ?>
65
+ <?php endif; ?>
app/design/frontend/smarttheme/default/template/review/helper/summary.phtml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php /* @todo if ($this->getReviewsCount()): ?>
28
+ <div class="ratings">
29
+ <?php if ($this->getRatingSummary()):?>
30
+ <div class="rating-box">
31
+ <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
32
+ </div>
33
+ <?php endif; ?>
34
+ <p class="rating-links">
35
+ <a href="<?php echo $this->getReviewsUrl() ?>"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a>
36
+ <span class="separator">|</span>
37
+ <a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Add Your Review') ?></a>
38
+ </p>
39
+ </div>
40
+ <?php elseif ($this->getDisplayIfEmpty()): ?>
41
+ <p class="no-rating"><a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p>
42
+ <?php endif; */ ?>
package.xml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>smarttheme</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>A native looking smartphone theme for the iPhone, iPad, Android, Blackberry, Windows 7, Palm Pre, Kindle and many other &#xD;
10
+ devices.</summary>
11
+ <description>Smartphone cross-platform theme is a native looking magento theme designed for the iPhone, iPad, Android, Blackberry, Windows 7, Palm Pre, Kindle and many other devices. &#xD;
12
+ &#xD;
13
+ It provides you magento store visitors an interface that will look like a native application from whatever mobile device they use to access your website.&#xD;
14
+ &#xD;
15
+ For a full list of supported features, devices supported and an interactive demo, please visit http://smarttheme.cryozonic.com/</description>
16
+ <notes>This basic version is the very first release of the theme and contains all the basic view-only functionality for a magento store. This includes the essential product information of all types of products and a solid interface for navigating across the store with a mobile device. It does not include functionality such as reviews, wishlists, user accounts, cart and checkout. These features will be released shortly after the basic version with the full theme version.&#xD;
17
+ &#xD;
18
+ </notes>
19
+ <authors><author><name>Cryozonic Ltd</name><user>Cryozonic</user><email>info@cryozonic.com</email></author></authors>
20
+ <date>2011-09-21</date>
21
+ <time>21:41:08</time>
22
+ <contents><target name="magedesign"><dir name="frontend"><dir name="smarttheme"><dir name="default"><dir name="layout"><file name="bundle.xml" hash="95711196338773242fead3909acc4b12"/><file name="catalog.xml" hash="c739fc551ea770e112b4f07587e02101"/><file name="catalogsearch.xml" hash="0c3c834b84a06eb560834c35476558ee"/><file name="checkout.xml" hash="28f1ddde687c80604691a41a03ed59a5"/><file name="cms.xml" hash="e3aa2ca2f18c75846ff706378e5fa601"/><file name="customer.xml" hash="0be0ad6206729340403c12b5bf6ef192"/><file name="newsletter.xml" hash="217665c4845eb5be071776bc24acc468"/><file name="page.xml" hash="8d75c47a9e8a94bde5c1c08b7916d677"/><file name="wishlist.xml" hash="5fcd0b16e40c46f1e1a484fac45779a4"/></dir><dir name="template"><dir name="bundle"><dir name="catalog"><dir name="product"><dir name="list"><file name="partof.phtml" hash="ebe9c152f52e5587d0610ae8ce119575"/></dir><file name="price.phtml" hash="f2939c0858013090d0dc170206541736"/><dir name="view"><dir name="options"><file name="notice.phtml" hash="a5b635b16f7b39ef5a28285dcb4b3e7f"/></dir><file name="price.phtml" hash="7d8de3e33bcf039334d63160540dded4"/><file name="tierprices.phtml" hash="df12beaff96beb48d135348320a90ade"/><dir name="type"><dir name="bundle"><dir name="option"><file name="checkbox.phtml" hash="2eab055662446bef2a0c8811ee7ea127"/><file name="multi.phtml" hash="0a2065a975e85d823a2f7ed530fc6daf"/><file name="radio.phtml" hash="9820024a2bad565fffab1e2d61b391ee"/><file name="select.phtml" hash="30acc3200ff335bb9a675458d89e6524"/></dir><file name="options.phtml" hash="102c3e09d4cb047cc054b2c2ade787ec"/></dir><file name="bundle.phtml" hash="bd21641d5bf0d6b27b96160d5cc4f2ed"/></dir></dir></dir></dir></dir><dir name="callouts"><file name="left_col.phtml" hash="00657129c0516a4814789c3e509e490c"/></dir><dir name="catalog"><dir name="category"><file name="view.phtml" hash="bbfe838e7d9f8d390671ebd66906751a"/></dir><file name="left.phtml" hash="4b36d10d83b0fdd32ac22bf7f8c9420c"/><dir name="navigation"><file name="top.phtml" hash="96144b7c7823df7991c9ec1897391c18"/></dir><dir name="product"><dir name="list"><file name="toolbar.phtml" hash="2912b252c63a6b1308ec7e1fa26924df"/></dir><file name="list.phtml" hash="440b7517b99e5dcbe1d565ceff0b4a98"/><file name="new.phtml" hash="91f61c24f6c9e040a12d88e8672bbc41"/><file name="price.phtml" hash="6cda079b2e4c4278a3c120fa7d9c4656"/><dir name="type"><file name="configurable.phtml" hash="80f966e4732c65a23277c3ceb0137043"/><file name="default.phtml" hash="9419477d05d456fbb81d2a61510d71c2"/><file name="grouped.phtml" hash="6a4ebafe5f0c481208360dbec8d5503c"/><dir name="options"><file name="configurable.phtml" hash="a45418ad9bacafa56061f06fb46d3164"/></dir><file name="simple.phtml" hash="80f966e4732c65a23277c3ceb0137043"/><file name="virtual.phtml" hash="80f966e4732c65a23277c3ceb0137043"/></dir><dir name="view"><file name="additional.phtml" hash="17f72df0c3884ea701fe27781d6304e5"/><file name="addto.phtml" hash="a2d1730d581db8d3ec564b25ff0c39aa"/><file name="addtocart.phtml" hash="7db15069c6810e9ecaa824bdd7ab60aa"/><file name="attributes.phtml" hash="3d14a1a9793783586311a1abb808d765"/><file name="description.phtml" hash="ea8e40ae398e20085c87762ad46fc95c"/><file name="media.phtml" hash="84455ca815d6352c37335c994314a718"/><dir name="options"><file name="js.phtml" hash="5a82fa97fed6fed6f22949ba795bd2d3"/><dir name="type"><file name="date.phtml" hash="4f9371b64b26809af0b92f17aea2612b"/><file name="default.phtml" hash="075f27dd7636aee98f5041a9586246c8"/><file name="file.phtml" hash="5e9c8e5cdd13b4cc92bd172554dde45d"/><file name="select.phtml" hash="1f640397f113d4a5706675cf7dd31cdc"/><file name="text.phtml" hash="ac27484be20ec26370070e9dc73b8de1"/></dir><dir name="wrapper"><file name="bottom.phtml" hash="57ab510ee102bf9480164a5b042eabfb"/></dir><file name="wrapper.phtml" hash="798c2fafc09ad2350509434599ffea6a"/></dir><file name="options.phtml" hash="4e948dd0594f5eef2f2951a8d7ddd15e"/><file name="price.phtml" hash="e5dd5215fcf26734a1ae385939ce140d"/><file name="price_clone.phtml" hash="6c12eaebb6d1028bfee665d01ca6c3e2"/><file name="tierprices.phtml" hash="5382af49955271b98691d914482c29b2"/><dir name="type"><file name="configurable.phtml" hash="80f966e4732c65a23277c3ceb0137043"/><file name="default.phtml" hash="9419477d05d456fbb81d2a61510d71c2"/><file name="grouped.phtml" hash="b2507ff55233d51d355bac62b7295439"/><dir name="options"><file name="configurable.phtml" hash="db7e6da50c7912e5199e5c909af79f9f"/></dir><file name="simple.phtml" hash="80f966e4732c65a23277c3ceb0137043"/><file name="virtual.phtml" hash="80f966e4732c65a23277c3ceb0137043"/></dir></dir><file name="view.phtml" hash="bd40569fd70cb038bcaeadf95c456cd7"/></dir></dir><dir name="catalogsearch"><file name="form.mini.phtml" hash="ebe3b4a76535d75bce4438d9385df28f"/></dir><dir name="checkout"><dir name="cart"><file name="coupon.phtml" hash="6f3224ea540f21638b6b59371a0b0caa"/><file name="crosssell.phtml" hash="eca612ba359b7eedb92e0037e35bc4da"/><dir name="item"><file name="default.phtml" hash="b9c46ff60be3ed0549f40de1fc8f5531"/></dir><file name="noItems.phtml" hash="a226178105b57ea0a08fc5e586929d6d"/><file name="shipping.phtml" hash="4e5b50a6cfd2bbef21c38576f4e294e6"/><file name="totals.phtml" hash="ef580ddb64df7e1663c15ea6032eb674"/></dir><file name="cart.phtml" hash="a93366cf5bd9c016cec38f241b800051"/><dir name="onepage"><file name="link.phtml" hash="ad2b86530c743b457f837de82462c2c7"/></dir><dir name="total"><file name="default.phtml" hash="d52aa098719160b38face74db1341bb1"/></dir></dir><dir name="customer"><dir name="account"><dir name="dashboard"><file name="address.phtml" hash="8bac3445e9518f1bd050dd9916e897e7"/><file name="hello.phtml" hash="a8b6b2dc9f5caab825a575238696d68a"/><file name="info.phtml" hash="773d77c6b7219cd8b3768a6fd6e15f26"/><file name="newsletter.phtml" hash="0be058d555894c853e06096cdf64df90"/></dir><file name="dashboard.phtml" hash="f27d1503b0cf7a466a3cb5ac3f85ae94"/><dir name="link"><file name="back.phtml" hash="70830cac18e686c71552ca33ebc1c775"/></dir><file name="navigation.phtml" hash="fb54d6883a32edd6a91414b81d5e9afb"/></dir><dir name="address"><file name="book.phtml" hash="2f985f95a45dc6099f49d19a0eb9fc6b"/><file name="edit.phtml" hash="37f43b3893b2f3bb4375aa43b642484d"/></dir><file name="address.phtml" hash="39fe0b2d0296e6b448058db918517f8c"/><file name="balance.phtml" hash="fed4a9d7108cff7383f51b41852b5115"/><dir name="form"><file name="address.phtml" hash="9282d8579ba8cdd88465cc5ad5cb7b4e"/><file name="changepassword.phtml" hash="7cfbda91095134392a3cd8fa943b013e"/><file name="confirmation.phtml" hash="f6d47ffd4d3ebc10008d36319291db29"/><file name="edit.phtml" hash="704c4b21c4c0fc8923e78fecbebe121d"/><file name="forgotpassword.phtml" hash="14a238cd204e008935b2a461930edcfa"/><file name="login.phtml" hash="4fa4ae520699c76d8b43fee3a094f90a"/><file name="mini.login.phtml" hash="f0e9954b70e54fdff18e2455e247d2dd"/><file name="newsletter.phtml" hash="96e7af6f2eb8c8400bf73465a456dc97"/><file name="register.phtml" hash="7c3f64f046866686be3d0e36eb367285"/></dir><file name="logout.phtml" hash="623f11856f9652535a49e9759f8ed857"/><file name="orders.phtml" hash="54abd08e4c73fedaa2e1dd90a63015a2"/><dir name="widget"><file name="dob.phtml" hash="abe10f96c632d2550d44658b943bbaa1"/><file name="gender.phtml" hash="eb58e85df9448694cde2f50d311c08cd"/><file name="name.phtml" hash="a8042aabf293311965de91194aa01855"/><file name="taxvat.phtml" hash="759ddf46f102024c50ed44ef77d71e64"/></dir><file name="wishlist.phtml" hash="0f70687a4fea50fa24711ac99077ec28"/></dir><dir name="page"><file name="1column.phtml" hash="26be16115e5cccb15f006b76ad5129d7"/><file name="2columns-left.phtml" hash="509e6dc4a4216a6fb7276128cc37156a"/><dir name="html"><file name="breadcrumbs.phtml" hash="3b4f2d39dc21d325d9d055b85bae63a9"/><file name="footer.phtml" hash="8ae31dcdb0a5aaf4a6a7d24aca862081"/><file name="head.phtml" hash="d8b6cb864ab01a838a5cf259e101b10e"/><file name="header.phtml" hash="2ad3bcaac46473d2889ef6791bfedcaa"/><file name="notices.phtml" hash="c1dd6807ef0bc0740fe457c277746b43"/><file name="pager.phtml" hash="35149c98c108a2eb6cccf8016f26407e"/></dir><dir name="js"><file name="calendar.phtml" hash="0e69f2f83b5b501ac796abfa5275b677"/><file name="cookie.phtml" hash="3cbd6582684662bd9b85653d908e1938"/></dir><file name="mobile-product.phtml" hash="31caae7dacbbae86d1b3bdd1d0321118"/><file name="mobile.phtml" hash="b64a3829a16225da8adf498d7b679edf"/><dir name="switch"><file name="languages.phtml" hash="7c76ce788d4ce2ee210bb40735be4ba5"/><file name="stores.phtml" hash="cae33abb4a9e0928a722b36734fb089f"/></dir><dir name="template"><file name="links.phtml" hash="cea84ab829f92b77481396d4cbfe1afc"/></dir></dir><dir name="pagecache"><file name="cookie.phtml" hash="746495ef479a790621bef27cea8f503b"/></dir><dir name="reports"><file name="home_product_viewed.phtml" hash="01571b50f8ef03d5a3977635333c1f2a"/></dir><dir name="review"><dir name="helper"><file name="summary.phtml" hash="b266e2c5792e2ed62388408a7201cb4f"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="smarttheme"><dir name="default"><dir name="images"><file name="ajax-loader.png" hash="5673b0e9f616ed3fe12a1a388f6aa019"/><file name="bkg_add-to.gif" hash="30ad4986308f5012175006648ec002c4"/><file name="bkg_block-layered-title.gif" hash="5ba30a503859e0c74703e9451dc66ca5"/><file name="bkg_body.gif" hash="f721950262bb5c60227ee74bb435fa79"/><file name="bkg_btn-green.gif" hash="732c08dcbb45ecc07305a6fcc8a8e1a2"/><file name="bkg_btn-small.gif" hash="63a4d1b7cf6cf9f8c2ba557c21b3d6ec"/><file name="bkg_btn-small.png" hash="395fbc85113004f09b8e497c766f0b26"/><file name="bkg_btn.gif" hash="1b9a2115bfd66afd1d47b9872de1f9e8"/><file name="bkg_btn.png" hash="df9af47f282450892546effa54e7da59"/><file name="bkg_cart-totals.gif" hash="1fbacde3b2afd6562f35d0bc21ea41c5"/><file name="bkg_collapse-gm.gif" hash="37c585c23bbfbb3ef8f51191513d435b"/><file name="bkg_collapse.gif" hash="2333c68e38163ed4656da82b9bcf362b"/><file name="bkg_grid.gif" hash="a6f64fedbac51fb1b86184cd488cc4e6"/><file name="bkg_nav_parent.gif" hash="0208ae272e474b99bf1f8743b525c342"/><file name="bkg_nav_top.gif" hash="e208d78164da001372d050b4933d021c"/><file name="bkg_pipe1.gif" hash="bca445209e5b0c9390c526ff6fb9bfcf"/><file name="bkg_pipe2.gif" hash="7da64eefaf4da3855ab6ee76dbced0c2"/><file name="bkg_pipe3.gif" hash="11bfac1e590f0c77fb12f37d7f05cd3c"/><file name="bkg_rating.gif" hash="d2ea21ea9824962892adf2e9d78f03ba"/><file name="bkg_subtotal.gif" hash="fa2f26527c87fc6b00be8b5e594e52f4"/><file name="bkg_tabs.gif" hash="3929ea638ee939e2280b909d291dd706"/><file name="bkg_toolbar.gif" hash="b51ad5ce6fc7c93c7be429822b7d0f54"/><file name="bkg_top-promo.gif" hash="9e11a17ae228afd7073f5082daa68094"/><file name="btn_checkout.gif" hash="79b6d671dc425b20d024255e76187f70"/><file name="btn_edit.gif" hash="a723d24e578ae946d29c46585d91f066"/><file name="btn_remove.gif" hash="e106b9cea6e73407f5311ebf024ebbbb"/><file name="btn_trash.gif" hash="bcb22f558a0eb32243a2a36645189e9f"/><file name="btn_window_close.gif" hash="e106b9cea6e73407f5311ebf024ebbbb"/><file name="calendar.gif" hash="b1468e5239504974c689eea5d93f86d4"/><dir name="catalog"><dir name="product"><dir name="placeholder"><file name="image.jpg" hash="097ab8a3051bc037ea3de0e17f440540"/><file name="small_image.jpg" hash="f825d16f97a640453553c79c48ebaa73"/><file name="thumbnail.jpg" hash="b2b682d28a08a748a73d2cda70ab5a57"/></dir></dir></dir><file name="cvv.gif" hash="ed0f392004a405466291071a760b285d"/><file name="fam_book_open.png" hash="0ba89b9fbe7e88d4c6896ed0a1f495aa"/><file name="grid-cal.gif" hash="b1468e5239504974c689eea5d93f86d4"/><file name="i_asc_arrow.gif" hash="54fa7a2610dca6402a8159a0de658894"/><file name="i_availability_only.gif" hash="bca1f00a50864171ad98317b778e869c"/><file name="i_availability_only_arrow.gif" hash="0cf32b72fefc94b89b74e4f3f02c2e93"/><file name="i_desc_arrow.gif" hash="2ffa641590dbc5017952f77135d96185"/><file name="i_msg-error.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="i_msg-note.gif" hash="e774ee481a2820789c1a77112377c4e0"/><file name="i_msg-success.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/><file name="i_notice.gif" hash="ebd56dc80b8346e10e93628bc0e6c372"/><file name="i_pager-next.gif" hash="b565ec86dceddf2c89397a31a6fc9bc8"/><file name="i_pager-prev.gif" hash="ba5d000eb30be2f5b9d8f1aa85cdf478"/><file name="i_print.gif" hash="0aed138181495642e9ab29e55d194d40"/><file name="i_rss-big.png" hash="6cf70e7c52a3f3d7b833ccadb041a555"/><file name="i_rss.gif" hash="e5bbc388d818c142868b4a1df0b48793"/><file name="icon-search-black.png" hash="9b2d886c3feb5d92911e9d4a2ff2bca2"/><file name="icons-18-black.png" hash="0b27bb0de469c0023fe3442b36ed11e5"/><file name="icons-18-white.png" hash="30ee929b6c0e075d046347bcdd8ff807"/><file name="icons-36-black.png" hash="8dd770dee069a005007b32fc5bb0cfef"/><file name="icons-36-white.png" hash="b731dd7d99265141897ec2fbd49a67d8"/><file name="logo.gif" hash="47bc079d9b3933c419739b580e4d0f39"/><file name="logo_email.gif" hash="47bc079d9b3933c419739b580e4d0f39"/><file name="logo_print.gif" hash="47bc079d9b3933c419739b580e4d0f39"/><file name="magnifier_handle.gif" hash="2ee40683870a2bef5c5b34d30c84d6d8"/><dir name="media"><file name="callout1.jpg" hash="0f274fb85b3f1b153072f8478ced414e"/><file name="footer_callout.png" hash="9dc69b9d5517457e08dfce85424e6e16"/><file name="fpo_no_crosssell.gif" hash="7aa2defb505f4d1353fadaac00812501"/><file name="home_co_bottom.gif" hash="52eb6bdfa8926e7a2d0e381b1604e868"/><file name="home_co_br.gif" hash="8ae386c3822b77287a6339068f53953b"/><file name="home_co_main.jpg" hash="c74e1e5276d3c09c6089ce157bda0b24"/><file name="home_co_tr.gif" hash="4fec17962d091640046cab9aa9f4b42e"/><file name="left_col_callout.jpg" hash="e19cc46c3c2b3777484d2847da8564d8"/></dir><file name="opc-ajax-loader.gif" hash="2d5cf231c4f520b5c2b4de5536ecb82d"/><file name="pager_arrow_left.gif" hash="ba5d000eb30be2f5b9d8f1aa85cdf478"/><file name="pager_arrow_right.gif" hash="b565ec86dceddf2c89397a31a6fc9bc8"/><file name="slider_bg.gif" hash="a1b9c405b99162b803ea0026371c38c3"/><file name="slider_btn_zoom_in.gif" hash="e1fb26133b6b00cf548ecb0225867c8e"/><file name="slider_btn_zoom_out.gif" hash="17567db9d985e26ab13cbed6e81abb44"/><file name="spacer.gif" hash="df3e567d6f16d040326c7a0ea29a4f41"/><file name="validation_advice_bg.gif" hash="992b643e08dd71f20de7f94f29e647ba"/><dir name="widgets"><file name="i_widget-link.gif" hash="1bf753578171f147f0203e7b13bdd0c4"/></dir></dir><file name="jquery-1.6.2.min.js" hash="3eb479bd427862f8b321595ade71b5af"/><file name="jquery.mobile-1.0b3.js" hash="308854ee226177d446ae758731c1d49e"/><file name="jquery.mobile-1.0b3.min.css" hash="4b3c3b3d95f490e21c6c3c5e6e97a514"/><file name="jquery.mobile-1.0b3.min.js" hash="fcfc50f83cddeb41498330e93937da73"/><file name="main.css" hash="5efb65205a44379a8b8823799d4419a4"/><file name="main.js" hash="f6d593aaede9c619755290c44806dac1"/></dir></dir></dir></target><target name="mage"><dir name="."><file name="smarttheme.php" hash="c8350085f37aa15cc2872382f841a99b"/></dir></target></contents>
23
+ <compatible/>
24
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
25
+ </package>
skin/frontend/smarttheme/default/images/ajax-loader.png ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_add-to.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_block-layered-title.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_body.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_btn-green.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_btn-small.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_btn-small.png ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_btn.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_btn.png ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_cart-totals.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_collapse-gm.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_collapse.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_grid.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_nav_parent.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_nav_top.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_pipe1.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_pipe2.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_pipe3.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_rating.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_subtotal.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_tabs.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_toolbar.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/bkg_top-promo.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/btn_checkout.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/btn_edit.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/btn_remove.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/btn_trash.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/btn_window_close.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/calendar.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/catalog/product/placeholder/image.jpg ADDED
Binary file
skin/frontend/smarttheme/default/images/catalog/product/placeholder/small_image.jpg ADDED
Binary file
skin/frontend/smarttheme/default/images/catalog/product/placeholder/thumbnail.jpg ADDED
Binary file
skin/frontend/smarttheme/default/images/cvv.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/fam_book_open.png ADDED
Binary file
skin/frontend/smarttheme/default/images/grid-cal.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_asc_arrow.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_availability_only.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_availability_only_arrow.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_desc_arrow.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_msg-error.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_msg-note.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_msg-success.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_notice.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_pager-next.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_pager-prev.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_print.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/i_rss-big.png ADDED
Binary file
skin/frontend/smarttheme/default/images/i_rss.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/icon-search-black.png ADDED
Binary file
skin/frontend/smarttheme/default/images/icons-18-black.png ADDED
Binary file
skin/frontend/smarttheme/default/images/icons-18-white.png ADDED
Binary file
skin/frontend/smarttheme/default/images/icons-36-black.png ADDED
Binary file
skin/frontend/smarttheme/default/images/icons-36-white.png ADDED
Binary file
skin/frontend/smarttheme/default/images/logo.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/logo_email.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/logo_print.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/magnifier_handle.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/media/callout1.jpg ADDED
Binary file
skin/frontend/smarttheme/default/images/media/footer_callout.png ADDED
Binary file
skin/frontend/smarttheme/default/images/media/fpo_no_crosssell.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/media/home_co_bottom.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/media/home_co_br.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/media/home_co_main.jpg ADDED
Binary file
skin/frontend/smarttheme/default/images/media/home_co_tr.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/media/left_col_callout.jpg ADDED
Binary file
skin/frontend/smarttheme/default/images/opc-ajax-loader.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/pager_arrow_left.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/pager_arrow_right.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/slider_bg.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/slider_btn_zoom_in.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/slider_btn_zoom_out.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/spacer.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/validation_advice_bg.gif ADDED
Binary file
skin/frontend/smarttheme/default/images/widgets/i_widget-link.gif ADDED
Binary file
skin/frontend/smarttheme/default/jquery-1.6.2.min.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery JavaScript Library v1.6.2
3
+ * http://jquery.com/
4
+ *
5
+ * Copyright 2011, John Resig
6
+ * Dual licensed under the MIT or GPL Version 2 licenses.
7
+ * http://jquery.org/license
8
+ *
9
+ * Includes Sizzle.js
10
+ * http://sizzlejs.com/
11
+ * Copyright 2011, The Dojo Foundation
12
+ * Released under the MIT, BSD, and GPL Licenses.
13
+ *
14
+ * Date: Thu Jun 30 14:16:56 2011 -0400
15
+ */
16
+ (function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bC.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bR,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bX(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bX(a,c,d,e,"*",g));return l}function bW(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bN),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bA(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bv:bw;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bg(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(H)return H.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:|^on/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.
17
+ shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be=/^\s*<!(?:\[CDATA\[|\-\-)/,bf={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bg(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bm)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j
18
+ )}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1></$2>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bl(k[i]);else bl(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bn=/alpha\([^)]*\)/i,bo=/opacity=([^)]*)/,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c)),h="number"),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bA(a,b,d);f.swap(a,bu,function(){e=bA(a,b,d)});return e}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cs(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cr("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cr("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cs(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cr("show",1),slideUp:cr("hide",1),slideToggle:cr("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cn||cp(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cl&&(co?(cl=!0,g=function(){cl&&(co(g),e.tick())},co(g)):cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||cp(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var ct=/^t(?:able|d|h)$/i,cu=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cv(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!ct.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
skin/frontend/smarttheme/default/jquery.mobile-1.0b3.js ADDED
@@ -0,0 +1,6657 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Mobile v1.0b3
3
+ * http://jquerymobile.com/
4
+ *
5
+ * Copyright 2010, jQuery Project
6
+ * Dual licensed under the MIT or GPL Version 2 licenses.
7
+ * http://jquery.org/license
8
+ */
9
+ /*!
10
+ * jQuery UI Widget @VERSION
11
+ *
12
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
13
+ * Dual licensed under the MIT or GPL Version 2 licenses.
14
+ * http://jquery.org/license
15
+ *
16
+ * http://docs.jquery.com/UI/Widget
17
+ */
18
+ (function( $, undefined ) {
19
+
20
+ // jQuery 1.4+
21
+ if ( $.cleanData ) {
22
+ var _cleanData = $.cleanData;
23
+ $.cleanData = function( elems ) {
24
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
25
+ $( elem ).triggerHandler( "remove" );
26
+ }
27
+ _cleanData( elems );
28
+ };
29
+ } else {
30
+ var _remove = $.fn.remove;
31
+ $.fn.remove = function( selector, keepData ) {
32
+ return this.each(function() {
33
+ if ( !keepData ) {
34
+ if ( !selector || $.filter( selector, [ this ] ).length ) {
35
+ $( "*", this ).add( [ this ] ).each(function() {
36
+ $( this ).triggerHandler( "remove" );
37
+ });
38
+ }
39
+ }
40
+ return _remove.call( $(this), selector, keepData );
41
+ });
42
+ };
43
+ }
44
+
45
+ $.widget = function( name, base, prototype ) {
46
+ var namespace = name.split( "." )[ 0 ],
47
+ fullName;
48
+ name = name.split( "." )[ 1 ];
49
+ fullName = namespace + "-" + name;
50
+
51
+ if ( !prototype ) {
52
+ prototype = base;
53
+ base = $.Widget;
54
+ }
55
+
56
+ // create selector for plugin
57
+ $.expr[ ":" ][ fullName ] = function( elem ) {
58
+ return !!$.data( elem, name );
59
+ };
60
+
61
+ $[ namespace ] = $[ namespace ] || {};
62
+ $[ namespace ][ name ] = function( options, element ) {
63
+ // allow instantiation without initializing for simple inheritance
64
+ if ( arguments.length ) {
65
+ this._createWidget( options, element );
66
+ }
67
+ };
68
+
69
+ var basePrototype = new base();
70
+ // we need to make the options hash a property directly on the new instance
71
+ // otherwise we'll modify the options hash on the prototype that we're
72
+ // inheriting from
73
+ // $.each( basePrototype, function( key, val ) {
74
+ // if ( $.isPlainObject(val) ) {
75
+ // basePrototype[ key ] = $.extend( {}, val );
76
+ // }
77
+ // });
78
+ basePrototype.options = $.extend( true, {}, basePrototype.options );
79
+ $[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
80
+ namespace: namespace,
81
+ widgetName: name,
82
+ widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
83
+ widgetBaseClass: fullName
84
+ }, prototype );
85
+
86
+ $.widget.bridge( name, $[ namespace ][ name ] );
87
+ };
88
+
89
+ $.widget.bridge = function( name, object ) {
90
+ $.fn[ name ] = function( options ) {
91
+ var isMethodCall = typeof options === "string",
92
+ args = Array.prototype.slice.call( arguments, 1 ),
93
+ returnValue = this;
94
+
95
+ // allow multiple hashes to be passed on init
96
+ options = !isMethodCall && args.length ?
97
+ $.extend.apply( null, [ true, options ].concat(args) ) :
98
+ options;
99
+
100
+ // prevent calls to internal methods
101
+ if ( isMethodCall && options.charAt( 0 ) === "_" ) {
102
+ return returnValue;
103
+ }
104
+
105
+ if ( isMethodCall ) {
106
+ this.each(function() {
107
+ var instance = $.data( this, name );
108
+ if ( !instance ) {
109
+ throw "cannot call methods on " + name + " prior to initialization; " +
110
+ "attempted to call method '" + options + "'";
111
+ }
112
+ if ( !$.isFunction( instance[options] ) ) {
113
+ throw "no such method '" + options + "' for " + name + " widget instance";
114
+ }
115
+ var methodValue = instance[ options ].apply( instance, args );
116
+ if ( methodValue !== instance && methodValue !== undefined ) {
117
+ returnValue = methodValue;
118
+ return false;
119
+ }
120
+ });
121
+ } else {
122
+ this.each(function() {
123
+ var instance = $.data( this, name );
124
+ if ( instance ) {
125
+ instance.option( options || {} )._init();
126
+ } else {
127
+ $.data( this, name, new object( options, this ) );
128
+ }
129
+ });
130
+ }
131
+
132
+ return returnValue;
133
+ };
134
+ };
135
+
136
+ $.Widget = function( options, element ) {
137
+ // allow instantiation without initializing for simple inheritance
138
+ if ( arguments.length ) {
139
+ this._createWidget( options, element );
140
+ }
141
+ };
142
+
143
+ $.Widget.prototype = {
144
+ widgetName: "widget",
145
+ widgetEventPrefix: "",
146
+ options: {
147
+ disabled: false
148
+ },
149
+ _createWidget: function( options, element ) {
150
+ // $.widget.bridge stores the plugin instance, but we do it anyway
151
+ // so that it's stored even before the _create function runs
152
+ $.data( element, this.widgetName, this );
153
+ this.element = $( element );
154
+ this.options = $.extend( true, {},
155
+ this.options,
156
+ this._getCreateOptions(),
157
+ options );
158
+
159
+ var self = this;
160
+ this.element.bind( "remove." + this.widgetName, function() {
161
+ self.destroy();
162
+ });
163
+
164
+ this._create();
165
+ this._trigger( "create" );
166
+ this._init();
167
+ },
168
+ _getCreateOptions: function() {
169
+ var options = {};
170
+ if ( $.metadata ) {
171
+ options = $.metadata.get( element )[ this.widgetName ];
172
+ }
173
+ return options;
174
+ },
175
+ _create: function() {},
176
+ _init: function() {},
177
+
178
+ destroy: function() {
179
+ this.element
180
+ .unbind( "." + this.widgetName )
181
+ .removeData( this.widgetName );
182
+ this.widget()
183
+ .unbind( "." + this.widgetName )
184
+ .removeAttr( "aria-disabled" )
185
+ .removeClass(
186
+ this.widgetBaseClass + "-disabled " +
187
+ "ui-state-disabled" );
188
+ },
189
+
190
+ widget: function() {
191
+ return this.element;
192
+ },
193
+
194
+ option: function( key, value ) {
195
+ var options = key;
196
+
197
+ if ( arguments.length === 0 ) {
198
+ // don't return a reference to the internal hash
199
+ return $.extend( {}, this.options );
200
+ }
201
+
202
+ if (typeof key === "string" ) {
203
+ if ( value === undefined ) {
204
+ return this.options[ key ];
205
+ }
206
+ options = {};
207
+ options[ key ] = value;
208
+ }
209
+
210
+ this._setOptions( options );
211
+
212
+ return this;
213
+ },
214
+ _setOptions: function( options ) {
215
+ var self = this;
216
+ $.each( options, function( key, value ) {
217
+ self._setOption( key, value );
218
+ });
219
+
220
+ return this;
221
+ },
222
+ _setOption: function( key, value ) {
223
+ this.options[ key ] = value;
224
+
225
+ if ( key === "disabled" ) {
226
+ this.widget()
227
+ [ value ? "addClass" : "removeClass"](
228
+ this.widgetBaseClass + "-disabled" + " " +
229
+ "ui-state-disabled" )
230
+ .attr( "aria-disabled", value );
231
+ }
232
+
233
+ return this;
234
+ },
235
+
236
+ enable: function() {
237
+ return this._setOption( "disabled", false );
238
+ },
239
+ disable: function() {
240
+ return this._setOption( "disabled", true );
241
+ },
242
+
243
+ _trigger: function( type, event, data ) {
244
+ var callback = this.options[ type ];
245
+
246
+ event = $.Event( event );
247
+ event.type = ( type === this.widgetEventPrefix ?
248
+ type :
249
+ this.widgetEventPrefix + type ).toLowerCase();
250
+ data = data || {};
251
+
252
+ // copy original event properties over to the new event
253
+ // this would happen if we could call $.event.fix instead of $.Event
254
+ // but we don't have a way to force an event to be fixed multiple times
255
+ if ( event.originalEvent ) {
256
+ for ( var i = $.event.props.length, prop; i; ) {
257
+ prop = $.event.props[ --i ];
258
+ event[ prop ] = event.originalEvent[ prop ];
259
+ }
260
+ }
261
+
262
+ this.element.trigger( event, data );
263
+
264
+ return !( $.isFunction(callback) &&
265
+ callback.call( this.element[0], event, data ) === false ||
266
+ event.isDefaultPrevented() );
267
+ }
268
+ };
269
+
270
+ })( jQuery );
271
+ /*
272
+ * jQuery Mobile Framework : widget factory extentions for mobile
273
+ * Copyright (c) jQuery Project
274
+ * Dual licensed under the MIT or GPL Version 2 licenses.
275
+ * http://jquery.org/license
276
+ */
277
+
278
+ (function( $, undefined ) {
279
+
280
+ $.widget( "mobile.widget", {
281
+ _getCreateOptions: function() {
282
+
283
+ var elem = this.element,
284
+ options = {};
285
+
286
+ $.each( this.options, function( option ) {
287
+
288
+ var value = elem.jqmData( option.replace( /[A-Z]/g, function( c ) {
289
+ return "-" + c.toLowerCase();
290
+ })
291
+ );
292
+
293
+ if ( value !== undefined ) {
294
+ options[ option ] = value;
295
+ }
296
+ });
297
+
298
+ return options;
299
+ }
300
+ });
301
+
302
+ })( jQuery );
303
+ /*
304
+ * jQuery Mobile Framework : resolution and CSS media query related helpers and behavior
305
+ * Copyright (c) jQuery Project
306
+ * Dual licensed under the MIT or GPL Version 2 licenses.
307
+ * http://jquery.org/license
308
+ */
309
+ (function( $, undefined ) {
310
+
311
+ var $window = $( window ),
312
+ $html = $( "html" );
313
+
314
+ /* $.mobile.media method: pass a CSS media type or query and get a bool return
315
+ note: this feature relies on actual media query support for media queries, though types will work most anywhere
316
+ examples:
317
+ $.mobile.media('screen') //>> tests for screen media type
318
+ $.mobile.media('screen and (min-width: 480px)') //>> tests for screen media type with window width > 480px
319
+ $.mobile.media('@media screen and (-webkit-min-device-pixel-ratio: 2)') //>> tests for webkit 2x pixel ratio (iPhone 4)
320
+ */
321
+ $.mobile.media = (function() {
322
+ // TODO: use window.matchMedia once at least one UA implements it
323
+ var cache = {},
324
+ testDiv = $( "<div id='jquery-mediatest'>" ),
325
+ fakeBody = $( "<body>" ).append( testDiv );
326
+
327
+ return function( query ) {
328
+ if ( !( query in cache ) ) {
329
+ var styleBlock = document.createElement( "style" ),
330
+ cssrule = "@media " + query + " { #jquery-mediatest { position:absolute; } }";
331
+
332
+ //must set type for IE!
333
+ styleBlock.type = "text/css";
334
+
335
+ if ( styleBlock.styleSheet ){
336
+ styleBlock.styleSheet.cssText = cssrule;
337
+ } else {
338
+ styleBlock.appendChild( document.createTextNode(cssrule) );
339
+ }
340
+
341
+ $html.prepend( fakeBody ).prepend( styleBlock );
342
+ cache[ query ] = testDiv.css( "position" ) === "absolute";
343
+ fakeBody.add( styleBlock ).remove();
344
+ }
345
+ return cache[ query ];
346
+ };
347
+ })();
348
+
349
+ })(jQuery);/*
350
+ * jQuery Mobile Framework : support tests
351
+ * Copyright (c) jQuery Project
352
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
353
+ */
354
+
355
+ (function( $, undefined ) {
356
+
357
+ var fakeBody = $( "<body>" ).prependTo( "html" ),
358
+ fbCSS = fakeBody[ 0 ].style,
359
+ vendors = [ "Webkit", "Moz", "O" ],
360
+ webos = "palmGetResource" in window, //only used to rule out scrollTop
361
+ bb = window.blackberry; //only used to rule out box shadow, as it's filled opaque on BB
362
+
363
+ // thx Modernizr
364
+ function propExists( prop ) {
365
+ var uc_prop = prop.charAt( 0 ).toUpperCase() + prop.substr( 1 ),
366
+ props = ( prop + " " + vendors.join( uc_prop + " " ) + uc_prop ).split( " " );
367
+
368
+ for ( var v in props ){
369
+ if ( fbCSS[ props[ v ] ] !== undefined ) {
370
+ return true;
371
+ }
372
+ }
373
+ }
374
+
375
+ // Test for dynamic-updating base tag support ( allows us to avoid href,src attr rewriting )
376
+ function baseTagTest() {
377
+ var fauxBase = location.protocol + "//" + location.host + location.pathname + "ui-dir/",
378
+ base = $( "head base" ),
379
+ fauxEle = null,
380
+ href = "",
381
+ link, rebase;
382
+
383
+ if ( !base.length ) {
384
+ base = fauxEle = $( "<base>", { "href": fauxBase }).appendTo( "head" );
385
+ } else {
386
+ href = base.attr( "href" );
387
+ }
388
+
389
+ link = $( "<a href='testurl'></a>" ).prependTo( fakeBody );
390
+ rebase = link[ 0 ].href;
391
+ base[ 0 ].href = href ? href : location.pathname;
392
+
393
+ if ( fauxEle ) {
394
+ fauxEle.remove();
395
+ }
396
+ return rebase.indexOf( fauxBase ) === 0;
397
+ }
398
+
399
+
400
+ // non-UA-based IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683
401
+ // allows for inclusion of IE 6+, including Windows Mobile 7
402
+ $.mobile.browser = {};
403
+ $.mobile.browser.ie = (function() {
404
+ var v = 3,
405
+ div = document.createElement( "div" ),
406
+ a = div.all || [];
407
+
408
+ while ( div.innerHTML = "<!--[if gt IE " + ( ++v ) + "]><br><![endif]-->", a[ 0 ] );
409
+
410
+ return v > 4 ? v : !v;
411
+ })();
412
+
413
+
414
+ $.extend( $.support, {
415
+ orientation: "orientation" in window,
416
+ touch: "ontouchend" in document,
417
+ cssTransitions: "WebKitTransitionEvent" in window,
418
+ pushState: "pushState" in history && "replaceState" in history,
419
+ mediaquery: $.mobile.media( "only all" ),
420
+ cssPseudoElement: !!propExists( "content" ),
421
+ touchOverflow: !!propExists( "overflowScrolling" ),
422
+ boxShadow: !!propExists( "boxShadow" ) && !bb,
423
+ scrollTop: ( "pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[ 0 ] ) && !webos,
424
+ dynamicBaseTag: baseTagTest(),
425
+ // TODO: This is a weak test. We may want to beef this up later.
426
+ eventCapture: "addEventListener" in document
427
+ });
428
+
429
+ fakeBody.remove();
430
+
431
+
432
+ // $.mobile.ajaxBlacklist is used to override ajaxEnabled on platforms that have known conflicts with hash history updates (BB5, Symbian)
433
+ // or that generally work better browsing in regular http for full page refreshes (Opera Mini)
434
+ // Note: This detection below is used as a last resort.
435
+ // We recommend only using these detection methods when all other more reliable/forward-looking approaches are not possible
436
+ var nokiaLTE7_3 = (function(){
437
+
438
+ var ua = window.navigator.userAgent;
439
+
440
+ //The following is an attempt to match Nokia browsers that are running Symbian/s60, with webkit, version 7.3 or older
441
+ return ua.indexOf( "Nokia" ) > -1 &&
442
+ ( ua.indexOf( "Symbian/3" ) > -1 || ua.indexOf( "Series60/5" ) > -1 ) &&
443
+ ua.indexOf( "AppleWebKit" ) > -1 &&
444
+ ua.match( /(BrowserNG|NokiaBrowser)\/7\.[0-3]/ );
445
+ })();
446
+
447
+ $.mobile.ajaxBlacklist =
448
+ // BlackBerry browsers, pre-webkit
449
+ window.blackberry && !window.WebKitPoint ||
450
+ // Opera Mini
451
+ window.operamini && Object.prototype.toString.call( window.operamini ) === "[object OperaMini]" ||
452
+ // Symbian webkits pre 7.3
453
+ nokiaLTE7_3;
454
+
455
+ // Lastly, this workaround is the only way we've found so far to get pre 7.3 Symbian webkit devices
456
+ // to render the stylesheets when they're referenced before this script, as we'd recommend doing.
457
+ // This simply reappends the CSS in place, which for some reason makes it apply
458
+ if ( nokiaLTE7_3 ) {
459
+ $(function() {
460
+ $( "head link[rel=stylesheet]" ).attr( "rel", "alternate stylesheet" ).attr( "rel", "stylesheet" );
461
+ });
462
+ }
463
+
464
+ // For ruling out shadows via css
465
+ if ( !$.support.boxShadow ) {
466
+ $( "html" ).addClass( "ui-mobile-nosupport-boxshadow" );
467
+ }
468
+
469
+ })( jQuery );/*
470
+ * jQuery Mobile Framework : "mouse" plugin
471
+ * Copyright (c) jQuery Project
472
+ * Dual licensed under the MIT or GPL Version 2 licenses.
473
+ * http://jquery.org/license
474
+ */
475
+
476
+ // This plugin is an experiment for abstracting away the touch and mouse
477
+ // events so that developers don't have to worry about which method of input
478
+ // the device their document is loaded on supports.
479
+ //
480
+ // The idea here is to allow the developer to register listeners for the
481
+ // basic mouse events, such as mousedown, mousemove, mouseup, and click,
482
+ // and the plugin will take care of registering the correct listeners
483
+ // behind the scenes to invoke the listener at the fastest possible time
484
+ // for that device, while still retaining the order of event firing in
485
+ // the traditional mouse environment, should multiple handlers be registered
486
+ // on the same element for different events.
487
+ //
488
+ // The current version exposes the following virtual events to jQuery bind methods:
489
+ // "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel"
490
+
491
+ (function( $, window, document, undefined ) {
492
+
493
+ var dataPropertyName = "virtualMouseBindings",
494
+ touchTargetPropertyName = "virtualTouchID",
495
+ virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ),
496
+ touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ),
497
+ activeDocHandlers = {},
498
+ resetTimerID = 0,
499
+ startX = 0,
500
+ startY = 0,
501
+ didScroll = false,
502
+ clickBlockList = [],
503
+ blockMouseTriggers = false,
504
+ blockTouchTriggers = false,
505
+ eventCaptureSupported = $.support.eventCapture,
506
+ $document = $( document ),
507
+ nextTouchID = 1,
508
+ lastTouchID = 0;
509
+
510
+ $.vmouse = {
511
+ moveDistanceThreshold: 10,
512
+ clickDistanceThreshold: 10,
513
+ resetTimerDuration: 1500
514
+ };
515
+
516
+ function getNativeEvent( event ) {
517
+
518
+ while ( event && typeof event.originalEvent !== "undefined" ) {
519
+ event = event.originalEvent;
520
+ }
521
+ return event;
522
+ }
523
+
524
+ function createVirtualEvent( event, eventType ) {
525
+
526
+ var t = event.type,
527
+ oe, props, ne, prop, ct, touch, i, j;
528
+
529
+ event = $.Event(event);
530
+ event.type = eventType;
531
+
532
+ oe = event.originalEvent;
533
+ props = $.event.props;
534
+
535
+ // copy original event properties over to the new event
536
+ // this would happen if we could call $.event.fix instead of $.Event
537
+ // but we don't have a way to force an event to be fixed multiple times
538
+ if ( oe ) {
539
+ for ( i = props.length, prop; i; ) {
540
+ prop = props[ --i ];
541
+ event[ prop ] = oe[ prop ];
542
+ }
543
+ }
544
+
545
+ if ( t.search(/^touch/) !== -1 ) {
546
+ ne = getNativeEvent( oe );
547
+ t = ne.touches;
548
+ ct = ne.changedTouches;
549
+ touch = ( t && t.length ) ? t[0] : ( (ct && ct.length) ? ct[ 0 ] : undefined );
550
+
551
+ if ( touch ) {
552
+ for ( j = 0, len = touchEventProps.length; j < len; j++){
553
+ prop = touchEventProps[ j ];
554
+ event[ prop ] = touch[ prop ];
555
+ }
556
+ }
557
+ }
558
+
559
+ return event;
560
+ }
561
+
562
+ function getVirtualBindingFlags( element ) {
563
+
564
+ var flags = {},
565
+ b, k;
566
+
567
+ while ( element ) {
568
+
569
+ b = $.data( element, dataPropertyName );
570
+
571
+ for ( k in b ) {
572
+ if ( b[ k ] ) {
573
+ flags[ k ] = flags.hasVirtualBinding = true;
574
+ }
575
+ }
576
+ element = element.parentNode;
577
+ }
578
+ return flags;
579
+ }
580
+
581
+ function getClosestElementWithVirtualBinding( element, eventType ) {
582
+ var b;
583
+ while ( element ) {
584
+
585
+ b = $.data( element, dataPropertyName );
586
+
587
+ if ( b && ( !eventType || b[ eventType ] ) ) {
588
+ return element;
589
+ }
590
+ element = element.parentNode;
591
+ }
592
+ return null;
593
+ }
594
+
595
+ function enableTouchBindings() {
596
+ blockTouchTriggers = false;
597
+ }
598
+
599
+ function disableTouchBindings() {
600
+ blockTouchTriggers = true;
601
+ }
602
+
603
+ function enableMouseBindings() {
604
+ lastTouchID = 0;
605
+ clickBlockList.length = 0;
606
+ blockMouseTriggers = false;
607
+
608
+ // When mouse bindings are enabled, our
609
+ // touch bindings are disabled.
610
+ disableTouchBindings();
611
+ }
612
+
613
+ function disableMouseBindings() {
614
+ // When mouse bindings are disabled, our
615
+ // touch bindings are enabled.
616
+ enableTouchBindings();
617
+ }
618
+
619
+ function startResetTimer() {
620
+ clearResetTimer();
621
+ resetTimerID = setTimeout(function(){
622
+ resetTimerID = 0;
623
+ enableMouseBindings();
624
+ }, $.vmouse.resetTimerDuration );
625
+ }
626
+
627
+ function clearResetTimer() {
628
+ if ( resetTimerID ){
629
+ clearTimeout( resetTimerID );
630
+ resetTimerID = 0;
631
+ }
632
+ }
633
+
634
+ function triggerVirtualEvent( eventType, event, flags ) {
635
+ var ve;
636
+
637
+ if ( ( flags && flags[ eventType ] ) ||
638
+ ( !flags && getClosestElementWithVirtualBinding( event.target, eventType ) ) ) {
639
+
640
+ ve = createVirtualEvent( event, eventType );
641
+
642
+ $( event.target).trigger( ve );
643
+ }
644
+
645
+ return ve;
646
+ }
647
+
648
+ function mouseEventCallback( event ) {
649
+ var touchID = $.data(event.target, touchTargetPropertyName);
650
+
651
+ if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ){
652
+ var ve = triggerVirtualEvent( "v" + event.type, event );
653
+ if ( ve ) {
654
+ if ( ve.isDefaultPrevented() ) {
655
+ event.preventDefault();
656
+ }
657
+ if ( ve.isPropagationStopped() ) {
658
+ event.stopPropagation();
659
+ }
660
+ if ( ve.isImmediatePropagationStopped() ) {
661
+ event.stopImmediatePropagation();
662
+ }
663
+ }
664
+ }
665
+ }
666
+
667
+ function handleTouchStart( event ) {
668
+
669
+ var touches = getNativeEvent( event ).touches,
670
+ target, flags;
671
+
672
+ if ( touches && touches.length === 1 ) {
673
+
674
+ target = event.target;
675
+ flags = getVirtualBindingFlags( target );
676
+
677
+ if ( flags.hasVirtualBinding ) {
678
+
679
+ lastTouchID = nextTouchID++;
680
+ $.data( target, touchTargetPropertyName, lastTouchID );
681
+
682
+ clearResetTimer();
683
+
684
+ disableMouseBindings();
685
+ didScroll = false;
686
+
687
+ var t = getNativeEvent( event ).touches[ 0 ];
688
+ startX = t.pageX;
689
+ startY = t.pageY;
690
+
691
+ triggerVirtualEvent( "vmouseover", event, flags );
692
+ triggerVirtualEvent( "vmousedown", event, flags );
693
+ }
694
+ }
695
+ }
696
+
697
+ function handleScroll( event ) {
698
+ if ( blockTouchTriggers ) {
699
+ return;
700
+ }
701
+
702
+ if ( !didScroll ) {
703
+ triggerVirtualEvent( "vmousecancel", event, getVirtualBindingFlags( event.target ) );
704
+ }
705
+
706
+ didScroll = true;
707
+ startResetTimer();
708
+ }
709
+
710
+ function handleTouchMove( event ) {
711
+ if ( blockTouchTriggers ) {
712
+ return;
713
+ }
714
+
715
+ var t = getNativeEvent( event ).touches[ 0 ],
716
+ didCancel = didScroll,
717
+ moveThreshold = $.vmouse.moveDistanceThreshold;
718
+ didScroll = didScroll ||
719
+ ( Math.abs(t.pageX - startX) > moveThreshold ||
720
+ Math.abs(t.pageY - startY) > moveThreshold ),
721
+ flags = getVirtualBindingFlags( event.target );
722
+
723
+ if ( didScroll && !didCancel ) {
724
+ triggerVirtualEvent( "vmousecancel", event, flags );
725
+ }
726
+
727
+ triggerVirtualEvent( "vmousemove", event, flags );
728
+ startResetTimer();
729
+ }
730
+
731
+ function handleTouchEnd( event ) {
732
+ if ( blockTouchTriggers ) {
733
+ return;
734
+ }
735
+
736
+ disableTouchBindings();
737
+
738
+ var flags = getVirtualBindingFlags( event.target ),
739
+ t;
740
+ triggerVirtualEvent( "vmouseup", event, flags );
741
+
742
+ if ( !didScroll ) {
743
+ var ve = triggerVirtualEvent( "vclick", event, flags );
744
+ if ( ve && ve.isDefaultPrevented() ) {
745
+ // The target of the mouse events that follow the touchend
746
+ // event don't necessarily match the target used during the
747
+ // touch. This means we need to rely on coordinates for blocking
748
+ // any click that is generated.
749
+ t = getNativeEvent( event ).changedTouches[ 0 ];
750
+ clickBlockList.push({
751
+ touchID: lastTouchID,
752
+ x: t.clientX,
753
+ y: t.clientY
754
+ });
755
+
756
+ // Prevent any mouse events that follow from triggering
757
+ // virtual event notifications.
758
+ blockMouseTriggers = true;
759
+ }
760
+ }
761
+ triggerVirtualEvent( "vmouseout", event, flags);
762
+ didScroll = false;
763
+
764
+ startResetTimer();
765
+ }
766
+
767
+ function hasVirtualBindings( ele ) {
768
+ var bindings = $.data( ele, dataPropertyName ),
769
+ k;
770
+
771
+ if ( bindings ) {
772
+ for ( k in bindings ) {
773
+ if ( bindings[ k ] ) {
774
+ return true;
775
+ }
776
+ }
777
+ }
778
+ return false;
779
+ }
780
+
781
+ function dummyMouseHandler(){}
782
+
783
+ function getSpecialEventObject( eventType ) {
784
+ var realType = eventType.substr( 1 );
785
+
786
+ return {
787
+ setup: function( data, namespace ) {
788
+ // If this is the first virtual mouse binding for this element,
789
+ // add a bindings object to its data.
790
+
791
+ if ( !hasVirtualBindings( this ) ) {
792
+ $.data( this, dataPropertyName, {});
793
+ }
794
+
795
+ // If setup is called, we know it is the first binding for this
796
+ // eventType, so initialize the count for the eventType to zero.
797
+ var bindings = $.data( this, dataPropertyName );
798
+ bindings[ eventType ] = true;
799
+
800
+ // If this is the first virtual mouse event for this type,
801
+ // register a global handler on the document.
802
+
803
+ activeDocHandlers[ eventType ] = ( activeDocHandlers[ eventType ] || 0 ) + 1;
804
+
805
+ if ( activeDocHandlers[ eventType ] === 1 ) {
806
+ $document.bind( realType, mouseEventCallback );
807
+ }
808
+
809
+ // Some browsers, like Opera Mini, won't dispatch mouse/click events
810
+ // for elements unless they actually have handlers registered on them.
811
+ // To get around this, we register dummy handlers on the elements.
812
+
813
+ $( this ).bind( realType, dummyMouseHandler );
814
+
815
+ // For now, if event capture is not supported, we rely on mouse handlers.
816
+ if ( eventCaptureSupported ) {
817
+ // If this is the first virtual mouse binding for the document,
818
+ // register our touchstart handler on the document.
819
+
820
+ activeDocHandlers[ "touchstart" ] = ( activeDocHandlers[ "touchstart" ] || 0) + 1;
821
+
822
+ if (activeDocHandlers[ "touchstart" ] === 1) {
823
+ $document.bind( "touchstart", handleTouchStart )
824
+ .bind( "touchend", handleTouchEnd )
825
+
826
+ // On touch platforms, touching the screen and then dragging your finger
827
+ // causes the window content to scroll after some distance threshold is
828
+ // exceeded. On these platforms, a scroll prevents a click event from being
829
+ // dispatched, and on some platforms, even the touchend is suppressed. To
830
+ // mimic the suppression of the click event, we need to watch for a scroll
831
+ // event. Unfortunately, some platforms like iOS don't dispatch scroll
832
+ // events until *AFTER* the user lifts their finger (touchend). This means
833
+ // we need to watch both scroll and touchmove events to figure out whether
834
+ // or not a scroll happenens before the touchend event is fired.
835
+
836
+ .bind( "touchmove", handleTouchMove )
837
+ .bind( "scroll", handleScroll );
838
+ }
839
+ }
840
+ },
841
+
842
+ teardown: function( data, namespace ) {
843
+ // If this is the last virtual binding for this eventType,
844
+ // remove its global handler from the document.
845
+
846
+ --activeDocHandlers[ eventType ];
847
+
848
+ if ( !activeDocHandlers[ eventType ] ) {
849
+ $document.unbind( realType, mouseEventCallback );
850
+ }
851
+
852
+ if ( eventCaptureSupported ) {
853
+ // If this is the last virtual mouse binding in existence,
854
+ // remove our document touchstart listener.
855
+
856
+ --activeDocHandlers[ "touchstart" ];
857
+
858
+ if ( !activeDocHandlers[ "touchstart" ] ) {
859
+ $document.unbind( "touchstart", handleTouchStart )
860
+ .unbind( "touchmove", handleTouchMove )
861
+ .unbind( "touchend", handleTouchEnd )
862
+ .unbind( "scroll", handleScroll );
863
+ }
864
+ }
865
+
866
+ var $this = $( this ),
867
+ bindings = $.data( this, dataPropertyName );
868
+
869
+ // teardown may be called when an element was
870
+ // removed from the DOM. If this is the case,
871
+ // jQuery core may have already stripped the element
872
+ // of any data bindings so we need to check it before
873
+ // using it.
874
+ if ( bindings ) {
875
+ bindings[ eventType ] = false;
876
+ }
877
+
878
+ // Unregister the dummy event handler.
879
+
880
+ $this.unbind( realType, dummyMouseHandler );
881
+
882
+ // If this is the last virtual mouse binding on the
883
+ // element, remove the binding data from the element.
884
+
885
+ if ( !hasVirtualBindings( this ) ) {
886
+ $this.removeData( dataPropertyName );
887
+ }
888
+ }
889
+ };
890
+ }
891
+
892
+ // Expose our custom events to the jQuery bind/unbind mechanism.
893
+
894
+ for ( var i = 0; i < virtualEventNames.length; i++ ){
895
+ $.event.special[ virtualEventNames[ i ] ] = getSpecialEventObject( virtualEventNames[ i ] );
896
+ }
897
+
898
+ // Add a capture click handler to block clicks.
899
+ // Note that we require event capture support for this so if the device
900
+ // doesn't support it, we punt for now and rely solely on mouse events.
901
+ if ( eventCaptureSupported ) {
902
+ document.addEventListener( "click", function( e ){
903
+ var cnt = clickBlockList.length,
904
+ target = e.target,
905
+ x, y, ele, i, o, touchID;
906
+
907
+ if ( cnt ) {
908
+ x = e.clientX;
909
+ y = e.clientY;
910
+ threshold = $.vmouse.clickDistanceThreshold;
911
+
912
+ // The idea here is to run through the clickBlockList to see if
913
+ // the current click event is in the proximity of one of our
914
+ // vclick events that had preventDefault() called on it. If we find
915
+ // one, then we block the click.
916
+ //
917
+ // Why do we have to rely on proximity?
918
+ //
919
+ // Because the target of the touch event that triggered the vclick
920
+ // can be different from the target of the click event synthesized
921
+ // by the browser. The target of a mouse/click event that is syntehsized
922
+ // from a touch event seems to be implementation specific. For example,
923
+ // some browsers will fire mouse/click events for a link that is near
924
+ // a touch event, even though the target of the touchstart/touchend event
925
+ // says the user touched outside the link. Also, it seems that with most
926
+ // browsers, the target of the mouse/click event is not calculated until the
927
+ // time it is dispatched, so if you replace an element that you touched
928
+ // with another element, the target of the mouse/click will be the new
929
+ // element underneath that point.
930
+ //
931
+ // Aside from proximity, we also check to see if the target and any
932
+ // of its ancestors were the ones that blocked a click. This is necessary
933
+ // because of the strange mouse/click target calculation done in the
934
+ // Android 2.1 browser, where if you click on an element, and there is a
935
+ // mouse/click handler on one of its ancestors, the target will be the
936
+ // innermost child of the touched element, even if that child is no where
937
+ // near the point of touch.
938
+
939
+ ele = target;
940
+
941
+ while ( ele ) {
942
+ for ( i = 0; i < cnt; i++ ) {
943
+ o = clickBlockList[ i ];
944
+ touchID = 0;
945
+
946
+ if ( ( ele === target && Math.abs( o.x - x ) < threshold && Math.abs( o.y - y ) < threshold ) ||
947
+ $.data( ele, touchTargetPropertyName ) === o.touchID ) {
948
+ // XXX: We may want to consider removing matches from the block list
949
+ // instead of waiting for the reset timer to fire.
950
+ e.preventDefault();
951
+ e.stopPropagation();
952
+ return;
953
+ }
954
+ }
955
+ ele = ele.parentNode;
956
+ }
957
+ }
958
+ }, true);
959
+ }
960
+ })( jQuery, window, document );
961
+ /*
962
+ * jQuery Mobile Framework : events
963
+ * Copyright (c) jQuery Project
964
+ * Dual licensed under the MIT or GPL Version 2 licenses.
965
+ * http://jquery.org/license
966
+ */
967
+ (function( $, window, undefined ) {
968
+
969
+ // add new event shortcuts
970
+ $.each( ( "touchstart touchmove touchend orientationchange throttledresize " +
971
+ "tap taphold swipe swipeleft swiperight scrollstart scrollstop" ).split( " " ), function( i, name ) {
972
+
973
+ $.fn[ name ] = function( fn ) {
974
+ return fn ? this.bind( name, fn ) : this.trigger( name );
975
+ };
976
+
977
+ $.attrFn[ name ] = true;
978
+ });
979
+
980
+ var supportTouch = $.support.touch,
981
+ scrollEvent = "touchmove scroll",
982
+ touchStartEvent = supportTouch ? "touchstart" : "mousedown",
983
+ touchStopEvent = supportTouch ? "touchend" : "mouseup",
984
+ touchMoveEvent = supportTouch ? "touchmove" : "mousemove";
985
+
986
+ function triggerCustomEvent( obj, eventType, event ) {
987
+ var originalType = event.type;
988
+ event.type = eventType;
989
+ $.event.handle.call( obj, event );
990
+ event.type = originalType;
991
+ }
992
+
993
+ // also handles scrollstop
994
+ $.event.special.scrollstart = {
995
+
996
+ enabled: true,
997
+
998
+ setup: function() {
999
+
1000
+ var thisObject = this,
1001
+ $this = $( thisObject ),
1002
+ scrolling,
1003
+ timer;
1004
+
1005
+ function trigger( event, state ) {
1006
+ scrolling = state;
1007
+ triggerCustomEvent( thisObject, scrolling ? "scrollstart" : "scrollstop", event );
1008
+ }
1009
+
1010
+ // iPhone triggers scroll after a small delay; use touchmove instead
1011
+ $this.bind( scrollEvent, function( event ) {
1012
+
1013
+ if ( !$.event.special.scrollstart.enabled ) {
1014
+ return;
1015
+ }
1016
+
1017
+ if ( !scrolling ) {
1018
+ trigger( event, true );
1019
+ }
1020
+
1021
+ clearTimeout( timer );
1022
+ timer = setTimeout(function() {
1023
+ trigger( event, false );
1024
+ }, 50 );
1025
+ });
1026
+ }
1027
+ };
1028
+
1029
+ // also handles taphold
1030
+ $.event.special.tap = {
1031
+ setup: function() {
1032
+ var thisObject = this,
1033
+ $this = $( thisObject );
1034
+
1035
+ $this.bind( "vmousedown", function( event ) {
1036
+
1037
+ if ( event.which && event.which !== 1 ) {
1038
+ return false;
1039
+ }
1040
+
1041
+ var origTarget = event.target,
1042
+ origEvent = event.originalEvent,
1043
+ timer;
1044
+
1045
+ function clearTapTimer() {
1046
+ clearTimeout( timer );
1047
+ }
1048
+
1049
+ function clearTapHandlers() {
1050
+ clearTapTimer();
1051
+
1052
+ $this.unbind( "vclick", clickHandler )
1053
+ .unbind( "vmouseup", clearTapTimer )
1054
+ .unbind( "vmousecancel", clearTapHandlers );
1055
+ }
1056
+
1057
+ function clickHandler(event) {
1058
+ clearTapHandlers();
1059
+
1060
+ // ONLY trigger a 'tap' event if the start target is
1061
+ // the same as the stop target.
1062
+ if ( origTarget == event.target ) {
1063
+ triggerCustomEvent( thisObject, "tap", event );
1064
+ }
1065
+ }
1066
+
1067
+ $this.bind( "vmousecancel", clearTapHandlers )
1068
+ .bind( "vmouseup", clearTapTimer )
1069
+ .bind( "vclick", clickHandler );
1070
+
1071
+ timer = setTimeout(function() {
1072
+ triggerCustomEvent( thisObject, "taphold", $.Event( "taphold" ) );
1073
+ }, 750 );
1074
+ });
1075
+ }
1076
+ };
1077
+
1078
+ // also handles swipeleft, swiperight
1079
+ $.event.special.swipe = {
1080
+ scrollSupressionThreshold: 10, // More than this horizontal displacement, and we will suppress scrolling.
1081
+
1082
+ durationThreshold: 1000, // More time than this, and it isn't a swipe.
1083
+
1084
+ horizontalDistanceThreshold: 30, // Swipe horizontal displacement must be more than this.
1085
+
1086
+ verticalDistanceThreshold: 75, // Swipe vertical displacement must be less than this.
1087
+
1088
+ setup: function() {
1089
+ var thisObject = this,
1090
+ $this = $( thisObject );
1091
+
1092
+ $this.bind( touchStartEvent, function( event ) {
1093
+ var data = event.originalEvent.touches ?
1094
+ event.originalEvent.touches[ 0 ] : event,
1095
+ start = {
1096
+ time: ( new Date() ).getTime(),
1097
+ coords: [ data.pageX, data.pageY ],
1098
+ origin: $( event.target )
1099
+ },
1100
+ stop;
1101
+
1102
+ function moveHandler( event ) {
1103
+
1104
+ if ( !start ) {
1105
+ return;
1106
+ }
1107
+
1108
+ var data = event.originalEvent.touches ?
1109
+ event.originalEvent.touches[ 0 ] : event;
1110
+
1111
+ stop = {
1112
+ time: ( new Date() ).getTime(),
1113
+ coords: [ data.pageX, data.pageY ]
1114
+ };
1115
+
1116
+ // prevent scrolling
1117
+ if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) {
1118
+ event.preventDefault();
1119
+ }
1120
+ }
1121
+
1122
+ $this.bind( touchMoveEvent, moveHandler )
1123
+ .one( touchStopEvent, function( event ) {
1124
+ $this.unbind( touchMoveEvent, moveHandler );
1125
+
1126
+ if ( start && stop ) {
1127
+ if ( stop.time - start.time < $.event.special.swipe.durationThreshold &&
1128
+ Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.horizontalDistanceThreshold &&
1129
+ Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) {
1130
+
1131
+ start.origin.trigger( "swipe" )
1132
+ .trigger( start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight" );
1133
+ }
1134
+ }
1135
+ start = stop = undefined;
1136
+ });
1137
+ });
1138
+ }
1139
+ };
1140
+
1141
+ (function( $, window ) {
1142
+ // "Cowboy" Ben Alman
1143
+
1144
+ var win = $( window ),
1145
+ special_event,
1146
+ get_orientation,
1147
+ last_orientation;
1148
+
1149
+ $.event.special.orientationchange = special_event = {
1150
+ setup: function() {
1151
+ // If the event is supported natively, return false so that jQuery
1152
+ // will bind to the event using DOM methods.
1153
+ if ( $.support.orientation ) {
1154
+ return false;
1155
+ }
1156
+
1157
+ // Get the current orientation to avoid initial double-triggering.
1158
+ last_orientation = get_orientation();
1159
+
1160
+ // Because the orientationchange event doesn't exist, simulate the
1161
+ // event by testing window dimensions on resize.
1162
+ win.bind( "throttledresize", handler );
1163
+ },
1164
+ teardown: function(){
1165
+ // If the event is not supported natively, return false so that
1166
+ // jQuery will unbind the event using DOM methods.
1167
+ if ( $.support.orientation ) {
1168
+ return false;
1169
+ }
1170
+
1171
+ // Because the orientationchange event doesn't exist, unbind the
1172
+ // resize event handler.
1173
+ win.unbind( "throttledresize", handler );
1174
+ },
1175
+ add: function( handleObj ) {
1176
+ // Save a reference to the bound event handler.
1177
+ var old_handler = handleObj.handler;
1178
+
1179
+ handleObj.handler = function( event ) {
1180
+ // Modify event object, adding the .orientation property.
1181
+ event.orientation = get_orientation();
1182
+
1183
+ // Call the originally-bound event handler and return its result.
1184
+ return old_handler.apply( this, arguments );
1185
+ };
1186
+ }
1187
+ };
1188
+
1189
+ // If the event is not supported natively, this handler will be bound to
1190
+ // the window resize event to simulate the orientationchange event.
1191
+ function handler() {
1192
+ // Get the current orientation.
1193
+ var orientation = get_orientation();
1194
+
1195
+ if ( orientation !== last_orientation ) {
1196
+ // The orientation has changed, so trigger the orientationchange event.
1197
+ last_orientation = orientation;
1198
+ win.trigger( "orientationchange" );
1199
+ }
1200
+ };
1201
+
1202
+ // Get the current page orientation. This method is exposed publicly, should it
1203
+ // be needed, as jQuery.event.special.orientationchange.orientation()
1204
+ $.event.special.orientationchange.orientation = get_orientation = function() {
1205
+ var elem = document.documentElement;
1206
+ return elem && elem.clientWidth / elem.clientHeight < 1.1 ? "portrait" : "landscape";
1207
+ };
1208
+
1209
+ })( jQuery, window );
1210
+
1211
+
1212
+ // throttled resize event
1213
+ (function() {
1214
+
1215
+ $.event.special.throttledresize = {
1216
+ setup: function() {
1217
+ $( this ).bind( "resize", handler );
1218
+ },
1219
+ teardown: function(){
1220
+ $( this ).unbind( "resize", handler );
1221
+ }
1222
+ };
1223
+
1224
+ var throttle = 250,
1225
+ handler = function() {
1226
+ curr = ( new Date() ).getTime();
1227
+ diff = curr - lastCall;
1228
+
1229
+ if ( diff >= throttle ) {
1230
+
1231
+ lastCall = curr;
1232
+ $( this ).trigger( "throttledresize" );
1233
+
1234
+ } else {
1235
+
1236
+ if ( heldCall ) {
1237
+ clearTimeout( heldCall );
1238
+ }
1239
+
1240
+ // Promise a held call will still execute
1241
+ heldCall = setTimeout( handler, throttle - diff );
1242
+ }
1243
+ },
1244
+ lastCall = 0,
1245
+ heldCall,
1246
+ curr,
1247
+ diff;
1248
+ })();
1249
+
1250
+
1251
+ $.each({
1252
+ scrollstop: "scrollstart",
1253
+ taphold: "tap",
1254
+ swipeleft: "swipe",
1255
+ swiperight: "swipe"
1256
+ }, function( event, sourceEvent ) {
1257
+
1258
+ $.event.special[ event ] = {
1259
+ setup: function() {
1260
+ $( this ).bind( sourceEvent, $.noop );
1261
+ }
1262
+ };
1263
+ });
1264
+
1265
+ })( jQuery, this );
1266
+ /*!
1267
+ * jQuery hashchange event - v1.3 - 7/21/2010
1268
+ * http://benalman.com/projects/jquery-hashchange-plugin/
1269
+ *
1270
+ * Copyright (c) 2010 "Cowboy" Ben Alman
1271
+ * Dual licensed under the MIT and GPL licenses.
1272
+ * http://benalman.com/about/license/
1273
+ */
1274
+
1275
+ // Script: jQuery hashchange event
1276
+ //
1277
+ // *Version: 1.3, Last updated: 7/21/2010*
1278
+ //
1279
+ // Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
1280
+ // GitHub - http://github.com/cowboy/jquery-hashchange/
1281
+ // Source - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
1282
+ // (Minified) - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped)
1283
+ //
1284
+ // About: License
1285
+ //
1286
+ // Copyright (c) 2010 "Cowboy" Ben Alman,
1287
+ // Dual licensed under the MIT and GPL licenses.
1288
+ // http://benalman.com/about/license/
1289
+ //
1290
+ // About: Examples
1291
+ //
1292
+ // These working examples, complete with fully commented code, illustrate a few
1293
+ // ways in which this plugin can be used.
1294
+ //
1295
+ // hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
1296
+ // document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
1297
+ //
1298
+ // About: Support and Testing
1299
+ //
1300
+ // Information about what version or versions of jQuery this plugin has been
1301
+ // tested with, what browsers it has been tested in, and where the unit tests
1302
+ // reside (so you can test it yourself).
1303
+ //
1304
+ // jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
1305
+ // Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5,
1306
+ // Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5.
1307
+ // Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/
1308
+ //
1309
+ // About: Known issues
1310
+ //
1311
+ // While this jQuery hashchange event implementation is quite stable and
1312
+ // robust, there are a few unfortunate browser bugs surrounding expected
1313
+ // hashchange event-based behaviors, independent of any JavaScript
1314
+ // window.onhashchange abstraction. See the following examples for more
1315
+ // information:
1316
+ //
1317
+ // Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
1318
+ // Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
1319
+ // WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
1320
+ // Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
1321
+ //
1322
+ // Also note that should a browser natively support the window.onhashchange
1323
+ // event, but not report that it does, the fallback polling loop will be used.
1324
+ //
1325
+ // About: Release History
1326
+ //
1327
+ // 1.3 - (7/21/2010) Reorganized IE6/7 Iframe code to make it more
1328
+ // "removable" for mobile-only development. Added IE6/7 document.title
1329
+ // support. Attempted to make Iframe as hidden as possible by using
1330
+ // techniques from http://www.paciellogroup.com/blog/?p=604. Added
1331
+ // support for the "shortcut" format $(window).hashchange( fn ) and
1332
+ // $(window).hashchange() like jQuery provides for built-in events.
1333
+ // Renamed jQuery.hashchangeDelay to <jQuery.fn.hashchange.delay> and
1334
+ // lowered its default value to 50. Added <jQuery.fn.hashchange.domain>
1335
+ // and <jQuery.fn.hashchange.src> properties plus document-domain.html
1336
+ // file to address access denied issues when setting document.domain in
1337
+ // IE6/7.
1338
+ // 1.2 - (2/11/2010) Fixed a bug where coming back to a page using this plugin
1339
+ // from a page on another domain would cause an error in Safari 4. Also,
1340
+ // IE6/7 Iframe is now inserted after the body (this actually works),
1341
+ // which prevents the page from scrolling when the event is first bound.
1342
+ // Event can also now be bound before DOM ready, but it won't be usable
1343
+ // before then in IE6/7.
1344
+ // 1.1 - (1/21/2010) Incorporated document.documentMode test to fix IE8 bug
1345
+ // where browser version is incorrectly reported as 8.0, despite
1346
+ // inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.
1347
+ // 1.0 - (1/9/2010) Initial Release. Broke out the jQuery BBQ event.special
1348
+ // window.onhashchange functionality into a separate plugin for users
1349
+ // who want just the basic event & back button support, without all the
1350
+ // extra awesomeness that BBQ provides. This plugin will be included as
1351
+ // part of jQuery BBQ, but also be available separately.
1352
+
1353
+ (function($,window,undefined){
1354
+ '$:nomunge'; // Used by YUI compressor.
1355
+
1356
+ // Reused string.
1357
+ var str_hashchange = 'hashchange',
1358
+
1359
+ // Method / object references.
1360
+ doc = document,
1361
+ fake_onhashchange,
1362
+ special = $.event.special,
1363
+
1364
+ // Does the browser support window.onhashchange? Note that IE8 running in
1365
+ // IE7 compatibility mode reports true for 'onhashchange' in window, even
1366
+ // though the event isn't supported, so also test document.documentMode.
1367
+ doc_mode = doc.documentMode,
1368
+ supports_onhashchange = 'on' + str_hashchange in window && ( doc_mode === undefined || doc_mode > 7 );
1369
+
1370
+ // Get location.hash (or what you'd expect location.hash to be) sans any
1371
+ // leading #. Thanks for making this necessary, Firefox!
1372
+ function get_fragment( url ) {
1373
+ url = url || location.href;
1374
+ return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );
1375
+ };
1376
+
1377
+ // Method: jQuery.fn.hashchange
1378
+ //
1379
+ // Bind a handler to the window.onhashchange event or trigger all bound
1380
+ // window.onhashchange event handlers. This behavior is consistent with
1381
+ // jQuery's built-in event handlers.
1382
+ //
1383
+ // Usage:
1384
+ //
1385
+ // > jQuery(window).hashchange( [ handler ] );
1386
+ //
1387
+ // Arguments:
1388
+ //
1389
+ // handler - (Function) Optional handler to be bound to the hashchange
1390
+ // event. This is a "shortcut" for the more verbose form:
1391
+ // jQuery(window).bind( 'hashchange', handler ). If handler is omitted,
1392
+ // all bound window.onhashchange event handlers will be triggered. This
1393
+ // is a shortcut for the more verbose
1394
+ // jQuery(window).trigger( 'hashchange' ). These forms are described in
1395
+ // the <hashchange event> section.
1396
+ //
1397
+ // Returns:
1398
+ //
1399
+ // (jQuery) The initial jQuery collection of elements.
1400
+
1401
+ // Allow the "shortcut" format $(elem).hashchange( fn ) for binding and
1402
+ // $(elem).hashchange() for triggering, like jQuery does for built-in events.
1403
+ $.fn[ str_hashchange ] = function( fn ) {
1404
+ return fn ? this.bind( str_hashchange, fn ) : this.trigger( str_hashchange );
1405
+ };
1406
+
1407
+ // Property: jQuery.fn.hashchange.delay
1408
+ //
1409
+ // The numeric interval (in milliseconds) at which the <hashchange event>
1410
+ // polling loop executes. Defaults to 50.
1411
+
1412
+ // Property: jQuery.fn.hashchange.domain
1413
+ //
1414
+ // If you're setting document.domain in your JavaScript, and you want hash
1415
+ // history to work in IE6/7, not only must this property be set, but you must
1416
+ // also set document.domain BEFORE jQuery is loaded into the page. This
1417
+ // property is only applicable if you are supporting IE6/7 (or IE8 operating
1418
+ // in "IE7 compatibility" mode).
1419
+ //
1420
+ // In addition, the <jQuery.fn.hashchange.src> property must be set to the
1421
+ // path of the included "document-domain.html" file, which can be renamed or
1422
+ // modified if necessary (note that the document.domain specified must be the
1423
+ // same in both your main JavaScript as well as in this file).
1424
+ //
1425
+ // Usage:
1426
+ //
1427
+ // jQuery.fn.hashchange.domain = document.domain;
1428
+
1429
+ // Property: jQuery.fn.hashchange.src
1430
+ //
1431
+ // If, for some reason, you need to specify an Iframe src file (for example,
1432
+ // when setting document.domain as in <jQuery.fn.hashchange.domain>), you can
1433
+ // do so using this property. Note that when using this property, history
1434
+ // won't be recorded in IE6/7 until the Iframe src file loads. This property
1435
+ // is only applicable if you are supporting IE6/7 (or IE8 operating in "IE7
1436
+ // compatibility" mode).
1437
+ //
1438
+ // Usage:
1439
+ //
1440
+ // jQuery.fn.hashchange.src = 'path/to/file.html';
1441
+
1442
+ $.fn[ str_hashchange ].delay = 50;
1443
+ /*
1444
+ $.fn[ str_hashchange ].domain = null;
1445
+ $.fn[ str_hashchange ].src = null;
1446
+ */
1447
+
1448
+ // Event: hashchange event
1449
+ //
1450
+ // Fired when location.hash changes. In browsers that support it, the native
1451
+ // HTML5 window.onhashchange event is used, otherwise a polling loop is
1452
+ // initialized, running every <jQuery.fn.hashchange.delay> milliseconds to
1453
+ // see if the hash has changed. In IE6/7 (and IE8 operating in "IE7
1454
+ // compatibility" mode), a hidden Iframe is created to allow the back button
1455
+ // and hash-based history to work.
1456
+ //
1457
+ // Usage as described in <jQuery.fn.hashchange>:
1458
+ //
1459
+ // > // Bind an event handler.
1460
+ // > jQuery(window).hashchange( function(e) {
1461
+ // > var hash = location.hash;
1462
+ // > ...
1463
+ // > });
1464
+ // >
1465
+ // > // Manually trigger the event handler.
1466
+ // > jQuery(window).hashchange();
1467
+ //
1468
+ // A more verbose usage that allows for event namespacing:
1469
+ //
1470
+ // > // Bind an event handler.
1471
+ // > jQuery(window).bind( 'hashchange', function(e) {
1472
+ // > var hash = location.hash;
1473
+ // > ...
1474
+ // > });
1475
+ // >
1476
+ // > // Manually trigger the event handler.
1477
+ // > jQuery(window).trigger( 'hashchange' );
1478
+ //
1479
+ // Additional Notes:
1480
+ //
1481
+ // * The polling loop and Iframe are not created until at least one handler
1482
+ // is actually bound to the 'hashchange' event.
1483
+ // * If you need the bound handler(s) to execute immediately, in cases where
1484
+ // a location.hash exists on page load, via bookmark or page refresh for
1485
+ // example, use jQuery(window).hashchange() or the more verbose
1486
+ // jQuery(window).trigger( 'hashchange' ).
1487
+ // * The event can be bound before DOM ready, but since it won't be usable
1488
+ // before then in IE6/7 (due to the necessary Iframe), recommended usage is
1489
+ // to bind it inside a DOM ready handler.
1490
+
1491
+ // Override existing $.event.special.hashchange methods (allowing this plugin
1492
+ // to be defined after jQuery BBQ in BBQ's source code).
1493
+ special[ str_hashchange ] = $.extend( special[ str_hashchange ], {
1494
+
1495
+ // Called only when the first 'hashchange' event is bound to window.
1496
+ setup: function() {
1497
+ // If window.onhashchange is supported natively, there's nothing to do..
1498
+ if ( supports_onhashchange ) { return false; }
1499
+
1500
+ // Otherwise, we need to create our own. And we don't want to call this
1501
+ // until the user binds to the event, just in case they never do, since it
1502
+ // will create a polling loop and possibly even a hidden Iframe.
1503
+ $( fake_onhashchange.start );
1504
+ },
1505
+
1506
+ // Called only when the last 'hashchange' event is unbound from window.
1507
+ teardown: function() {
1508
+ // If window.onhashchange is supported natively, there's nothing to do..
1509
+ if ( supports_onhashchange ) { return false; }
1510
+
1511
+ // Otherwise, we need to stop ours (if possible).
1512
+ $( fake_onhashchange.stop );
1513
+ }
1514
+
1515
+ });
1516
+
1517
+ // fake_onhashchange does all the work of triggering the window.onhashchange
1518
+ // event for browsers that don't natively support it, including creating a
1519
+ // polling loop to watch for hash changes and in IE 6/7 creating a hidden
1520
+ // Iframe to enable back and forward.
1521
+ fake_onhashchange = (function(){
1522
+ var self = {},
1523
+ timeout_id,
1524
+
1525
+ // Remember the initial hash so it doesn't get triggered immediately.
1526
+ last_hash = get_fragment(),
1527
+
1528
+ fn_retval = function(val){ return val; },
1529
+ history_set = fn_retval,
1530
+ history_get = fn_retval;
1531
+
1532
+ // Start the polling loop.
1533
+ self.start = function() {
1534
+ timeout_id || poll();
1535
+ };
1536
+
1537
+ // Stop the polling loop.
1538
+ self.stop = function() {
1539
+ timeout_id && clearTimeout( timeout_id );
1540
+ timeout_id = undefined;
1541
+ };
1542
+
1543
+ // This polling loop checks every $.fn.hashchange.delay milliseconds to see
1544
+ // if location.hash has changed, and triggers the 'hashchange' event on
1545
+ // window when necessary.
1546
+ function poll() {
1547
+ var hash = get_fragment(),
1548
+ history_hash = history_get( last_hash );
1549
+
1550
+ if ( hash !== last_hash ) {
1551
+ history_set( last_hash = hash, history_hash );
1552
+
1553
+ $(window).trigger( str_hashchange );
1554
+
1555
+ } else if ( history_hash !== last_hash ) {
1556
+ location.href = location.href.replace( /#.*/, '' ) + history_hash;
1557
+ }
1558
+
1559
+ timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );
1560
+ };
1561
+
1562
+ // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
1563
+ // vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv
1564
+ // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
1565
+ $.browser.msie && !supports_onhashchange && (function(){
1566
+ // Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8
1567
+ // when running in "IE7 compatibility" mode.
1568
+
1569
+ var iframe,
1570
+ iframe_src;
1571
+
1572
+ // When the event is bound and polling starts in IE 6/7, create a hidden
1573
+ // Iframe for history handling.
1574
+ self.start = function(){
1575
+ if ( !iframe ) {
1576
+ iframe_src = $.fn[ str_hashchange ].src;
1577
+ iframe_src = iframe_src && iframe_src + get_fragment();
1578
+
1579
+ // Create hidden Iframe. Attempt to make Iframe as hidden as possible
1580
+ // by using techniques from http://www.paciellogroup.com/blog/?p=604.
1581
+ iframe = $('<iframe tabindex="-1" title="empty"/>').hide()
1582
+
1583
+ // When Iframe has completely loaded, initialize the history and
1584
+ // start polling.
1585
+ .one( 'load', function(){
1586
+ iframe_src || history_set( get_fragment() );
1587
+ poll();
1588
+ })
1589
+
1590
+ // Load Iframe src if specified, otherwise nothing.
1591
+ .attr( 'src', iframe_src || 'javascript:0' )
1592
+
1593
+ // Append Iframe after the end of the body to prevent unnecessary
1594
+ // initial page scrolling (yes, this works).
1595
+ .insertAfter( 'body' )[0].contentWindow;
1596
+
1597
+ // Whenever `document.title` changes, update the Iframe's title to
1598
+ // prettify the back/next history menu entries. Since IE sometimes
1599
+ // errors with "Unspecified error" the very first time this is set
1600
+ // (yes, very useful) wrap this with a try/catch block.
1601
+ doc.onpropertychange = function(){
1602
+ try {
1603
+ if ( event.propertyName === 'title' ) {
1604
+ iframe.document.title = doc.title;
1605
+ }
1606
+ } catch(e) {}
1607
+ };
1608
+
1609
+ }
1610
+ };
1611
+
1612
+ // Override the "stop" method since an IE6/7 Iframe was created. Even
1613
+ // if there are no longer any bound event handlers, the polling loop
1614
+ // is still necessary for back/next to work at all!
1615
+ self.stop = fn_retval;
1616
+
1617
+ // Get history by looking at the hidden Iframe's location.hash.
1618
+ history_get = function() {
1619
+ return get_fragment( iframe.location.href );
1620
+ };
1621
+
1622
+ // Set a new history item by opening and then closing the Iframe
1623
+ // document, *then* setting its location.hash. If document.domain has
1624
+ // been set, update that as well.
1625
+ history_set = function( hash, history_hash ) {
1626
+ var iframe_doc = iframe.document,
1627
+ domain = $.fn[ str_hashchange ].domain;
1628
+
1629
+ if ( hash !== history_hash ) {
1630
+ // Update Iframe with any initial `document.title` that might be set.
1631
+ iframe_doc.title = doc.title;
1632
+
1633
+ // Opening the Iframe's document after it has been closed is what
1634
+ // actually adds a history entry.
1635
+ iframe_doc.open();
1636
+
1637
+ // Set document.domain for the Iframe document as well, if necessary.
1638
+ domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );
1639
+
1640
+ iframe_doc.close();
1641
+
1642
+ // Update the Iframe's hash, for great justice.
1643
+ iframe.location.hash = hash;
1644
+ }
1645
+ };
1646
+
1647
+ })();
1648
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1649
+ // ^^^^^^^^^^^^^^^^^^^ REMOVE IF NOT SUPPORTING IE6/7/8 ^^^^^^^^^^^^^^^^^^^
1650
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1651
+
1652
+ return self;
1653
+ })();
1654
+
1655
+ })(jQuery,this);
1656
+ /*
1657
+ * jQuery Mobile Framework : "page" plugin
1658
+ * Copyright (c) jQuery Project
1659
+ * Dual licensed under the MIT or GPL Version 2 licenses.
1660
+ * http://jquery.org/license
1661
+ */
1662
+
1663
+ (function( $, undefined ) {
1664
+
1665
+ $.widget( "mobile.page", $.mobile.widget, {
1666
+ options: {
1667
+ theme: "c",
1668
+ domCache: false
1669
+ },
1670
+
1671
+ _create: function() {
1672
+
1673
+ this._trigger( "beforecreate" );
1674
+
1675
+ this.element
1676
+ .attr( "tabindex", "0" )
1677
+ .addClass( "ui-page ui-body-" + this.options.theme );
1678
+ }
1679
+ });
1680
+
1681
+ })( jQuery );
1682
+ /*!
1683
+ * jQuery Mobile v@VERSION
1684
+ * http://jquerymobile.com/
1685
+ *
1686
+ * Copyright 2010, jQuery Project
1687
+ * Dual licensed under the MIT or GPL Version 2 licenses.
1688
+ * http://jquery.org/license
1689
+ */
1690
+
1691
+ (function( $, window, undefined ) {
1692
+
1693
+ // jQuery.mobile configurable options
1694
+ $.extend( $.mobile, {
1695
+
1696
+ // Namespace used framework-wide for data-attrs. Default is no namespace
1697
+ ns: "",
1698
+
1699
+ // Define the url parameter used for referencing widget-generated sub-pages.
1700
+ // Translates to to example.html&ui-page=subpageIdentifier
1701
+ // hash segment before &ui-page= is used to make Ajax request
1702
+ subPageUrlKey: "ui-page",
1703
+
1704
+ // Class assigned to page currently in view, and during transitions
1705
+ activePageClass: "ui-page-active",
1706
+
1707
+ // Class used for "active" button state, from CSS framework
1708
+ activeBtnClass: "ui-btn-active",
1709
+
1710
+ // Automatically handle clicks and form submissions through Ajax, when same-domain
1711
+ ajaxEnabled: true,
1712
+
1713
+ // Automatically load and show pages based on location.hash
1714
+ hashListeningEnabled: true,
1715
+
1716
+ // Set default page transition - 'none' for no transitions
1717
+ defaultPageTransition: "none",
1718
+
1719
+ // Minimum scroll distance that will be remembered when returning to a page
1720
+ minScrollBack: 250,
1721
+
1722
+ // Set default dialog transition - 'none' for no transitions
1723
+ defaultDialogTransition: "pop",
1724
+
1725
+ // Show loading message during Ajax requests
1726
+ // if false, message will not appear, but loading classes will still be toggled on html el
1727
+ loadingMessage: "loading",
1728
+
1729
+ // Error response message - appears when an Ajax page request fails
1730
+ pageLoadErrorMessage: "Error Loading Page",
1731
+
1732
+ //automatically initialize the DOM when it's ready
1733
+ autoInitializePage: true,
1734
+
1735
+ pushStateEnabled: true,
1736
+
1737
+ // Support conditions that must be met in order to proceed
1738
+ // default enhanced qualifications are media query support OR IE 7+
1739
+ gradeA: function(){
1740
+ return $.support.mediaquery || $.mobile.browser.ie && $.mobile.browser.ie >= 7;
1741
+ },
1742
+
1743
+ // TODO might be useful upstream in jquery itself ?
1744
+ keyCode: {
1745
+ ALT: 18,
1746
+ BACKSPACE: 8,
1747
+ CAPS_LOCK: 20,
1748
+ COMMA: 188,
1749
+ COMMAND: 91,
1750
+ COMMAND_LEFT: 91, // COMMAND
1751
+ COMMAND_RIGHT: 93,
1752
+ CONTROL: 17,
1753
+ DELETE: 46,
1754
+ DOWN: 40,
1755
+ END: 35,
1756
+ ENTER: 13,
1757
+ ESCAPE: 27,
1758
+ HOME: 36,
1759
+ INSERT: 45,
1760
+ LEFT: 37,
1761
+ MENU: 93, // COMMAND_RIGHT
1762
+ NUMPAD_ADD: 107,
1763
+ NUMPAD_DECIMAL: 110,
1764
+ NUMPAD_DIVIDE: 111,
1765
+ NUMPAD_ENTER: 108,
1766
+ NUMPAD_MULTIPLY: 106,
1767
+ NUMPAD_SUBTRACT: 109,
1768
+ PAGE_DOWN: 34,
1769
+ PAGE_UP: 33,
1770
+ PERIOD: 190,
1771
+ RIGHT: 39,
1772
+ SHIFT: 16,
1773
+ SPACE: 32,
1774
+ TAB: 9,
1775
+ UP: 38,
1776
+ WINDOWS: 91 // COMMAND
1777
+ },
1778
+
1779
+ // Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value
1780
+ silentScroll: function( ypos ) {
1781
+ if ( $.type( ypos ) !== "number" ) {
1782
+ ypos = $.mobile.defaultHomeScroll;
1783
+ }
1784
+
1785
+ // prevent scrollstart and scrollstop events
1786
+ $.event.special.scrollstart.enabled = false;
1787
+
1788
+ setTimeout(function() {
1789
+ window.scrollTo( 0, ypos );
1790
+ $( document ).trigger( "silentscroll", { x: 0, y: ypos });
1791
+ }, 20 );
1792
+
1793
+ setTimeout(function() {
1794
+ $.event.special.scrollstart.enabled = true;
1795
+ }, 150 );
1796
+ },
1797
+
1798
+ // Take a data attribute property, prepend the namespace
1799
+ // and then camel case the attribute string
1800
+ nsNormalize: function( prop ) {
1801
+ if ( !prop ) {
1802
+ return;
1803
+ }
1804
+
1805
+ return $.camelCase( $.mobile.ns + prop );
1806
+ }
1807
+ });
1808
+
1809
+ // Mobile version of data and removeData and hasData methods
1810
+ // ensures all data is set and retrieved using jQuery Mobile's data namespace
1811
+ $.fn.jqmData = function( prop, value ) {
1812
+ return this.data( prop ? $.mobile.nsNormalize( prop ) : prop, value );
1813
+ };
1814
+
1815
+ $.jqmData = function( elem, prop, value ) {
1816
+ return $.data( elem, $.mobile.nsNormalize( prop ), value );
1817
+ };
1818
+
1819
+ $.fn.jqmRemoveData = function( prop ) {
1820
+ return this.removeData( $.mobile.nsNormalize( prop ) );
1821
+ };
1822
+
1823
+ $.jqmRemoveData = function( elem, prop ) {
1824
+ return $.removeData( elem, $.mobile.nsNormalize( prop ) );
1825
+ };
1826
+
1827
+ $.jqmHasData = function( elem, prop ) {
1828
+ return $.hasData( elem, $.mobile.nsNormalize( prop ) );
1829
+ };
1830
+
1831
+ // Monkey-patching Sizzle to filter the :jqmData selector
1832
+ var oldFind = $.find;
1833
+
1834
+ $.find = function( selector, context, ret, extra ) {
1835
+ selector = selector.replace(/:jqmData\(([^)]*)\)/g, "[data-" + ( $.mobile.ns || "" ) + "$1]");
1836
+
1837
+ return oldFind.call( this, selector, context, ret, extra );
1838
+ };
1839
+
1840
+ $.extend( $.find, oldFind );
1841
+
1842
+ $.find.matches = function( expr, set ) {
1843
+ return $.find( expr, null, null, set );
1844
+ };
1845
+
1846
+ $.find.matchesSelector = function( node, expr ) {
1847
+ return $.find( expr, null, null, [ node ] ).length > 0;
1848
+ };
1849
+ })( jQuery, this );
1850
+
1851
+ /*
1852
+ * jQuery Mobile Framework : core utilities for auto ajax navigation, base tag mgmt,
1853
+ * Copyright (c) jQuery Project
1854
+ * Dual licensed under the MIT or GPL Version 2 licenses.
1855
+ * http://jquery.org/license
1856
+ */
1857
+ ( function( $, undefined ) {
1858
+
1859
+ //define vars for interal use
1860
+ var $window = $( window ),
1861
+ $html = $( 'html' ),
1862
+ $head = $( 'head' ),
1863
+
1864
+ //url path helpers for use in relative url management
1865
+ path = {
1866
+
1867
+ // This scary looking regular expression parses an absolute URL or its relative
1868
+ // variants (protocol, site, document, query, and hash), into the various
1869
+ // components (protocol, host, path, query, fragment, etc that make up the
1870
+ // URL as well as some other commonly used sub-parts. When used with RegExp.exec()
1871
+ // or String.match, it parses the URL into a results array that looks like this:
1872
+ //
1873
+ // [0]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread#msg-content
1874
+ // [1]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread
1875
+ // [2]: http://jblas:password@mycompany.com:8080/mail/inbox
1876
+ // [3]: http://jblas:password@mycompany.com:8080
1877
+ // [4]: http:
1878
+ // [5]: jblas:password@mycompany.com:8080
1879
+ // [6]: jblas:password
1880
+ // [7]: jblas
1881
+ // [8]: password
1882
+ // [9]: mycompany.com:8080
1883
+ // [10]: mycompany.com
1884
+ // [11]: 8080
1885
+ // [12]: /mail/inbox
1886
+ // [13]: /mail/
1887
+ // [14]: inbox
1888
+ // [15]: ?msg=1234&type=unread
1889
+ // [16]: #msg-content
1890
+ //
1891
+ urlParseRE: /^(((([^:\/#\?]+:)?(?:\/\/((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
1892
+
1893
+ //Parse a URL into a structure that allows easy access to
1894
+ //all of the URL components by name.
1895
+ parseUrl: function( url ) {
1896
+ // If we're passed an object, we'll assume that it is
1897
+ // a parsed url object and just return it back to the caller.
1898
+ if ( $.type( url ) === "object" ) {
1899
+ return url;
1900
+ }
1901
+
1902
+ var u = url || "",
1903
+ matches = path.urlParseRE.exec( url ),
1904
+ results;
1905
+ if ( matches ) {
1906
+ // Create an object that allows the caller to access the sub-matches
1907
+ // by name. Note that IE returns an empty string instead of undefined,
1908
+ // like all other browsers do, so we normalize everything so its consistent
1909
+ // no matter what browser we're running on.
1910
+ results = {
1911
+ href: matches[0] || "",
1912
+ hrefNoHash: matches[1] || "",
1913
+ hrefNoSearch: matches[2] || "",
1914
+ domain: matches[3] || "",
1915
+ protocol: matches[4] || "",
1916
+ authority: matches[5] || "",
1917
+ username: matches[7] || "",
1918
+ password: matches[8] || "",
1919
+ host: matches[9] || "",
1920
+ hostname: matches[10] || "",
1921
+ port: matches[11] || "",
1922
+ pathname: matches[12] || "",
1923
+ directory: matches[13] || "",
1924
+ filename: matches[14] || "",
1925
+ search: matches[15] || "",
1926
+ hash: matches[16] || ""
1927
+ };
1928
+ }
1929
+ return results || {};
1930
+ },
1931
+
1932
+ //Turn relPath into an asbolute path. absPath is
1933
+ //an optional absolute path which describes what
1934
+ //relPath is relative to.
1935
+ makePathAbsolute: function( relPath, absPath ) {
1936
+ if ( relPath && relPath.charAt( 0 ) === "/" ) {
1937
+ return relPath;
1938
+ }
1939
+
1940
+ relPath = relPath || "";
1941
+ absPath = absPath ? absPath.replace( /^\/|(\/[^\/]*|[^\/]+)$/g, "" ) : "";
1942
+
1943
+ var absStack = absPath ? absPath.split( "/" ) : [],
1944
+ relStack = relPath.split( "/" );
1945
+ for ( var i = 0; i < relStack.length; i++ ) {
1946
+ var d = relStack[ i ];
1947
+ switch ( d ) {
1948
+ case ".":
1949
+ break;
1950
+ case "..":
1951
+ if ( absStack.length ) {
1952
+ absStack.pop();
1953
+ }
1954
+ break;
1955
+ default:
1956
+ absStack.push( d );
1957
+ break;
1958
+ }
1959
+ }
1960
+ return "/" + absStack.join( "/" );
1961
+ },
1962
+
1963
+ //Returns true if both urls have the same domain.
1964
+ isSameDomain: function( absUrl1, absUrl2 ) {
1965
+ return path.parseUrl( absUrl1 ).domain === path.parseUrl( absUrl2 ).domain;
1966
+ },
1967
+
1968
+ //Returns true for any relative variant.
1969
+ isRelativeUrl: function( url ) {
1970
+ // All relative Url variants have one thing in common, no protocol.
1971
+ return path.parseUrl( url ).protocol === "";
1972
+ },
1973
+
1974
+ //Returns true for an absolute url.
1975
+ isAbsoluteUrl: function( url ) {
1976
+ return path.parseUrl( url ).protocol !== "";
1977
+ },
1978
+
1979
+ //Turn the specified realtive URL into an absolute one. This function
1980
+ //can handle all relative variants (protocol, site, document, query, fragment).
1981
+ makeUrlAbsolute: function( relUrl, absUrl ) {
1982
+ if ( !path.isRelativeUrl( relUrl ) ) {
1983
+ return relUrl;
1984
+ }
1985
+
1986
+ var relObj = path.parseUrl( relUrl ),
1987
+ absObj = path.parseUrl( absUrl ),
1988
+ protocol = relObj.protocol || absObj.protocol,
1989
+ authority = relObj.authority || absObj.authority,
1990
+ hasPath = relObj.pathname !== "",
1991
+ pathname = path.makePathAbsolute( relObj.pathname || absObj.filename, absObj.pathname ),
1992
+ search = relObj.search || ( !hasPath && absObj.search ) || "",
1993
+ hash = relObj.hash;
1994
+
1995
+ return protocol + "//" + authority + pathname + search + hash;
1996
+ },
1997
+
1998
+ //Add search (aka query) params to the specified url.
1999
+ addSearchParams: function( url, params ) {
2000
+ var u = path.parseUrl( url ),
2001
+ p = ( typeof params === "object" ) ? $.param( params ) : params,
2002
+ s = u.search || "?";
2003
+ return u.hrefNoSearch + s + ( s.charAt( s.length - 1 ) !== "?" ? "&" : "" ) + p + ( u.hash || "" );
2004
+ },
2005
+
2006
+ convertUrlToDataUrl: function( absUrl ) {
2007
+ var u = path.parseUrl( absUrl );
2008
+ if ( path.isEmbeddedPage( u ) ) {
2009
+ // For embedded pages, remove the dialog hash key as in getFilePath(),
2010
+ // otherwise the Data Url won't match the id of the embedded Page.
2011
+ return u.hash.split( dialogHashKey )[0].replace( /^#/, "" );
2012
+ } else if ( path.isSameDomain( u, documentBase ) ) {
2013
+ return u.hrefNoHash.replace( documentBase.domain, "" );
2014
+ }
2015
+ return absUrl;
2016
+ },
2017
+
2018
+ //get path from current hash, or from a file path
2019
+ get: function( newPath ) {
2020
+ if( newPath === undefined ) {
2021
+ newPath = location.hash;
2022
+ }
2023
+ return path.stripHash( newPath ).replace( /[^\/]*\.[^\/*]+$/, '' );
2024
+ },
2025
+
2026
+ //return the substring of a filepath before the sub-page key, for making a server request
2027
+ getFilePath: function( path ) {
2028
+ var splitkey = '&' + $.mobile.subPageUrlKey;
2029
+ return path && path.split( splitkey )[0].split( dialogHashKey )[0];
2030
+ },
2031
+
2032
+ //set location hash to path
2033
+ set: function( path ) {
2034
+ location.hash = path;
2035
+ },
2036
+
2037
+ //test if a given url (string) is a path
2038
+ //NOTE might be exceptionally naive
2039
+ isPath: function( url ) {
2040
+ return ( /\// ).test( url );
2041
+ },
2042
+
2043
+ //return a url path with the window's location protocol/hostname/pathname removed
2044
+ clean: function( url ) {
2045
+ return url.replace( documentBase.domain, "" );
2046
+ },
2047
+
2048
+ //just return the url without an initial #
2049
+ stripHash: function( url ) {
2050
+ return url.replace( /^#/, "" );
2051
+ },
2052
+
2053
+ //remove the preceding hash, any query params, and dialog notations
2054
+ cleanHash: function( hash ) {
2055
+ return path.stripHash( hash.replace( /\?.*$/, "" ).replace( dialogHashKey, "" ) );
2056
+ },
2057
+
2058
+ //check whether a url is referencing the same domain, or an external domain or different protocol
2059
+ //could be mailto, etc
2060
+ isExternal: function( url ) {
2061
+ var u = path.parseUrl( url );
2062
+ return u.protocol && u.domain !== documentUrl.domain ? true : false;
2063
+ },
2064
+
2065
+ hasProtocol: function( url ) {
2066
+ return ( /^(:?\w+:)/ ).test( url );
2067
+ },
2068
+
2069
+ //check if the specified url refers to the first page in the main application document.
2070
+ isFirstPageUrl: function( url ) {
2071
+ // We only deal with absolute paths.
2072
+ var u = path.parseUrl( path.makeUrlAbsolute( url, documentBase ) ),
2073
+
2074
+ // Does the url have the same path as the document?
2075
+ samePath = u.hrefNoHash === documentUrl.hrefNoHash || ( documentBaseDiffers && u.hrefNoHash === documentBase.hrefNoHash ),
2076
+
2077
+ // Get the first page element.
2078
+ fp = $.mobile.firstPage,
2079
+
2080
+ // Get the id of the first page element if it has one.
2081
+ fpId = fp && fp[0] ? fp[0].id : undefined;
2082
+
2083
+ // The url refers to the first page if the path matches the document and
2084
+ // it either has no hash value, or the hash is exactly equal to the id of the
2085
+ // first page element.
2086
+ return samePath && ( !u.hash || u.hash === "#" || ( fpId && u.hash.replace( /^#/, "" ) === fpId ) );
2087
+ },
2088
+
2089
+ isEmbeddedPage: function( url ) {
2090
+ var u = path.parseUrl( url );
2091
+
2092
+ //if the path is absolute, then we need to compare the url against
2093
+ //both the documentUrl and the documentBase. The main reason for this
2094
+ //is that links embedded within external documents will refer to the
2095
+ //application document, whereas links embedded within the application
2096
+ //document will be resolved against the document base.
2097
+ if ( u.protocol !== "" ) {
2098
+ return ( u.hash && ( u.hrefNoHash === documentUrl.hrefNoHash || ( documentBaseDiffers && u.hrefNoHash === documentBase.hrefNoHash ) ) );
2099
+ }
2100
+ return (/^#/).test( u.href );
2101
+ }
2102
+ },
2103
+
2104
+ //will be defined when a link is clicked and given an active class
2105
+ $activeClickedLink = null,
2106
+
2107
+ //urlHistory is purely here to make guesses at whether the back or forward button was clicked
2108
+ //and provide an appropriate transition
2109
+ urlHistory = {
2110
+ // Array of pages that are visited during a single page load.
2111
+ // Each has a url and optional transition, title, and pageUrl (which represents the file path, in cases where URL is obscured, such as dialogs)
2112
+ stack: [],
2113
+
2114
+ //maintain an index number for the active page in the stack
2115
+ activeIndex: 0,
2116
+
2117
+ //get active
2118
+ getActive: function() {
2119
+ return urlHistory.stack[ urlHistory.activeIndex ];
2120
+ },
2121
+
2122
+ getPrev: function() {
2123
+ return urlHistory.stack[ urlHistory.activeIndex - 1 ];
2124
+ },
2125
+
2126
+ getNext: function() {
2127
+ return urlHistory.stack[ urlHistory.activeIndex + 1 ];
2128
+ },
2129
+
2130
+ // addNew is used whenever a new page is added
2131
+ addNew: function( url, transition, title, pageUrl, role ) {
2132
+ //if there's forward history, wipe it
2133
+ if( urlHistory.getNext() ) {
2134
+ urlHistory.clearForward();
2135
+ }
2136
+
2137
+ urlHistory.stack.push( {url : url, transition: transition, title: title, pageUrl: pageUrl, role: role } );
2138
+
2139
+ urlHistory.activeIndex = urlHistory.stack.length - 1;
2140
+ },
2141
+
2142
+ //wipe urls ahead of active index
2143
+ clearForward: function() {
2144
+ urlHistory.stack = urlHistory.stack.slice( 0, urlHistory.activeIndex + 1 );
2145
+ },
2146
+
2147
+ directHashChange: function( opts ) {
2148
+ var back , forward, newActiveIndex, prev = this.getActive();
2149
+
2150
+ // check if url isp in history and if it's ahead or behind current page
2151
+ $.each( urlHistory.stack, function( i, historyEntry ) {
2152
+
2153
+ //if the url is in the stack, it's a forward or a back
2154
+ if( opts.currentUrl === historyEntry.url ) {
2155
+ //define back and forward by whether url is older or newer than current page
2156
+ back = i < urlHistory.activeIndex;
2157
+ forward = !back;
2158
+ newActiveIndex = i;
2159
+ }
2160
+ });
2161
+
2162
+ // save new page index, null check to prevent falsey 0 result
2163
+ this.activeIndex = newActiveIndex !== undefined ? newActiveIndex : this.activeIndex;
2164
+
2165
+ if( back ) {
2166
+ ( opts.either || opts.isBack )( true );
2167
+ } else if( forward ) {
2168
+ ( opts.either || opts.isForward )( false );
2169
+ }
2170
+ },
2171
+
2172
+ //disable hashchange event listener internally to ignore one change
2173
+ //toggled internally when location.hash is updated to match the url of a successful page load
2174
+ ignoreNextHashChange: false
2175
+ },
2176
+
2177
+ //define first selector to receive focus when a page is shown
2178
+ focusable = "[tabindex],a,button:visible,select:visible,input",
2179
+
2180
+ //queue to hold simultanious page transitions
2181
+ pageTransitionQueue = [],
2182
+
2183
+ //indicates whether or not page is in process of transitioning
2184
+ isPageTransitioning = false,
2185
+
2186
+ //nonsense hash change key for dialogs, so they create a history entry
2187
+ dialogHashKey = "&ui-state=dialog",
2188
+
2189
+ //existing base tag?
2190
+ $base = $head.children( "base" ),
2191
+
2192
+ //tuck away the original document URL minus any fragment.
2193
+ documentUrl = path.parseUrl( location.href ),
2194
+
2195
+ //if the document has an embedded base tag, documentBase is set to its
2196
+ //initial value. If a base tag does not exist, then we default to the documentUrl.
2197
+ documentBase = $base.length ? path.parseUrl( path.makeUrlAbsolute( $base.attr( "href" ), documentUrl.href ) ) : documentUrl,
2198
+
2199
+ //cache the comparison once.
2200
+ documentBaseDiffers = ( documentUrl.hrefNoHash !== documentBase.hrefNoHash );
2201
+
2202
+ //base element management, defined depending on dynamic base tag support
2203
+ var base = $.support.dynamicBaseTag ? {
2204
+
2205
+ //define base element, for use in routing asset urls that are referenced in Ajax-requested markup
2206
+ element: ( $base.length ? $base : $( "<base>", { href: documentBase.hrefNoHash } ).prependTo( $head ) ),
2207
+
2208
+ //set the generated BASE element's href attribute to a new page's base path
2209
+ set: function( href ) {
2210
+ base.element.attr( "href", path.makeUrlAbsolute( href, documentBase ) );
2211
+ },
2212
+
2213
+ //set the generated BASE element's href attribute to a new page's base path
2214
+ reset: function() {
2215
+ base.element.attr( "href", documentBase.hrefNoHash );
2216
+ }
2217
+
2218
+ } : undefined;
2219
+
2220
+ /*
2221
+ internal utility functions
2222
+ --------------------------------------*/
2223
+
2224
+
2225
+ //direct focus to the page title, or otherwise first focusable element
2226
+ function reFocus( page ) {
2227
+ var pageTitle = page.find( ".ui-title:eq(0)" );
2228
+
2229
+ if( pageTitle.length ) {
2230
+ pageTitle.focus();
2231
+ }
2232
+ else{
2233
+ page.focus();
2234
+ }
2235
+ }
2236
+
2237
+ //remove active classes after page transition or error
2238
+ function removeActiveLinkClass( forceRemoval ) {
2239
+ if( !!$activeClickedLink && ( !$activeClickedLink.closest( '.ui-page-active' ).length || forceRemoval ) ) {
2240
+ $activeClickedLink.removeClass( $.mobile.activeBtnClass );
2241
+ }
2242
+ $activeClickedLink = null;
2243
+ }
2244
+
2245
+ function releasePageTransitionLock() {
2246
+ isPageTransitioning = false;
2247
+ if( pageTransitionQueue.length > 0 ) {
2248
+ $.mobile.changePage.apply( null, pageTransitionQueue.pop() );
2249
+ }
2250
+ }
2251
+
2252
+ // Save the last scroll distance per page, before it is hidden
2253
+ var getLastScroll = (function( lastScrollEnabled ){
2254
+ return function(){
2255
+ if( !lastScrollEnabled ){
2256
+ lastScrollEnabled = true;
2257
+ return;
2258
+ }
2259
+
2260
+ lastScrollEnabled = false;
2261
+
2262
+ var active = $.mobile.urlHistory.getActive(),
2263
+ activePage = $( ".ui-page-active" ),
2264
+ scrollElem = $( window ),
2265
+ touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled;
2266
+
2267
+ if( touchOverflow ){
2268
+ scrollElem = activePage.is( ".ui-native-fixed" ) ? activePage.find( ".ui-content" ) : activePage;
2269
+ }
2270
+
2271
+ if( active ){
2272
+ var lastScroll = scrollElem.scrollTop();
2273
+
2274
+ // Set active page's lastScroll prop.
2275
+ // If the Y location we're scrolling to is less than minScrollBack, let it go.
2276
+ active.lastScroll = lastScroll < $.mobile.minScrollBack ? $.mobile.defaultHomeScroll : lastScroll;
2277
+ }
2278
+ };
2279
+ })( true );
2280
+
2281
+ // to get last scroll, we need to get scrolltop before the page change
2282
+ // using beforechangepage or popstate/hashchange (whichever comes first)
2283
+ $( document ).bind( "beforechangepage", getLastScroll );
2284
+ $( window ).bind( $.support.pushState ? "popstate" : "hashchange", getLastScroll );
2285
+
2286
+ // Make the iOS clock quick-scroll work again if we're using native overflow scrolling
2287
+ /*
2288
+ if( $.support.touchOverflow ){
2289
+ if( $.mobile.touchOverflowEnabled ){
2290
+ $( window ).bind( "scrollstop", function(){
2291
+ if( $( this ).scrollTop() === 0 ){
2292
+ $.mobile.activePage.scrollTop( 0 );
2293
+ }
2294
+ });
2295
+ }
2296
+ }
2297
+ */
2298
+
2299
+ //function for transitioning between two existing pages
2300
+ function transitionPages( toPage, fromPage, transition, reverse ) {
2301
+
2302
+ //get current scroll distance
2303
+ var active = $.mobile.urlHistory.getActive(),
2304
+ touchOverflow = $.support.touchOverflow && $.mobile.touchOverflowEnabled,
2305
+ toScroll = active.lastScroll || ( touchOverflow ? 0 : $.mobile.defaultHomeScroll ),
2306
+ screenHeight = getScreenHeight();
2307
+
2308
+ // Scroll to top, hide addr bar
2309
+ //window.scrollTo( 0, $.mobile.defaultHomeScroll );
2310
+
2311
+ if( fromPage ) {
2312
+ //trigger before show/hide events
2313
+ fromPage.data( "page" )._trigger( "beforehide", null, { nextPage: toPage } );
2314
+ }
2315
+
2316
+ if( !touchOverflow){
2317
+ toPage.height( screenHeight + toScroll );
2318
+ }
2319
+
2320
+ toPage.data( "page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } );
2321
+
2322
+ //clear page loader
2323
+ $.mobile.hidePageLoadingMsg();
2324
+
2325
+ if( touchOverflow && toScroll ){
2326
+
2327
+ toPage.addClass( "ui-mobile-pre-transition" );
2328
+ // Send focus to page as it is now display: block
2329
+ reFocus( toPage );
2330
+
2331
+ //set page's scrollTop to remembered distance
2332
+ if( toPage.is( ".ui-native-fixed" ) ){
2333
+ toPage.find( ".ui-content" ).scrollTop( toScroll );
2334
+ }
2335
+ else{
2336
+ toPage.scrollTop( toScroll );
2337
+ }
2338
+ }
2339
+
2340
+ //find the transition handler for the specified transition. If there
2341
+ //isn't one in our transitionHandlers dictionary, use the default one.
2342
+ //call the handler immediately to kick-off the transition.
2343
+ var th = $.mobile.transitionHandlers[transition || "none"] || $.mobile.defaultTransitionHandler,
2344
+ promise = th( transition, reverse, toPage, fromPage );
2345
+
2346
+ promise.done(function() {
2347
+ //reset toPage height back
2348
+ if( !touchOverflow ){
2349
+ toPage.height( "" );
2350
+ // Send focus to the newly shown page
2351
+ reFocus( toPage );
2352
+ }
2353
+
2354
+ // Jump to top or prev scroll, sometimes on iOS the page has not rendered yet.
2355
+ if( !touchOverflow ){
2356
+ $.mobile.silentScroll( toScroll );
2357
+ }
2358
+
2359
+ //trigger show/hide events
2360
+ if( fromPage ) {
2361
+ if( !touchOverflow ){
2362
+ fromPage.height( "" );
2363
+ }
2364
+
2365
+ fromPage.data( "page" )._trigger( "hide", null, { nextPage: toPage } );
2366
+ }
2367
+
2368
+ //trigger pageshow, define prevPage as either fromPage or empty jQuery obj
2369
+ toPage.data( "page" )._trigger( "show", null, { prevPage: fromPage || $( "" ) } );
2370
+ });
2371
+
2372
+ return promise;
2373
+ }
2374
+
2375
+ //simply set the active page's minimum height to screen height, depending on orientation
2376
+ function getScreenHeight(){
2377
+ var orientation = jQuery.event.special.orientationchange.orientation(),
2378
+ port = orientation === "portrait",
2379
+ winMin = port ? 480 : 320,
2380
+ screenHeight = port ? screen.availHeight : screen.availWidth,
2381
+ winHeight = Math.max( winMin, $( window ).height() ),
2382
+ pageMin = Math.min( screenHeight, winHeight );
2383
+
2384
+ return pageMin;
2385
+ }
2386
+
2387
+ $.mobile.getScreenHeight = getScreenHeight;
2388
+
2389
+ //simply set the active page's minimum height to screen height, depending on orientation
2390
+ function resetActivePageHeight(){
2391
+ $( "." + $.mobile.activePageClass ).css( "min-height", getScreenHeight() );
2392
+ }
2393
+
2394
+ //shared page enhancements
2395
+ function enhancePage( $page, role ) {
2396
+ // If a role was specified, make sure the data-role attribute
2397
+ // on the page element is in sync.
2398
+ if( role ) {
2399
+ $page.attr( "data-" + $.mobile.ns + "role", role );
2400
+ }
2401
+
2402
+ //run page plugin
2403
+ $page.page();
2404
+ }
2405
+
2406
+ /* exposed $.mobile methods */
2407
+
2408
+ //animation complete callback
2409
+ $.fn.animationComplete = function( callback ) {
2410
+ if( $.support.cssTransitions ) {
2411
+ return $( this ).one( 'webkitAnimationEnd', callback );
2412
+ }
2413
+ else{
2414
+ // defer execution for consistency between webkit/non webkit
2415
+ setTimeout( callback, 0 );
2416
+ return $( this );
2417
+ }
2418
+ };
2419
+
2420
+ //update location.hash, with or without triggering hashchange event
2421
+ //TODO - deprecate this one at 1.0
2422
+ $.mobile.updateHash = path.set;
2423
+
2424
+ //expose path object on $.mobile
2425
+ $.mobile.path = path;
2426
+
2427
+ //expose base object on $.mobile
2428
+ $.mobile.base = base;
2429
+
2430
+ //url stack, useful when plugins need to be aware of previous pages viewed
2431
+ //TODO: deprecate this one at 1.0
2432
+ $.mobile.urlstack = urlHistory.stack;
2433
+
2434
+ //history stack
2435
+ $.mobile.urlHistory = urlHistory;
2436
+
2437
+ $.mobile.dialogHashKey = dialogHashKey;
2438
+
2439
+ //default non-animation transition handler
2440
+ $.mobile.noneTransitionHandler = function( name, reverse, $toPage, $fromPage ) {
2441
+ if ( $fromPage ) {
2442
+ $fromPage.removeClass( $.mobile.activePageClass );
2443
+ }
2444
+ $toPage.addClass( $.mobile.activePageClass );
2445
+
2446
+ return $.Deferred().resolve( name, reverse, $toPage, $fromPage ).promise();
2447
+ };
2448
+
2449
+ //default handler for unknown transitions
2450
+ $.mobile.defaultTransitionHandler = $.mobile.noneTransitionHandler;
2451
+
2452
+ //transition handler dictionary for 3rd party transitions
2453
+ $.mobile.transitionHandlers = {
2454
+ none: $.mobile.defaultTransitionHandler
2455
+ };
2456
+
2457
+ //enable cross-domain page support
2458
+ $.mobile.allowCrossDomainPages = false;
2459
+
2460
+ //return the original document url
2461
+ $.mobile.getDocumentUrl = function(asParsedObject) {
2462
+ return asParsedObject ? $.extend( {}, documentUrl ) : documentUrl.href;
2463
+ };
2464
+
2465
+ //return the original document base url
2466
+ $.mobile.getDocumentBase = function(asParsedObject) {
2467
+ return asParsedObject ? $.extend( {}, documentBase ) : documentBase.href;
2468
+ };
2469
+
2470
+ // Load a page into the DOM.
2471
+ $.mobile.loadPage = function( url, options ) {
2472
+ // This function uses deferred notifications to let callers
2473
+ // know when the page is done loading, or if an error has occurred.
2474
+ var deferred = $.Deferred(),
2475
+
2476
+ // The default loadPage options with overrides specified by
2477
+ // the caller.
2478
+ settings = $.extend( {}, $.mobile.loadPage.defaults, options ),
2479
+
2480
+ // The DOM element for the page after it has been loaded.
2481
+ page = null,
2482
+
2483
+ // If the reloadPage option is true, and the page is already
2484
+ // in the DOM, dupCachedPage will be set to the page element
2485
+ // so that it can be removed after the new version of the
2486
+ // page is loaded off the network.
2487
+ dupCachedPage = null,
2488
+
2489
+ // determine the current base url
2490
+ findBaseWithDefault = function(){
2491
+ var closestBase = ( $.mobile.activePage && getClosestBaseUrl( $.mobile.activePage ) );
2492
+ return closestBase || documentBase.hrefNoHash;
2493
+ },
2494
+
2495
+ // The absolute version of the URL passed into the function. This
2496
+ // version of the URL may contain dialog/subpage params in it.
2497
+ absUrl = path.makeUrlAbsolute( url, findBaseWithDefault() );
2498
+
2499
+
2500
+ // If the caller provided data, and we're using "get" request,
2501
+ // append the data to the URL.
2502
+ if ( settings.data && settings.type === "get" ) {
2503
+ absUrl = path.addSearchParams( absUrl, settings.data );
2504
+ settings.data = undefined;
2505
+ }
2506
+
2507
+ // The absolute version of the URL minus any dialog/subpage params.
2508
+ // In otherwords the real URL of the page to be loaded.
2509
+ var fileUrl = path.getFilePath( absUrl ),
2510
+
2511
+ // The version of the Url actually stored in the data-url attribute of
2512
+ // the page. For embedded pages, it is just the id of the page. For pages
2513
+ // within the same domain as the document base, it is the site relative
2514
+ // path. For cross-domain pages (Phone Gap only) the entire absolute Url
2515
+ // used to load the page.
2516
+ dataUrl = path.convertUrlToDataUrl( absUrl );
2517
+
2518
+ // Make sure we have a pageContainer to work with.
2519
+ settings.pageContainer = settings.pageContainer || $.mobile.pageContainer;
2520
+
2521
+ // Check to see if the page already exists in the DOM.
2522
+ page = settings.pageContainer.children( ":jqmData(url='" + dataUrl + "')" );
2523
+
2524
+ // If we failed to find a page in the DOM, check the URL to see if it
2525
+ // refers to the first page in the application.
2526
+ if ( page.length === 0 && $.mobile.firstPage && path.isFirstPageUrl( absUrl ) ) {
2527
+ page = $( $.mobile.firstPage );
2528
+ }
2529
+
2530
+ // Reset base to the default document base.
2531
+ if ( base ) {
2532
+ base.reset();
2533
+ }
2534
+
2535
+ // If the page we are interested in is already in the DOM,
2536
+ // and the caller did not indicate that we should force a
2537
+ // reload of the file, we are done. Otherwise, track the
2538
+ // existing page as a duplicated.
2539
+ if ( page.length ) {
2540
+ if ( !settings.reloadPage ) {
2541
+ enhancePage( page, settings.role );
2542
+ deferred.resolve( absUrl, options, page );
2543
+ return deferred.promise();
2544
+ }
2545
+ dupCachedPage = page;
2546
+ }
2547
+
2548
+ if ( settings.showLoadMsg ) {
2549
+
2550
+ // This configurable timeout allows cached pages a brief delay to load without showing a message
2551
+ var loadMsgDelay = setTimeout(function(){
2552
+ $.mobile.showPageLoadingMsg();
2553
+ }, settings.loadMsgDelay ),
2554
+
2555
+ // Shared logic for clearing timeout and removing message.
2556
+ hideMsg = function(){
2557
+
2558
+ // Stop message show timer
2559
+ clearTimeout( loadMsgDelay );
2560
+
2561
+ // Hide loading message
2562
+ $.mobile.hidePageLoadingMsg();
2563
+ };
2564
+ }
2565
+
2566
+ if ( !( $.mobile.allowCrossDomainPages || path.isSameDomain( documentUrl, absUrl ) ) ) {
2567
+ deferred.reject( absUrl, options );
2568
+ } else {
2569
+ // Load the new page.
2570
+ $.ajax({
2571
+ url: fileUrl,
2572
+ type: settings.type,
2573
+ data: settings.data,
2574
+ dataType: "html",
2575
+ success: function( html ) {
2576
+ //pre-parse html to check for a data-url,
2577
+ //use it as the new fileUrl, base path, etc
2578
+ var all = $( "<div></div>" ),
2579
+
2580
+ //page title regexp
2581
+ newPageTitle = html.match( /<title[^>]*>([^<]*)/ ) && RegExp.$1,
2582
+
2583
+ // TODO handle dialogs again
2584
+ pageElemRegex = new RegExp( ".*(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>).*" ),
2585
+ dataUrlRegex = new RegExp( "\\bdata-" + $.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?" );
2586
+
2587
+
2588
+ // data-url must be provided for the base tag so resource requests can be directed to the
2589
+ // correct url. loading into a temprorary element makes these requests immediately
2590
+ if( pageElemRegex.test( html )
2591
+ && RegExp.$1
2592
+ && dataUrlRegex.test( RegExp.$1 )
2593
+ && RegExp.$1 ) {
2594
+ url = fileUrl = path.getFilePath( RegExp.$1 );
2595
+ }
2596
+ else{
2597
+
2598
+ }
2599
+
2600
+ if ( base ) {
2601
+ base.set( fileUrl );
2602
+ }
2603
+
2604
+ //workaround to allow scripts to execute when included in page divs
2605
+ all.get( 0 ).innerHTML = html;
2606
+ page = all.find( ":jqmData(role='page'), :jqmData(role='dialog')" ).first();
2607
+
2608
+ //if page elem couldn't be found, create one and insert the body element's contents
2609
+ if( !page.length ){
2610
+ page = $( "<div data-" + $.mobile.ns + "role='page'>" + html.split( /<\/?body[^>]*>/gmi )[1] + "</div>" );
2611
+ }
2612
+
2613
+ if ( newPageTitle && !page.jqmData( "title" ) ) {
2614
+ page.jqmData( "title", newPageTitle );
2615
+ }
2616
+
2617
+ //rewrite src and href attrs to use a base url
2618
+ if( !$.support.dynamicBaseTag ) {
2619
+ var newPath = path.get( fileUrl );
2620
+ page.find( "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]" ).each(function() {
2621
+ var thisAttr = $( this ).is( '[href]' ) ? 'href' :
2622
+ $(this).is('[src]') ? 'src' : 'action',
2623
+ thisUrl = $( this ).attr( thisAttr );
2624
+
2625
+ // XXX_jblas: We need to fix this so that it removes the document
2626
+ // base URL, and then prepends with the new page URL.
2627
+ //if full path exists and is same, chop it - helps IE out
2628
+ thisUrl = thisUrl.replace( location.protocol + '//' + location.host + location.pathname, '' );
2629
+
2630
+ if( !/^(\w+:|#|\/)/.test( thisUrl ) ) {
2631
+ $( this ).attr( thisAttr, newPath + thisUrl );
2632
+ }
2633
+ });
2634
+ }
2635
+
2636
+ //append to page and enhance
2637
+ page
2638
+ .attr( "data-" + $.mobile.ns + "url", path.convertUrlToDataUrl( fileUrl ) )
2639
+ .appendTo( settings.pageContainer );
2640
+
2641
+ // wait for page creation to leverage options defined on widget
2642
+ page.one('pagecreate', function(){
2643
+
2644
+ // when dom caching is not enabled bind to remove the page on hide
2645
+ if( !page.data("page").options.domCache ){
2646
+ page.bind( "pagehide.remove", function(){
2647
+ $(this).remove();
2648
+ });
2649
+ }
2650
+ });
2651
+
2652
+ enhancePage( page, settings.role );
2653
+
2654
+ // Enhancing the page may result in new dialogs/sub pages being inserted
2655
+ // into the DOM. If the original absUrl refers to a sub-page, that is the
2656
+ // real page we are interested in.
2657
+ if ( absUrl.indexOf( "&" + $.mobile.subPageUrlKey ) > -1 ) {
2658
+ page = settings.pageContainer.children( ":jqmData(url='" + dataUrl + "')" );
2659
+ }
2660
+
2661
+ //bind pageHide to removePage after it's hidden, if the page options specify to do so
2662
+
2663
+ // Remove loading message.
2664
+ if ( settings.showLoadMsg ) {
2665
+ hideMsg();
2666
+ }
2667
+
2668
+ deferred.resolve( absUrl, options, page, dupCachedPage );
2669
+ },
2670
+ error: function() {
2671
+ //set base back to current path
2672
+ if( base ) {
2673
+ base.set( path.get() );
2674
+ }
2675
+
2676
+ // Remove loading message.
2677
+ if ( settings.showLoadMsg ) {
2678
+
2679
+ // Remove loading message.
2680
+ hideMsg();
2681
+
2682
+ //show error message
2683
+ $( "<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>"+ $.mobile.pageLoadErrorMessage +"</h1></div>" )
2684
+ .css({ "display": "block", "opacity": 0.96, "top": $window.scrollTop() + 100 })
2685
+ .appendTo( settings.pageContainer )
2686
+ .delay( 800 )
2687
+ .fadeOut( 400, function() {
2688
+ $( this ).remove();
2689
+ });
2690
+ }
2691
+
2692
+ deferred.reject( absUrl, options );
2693
+ }
2694
+ });
2695
+ }
2696
+
2697
+ return deferred.promise();
2698
+ };
2699
+
2700
+ $.mobile.loadPage.defaults = {
2701
+ type: "get",
2702
+ data: undefined,
2703
+ reloadPage: false,
2704
+ role: undefined, // By default we rely on the role defined by the @data-role attribute.
2705
+ showLoadMsg: false,
2706
+ pageContainer: undefined,
2707
+ loadMsgDelay: 50 // This delay allows loads that pull from browser cache to occur without showing the loading message.
2708
+ };
2709
+
2710
+ // Show a specific page in the page container.
2711
+ $.mobile.changePage = function( toPage, options ) {
2712
+ // XXX: REMOVE_BEFORE_SHIPPING_1.0
2713
+ // This is temporary code that makes changePage() compatible with previous alpha versions.
2714
+ if ( typeof options !== "object" ) {
2715
+ var opts = null;
2716
+
2717
+ // Map old-style call signature for form submit to the new options object format.
2718
+ if ( typeof toPage === "object" && toPage.url && toPage.type ) {
2719
+ opts = {
2720
+ type: toPage.type,
2721
+ data: toPage.data,
2722
+ forcePageLoad: true
2723
+ };
2724
+ toPage = toPage.url;
2725
+ }
2726
+
2727
+ // The arguments passed into the function need to be re-mapped
2728
+ // to the new options object format.
2729
+ var len = arguments.length;
2730
+ if ( len > 1 ) {
2731
+ var argNames = [ "transition", "reverse", "changeHash", "fromHashChange" ], i;
2732
+ for ( i = 1; i < len; i++ ) {
2733
+ var a = arguments[ i ];
2734
+ if ( typeof a !== "undefined" ) {
2735
+ opts = opts || {};
2736
+ opts[ argNames[ i - 1 ] ] = a;
2737
+ }
2738
+ }
2739
+ }
2740
+
2741
+ // If an options object was created, then we know changePage() was called
2742
+ // with an old signature.
2743
+ if ( opts ) {
2744
+ return $.mobile.changePage( toPage, opts );
2745
+ }
2746
+ }
2747
+ // XXX: REMOVE_BEFORE_SHIPPING_1.0
2748
+
2749
+ // If we are in the midst of a transition, queue the current request.
2750
+ // We'll call changePage() once we're done with the current transition to
2751
+ // service the request.
2752
+ if( isPageTransitioning ) {
2753
+ pageTransitionQueue.unshift( arguments );
2754
+ return;
2755
+ }
2756
+
2757
+ var settings = $.extend( {}, $.mobile.changePage.defaults, options );
2758
+
2759
+ // Make sure we have a pageContainer to work with.
2760
+ settings.pageContainer = settings.pageContainer || $.mobile.pageContainer;
2761
+
2762
+ // Make sure we have a fromPage.
2763
+ settings.fromPage = settings.fromPage || $.mobile.activePage;
2764
+
2765
+ var mpc = settings.pageContainer,
2766
+ pbcEvent = new $.Event( "pagebeforechange" ),
2767
+ triggerData = { toPage: toPage, options: settings };
2768
+
2769
+ // Let listeners know we're about to change the current page.
2770
+ mpc.trigger( pbcEvent, triggerData );
2771
+
2772
+ mpc.trigger( "beforechangepage", triggerData ); // XXX: DEPRECATED for 1.0
2773
+
2774
+ // If the default behavior is prevented, stop here!
2775
+ if( pbcEvent.isDefaultPrevented() ){
2776
+ return;
2777
+ }
2778
+
2779
+ // We allow "pagebeforechange" observers to modify the toPage in the trigger
2780
+ // data to allow for redirects. Make sure our toPage is updated.
2781
+
2782
+ toPage = triggerData.toPage;
2783
+
2784
+ // Set the isPageTransitioning flag to prevent any requests from
2785
+ // entering this method while we are in the midst of loading a page
2786
+ // or transitioning.
2787
+
2788
+ isPageTransitioning = true;
2789
+
2790
+ // If the caller passed us a url, call loadPage()
2791
+ // to make sure it is loaded into the DOM. We'll listen
2792
+ // to the promise object it returns so we know when
2793
+ // it is done loading or if an error ocurred.
2794
+ if ( typeof toPage == "string" ) {
2795
+ $.mobile.loadPage( toPage, settings )
2796
+ .done(function( url, options, newPage, dupCachedPage ) {
2797
+ isPageTransitioning = false;
2798
+ options.duplicateCachedPage = dupCachedPage;
2799
+ $.mobile.changePage( newPage, options );
2800
+ })
2801
+ .fail(function( url, options ) {
2802
+ // XXX_jblas: Fire off changepagefailed notificaiton.
2803
+ isPageTransitioning = false;
2804
+
2805
+ //clear out the active button state
2806
+ removeActiveLinkClass( true );
2807
+
2808
+ //release transition lock so navigation is free again
2809
+ releasePageTransitionLock();
2810
+ settings.pageContainer.trigger( "pagechangefailed", triggerData );
2811
+ settings.pageContainer.trigger( "changepagefailed", triggerData ); // XXX: DEPRECATED for 1.0
2812
+ });
2813
+ return;
2814
+ }
2815
+
2816
+ // The caller passed us a real page DOM element. Update our
2817
+ // internal state and then trigger a transition to the page.
2818
+ var fromPage = settings.fromPage,
2819
+ url = ( settings.dataUrl && path.convertUrlToDataUrl( settings.dataUrl ) ) || toPage.jqmData( "url" ),
2820
+ // The pageUrl var is usually the same as url, except when url is obscured as a dialog url. pageUrl always contains the file path
2821
+ pageUrl = url,
2822
+ fileUrl = path.getFilePath( url ),
2823
+ active = urlHistory.getActive(),
2824
+ activeIsInitialPage = urlHistory.activeIndex === 0,
2825
+ historyDir = 0,
2826
+ pageTitle = document.title,
2827
+ isDialog = settings.role === "dialog" || toPage.jqmData( "role" ) === "dialog";
2828
+
2829
+ // If we are trying to transition to the same page that we are currently on ignore the request.
2830
+ // an illegal same page request is defined by the current page being the same as the url, as long as there's history
2831
+ // and toPage is not an array or object (those are allowed to be "same")
2832
+ //
2833
+ // XXX_jblas: We need to remove this at some point when we allow for transitions
2834
+ // to the same page.
2835
+ if( fromPage && fromPage[0] === toPage[0] ) {
2836
+ isPageTransitioning = false;
2837
+ mpc.trigger( "pagechange", triggerData );
2838
+ mpc.trigger( "changepage", triggerData ); // XXX: DEPRECATED for 1.0
2839
+ return;
2840
+ }
2841
+
2842
+ // We need to make sure the page we are given has already been enhanced.
2843
+ enhancePage( toPage, settings.role );
2844
+
2845
+ // If the changePage request was sent from a hashChange event, check to see if the
2846
+ // page is already within the urlHistory stack. If so, we'll assume the user hit
2847
+ // the forward/back button and will try to match the transition accordingly.
2848
+ if( settings.fromHashChange ) {
2849
+ urlHistory.directHashChange({
2850
+ currentUrl: url,
2851
+ isBack: function() { historyDir = -1; },
2852
+ isForward: function() { historyDir = 1; }
2853
+ });
2854
+ }
2855
+
2856
+ // Kill the keyboard.
2857
+ // XXX_jblas: We need to stop crawling the entire document to kill focus. Instead,
2858
+ // we should be tracking focus with a live() handler so we already have
2859
+ // the element in hand at this point.
2860
+ // Wrap this in a try/catch block since IE9 throw "Unspecified error" if document.activeElement
2861
+ // is undefined when we are in an IFrame.
2862
+ try {
2863
+ $( document.activeElement || "" ).add( "input:focus, textarea:focus, select:focus" ).blur();
2864
+ } catch(e) {}
2865
+
2866
+ // If we're displaying the page as a dialog, we don't want the url
2867
+ // for the dialog content to be used in the hash. Instead, we want
2868
+ // to append the dialogHashKey to the url of the current page.
2869
+ if ( isDialog && active ) {
2870
+ // on the initial page load active.url is undefined and in that case should
2871
+ // be an empty string. Moving the undefined -> empty string back into
2872
+ // urlHistory.addNew seemed imprudent given undefined better represents
2873
+ // the url state
2874
+ url = ( active.url || "" ) + dialogHashKey;
2875
+ }
2876
+
2877
+ // Set the location hash.
2878
+ if( settings.changeHash !== false && url ) {
2879
+ //disable hash listening temporarily
2880
+ urlHistory.ignoreNextHashChange = true;
2881
+ //update hash and history
2882
+ path.set( url );
2883
+ }
2884
+
2885
+ //if title element wasn't found, try the page div data attr too
2886
+ var newPageTitle = toPage.jqmData( "title" ) || toPage.children(":jqmData(role='header')").find(".ui-title" ).text();
2887
+ if( !!newPageTitle && pageTitle == document.title ) {
2888
+ pageTitle = newPageTitle;
2889
+ }
2890
+
2891
+ //add page to history stack if it's not back or forward
2892
+ if( !historyDir ) {
2893
+ urlHistory.addNew( url, settings.transition, pageTitle, pageUrl, settings.role );
2894
+ }
2895
+
2896
+ //set page title
2897
+ document.title = urlHistory.getActive().title;
2898
+
2899
+ //set "toPage" as activePage
2900
+ $.mobile.activePage = toPage;
2901
+
2902
+ // Make sure we have a transition defined.
2903
+ settings.transition = settings.transition
2904
+ || ( ( historyDir && !activeIsInitialPage ) ? active.transition : undefined )
2905
+ || ( isDialog ? $.mobile.defaultDialogTransition : $.mobile.defaultPageTransition );
2906
+
2907
+ // If we're navigating back in the URL history, set reverse accordingly.
2908
+ settings.reverse = settings.reverse || historyDir < 0;
2909
+
2910
+ transitionPages( toPage, fromPage, settings.transition, settings.reverse )
2911
+ .done(function() {
2912
+ removeActiveLinkClass();
2913
+
2914
+ //if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
2915
+ if ( settings.duplicateCachedPage ) {
2916
+ settings.duplicateCachedPage.remove();
2917
+ }
2918
+
2919
+ //remove initial build class (only present on first pageshow)
2920
+ $html.removeClass( "ui-mobile-rendering" );
2921
+
2922
+ releasePageTransitionLock();
2923
+
2924
+ // Let listeners know we're all done changing the current page.
2925
+ mpc.trigger( "pagechange", triggerData );
2926
+
2927
+ mpc.trigger( "changepage", triggerData ); // XXX: DEPRECATED for 1.0
2928
+ });
2929
+ };
2930
+
2931
+ $.mobile.changePage.defaults = {
2932
+ transition: undefined,
2933
+ reverse: false,
2934
+ changeHash: true,
2935
+ fromHashChange: false,
2936
+ role: undefined, // By default we rely on the role defined by the @data-role attribute.
2937
+ duplicateCachedPage: undefined,
2938
+ pageContainer: undefined,
2939
+ showLoadMsg: true, //loading message shows by default when pages are being fetched during changePage
2940
+ dataUrl: undefined,
2941
+ fromPage: undefined
2942
+ };
2943
+
2944
+ /* Event Bindings - hashchange, submit, and click */
2945
+ function findClosestLink( ele )
2946
+ {
2947
+ while ( ele ) {
2948
+ if ( ele.nodeName.toLowerCase() == "a" ) {
2949
+ break;
2950
+ }
2951
+ ele = ele.parentNode;
2952
+ }
2953
+ return ele;
2954
+ }
2955
+
2956
+ // The base URL for any given element depends on the page it resides in.
2957
+ function getClosestBaseUrl( ele )
2958
+ {
2959
+ // Find the closest page and extract out its url.
2960
+ var url = $( ele ).closest( ".ui-page" ).jqmData( "url" ),
2961
+ base = documentBase.hrefNoHash;
2962
+
2963
+ if ( !url || !path.isPath( url ) ) {
2964
+ url = base;
2965
+ }
2966
+
2967
+ return path.makeUrlAbsolute( url, base);
2968
+ }
2969
+
2970
+
2971
+ //The following event bindings should be bound after mobileinit has been triggered
2972
+ //the following function is called in the init file
2973
+ $.mobile._registerInternalEvents = function(){
2974
+
2975
+ //bind to form submit events, handle with Ajax
2976
+ $( "form" ).live('submit', function( event ) {
2977
+ var $this = $( this );
2978
+ if( !$.mobile.ajaxEnabled ||
2979
+ $this.is( ":jqmData(ajax='false')" ) ) {
2980
+ return;
2981
+ }
2982
+
2983
+ var type = $this.attr( "method" ),
2984
+ target = $this.attr( "target" ),
2985
+ url = $this.attr( "action" );
2986
+
2987
+ // If no action is specified, browsers default to using the
2988
+ // URL of the document containing the form. Since we dynamically
2989
+ // pull in pages from external documents, the form should submit
2990
+ // to the URL for the source document of the page containing
2991
+ // the form.
2992
+ if ( !url ) {
2993
+ // Get the @data-url for the page containing the form.
2994
+ url = getClosestBaseUrl( $this );
2995
+ if ( url === documentBase.hrefNoHash ) {
2996
+ // The url we got back matches the document base,
2997
+ // which means the page must be an internal/embedded page,
2998
+ // so default to using the actual document url as a browser
2999
+ // would.
3000
+ url = documentUrl.hrefNoSearch;
3001
+ }
3002
+ }
3003
+
3004
+ url = path.makeUrlAbsolute( url, getClosestBaseUrl($this) );
3005
+
3006
+ //external submits use regular HTTP
3007
+ if( path.isExternal( url ) || target ) {
3008
+ return;
3009
+ }
3010
+
3011
+ $.mobile.changePage(
3012
+ url,
3013
+ {
3014
+ type: type && type.length && type.toLowerCase() || "get",
3015
+ data: $this.serialize(),
3016
+ transition: $this.jqmData( "transition" ),
3017
+ direction: $this.jqmData( "direction" ),
3018
+ reloadPage: true
3019
+ }
3020
+ );
3021
+ event.preventDefault();
3022
+ });
3023
+
3024
+ //add active state on vclick
3025
+ $( document ).bind( "vclick", function( event ) {
3026
+ var link = findClosestLink( event.target );
3027
+ if ( link ) {
3028
+ if ( path.parseUrl( link.getAttribute( "href" ) || "#" ).hash !== "#" ) {
3029
+ removeActiveLinkClass( true );
3030
+ $activeClickedLink = $( link ).closest( ".ui-btn" ).not( ".ui-disabled" );
3031
+ $activeClickedLink.addClass( $.mobile.activeBtnClass );
3032
+ $( "." + $.mobile.activePageClass + " .ui-btn" ).not( link ).blur();
3033
+ }
3034
+ }
3035
+ });
3036
+
3037
+ // click routing - direct to HTTP or Ajax, accordingly
3038
+ $( document ).bind( "click", function( event ) {
3039
+ var link = findClosestLink( event.target );
3040
+ if ( !link ) {
3041
+ return;
3042
+ }
3043
+
3044
+ var $link = $( link ),
3045
+ //remove active link class if external (then it won't be there if you come back)
3046
+ httpCleanup = function(){
3047
+ window.setTimeout( function() { removeActiveLinkClass( true ); }, 200 );
3048
+ };
3049
+
3050
+ //if there's a data-rel=back attr, go back in history
3051
+ if( $link.is( ":jqmData(rel='back')" ) ) {
3052
+ window.history.back();
3053
+ return false;
3054
+ }
3055
+
3056
+ //if ajax is disabled, exit early
3057
+ if( !$.mobile.ajaxEnabled ){
3058
+ httpCleanup();
3059
+ //use default click handling
3060
+ return;
3061
+ }
3062
+
3063
+ var baseUrl = getClosestBaseUrl( $link ),
3064
+
3065
+ //get href, if defined, otherwise default to empty hash
3066
+ href = path.makeUrlAbsolute( $link.attr( "href" ) || "#", baseUrl );
3067
+
3068
+ // XXX_jblas: Ideally links to application pages should be specified as
3069
+ // an url to the application document with a hash that is either
3070
+ // the site relative path or id to the page. But some of the
3071
+ // internal code that dynamically generates sub-pages for nested
3072
+ // lists and select dialogs, just write a hash in the link they
3073
+ // create. This means the actual URL path is based on whatever
3074
+ // the current value of the base tag is at the time this code
3075
+ // is called. For now we are just assuming that any url with a
3076
+ // hash in it is an application page reference.
3077
+ if ( href.search( "#" ) != -1 ) {
3078
+ href = href.replace( /[^#]*#/, "" );
3079
+ if ( !href ) {
3080
+ //link was an empty hash meant purely
3081
+ //for interaction, so we ignore it.
3082
+ event.preventDefault();
3083
+ return;
3084
+ } else if ( path.isPath( href ) ) {
3085
+ //we have apath so make it the href we want to load.
3086
+ href = path.makeUrlAbsolute( href, baseUrl );
3087
+ } else {
3088
+ //we have a simple id so use the documentUrl as its base.
3089
+ href = path.makeUrlAbsolute( "#" + href, documentUrl.hrefNoHash );
3090
+ }
3091
+ }
3092
+
3093
+ // Should we handle this link, or let the browser deal with it?
3094
+ var useDefaultUrlHandling = $link.is( "[rel='external']" ) || $link.is( ":jqmData(ajax='false')" ) || $link.is( "[target]" ),
3095
+
3096
+ // Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR
3097
+ // requests if the document doing the request was loaded via the file:// protocol.
3098
+ // This is usually to allow the application to "phone home" and fetch app specific
3099
+ // data. We normally let the browser handle external/cross-domain urls, but if the
3100
+ // allowCrossDomainPages option is true, we will allow cross-domain http/https
3101
+ // requests to go through our page loading logic.
3102
+ isCrossDomainPageLoad = ( $.mobile.allowCrossDomainPages && documentUrl.protocol === "file:" && href.search( /^https?:/ ) != -1 ),
3103
+
3104
+ //check for protocol or rel and its not an embedded page
3105
+ //TODO overlap in logic from isExternal, rel=external check should be
3106
+ // moved into more comprehensive isExternalLink
3107
+ isExternal = useDefaultUrlHandling || ( path.isExternal( href ) && !isCrossDomainPageLoad );
3108
+
3109
+ if( isExternal ) {
3110
+ httpCleanup();
3111
+ //use default click handling
3112
+ return;
3113
+ }
3114
+
3115
+ //use ajax
3116
+ var transition = $link.jqmData( "transition" ),
3117
+ direction = $link.jqmData( "direction" ),
3118
+ reverse = ( direction && direction === "reverse" ) ||
3119
+ // deprecated - remove by 1.0
3120
+ $link.jqmData( "back" ),
3121
+
3122
+ //this may need to be more specific as we use data-rel more
3123
+ role = $link.attr( "data-" + $.mobile.ns + "rel" ) || undefined;
3124
+
3125
+ $.mobile.changePage( href, { transition: transition, reverse: reverse, role: role } );
3126
+ event.preventDefault();
3127
+ });
3128
+
3129
+ //prefetch pages when anchors with data-prefetch are encountered
3130
+ $( ".ui-page" ).live( "pageshow.prefetch", function(){
3131
+ var urls = [];
3132
+ $( this ).find( "a:jqmData(prefetch)" ).each(function(){
3133
+ var url = $( this ).attr( "href" );
3134
+ if ( url && $.inArray( url, urls ) === -1 ) {
3135
+ urls.push( url );
3136
+ $.mobile.loadPage( url );
3137
+ }
3138
+ });
3139
+ } );
3140
+
3141
+ $.mobile._handleHashChange = function( hash ) {
3142
+ //find first page via hash
3143
+ var to = path.stripHash( hash ),
3144
+ //transition is false if it's the first page, undefined otherwise (and may be overridden by default)
3145
+ transition = $.mobile.urlHistory.stack.length === 0 ? "none" : undefined,
3146
+
3147
+ // default options for the changPage calls made after examining the current state
3148
+ // of the page and the hash
3149
+ changePageOptions = {
3150
+ transition: transition,
3151
+ changeHash: false,
3152
+ fromHashChange: true
3153
+ };
3154
+
3155
+ //if listening is disabled (either globally or temporarily), or it's a dialog hash
3156
+ if( !$.mobile.hashListeningEnabled || urlHistory.ignoreNextHashChange ) {
3157
+ urlHistory.ignoreNextHashChange = false;
3158
+ return;
3159
+ }
3160
+
3161
+ // special case for dialogs
3162
+ if( urlHistory.stack.length > 1 && to.indexOf( dialogHashKey ) > -1 ) {
3163
+
3164
+ // If current active page is not a dialog skip the dialog and continue
3165
+ // in the same direction
3166
+ if(!$.mobile.activePage.is( ".ui-dialog" )) {
3167
+ //determine if we're heading forward or backward and continue accordingly past
3168
+ //the current dialog
3169
+ urlHistory.directHashChange({
3170
+ currentUrl: to,
3171
+ isBack: function() { window.history.back(); },
3172
+ isForward: function() { window.history.forward(); }
3173
+ });
3174
+
3175
+ // prevent changepage
3176
+ return;
3177
+ } else {
3178
+ // if the current active page is a dialog and we're navigating
3179
+ // to a dialog use the dialog objected saved in the stack
3180
+ urlHistory.directHashChange({
3181
+ currentUrl: to,
3182
+
3183
+ // regardless of the direction of the history change
3184
+ // do the following
3185
+ either: function( isBack ) {
3186
+ var active = $.mobile.urlHistory.getActive();
3187
+
3188
+ to = active.pageUrl;
3189
+
3190
+ // make sure to set the role, transition and reversal
3191
+ // as most of this is lost by the domCache cleaning
3192
+ $.extend( changePageOptions, {
3193
+ role: active.role,
3194
+ transition: active.transition,
3195
+ reverse: isBack
3196
+ });
3197
+ }
3198
+ });
3199
+ }
3200
+ }
3201
+
3202
+ //if to is defined, load it
3203
+ if ( to ) {
3204
+ to = ( typeof to === "string" && !path.isPath( to ) ) ? ( '#' + to ) : to;
3205
+ $.mobile.changePage( to, changePageOptions );
3206
+ } else {
3207
+ //there's no hash, go to the first page in the dom
3208
+ $.mobile.changePage( $.mobile.firstPage, changePageOptions );
3209
+ }
3210
+ };
3211
+
3212
+ //hashchange event handler
3213
+ $window.bind( "hashchange", function( e, triggered ) {
3214
+ $.mobile._handleHashChange( location.hash );
3215
+ });
3216
+
3217
+ //set page min-heights to be device specific
3218
+ $( document ).bind( "pageshow", resetActivePageHeight );
3219
+ $( window ).bind( "throttledresize", resetActivePageHeight );
3220
+
3221
+ };//_registerInternalEvents callback
3222
+
3223
+ })( jQuery );
3224
+ /*
3225
+ * jQuery Mobile Framework : history.pushState support, layered on top of hashchange
3226
+ * Copyright (c) jQuery Project
3227
+ * Dual licensed under the MIT or GPL Version 2 licenses.
3228
+ * http://jquery.org/license
3229
+ */
3230
+ ( function( $, window ) {
3231
+ // For now, let's Monkeypatch this onto the end of $.mobile._registerInternalEvents
3232
+ // Scope self to pushStateHandler so we can reference it sanely within the
3233
+ // methods handed off as event handlers
3234
+ var pushStateHandler = {},
3235
+ self = pushStateHandler,
3236
+ $win = $( window ),
3237
+ url = $.mobile.path.parseUrl( location.href );
3238
+
3239
+ $.extend( pushStateHandler, {
3240
+ // TODO move to a path helper, this is rather common functionality
3241
+ initialFilePath: (function() {
3242
+ return url.pathname + url.search;
3243
+ })(),
3244
+
3245
+ initialHref: url.hrefNoHash,
3246
+
3247
+ // Flag for tracking if a Hashchange naturally occurs after each popstate + replace
3248
+ hashchangeFired: false,
3249
+
3250
+ state: function() {
3251
+ return {
3252
+ hash: location.hash || "#" + self.initialFilePath,
3253
+ title: document.title,
3254
+
3255
+ // persist across refresh
3256
+ initialHref: self.initialHref
3257
+ };
3258
+ },
3259
+
3260
+ resetUIKeys: function( url ) {
3261
+ var dialog = $.mobile.dialogHashKey,
3262
+ subkey = "&" + $.mobile.subPageUrlKey,
3263
+ dialogIndex = url.indexOf( dialog );
3264
+
3265
+ if( dialogIndex > -1 ) {
3266
+ url = url.slice( 0, dialogIndex ) + "#" + url.slice( dialogIndex );
3267
+ } else if( url.indexOf( subkey ) > -1 ) {
3268
+ url = url.split( subkey ).join( "#" + subkey );
3269
+ }
3270
+
3271
+ return url;
3272
+ },
3273
+
3274
+ // on hash change we want to clean up the url
3275
+ // NOTE this takes place *after* the vanilla navigation hash change
3276
+ // handling has taken place and set the state of the DOM
3277
+ onHashChange: function( e ) {
3278
+ var href, state;
3279
+
3280
+ self.hashchangeFired = true;
3281
+
3282
+ // only replaceState when the hash doesn't represent an embeded page
3283
+ if( $.mobile.path.isPath(location.hash) ) {
3284
+
3285
+ // propulate the hash when its not available
3286
+ state = self.state();
3287
+
3288
+ // make the hash abolute with the current href
3289
+ href = $.mobile.path.makeUrlAbsolute( state.hash.replace("#", ""), location.href );
3290
+
3291
+ href = self.resetUIKeys( href );
3292
+
3293
+ // replace the current url with the new href and store the state
3294
+ history.replaceState( state, document.title, href );
3295
+ }
3296
+ },
3297
+
3298
+ // on popstate (ie back or forward) we need to replace the hash that was there previously
3299
+ // cleaned up by the additional hash handling
3300
+ onPopState: function( e ) {
3301
+ var poppedState = e.originalEvent.state, holdnexthashchange = false;
3302
+
3303
+ // if there's no state its not a popstate we care about, ie chrome's initial popstate
3304
+ // or forward popstate
3305
+ if( poppedState ) {
3306
+ // disable any hashchange triggered by the browser
3307
+ $.mobile.urlHistory.ignoreNextHashChange = true;
3308
+
3309
+ // defer our manual hashchange until after the browser fired
3310
+ // version has come and gone
3311
+ setTimeout(function() {
3312
+ // make sure that the manual hash handling takes place
3313
+ $.mobile.urlHistory.ignoreNextHashChange = false;
3314
+
3315
+ // change the page based on the hash
3316
+ $.mobile._handleHashChange( poppedState.hash );
3317
+ }, 100);
3318
+ }
3319
+ },
3320
+
3321
+ init: function() {
3322
+ $win.bind( "hashchange", self.onHashChange );
3323
+
3324
+ // Handle popstate events the occur through history changes
3325
+ $win.bind( "popstate", self.onPopState );
3326
+
3327
+ // if there's no hash, we need to replacestate for returning to home
3328
+ if ( location.hash === "" ) {
3329
+ history.replaceState( self.state(), document.title, location.href );
3330
+ }
3331
+ }
3332
+ });
3333
+
3334
+ $( function() {
3335
+ if( $.mobile.pushStateEnabled && $.support.pushState ){
3336
+ pushStateHandler.init();
3337
+ }
3338
+ });
3339
+ })( jQuery, this );/*!
3340
+ * jQuery Mobile v@VERSION
3341
+ * http://jquerymobile.com/
3342
+ *
3343
+ * Copyright 2010, jQuery Project
3344
+ * Dual licensed under the MIT or GPL Version 2 licenses.
3345
+ * http://jquery.org/license
3346
+ */
3347
+
3348
+ (function( $, window, undefined ) {
3349
+
3350
+ function css3TransitionHandler( name, reverse, $to, $from ) {
3351
+
3352
+ var deferred = new $.Deferred(),
3353
+ reverseClass = reverse ? " reverse" : "",
3354
+ viewportClass = "ui-mobile-viewport-transitioning viewport-" + name,
3355
+ doneFunc = function() {
3356
+
3357
+ $to.add( $from ).removeClass( "out in reverse " + name );
3358
+
3359
+ if ( $from ) {
3360
+ $from.removeClass( $.mobile.activePageClass );
3361
+ }
3362
+
3363
+ $to.parent().removeClass( viewportClass );
3364
+
3365
+ deferred.resolve( name, reverse, $to, $from );
3366
+ };
3367
+
3368
+ $to.animationComplete( doneFunc );
3369
+
3370
+ $to.parent().addClass( viewportClass );
3371
+
3372
+ if ( $from ) {
3373
+ $from.addClass( name + " out" + reverseClass );
3374
+ }
3375
+ $to.addClass( $.mobile.activePageClass + " " + name + " in" + reverseClass );
3376
+
3377
+ return deferred.promise();
3378
+ }
3379
+
3380
+ // Make our transition handler public.
3381
+ $.mobile.css3TransitionHandler = css3TransitionHandler;
3382
+
3383
+ // If the default transition handler is the 'none' handler, replace it with our handler.
3384
+ if ( $.mobile.defaultTransitionHandler === $.mobile.noneTransitionHandler ) {
3385
+ $.mobile.defaultTransitionHandler = css3TransitionHandler;
3386
+ }
3387
+
3388
+ })( jQuery, this );
3389
+ /*
3390
+ * jQuery Mobile Framework : "degradeInputs" plugin - degrades inputs to another type after custom enhancements are made.
3391
+ * Copyright (c) jQuery Project
3392
+ * Dual licensed under the MIT or GPL Version 2 licenses.
3393
+ * http://jquery.org/license
3394
+ */
3395
+
3396
+ (function( $, undefined ) {
3397
+
3398
+ $.mobile.page.prototype.options.degradeInputs = {
3399
+ color: false,
3400
+ date: false,
3401
+ datetime: false,
3402
+ "datetime-local": false,
3403
+ email: false,
3404
+ month: false,
3405
+ number: false,
3406
+ range: "number",
3407
+ search: "text",
3408
+ tel: false,
3409
+ time: false,
3410
+ url: false,
3411
+ week: false
3412
+ };
3413
+
3414
+ $.mobile.page.prototype.options.keepNative = ":jqmData(role='none'), :jqmData(role='nojs')";
3415
+
3416
+
3417
+ //auto self-init widgets
3418
+ $( document ).bind( "pagecreate enhance", function( e ){
3419
+
3420
+ var page = $( e.target ).data( "page" ),
3421
+ o = page.options;
3422
+
3423
+ // degrade inputs to avoid poorly implemented native functionality
3424
+ $( e.target ).find( "input" ).not( o.keepNative ).each(function() {
3425
+ var $this = $( this ),
3426
+ type = this.getAttribute( "type" ),
3427
+ optType = o.degradeInputs[ type ] || "text";
3428
+
3429
+ if ( o.degradeInputs[ type ] ) {
3430
+ $this.replaceWith(
3431
+ $( "<div>" ).html( $this.clone() ).html()
3432
+ .replace( /\s+type=["']?\w+['"]?/, " type=\"" + optType + "\" data-" + $.mobile.ns + "type=\"" + type + "\" " )
3433
+ );
3434
+ }
3435
+ });
3436
+
3437
+ });
3438
+
3439
+ })( jQuery );/*
3440
+ * jQuery Mobile Framework : "dialog" plugin.
3441
+ * Copyright (c) jQuery Project
3442
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
3443
+ */
3444
+
3445
+ (function( $, window, undefined ) {
3446
+
3447
+ $.widget( "mobile.dialog", $.mobile.widget, {
3448
+ options: {
3449
+ closeBtnText : "Close",
3450
+ theme : "a",
3451
+ initSelector : ":jqmData(role='dialog')"
3452
+ },
3453
+ _create: function() {
3454
+ var $el = this.element,
3455
+ pageTheme = $el.attr( "class" ).match( /ui-body-[a-z]/ );
3456
+
3457
+ if( pageTheme.length ){
3458
+ $el.removeClass( pageTheme[ 0 ] );
3459
+ }
3460
+
3461
+ $el.addClass( "ui-body-" + this.options.theme );
3462
+
3463
+ // Class the markup for dialog styling
3464
+ // Set aria role
3465
+ $el.attr( "role", "dialog" )
3466
+ .addClass( "ui-dialog" )
3467
+ .find( ":jqmData(role='header')" )
3468
+ .addClass( "ui-corner-top ui-overlay-shadow" )
3469
+ .prepend( "<a href='#' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "rel='back' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" )
3470
+ .end()
3471
+ .find( ":jqmData(role='content'),:jqmData(role='footer')" )
3472
+ .last()
3473
+ .addClass( "ui-corner-bottom ui-overlay-shadow" );
3474
+
3475
+ /* bind events
3476
+ - clicks and submits should use the closing transition that the dialog opened with
3477
+ unless a data-transition is specified on the link/form
3478
+ - if the click was on the close button, or the link has a data-rel="back" it'll go back in history naturally
3479
+ */
3480
+ $el.bind( "vclick submit", function( event ) {
3481
+ var $target = $( event.target ).closest( event.type === "vclick" ? "a" : "form" ),
3482
+ active;
3483
+
3484
+ if ( $target.length && !$target.jqmData( "transition" ) ) {
3485
+
3486
+ active = $.mobile.urlHistory.getActive() || {};
3487
+
3488
+ $target.attr( "data-" + $.mobile.ns + "transition", ( active.transition || $.mobile.defaultDialogTransition ) )
3489
+ .attr( "data-" + $.mobile.ns + "direction", "reverse" );
3490
+ }
3491
+ })
3492
+ .bind( "pagehide", function() {
3493
+ $( this ).find( "." + $.mobile.activeBtnClass ).removeClass( $.mobile.activeBtnClass );
3494
+ });
3495
+ },
3496
+
3497
+ // Close method goes back in history
3498
+ close: function() {
3499
+ window.history.back();
3500
+ }
3501
+ });
3502
+
3503
+ //auto self-init widgets
3504
+ $( $.mobile.dialog.prototype.options.initSelector ).live( "pagecreate", function(){
3505
+ $( this ).dialog();
3506
+ });
3507
+
3508
+ })( jQuery, this );
3509
+ /*
3510
+ * jQuery Mobile Framework : This plugin handles theming and layout of headers, footers, and content areas
3511
+ * Copyright (c) jQuery Project
3512
+ * Dual licensed under the MIT or GPL Version 2 licenses.
3513
+ * http://jquery.org/license
3514
+ */
3515
+
3516
+ (function( $, undefined ) {
3517
+
3518
+ $.mobile.page.prototype.options.backBtnText = "Back";
3519
+ $.mobile.page.prototype.options.addBackBtn = false;
3520
+ $.mobile.page.prototype.options.backBtnTheme = null;
3521
+ $.mobile.page.prototype.options.headerTheme = "a";
3522
+ $.mobile.page.prototype.options.footerTheme = "a";
3523
+ $.mobile.page.prototype.options.contentTheme = null;
3524
+
3525
+ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", function( e ) {
3526
+
3527
+ var $page = $( this ),
3528
+ o = $page.data( "page" ).options,
3529
+ pageTheme = o.theme;
3530
+
3531
+ $( ":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')", this ).each(function() {
3532
+ var $this = $( this ),
3533
+ role = $this.jqmData( "role" ),
3534
+ theme = $this.jqmData( "theme" ),
3535
+ $headeranchors,
3536
+ leftbtn,
3537
+ rightbtn,
3538
+ backBtn;
3539
+
3540
+ $this.addClass( "ui-" + role );
3541
+
3542
+ //apply theming and markup modifications to page,header,content,footer
3543
+ if ( role === "header" || role === "footer" ) {
3544
+
3545
+ var thisTheme = theme || ( role === "header" ? o.headerTheme : o.footerTheme ) || pageTheme;
3546
+
3547
+ //add theme class
3548
+ $this.addClass( "ui-bar-" + thisTheme );
3549
+
3550
+ // Add ARIA role
3551
+ $this.attr( "role", role === "header" ? "banner" : "contentinfo" );
3552
+
3553
+ // Right,left buttons
3554
+ $headeranchors = $this.children( "a" );
3555
+ leftbtn = $headeranchors.hasClass( "ui-btn-left" );
3556
+ rightbtn = $headeranchors.hasClass( "ui-btn-right" );
3557
+
3558
+ if ( !leftbtn ) {
3559
+ leftbtn = $headeranchors.eq( 0 ).not( ".ui-btn-right" ).addClass( "ui-btn-left" ).length;
3560
+ }
3561
+
3562
+ if ( !rightbtn ) {
3563
+ rightbtn = $headeranchors.eq( 1 ).addClass( "ui-btn-right" ).length;
3564
+ }
3565
+
3566
+ // Auto-add back btn on pages beyond first view
3567
+ if ( o.addBackBtn && role === "header" &&
3568
+ $( ".ui-page" ).length > 1 &&
3569
+ $this.jqmData( "url" ) !== $.mobile.path.stripHash( location.hash ) &&
3570
+ !leftbtn ) {
3571
+
3572
+ backBtn = $( "<a href='#' class='ui-btn-left' data-"+ $.mobile.ns +"rel='back' data-"+ $.mobile.ns +"icon='arrow-l'>"+ o.backBtnText +"</a>" ).prependTo( $this );
3573
+
3574
+ // If theme is provided, override default inheritance
3575
+ backBtn.attr( "data-"+ $.mobile.ns +"theme", o.backBtnTheme || thisTheme );
3576
+ }
3577
+
3578
+ // Page title
3579
+ $this.children( "h1, h2, h3, h4, h5, h6" )
3580
+ .addClass( "ui-title" )
3581
+ // Regardless of h element number in src, it becomes h1 for the enhanced page
3582
+ .attr({
3583
+ "tabindex": "0",
3584
+ "role": "heading",
3585
+ "aria-level": "1"
3586
+ });
3587
+
3588
+ } else if ( role === "content" ) {
3589
+
3590
+ if (theme || o.contentTheme) {
3591
+ $this.addClass( "ui-body-" + ( theme || o.contentTheme ) );
3592
+ }
3593
+
3594
+ // Add ARIA role
3595
+ $this.attr( "role", "main" );
3596
+
3597
+ }
3598
+ });
3599
+ });
3600
+
3601
+ })( jQuery );/*
3602
+ * jQuery Mobile Framework : "collapsible" plugin
3603
+ * Copyright (c) jQuery Project
3604
+ * Dual licensed under the MIT or GPL Version 2 licenses.
3605
+ * http://jquery.org/license
3606
+ */
3607
+ (function( $, undefined ) {
3608
+
3609
+ $.widget( "mobile.collapsible", $.mobile.widget, {
3610
+ options: {
3611
+ expandCueText: " click to expand contents",
3612
+ collapseCueText: " click to collapse contents",
3613
+ collapsed: true,
3614
+ heading: ">:header,>legend",
3615
+ theme: null,
3616
+ iconTheme: "d",
3617
+ initSelector: ":jqmData(role='collapsible')"
3618
+ },
3619
+ _create: function() {
3620
+
3621
+ var $el = this.element,
3622
+ o = this.options,
3623
+ collapsibleContain = $el.addClass( "ui-collapsible-contain" ),
3624
+ collapsibleHeading = $el.find( o.heading ).eq( 0 ),
3625
+ collapsibleContent = collapsibleContain.wrapInner( "<div class='ui-collapsible-content'></div>" ).find( ".ui-collapsible-content" ),
3626
+ collapsibleParent = $el.closest( ":jqmData(role='collapsible-set')" ).addClass( "ui-collapsible-set" );
3627
+
3628
+ // Replace collapsibleHeading if it's a legend
3629
+ if ( collapsibleHeading.is( "legend" ) ) {
3630
+ collapsibleHeading = $( "<div role='heading'>"+ collapsibleHeading.html() +"</div>" ).insertBefore( collapsibleHeading );
3631
+ collapsibleHeading.next().remove();
3632
+ }
3633
+
3634
+ collapsibleHeading
3635
+ //drop heading in before content
3636
+ .insertBefore( collapsibleContent )
3637
+ //modify markup & attributes
3638
+ .addClass( "ui-collapsible-heading" )
3639
+ .append( "<span class='ui-collapsible-heading-status'></span>" )
3640
+ .wrapInner( "<a href='#' class='ui-collapsible-heading-toggle'></a>" )
3641
+ .find( "a:eq(0)" )
3642
+ .buttonMarkup({
3643
+ shadow: !collapsibleParent.length,
3644
+ corners: false,
3645
+ iconPos: "left",
3646
+ icon: "plus",
3647
+ theme: o.theme
3648
+ })
3649
+ .find( ".ui-icon" )
3650
+ .removeAttr( "class" )
3651
+ .buttonMarkup({
3652
+ shadow: true,
3653
+ corners: true,
3654
+ iconPos: "notext",
3655
+ icon: "plus",
3656
+ theme: o.iconTheme
3657
+ });
3658
+
3659
+ if ( !collapsibleParent.length ) {
3660
+ collapsibleHeading
3661
+ .find( "a:eq(0)" )
3662
+ .addClass( "ui-corner-all" )
3663
+ .find( ".ui-btn-inner" )
3664
+ .addClass( "ui-corner-all" );
3665
+ } else {
3666
+ if ( collapsibleContain.jqmData( "collapsible-last" ) ) {
3667
+ collapsibleHeading
3668
+ .find( "a:eq(0), .ui-btn-inner" )
3669
+ .addClass( "ui-corner-bottom" );
3670
+ }
3671
+ }
3672
+
3673
+ //events
3674
+ collapsibleContain
3675
+ .bind( "collapse", function( event ) {
3676
+ if ( ! event.isDefaultPrevented() &&
3677
+ $( event.target ).closest( ".ui-collapsible-contain" ).is( collapsibleContain ) ) {
3678
+
3679
+ event.preventDefault();
3680
+
3681
+ collapsibleHeading
3682
+ .addClass( "ui-collapsible-heading-collapsed" )
3683
+ .find( ".ui-collapsible-heading-status" )
3684
+ .text( o.expandCueText )
3685
+ .end()
3686
+ .find( ".ui-icon" )
3687
+ .removeClass( "ui-icon-minus" )
3688
+ .addClass( "ui-icon-plus" );
3689
+
3690
+ collapsibleContent.addClass( "ui-collapsible-content-collapsed" ).attr( "aria-hidden", true );
3691
+
3692
+ if ( collapsibleContain.jqmData( "collapsible-last" ) ) {
3693
+ collapsibleHeading
3694
+ .find( "a:eq(0), .ui-btn-inner" )
3695
+ .addClass( "ui-corner-bottom" );
3696
+ }
3697
+ }
3698
+ })
3699
+ .bind( "expand", function( event ) {
3700
+ if ( !event.isDefaultPrevented() ) {
3701
+
3702
+ event.preventDefault();
3703
+
3704
+ collapsibleHeading
3705
+ .removeClass( "ui-collapsible-heading-collapsed" )
3706
+ .find( ".ui-collapsible-heading-status" ).text( o.collapseCueText );
3707
+
3708
+ collapsibleHeading.find( ".ui-icon" ).removeClass( "ui-icon-plus" ).addClass( "ui-icon-minus" );
3709
+
3710
+ collapsibleContent.removeClass( "ui-collapsible-content-collapsed" ).attr( "aria-hidden", false );
3711
+
3712
+ if ( collapsibleContain.jqmData( "collapsible-last" ) ) {
3713
+
3714
+ collapsibleHeading
3715
+ .find( "a:eq(0), .ui-btn-inner" )
3716
+ .removeClass( "ui-corner-bottom" );
3717
+ }
3718
+ }
3719
+ })
3720
+ .trigger( o.collapsed ? "collapse" : "expand" );
3721
+
3722
+ // Close others in a set
3723
+ if ( collapsibleParent.length && !collapsibleParent.jqmData( "collapsiblebound" ) ) {
3724
+
3725
+ collapsibleParent
3726
+ .jqmData( "collapsiblebound", true )
3727
+ .bind( "expand", function( event ) {
3728
+
3729
+ $( event.target )
3730
+ .closest( ".ui-collapsible-contain" )
3731
+ .siblings( ".ui-collapsible-contain" )
3732
+ .trigger( "collapse" );
3733
+
3734
+ });
3735
+
3736
+ var set = collapsibleParent.children( ":jqmData(role='collapsible')" );
3737
+
3738
+ set.first()
3739
+ .find( "a:eq(0)" )
3740
+ .addClass( "ui-corner-top" )
3741
+ .find( ".ui-btn-inner" )
3742
+ .addClass( "ui-corner-top" );
3743
+
3744
+ set.last().jqmData( "collapsible-last", true );
3745
+ }
3746
+
3747
+ collapsibleHeading
3748
+ .bind( "vclick", function( event ) {
3749
+
3750
+ var type = collapsibleHeading.is( ".ui-collapsible-heading-collapsed" ) ?
3751
+ "expand" : "collapse";
3752
+
3753
+ collapsibleContain.trigger( type );
3754
+
3755
+ event.preventDefault();
3756
+ });
3757
+ }
3758
+ });
3759
+
3760
+ //auto self-init widgets
3761
+ $( document ).bind( "pagecreate create", function( e ){
3762
+ $( $.mobile.collapsible.prototype.options.initSelector, e.target ).collapsible();
3763
+ });
3764
+
3765
+ })( jQuery );
3766
+ /*
3767
+ * jQuery Mobile Framework : "fieldcontain" plugin - simple class additions to make form row separators
3768
+ * Copyright (c) jQuery Project
3769
+ * Dual licensed under the MIT or GPL Version 2 licenses.
3770
+ * http://jquery.org/license
3771
+ */
3772
+
3773
+ (function( $, undefined ) {
3774
+
3775
+ $.fn.fieldcontain = function( options ) {
3776
+ return this.addClass( "ui-field-contain ui-body ui-br" );
3777
+ };
3778
+
3779
+ //auto self-init widgets
3780
+ $( document ).bind( "pagecreate create", function( e ){
3781
+ $( ":jqmData(role='fieldcontain')", e.target ).fieldcontain();
3782
+ });
3783
+
3784
+ })( jQuery );/*
3785
+ * jQuery Mobile Framework : plugin for creating CSS grids
3786
+ * Copyright (c) jQuery Project
3787
+ * Dual licensed under the MIT or GPL Version 2 licenses.
3788
+ * http://jquery.org/license
3789
+ */
3790
+
3791
+ (function( $, undefined ) {
3792
+
3793
+ $.fn.grid = function( options ) {
3794
+ return this.each(function() {
3795
+
3796
+ var $this = $( this ),
3797
+ o = $.extend({
3798
+ grid: null
3799
+ },options),
3800
+ $kids = $this.children(),
3801
+ gridCols = {solo:1, a:2, b:3, c:4, d:5},
3802
+ grid = o.grid,
3803
+ iterator;
3804
+
3805
+ if ( !grid ) {
3806
+ if ( $kids.length <= 5 ) {
3807
+ for ( var letter in gridCols ) {
3808
+ if ( gridCols[ letter ] === $kids.length ) {
3809
+ grid = letter;
3810
+ }
3811
+ }
3812
+ } else {
3813
+ grid = "a";
3814
+ }
3815
+ }
3816
+ iterator = gridCols[grid];
3817
+
3818
+ $this.addClass( "ui-grid-" + grid );
3819
+
3820
+ $kids.filter( ":nth-child(" + iterator + "n+1)" ).addClass( "ui-block-a" );
3821
+
3822
+ if ( iterator > 1 ) {
3823
+ $kids.filter( ":nth-child(" + iterator + "n+2)" ).addClass( "ui-block-b" );
3824
+ }
3825
+ if ( iterator > 2 ) {
3826
+ $kids.filter( ":nth-child(3n+3)" ).addClass( "ui-block-c" );
3827
+ }
3828
+ if ( iterator > 3 ) {
3829
+ $kids.filter( ":nth-child(4n+4)" ).addClass( "ui-block-d" );
3830
+ }
3831
+ if ( iterator > 4 ) {
3832
+ $kids.filter( ":nth-child(5n+5)" ).addClass( "ui-block-e" );
3833
+ }
3834
+ });
3835
+ };
3836
+ })( jQuery );/*
3837
+ * jQuery Mobile Framework : "navbar" plugin
3838
+ * Copyright (c) jQuery Project
3839
+ * Dual licensed under the MIT or GPL Version 2 licenses.
3840
+ * http://jquery.org/license
3841
+ */
3842
+
3843
+ (function( $, undefined ) {
3844
+
3845
+ $.widget( "mobile.navbar", $.mobile.widget, {
3846
+ options: {
3847
+ iconpos: "top",
3848
+ grid: null,
3849
+ initSelector: ":jqmData(role='navbar')"
3850
+ },
3851
+
3852
+ _create: function(){
3853
+
3854
+ var $navbar = this.element,
3855
+ $navbtns = $navbar.find( "a" ),
3856
+ iconpos = $navbtns.filter( ":jqmData(icon)" ).length ?
3857
+ this.options.iconpos : undefined;
3858
+
3859
+ $navbar.addClass( "ui-navbar" )
3860
+ .attr( "role","navigation" )
3861
+ .find( "ul" )
3862
+ .grid({ grid: this.options.grid });
3863
+
3864
+ if ( !iconpos ) {
3865
+ $navbar.addClass( "ui-navbar-noicons" );
3866
+ }
3867
+
3868
+ $navbtns.buttonMarkup({
3869
+ corners: false,
3870
+ shadow: false,
3871
+ iconpos: iconpos
3872
+ });
3873
+
3874
+ $navbar.delegate( "a", "vclick", function( event ) {
3875
+ $navbtns.not( ".ui-state-persist" ).removeClass( $.mobile.activeBtnClass );
3876
+ $( this ).addClass( $.mobile.activeBtnClass );
3877
+ });
3878
+ }
3879
+ });
3880
+
3881
+ //auto self-init widgets
3882
+ $( document ).bind( "pagecreate create", function( e ){
3883
+ $( $.mobile.navbar.prototype.options.initSelector, e.target ).navbar();
3884
+ });
3885
+
3886
+ })( jQuery );
3887
+ /*
3888
+ * jQuery Mobile Framework : "listview" plugin
3889
+ * Copyright (c) jQuery Project
3890
+ * Dual licensed under the MIT or GPL Version 2 licenses.
3891
+ * http://jquery.org/license
3892
+ */
3893
+
3894
+ (function( $, undefined ) {
3895
+
3896
+ //Keeps track of the number of lists per page UID
3897
+ //This allows support for multiple nested list in the same page
3898
+ //https://github.com/jquery/jquery-mobile/issues/1617
3899
+ var listCountPerPage = {};
3900
+
3901
+ $.widget( "mobile.listview", $.mobile.widget, {
3902
+ options: {
3903
+ theme: "c",
3904
+ countTheme: "c",
3905
+ headerTheme: "b",
3906
+ dividerTheme: "b",
3907
+ splitIcon: "arrow-r",
3908
+ splitTheme: "b",
3909
+ inset: false,
3910
+ initSelector: ":jqmData(role='listview')"
3911
+ },
3912
+
3913
+ _create: function() {
3914
+ var t = this;
3915
+
3916
+ // create listview markup
3917
+ t.element.addClass(function( i, orig ) {
3918
+ return orig + " ui-listview " + ( t.options.inset ? " ui-listview-inset ui-corner-all ui-shadow " : "" );
3919
+ });
3920
+
3921
+ t.refresh( true );
3922
+ },
3923
+
3924
+ _itemApply: function( $list, item ) {
3925
+ var $countli = item.find( ".ui-li-count" );
3926
+ if ( $countli.length ) {
3927
+ item.addClass( "ui-li-has-count" );
3928
+ }
3929
+ $countli.addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme ) + " ui-btn-corner-all" );
3930
+
3931
+ // TODO class has to be defined in markup
3932
+ item.find( "h1, h2, h3, h4, h5, h6" ).addClass( "ui-li-heading" ).end()
3933
+ .find( "p, dl" ).addClass( "ui-li-desc" ).end()
3934
+ .find( ">img:eq(0), .ui-link-inherit>img:eq(0)" ).addClass( "ui-li-thumb" ).each(function() {
3935
+ item.addClass( $(this).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
3936
+ }).end()
3937
+ .find( ".ui-li-aside" ).each(function() {
3938
+ var $this = $(this);
3939
+ $this.prependTo( $this.parent() ); //shift aside to front for css float
3940
+ });
3941
+ },
3942
+
3943
+ _removeCorners: function( li, which ) {
3944
+ var top = "ui-corner-top ui-corner-tr ui-corner-tl",
3945
+ bot = "ui-corner-bottom ui-corner-br ui-corner-bl";
3946
+
3947
+ li = li.add( li.find( ".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb" ) );
3948
+
3949
+ if ( which === "top" ) {
3950
+ li.removeClass( top );
3951
+ } else if ( which === "bottom" ) {
3952
+ li.removeClass( bot );
3953
+ } else {
3954
+ li.removeClass( top + " " + bot );
3955
+ }
3956
+ },
3957
+
3958
+ _refreshCorners: function( create ) {
3959
+ var $li,
3960
+ $visibleli,
3961
+ $topli,
3962
+ $bottomli;
3963
+
3964
+ if ( this.options.inset ) {
3965
+ $li = this.element.children( "li" );
3966
+ // at create time the li are not visible yet so we need to rely on .ui-screen-hidden
3967
+ $visibleli = create?$li.not( ".ui-screen-hidden" ):$li.filter( ":visible" );
3968
+
3969
+ this._removeCorners( $li );
3970
+
3971
+ // Select the first visible li element
3972
+ $topli = $visibleli.first()
3973
+ .addClass( "ui-corner-top" );
3974
+
3975
+ $topli.add( $topli.find( ".ui-btn-inner" ) )
3976
+ .find( ".ui-li-link-alt" )
3977
+ .addClass( "ui-corner-tr" )
3978
+ .end()
3979
+ .find( ".ui-li-thumb" )
3980
+ .addClass( "ui-corner-tl" );
3981
+
3982
+ // Select the last visible li element
3983
+ $bottomli = $visibleli.last()
3984
+ .addClass( "ui-corner-bottom" );
3985
+
3986
+ $bottomli.add( $bottomli.find( ".ui-btn-inner" ) )
3987
+ .find( ".ui-li-link-alt" )
3988
+ .addClass( "ui-corner-br" )
3989
+ .end()
3990
+ .find( ".ui-li-thumb" )
3991
+ .addClass( "ui-corner-bl" );
3992
+ }
3993
+ },
3994
+
3995
+ refresh: function( create ) {
3996
+ this.parentPage = this.element.closest( ".ui-page" );
3997
+ this._createSubPages();
3998
+
3999
+ var o = this.options,
4000
+ $list = this.element,
4001
+ self = this,
4002
+ dividertheme = $list.jqmData( "dividertheme" ) || o.dividerTheme,
4003
+ listsplittheme = $list.jqmData( "splittheme" ),
4004
+ listspliticon = $list.jqmData( "spliticon" ),
4005
+ li = $list.children( "li" ),
4006
+ counter = $.support.cssPseudoElement || !$.nodeName( $list[ 0 ], "ol" ) ? 0 : 1,
4007
+ item, itemClass, itemTheme,
4008
+ a, last, splittheme, countParent, icon;
4009
+
4010
+ if ( counter ) {
4011
+ $list.find( ".ui-li-dec" ).remove();
4012
+ }
4013
+
4014
+ for ( var pos = 0, numli = li.length; pos < numli; pos++ ) {
4015
+ item = li.eq( pos );
4016
+ itemClass = "ui-li";
4017
+
4018
+ // If we're creating the element, we update it regardless
4019
+ if ( create || !item.hasClass( "ui-li" ) ) {
4020
+ itemTheme = item.jqmData("theme") || o.theme;
4021
+ a = item.children( "a" );
4022
+
4023
+ if ( a.length ) {
4024
+ icon = item.jqmData("icon");
4025
+
4026
+ item.buttonMarkup({
4027
+ wrapperEls: "div",
4028
+ shadow: false,
4029
+ corners: false,
4030
+ iconpos: "right",
4031
+ icon: a.length > 1 || icon === false ? false : icon || "arrow-r",
4032
+ theme: itemTheme
4033
+ });
4034
+
4035
+ if ( ( icon != false ) && ( a.length == 1 ) ) {
4036
+ item.addClass( "ui-li-has-arrow" );
4037
+ }
4038
+
4039
+ a.first().addClass( "ui-link-inherit" );
4040
+
4041
+ if ( a.length > 1 ) {
4042
+ itemClass += " ui-li-has-alt";
4043
+
4044
+ last = a.last();
4045
+ splittheme = listsplittheme || last.jqmData( "theme" ) || o.splitTheme;
4046
+
4047
+ last.appendTo(item)
4048
+ .attr( "title", last.text() )
4049
+ .addClass( "ui-li-link-alt" )
4050
+ .empty()
4051
+ .buttonMarkup({
4052
+ shadow: false,
4053
+ corners: false,
4054
+ theme: itemTheme,
4055
+ icon: false,
4056
+ iconpos: false
4057
+ })
4058
+ .find( ".ui-btn-inner" )
4059
+ .append(
4060
+ $( "<span />" ).buttonMarkup({
4061
+ shadow: true,
4062
+ corners: true,
4063
+ theme: splittheme,
4064
+ iconpos: "notext",
4065
+ icon: listspliticon || last.jqmData( "icon" ) || o.splitIcon
4066
+ })
4067
+ );
4068
+ }
4069
+ } else if ( item.jqmData( "role" ) === "list-divider" ) {
4070
+
4071
+ itemClass += " ui-li-divider ui-btn ui-bar-" + dividertheme;
4072
+ item.attr( "role", "heading" );
4073
+
4074
+ //reset counter when a divider heading is encountered
4075
+ if ( counter ) {
4076
+ counter = 1;
4077
+ }
4078
+
4079
+ } else {
4080
+ itemClass += " ui-li-static ui-body-" + itemTheme;
4081
+ }
4082
+ }
4083
+
4084
+ if ( counter && itemClass.indexOf( "ui-li-divider" ) < 0 ) {
4085
+ countParent = item.is( ".ui-li-static:first" ) ? item : item.find( ".ui-link-inherit" );
4086
+
4087
+ countParent.addClass( "ui-li-jsnumbering" )
4088
+ .prepend( "<span class='ui-li-dec'>" + (counter++) + ". </span>" );
4089
+ }
4090
+
4091
+ item.add( item.children( ".ui-btn-inner" ) ).addClass( itemClass );
4092
+
4093
+ self._itemApply( $list, item );
4094
+ }
4095
+
4096
+ this._refreshCorners( create );
4097
+ },
4098
+
4099
+ //create a string for ID/subpage url creation
4100
+ _idStringEscape: function( str ) {
4101
+ return str.replace(/[^a-zA-Z0-9]/g, '-');
4102
+ },
4103
+
4104
+ _createSubPages: function() {
4105
+ var parentList = this.element,
4106
+ parentPage = parentList.closest( ".ui-page" ),
4107
+ parentUrl = parentPage.jqmData( "url" ),
4108
+ parentId = parentUrl || parentPage[ 0 ][ $.expando ],
4109
+ parentListId = parentList.attr( "id" ),
4110
+ o = this.options,
4111
+ dns = "data-" + $.mobile.ns,
4112
+ self = this,
4113
+ persistentFooterID = parentPage.find( ":jqmData(role='footer')" ).jqmData( "id" ),
4114
+ hasSubPages;
4115
+
4116
+ if ( typeof listCountPerPage[ parentId ] === "undefined" ) {
4117
+ listCountPerPage[ parentId ] = -1;
4118
+ }
4119
+
4120
+ parentListId = parentListId || ++listCountPerPage[ parentId ];
4121
+
4122
+ $( parentList.find( "li>ul, li>ol" ).toArray().reverse() ).each(function( i ) {
4123
+ var self = this,
4124
+ list = $( this ),
4125
+ listId = list.attr( "id" ) || parentListId + "-" + i,
4126
+ parent = list.parent(),
4127
+ nodeEls = $( list.prevAll().toArray().reverse() ),
4128
+ nodeEls = nodeEls.length ? nodeEls : $( "<span>" + $.trim(parent.contents()[ 0 ].nodeValue) + "</span>" ),
4129
+ title = nodeEls.first().text(),//url limits to first 30 chars of text
4130
+ id = ( parentUrl || "" ) + "&" + $.mobile.subPageUrlKey + "=" + listId,
4131
+ theme = list.jqmData( "theme" ) || o.theme,
4132
+ countTheme = list.jqmData( "counttheme" ) || parentList.jqmData( "counttheme" ) || o.countTheme,
4133
+ newPage, anchor;
4134
+
4135
+ //define hasSubPages for use in later removal
4136
+ hasSubPages = true;
4137
+
4138
+ newPage = list.detach()
4139
+ .wrap( "<div " + dns + "role='page' " + dns + "url='" + id + "' " + dns + "theme='" + theme + "' " + dns + "count-theme='" + countTheme + "'><div " + dns + "role='content'></div></div>" )
4140
+ .parent()
4141
+ .before( "<div " + dns + "role='header' " + dns + "theme='" + o.headerTheme + "'><div class='ui-title'>" + title + "</div></div>" )
4142
+ .after( persistentFooterID ? $( "<div " + dns + "role='footer' " + dns + "id='"+ persistentFooterID +"'>") : "" )
4143
+ .parent()
4144
+ .appendTo( $.mobile.pageContainer );
4145
+
4146
+ newPage.page();
4147
+
4148
+ anchor = parent.find('a:first');
4149
+
4150
+ if ( !anchor.length ) {
4151
+ anchor = $( "<a/>" ).html( nodeEls || title ).prependTo( parent.empty() );
4152
+ }
4153
+
4154
+ anchor.attr( "href", "#" + id );
4155
+
4156
+ }).listview();
4157
+
4158
+ //on pagehide, remove any nested pages along with the parent page, as long as they aren't active
4159
+ if( hasSubPages && parentPage.data("page").options.domCache === false ){
4160
+ var newRemove = function( e, ui ){
4161
+ var nextPage = ui.nextPage, npURL;
4162
+
4163
+ if( ui.nextPage ){
4164
+ npURL = nextPage.jqmData( "url" );
4165
+ if( npURL.indexOf( parentUrl + "&" + $.mobile.subPageUrlKey ) !== 0 ){
4166
+ self.childPages().remove();
4167
+ parentPage.remove();
4168
+ }
4169
+ }
4170
+ };
4171
+
4172
+ // unbind the original page remove and replace with our specialized version
4173
+ parentPage
4174
+ .unbind( "pagehide.remove" )
4175
+ .bind( "pagehide.remove", newRemove);
4176
+ }
4177
+ },
4178
+
4179
+ // TODO sort out a better way to track sub pages of the listview this is brittle
4180
+ childPages: function(){
4181
+ var parentUrl = this.parentPage.jqmData( "url" );
4182
+
4183
+ return $( ":jqmData(url^='"+ parentUrl + "&" + $.mobile.subPageUrlKey +"')");
4184
+ }
4185
+ });
4186
+
4187
+ //auto self-init widgets
4188
+ $( document ).bind( "pagecreate create", function( e ){
4189
+ $( $.mobile.listview.prototype.options.initSelector, e.target ).listview();
4190
+ });
4191
+
4192
+ })( jQuery );
4193
+ /*
4194
+ * jQuery Mobile Framework : "listview" filter extension
4195
+ * Copyright (c) jQuery Project
4196
+ * Dual licensed under the MIT or GPL Version 2 licenses.
4197
+ * http://jquery.org/license
4198
+ */
4199
+
4200
+ (function( $, undefined ) {
4201
+
4202
+ $.mobile.listview.prototype.options.filter = false;
4203
+ $.mobile.listview.prototype.options.filterPlaceholder = "Filter items...";
4204
+ $.mobile.listview.prototype.options.filterTheme = "c";
4205
+ $.mobile.listview.prototype.options.filterCallback = function( text, searchValue ){
4206
+ return text.toLowerCase().indexOf( searchValue ) === -1;
4207
+ };
4208
+
4209
+ $( ":jqmData(role='listview')" ).live( "listviewcreate", function() {
4210
+
4211
+ var list = $( this ),
4212
+ listview = list.data( "listview" );
4213
+
4214
+ if ( !listview.options.filter ) {
4215
+ return;
4216
+ }
4217
+
4218
+ var wrapper = $( "<form>", {
4219
+ "class": "ui-listview-filter ui-bar-" + listview.options.filterTheme,
4220
+ "role": "search"
4221
+ }),
4222
+ search = $( "<input>", {
4223
+ placeholder: listview.options.filterPlaceholder
4224
+ })
4225
+ .attr( "data-" + $.mobile.ns + "type", "search" )
4226
+ .jqmData( "lastval", "" )
4227
+ .bind( "keyup change", function() {
4228
+
4229
+ var $this = $(this),
4230
+ val = this.value.toLowerCase(),
4231
+ listItems = null,
4232
+ lastval = $this.jqmData( "lastval" ) + "",
4233
+ childItems = false,
4234
+ itemtext = "",
4235
+ item, change;
4236
+
4237
+ // Change val as lastval for next execution
4238
+ $this.jqmData( "lastval" , val );
4239
+
4240
+ change = val.replace( new RegExp( "^" + lastval ) , "" );
4241
+
4242
+ if ( val.length < lastval.length || change.length != ( val.length - lastval.length ) ) {
4243
+
4244
+ // Removed chars or pasted something totaly different, check all items
4245
+ listItems = list.children();
4246
+ } else {
4247
+
4248
+ // Only chars added, not removed, only use visible subset
4249
+ listItems = list.children( ":not(.ui-screen-hidden)" );
4250
+ }
4251
+
4252
+ if ( val ) {
4253
+
4254
+ // This handles hiding regular rows without the text we search for
4255
+ // and any list dividers without regular rows shown under it
4256
+
4257
+ for ( var i = listItems.length - 1; i >= 0; i-- ) {
4258
+ item = $( listItems[ i ] );
4259
+ itemtext = item.jqmData( "filtertext" ) || item.text();
4260
+
4261
+ if ( item.is( "li:jqmData(role=list-divider)" ) ) {
4262
+
4263
+ item.toggleClass( "ui-filter-hidequeue" , !childItems );
4264
+
4265
+ // New bucket!
4266
+ childItems = false;
4267
+
4268
+ } else if ( listview.options.filterCallback( itemtext, val ) ) {
4269
+
4270
+ //mark to be hidden
4271
+ item.toggleClass( "ui-filter-hidequeue" , true );
4272
+ } else {
4273
+
4274
+ // There"s a shown item in the bucket
4275
+ childItems = true;
4276
+ }
4277
+ }
4278
+
4279
+ // Show items, not marked to be hidden
4280
+ listItems
4281
+ .filter( ":not(.ui-filter-hidequeue)" )
4282
+ .toggleClass( "ui-screen-hidden", false );
4283
+
4284
+ // Hide items, marked to be hidden
4285
+ listItems
4286
+ .filter( ".ui-filter-hidequeue" )
4287
+ .toggleClass( "ui-screen-hidden", true )
4288
+ .toggleClass( "ui-filter-hidequeue", false );
4289
+
4290
+ } else {
4291
+
4292
+ //filtervalue is empty => show all
4293
+ listItems.toggleClass( "ui-screen-hidden", false );
4294
+ }
4295
+ listview._refreshCorners();
4296
+ })
4297
+ .appendTo( wrapper )
4298
+ .textinput();
4299
+
4300
+ if ( $( this ).jqmData( "inset" ) ) {
4301
+ wrapper.addClass( "ui-listview-filter-inset" );
4302
+ }
4303
+
4304
+ wrapper.bind( "submit", function() {
4305
+ return false;
4306
+ })
4307
+ .insertBefore( list );
4308
+ });
4309
+
4310
+ })( jQuery );/*
4311
+ * jQuery Mobile Framework : "fieldcontain" plugin - simple class additions to make form row separators
4312
+ * Copyright (c) jQuery Project
4313
+ * Dual licensed under the MIT or GPL Version 2 licenses.
4314
+ * http://jquery.org/license
4315
+ */
4316
+
4317
+ (function( $, undefined ) {
4318
+
4319
+ $( document ).bind( "pagecreate create", function( e ){
4320
+ $( ":jqmData(role='nojs')", e.target ).addClass( "ui-nojs" );
4321
+
4322
+ });
4323
+
4324
+ })( jQuery );/*
4325
+ * jQuery Mobile Framework : "checkboxradio" plugin
4326
+ * Copyright (c) jQuery Project
4327
+ * Dual licensed under the MIT or GPL Version 2 licenses.
4328
+ * http://jquery.org/license
4329
+ */
4330
+
4331
+ (function( $, undefined ) {
4332
+
4333
+ $.widget( "mobile.checkboxradio", $.mobile.widget, {
4334
+ options: {
4335
+ theme: null,
4336
+ initSelector: "input[type='checkbox'],input[type='radio']"
4337
+ },
4338
+ _create: function() {
4339
+ var self = this,
4340
+ input = this.element,
4341
+ // NOTE: Windows Phone could not find the label through a selector
4342
+ // filter works though.
4343
+ label = input.closest( "form,fieldset,:jqmData(role='page')" ).find( "label" ).filter( "[for='" + input[ 0 ].id + "']"),
4344
+ inputtype = input.attr( "type" ),
4345
+ checkedState = inputtype + "-on",
4346
+ uncheckedState = inputtype + "-off",
4347
+ icon = input.parents( ":jqmData(type='horizontal')" ).length ? undefined : uncheckedState,
4348
+ activeBtn = icon ? "" : " " + $.mobile.activeBtnClass,
4349
+ checkedClass = "ui-" + checkedState + activeBtn,
4350
+ uncheckedClass = "ui-" + uncheckedState,
4351
+ checkedicon = "ui-icon-" + checkedState,
4352
+ uncheckedicon = "ui-icon-" + uncheckedState;
4353
+
4354
+ if ( inputtype !== "checkbox" && inputtype !== "radio" ) {
4355
+ return;
4356
+ }
4357
+
4358
+ // Expose for other methods
4359
+ $.extend( this, {
4360
+ label: label,
4361
+ inputtype: inputtype,
4362
+ checkedClass: checkedClass,
4363
+ uncheckedClass: uncheckedClass,
4364
+ checkedicon: checkedicon,
4365
+ uncheckedicon: uncheckedicon
4366
+ });
4367
+
4368
+ // If there's no selected theme...
4369
+ if( !this.options.theme ) {
4370
+ this.options.theme = this.element.jqmData( "theme" );
4371
+ }
4372
+
4373
+ label.buttonMarkup({
4374
+ theme: this.options.theme,
4375
+ icon: icon,
4376
+ shadow: false
4377
+ });
4378
+
4379
+ // Wrap the input + label in a div
4380
+ input.add( label )
4381
+ .wrapAll( "<div class='ui-" + inputtype + "'></div>" );
4382
+
4383
+ label.bind({
4384
+ vmouseover: function() {
4385
+ if ( $( this ).parent().is( ".ui-disabled" ) ) {
4386
+ return false;
4387
+ }
4388
+ },
4389
+
4390
+ vclick: function( event ) {
4391
+ if ( input.is( ":disabled" ) ) {
4392
+ event.preventDefault();
4393
+ return;
4394
+ }
4395
+
4396
+ self._cacheVals();
4397
+
4398
+ input.prop( "checked", inputtype === "radio" && true || !input.prop( "checked" ) );
4399
+
4400
+ // Input set for common radio buttons will contain all the radio
4401
+ // buttons, but will not for checkboxes. clearing the checked status
4402
+ // of other radios ensures the active button state is applied properly
4403
+ self._getInputSet().not( input ).prop( "checked", false );
4404
+
4405
+ self._updateAll();
4406
+ return false;
4407
+ }
4408
+
4409
+ });
4410
+
4411
+ input
4412
+ .bind({
4413
+ vmousedown: function() {
4414
+ this._cacheVals();
4415
+ },
4416
+
4417
+ vclick: function() {
4418
+
4419
+ var $this = $(this);
4420
+
4421
+ // Adds checked attribute to checked input when keyboard is used
4422
+ if ( $this.is( ":checked" ) ) {
4423
+
4424
+ $this.prop( "checked", true);
4425
+ self._getInputSet().not($this).prop( "checked", false );
4426
+ } else {
4427
+
4428
+ $this.prop( "checked", false );
4429
+ }
4430
+
4431
+ self._updateAll();
4432
+ },
4433
+
4434
+ focus: function() {
4435
+ label.addClass( "ui-focus" );
4436
+ },
4437
+
4438
+ blur: function() {
4439
+ label.removeClass( "ui-focus" );
4440
+ }
4441
+ });
4442
+
4443
+ this.refresh();
4444
+ },
4445
+
4446
+ _cacheVals: function() {
4447
+ this._getInputSet().each(function() {
4448
+ var $this = $(this);
4449
+
4450
+ $this.jqmData( "cacheVal", $this.is( ":checked" ) );
4451
+ });
4452
+ },
4453
+
4454
+ //returns either a set of radios with the same name attribute, or a single checkbox
4455
+ _getInputSet: function(){
4456
+ if(this.inputtype == "checkbox") {
4457
+ return this.element;
4458
+ }
4459
+ return this.element.closest( "form,fieldset,:jqmData(role='page')" )
4460
+ .find( "input[name='"+ this.element.attr( "name" ) +"'][type='"+ this.inputtype +"']" );
4461
+ },
4462
+
4463
+ _updateAll: function() {
4464
+ var self = this;
4465
+
4466
+ this._getInputSet().each(function() {
4467
+ var $this = $(this);
4468
+
4469
+ if ( $this.is( ":checked" ) || self.inputtype === "checkbox" ) {
4470
+ $this.trigger( "change" );
4471
+ }
4472
+ })
4473
+ .checkboxradio( "refresh" );
4474
+ },
4475
+
4476
+ refresh: function() {
4477
+ var input = this.element,
4478
+ label = this.label,
4479
+ icon = label.find( ".ui-icon" );
4480
+
4481
+ // input[0].checked expando doesn't always report the proper value
4482
+ // for checked='checked'
4483
+ if ( $( input[ 0 ] ).prop( "checked" ) ) {
4484
+
4485
+ label.addClass( this.checkedClass ).removeClass( this.uncheckedClass );
4486
+ icon.addClass( this.checkedicon ).removeClass( this.uncheckedicon );
4487
+
4488
+ } else {
4489
+
4490
+ label.removeClass( this.checkedClass ).addClass( this.uncheckedClass );
4491
+ icon.removeClass( this.checkedicon ).addClass( this.uncheckedicon );
4492
+ }
4493
+
4494
+ if ( input.is( ":disabled" ) ) {
4495
+ this.disable();
4496
+ } else {
4497
+ this.enable();
4498
+ }
4499
+ },
4500
+
4501
+ disable: function() {
4502
+ this.element.prop( "disabled", true ).parent().addClass( "ui-disabled" );
4503
+ },
4504
+
4505
+ enable: function() {
4506
+ this.element.prop( "disabled", false ).parent().removeClass( "ui-disabled" );
4507
+ }
4508
+ });
4509
+
4510
+ //auto self-init widgets
4511
+ $( document ).bind( "pagecreate create", function( e ){
4512
+ $( $.mobile.checkboxradio.prototype.options.initSelector, e.target )
4513
+ .not( ":jqmData(role='none'), :jqmData(role='nojs')" )
4514
+ .checkboxradio();
4515
+ });
4516
+
4517
+ })( jQuery );
4518
+ /*
4519
+ * jQuery Mobile Framework : "button" plugin - links that proxy to native input/buttons
4520
+ * Copyright (c) jQuery Project
4521
+ * Dual licensed under the MIT or GPL Version 2 licenses.
4522
+ * http://jquery.org/license
4523
+ */
4524
+
4525
+ (function( $, undefined ) {
4526
+
4527
+ $.widget( "mobile.button", $.mobile.widget, {
4528
+ options: {
4529
+ theme: null,
4530
+ icon: null,
4531
+ iconpos: null,
4532
+ inline: null,
4533
+ corners: true,
4534
+ shadow: true,
4535
+ iconshadow: true,
4536
+ initSelector: "button, [type='button'], [type='submit'], [type='reset'], [type='image']"
4537
+ },
4538
+ _create: function() {
4539
+ var $el = this.element,
4540
+ o = this.options,
4541
+ type;
4542
+
4543
+ // Add ARIA role
4544
+ this.button = $( "<div></div>" )
4545
+ .text( $el.text() || $el.val() )
4546
+ .buttonMarkup({
4547
+ theme: o.theme,
4548
+ icon: o.icon,
4549
+ iconpos: o.iconpos,
4550
+ inline: o.inline,
4551
+ corners: o.corners,
4552
+ shadow: o.shadow,
4553
+ iconshadow: o.iconshadow
4554
+ })
4555
+ .insertBefore( $el )
4556
+ .append( $el.addClass( "ui-btn-hidden" ) );
4557
+
4558
+ // Add hidden input during submit
4559
+ type = $el.attr( "type" );
4560
+
4561
+ if ( type !== "button" && type !== "reset" ) {
4562
+
4563
+ $el.bind( "vclick", function() {
4564
+
4565
+ var $buttonPlaceholder = $( "<input>", {
4566
+ type: "hidden",
4567
+ name: $el.attr( "name" ),
4568
+ value: $el.attr( "value" )
4569
+ })
4570
+ .insertBefore( $el );
4571
+
4572
+ // Bind to doc to remove after submit handling
4573
+ $( document ).submit(function(){
4574
+ $buttonPlaceholder.remove();
4575
+ });
4576
+ });
4577
+ }
4578
+
4579
+ this.refresh();
4580
+ },
4581
+
4582
+ enable: function() {
4583
+ this.element.attr( "disabled", false );
4584
+ this.button.removeClass( "ui-disabled" ).attr( "aria-disabled", false );
4585
+ return this._setOption( "disabled", false );
4586
+ },
4587
+
4588
+ disable: function() {
4589
+ this.element.attr( "disabled", true );
4590
+ this.button.addClass( "ui-disabled" ).attr( "aria-disabled", true );
4591
+ return this._setOption( "disabled", true );
4592
+ },
4593
+
4594
+ refresh: function() {
4595
+ if ( this.element.attr( "disabled" ) ) {
4596
+ this.disable();
4597
+ } else {
4598
+ this.enable();
4599
+ }
4600
+ }
4601
+ });
4602
+
4603
+ //auto self-init widgets
4604
+ $( document ).bind( "pagecreate create", function( e ){
4605
+ $( $.mobile.button.prototype.options.initSelector, e.target )
4606
+ .not( ":jqmData(role='none'), :jqmData(role='nojs')" )
4607
+ .button();
4608
+ });
4609
+
4610
+ })( jQuery );/*
4611
+ * jQuery Mobile Framework : "slider" plugin
4612
+ * Copyright (c) jQuery Project
4613
+ * Dual licensed under the MIT or GPL Version 2 licenses.
4614
+ * http://jquery.org/license
4615
+ */
4616
+
4617
+ ( function( $, undefined ) {
4618
+
4619
+ $.widget( "mobile.slider", $.mobile.widget, {
4620
+ options: {
4621
+ theme: null,
4622
+ trackTheme: null,
4623
+ disabled: false,
4624
+ initSelector: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')"
4625
+ },
4626
+
4627
+ _create: function() {
4628
+
4629
+ // TODO: Each of these should have comments explain what they're for
4630
+ var self = this,
4631
+
4632
+ control = this.element,
4633
+
4634
+ parentTheme = control.parents( "[class*='ui-bar-'],[class*='ui-body-']" ).eq( 0 ),
4635
+
4636
+ parentTheme = parentTheme.length ? parentTheme.attr( "class" ).match( /ui-(bar|body)-([a-z])/ )[ 2 ] : "c",
4637
+
4638
+ theme = this.options.theme ? this.options.theme : parentTheme,
4639
+
4640
+ trackTheme = this.options.trackTheme ? this.options.trackTheme : parentTheme,
4641
+
4642
+ cType = control[ 0 ].nodeName.toLowerCase(),
4643
+
4644
+ selectClass = ( cType == "select" ) ? "ui-slider-switch" : "",
4645
+
4646
+ controlID = control.attr( "id" ),
4647
+
4648
+ labelID = controlID + "-label",
4649
+
4650
+ label = $( "[for='"+ controlID +"']" ).attr( "id", labelID ),
4651
+
4652
+ val = function() {
4653
+ return cType == "input" ? parseFloat( control.val() ) : control[0].selectedIndex;
4654
+ },
4655
+
4656
+ min = cType == "input" ? parseFloat( control.attr( "min" ) ) : 0,
4657
+
4658
+ max = cType == "input" ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length-1,
4659
+
4660
+ step = window.parseFloat( control.attr( "step" ) || 1 ),
4661
+
4662
+ slider = $( "<div class='ui-slider " + selectClass + " ui-btn-down-" + trackTheme +
4663
+ " ui-btn-corner-all' role='application'></div>" ),
4664
+
4665
+ handle = $( "<a href='#' class='ui-slider-handle'></a>" )
4666
+ .appendTo( slider )
4667
+ .buttonMarkup({ corners: true, theme: theme, shadow: true })
4668
+ .attr({
4669
+ "role": "slider",
4670
+ "aria-valuemin": min,
4671
+ "aria-valuemax": max,
4672
+ "aria-valuenow": val(),
4673
+ "aria-valuetext": val(),
4674
+ "title": val(),
4675
+ "aria-labelledby": labelID
4676
+ }),
4677
+ options;
4678
+
4679
+ $.extend( this, {
4680
+ slider: slider,
4681
+ handle: handle,
4682
+ dragging: false,
4683
+ beforeStart: null,
4684
+ userModified: false
4685
+ });
4686
+
4687
+ if ( cType == "select" ) {
4688
+
4689
+ slider.wrapInner( "<div class='ui-slider-inneroffset'></div>" );
4690
+
4691
+ options = control.find( "option" );
4692
+
4693
+ control.find( "option" ).each(function( i ) {
4694
+
4695
+ var side = !i ? "b":"a",
4696
+ corners = !i ? "right" :"left",
4697
+ theme = !i ? " ui-btn-down-" + trackTheme :( " " + $.mobile.activeBtnClass );
4698
+
4699
+ $( "<div class='ui-slider-labelbg ui-slider-labelbg-" + side + theme + " ui-btn-corner-" + corners + "'></div>" )
4700
+ .prependTo( slider );
4701
+
4702
+ $( "<span class='ui-slider-label ui-slider-label-" + side + theme + " ui-btn-corner-" + corners + "' role='img'>" + $( this ).text() + "</span>" )
4703
+ .prependTo( handle );
4704
+ });
4705
+
4706
+ }
4707
+
4708
+ label.addClass( "ui-slider" );
4709
+
4710
+ // monitor the input for updated values
4711
+ control.addClass( cType === "input" ? "ui-slider-input" : "ui-slider-switch" )
4712
+ .change( function() {
4713
+ self.refresh( val(), true );
4714
+ })
4715
+ .keyup( function() { // necessary?
4716
+ self.refresh( val(), true, true );
4717
+ })
4718
+ .blur( function() {
4719
+ self.refresh( val(), true );
4720
+ });
4721
+
4722
+ // prevent screen drag when slider activated
4723
+ $( document ).bind( "vmousemove", function( event ) {
4724
+ if ( self.dragging ) {
4725
+ self.refresh( event );
4726
+ self.userModified = self.userModified || self.beforeStart !== control[0].selectedIndex;
4727
+ return false;
4728
+ }
4729
+ });
4730
+
4731
+ slider.bind( "vmousedown", function( event ) {
4732
+ self.dragging = true;
4733
+ self.userModified = false;
4734
+
4735
+ if ( cType === "select" ) {
4736
+ self.beforeStart = control[0].selectedIndex;
4737
+ }
4738
+ self.refresh( event );
4739
+ return false;
4740
+ });
4741
+
4742
+ slider.add( document )
4743
+ .bind( "vmouseup", function() {
4744
+ if ( self.dragging ) {
4745
+
4746
+ self.dragging = false;
4747
+
4748
+ if ( cType === "select" ) {
4749
+
4750
+ if ( !self.userModified ) {
4751
+ //tap occurred, but value didn't change. flip it!
4752
+ handle.addClass( "ui-slider-handle-snapping" );
4753
+ self.refresh( !self.beforeStart ? 1 : 0 );
4754
+ }
4755
+ }
4756
+ return false;
4757
+ }
4758
+ });
4759
+
4760
+ slider.insertAfter( control );
4761
+
4762
+ // NOTE force focus on handle
4763
+ this.handle
4764
+ .bind( "vmousedown", function() {
4765
+ $( this ).focus();
4766
+ })
4767
+ .bind( "vclick", false );
4768
+
4769
+ this.handle
4770
+ .bind( "keydown", function( event ) {
4771
+ var index = val();
4772
+
4773
+ if ( self.options.disabled ) {
4774
+ return;
4775
+ }
4776
+
4777
+ // In all cases prevent the default and mark the handle as active
4778
+ switch ( event.keyCode ) {
4779
+ case $.mobile.keyCode.HOME:
4780
+ case $.mobile.keyCode.END:
4781
+ case $.mobile.keyCode.PAGE_UP:
4782
+ case $.mobile.keyCode.PAGE_DOWN:
4783
+ case $.mobile.keyCode.UP:
4784
+ case $.mobile.keyCode.RIGHT:
4785
+ case $.mobile.keyCode.DOWN:
4786
+ case $.mobile.keyCode.LEFT:
4787
+ event.preventDefault();
4788
+
4789
+ if ( !self._keySliding ) {
4790
+ self._keySliding = true;
4791
+ $( this ).addClass( "ui-state-active" );
4792
+ }
4793
+ break;
4794
+ }
4795
+
4796
+ // move the slider according to the keypress
4797
+ switch ( event.keyCode ) {
4798
+ case $.mobile.keyCode.HOME:
4799
+ self.refresh( min );
4800
+ break;
4801
+ case $.mobile.keyCode.END:
4802
+ self.refresh( max );
4803
+ break;
4804
+ case $.mobile.keyCode.PAGE_UP:
4805
+ case $.mobile.keyCode.UP:
4806
+ case $.mobile.keyCode.RIGHT:
4807
+ self.refresh( index + step );
4808
+ break;
4809
+ case $.mobile.keyCode.PAGE_DOWN:
4810
+ case $.mobile.keyCode.DOWN:
4811
+ case $.mobile.keyCode.LEFT:
4812
+ self.refresh( index - step );
4813
+ break;
4814
+ }
4815
+ }) // remove active mark
4816
+ .keyup( function( event ) {
4817
+ if ( self._keySliding ) {
4818
+ self._keySliding = false;
4819
+ $( this ).removeClass( "ui-state-active" );
4820
+ }
4821
+ });
4822
+
4823
+ this.refresh(undefined, undefined, true);
4824
+ },
4825
+
4826
+ refresh: function( val, isfromControl, preventInputUpdate ) {
4827
+ if ( this.options.disabled ) { return; }
4828
+
4829
+ var control = this.element, percent,
4830
+ cType = control[0].nodeName.toLowerCase(),
4831
+ min = cType === "input" ? parseFloat( control.attr( "min" ) ) : 0,
4832
+ max = cType === "input" ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length - 1;
4833
+
4834
+ if ( typeof val === "object" ) {
4835
+ var data = val,
4836
+ // a slight tolerance helped get to the ends of the slider
4837
+ tol = 8;
4838
+ if ( !this.dragging ||
4839
+ data.pageX < this.slider.offset().left - tol ||
4840
+ data.pageX > this.slider.offset().left + this.slider.width() + tol ) {
4841
+ return;
4842
+ }
4843
+ percent = Math.round( ( ( data.pageX - this.slider.offset().left ) / this.slider.width() ) * 100 );
4844
+ } else {
4845
+ if ( val == null ) {
4846
+ val = cType === "input" ? parseFloat( control.val() ) : control[0].selectedIndex;
4847
+ }
4848
+ percent = ( parseFloat( val ) - min ) / ( max - min ) * 100;
4849
+ }
4850
+
4851
+ if ( isNaN( percent ) ) {
4852
+ return;
4853
+ }
4854
+
4855
+ if ( percent < 0 ) {
4856
+ percent = 0;
4857
+ }
4858
+
4859
+ if ( percent > 100 ) {
4860
+ percent = 100;
4861
+ }
4862
+
4863
+ var newval = Math.round( ( percent / 100 ) * ( max - min ) ) + min;
4864
+
4865
+ if ( newval < min ) {
4866
+ newval = min;
4867
+ }
4868
+
4869
+ if ( newval > max ) {
4870
+ newval = max;
4871
+ }
4872
+
4873
+ // Flip the stack of the bg colors
4874
+ if ( percent > 60 && cType === "select" ) {
4875
+ // TODO: Dead path?
4876
+ }
4877
+ this.handle.css( "left", percent + "%" );
4878
+ this.handle.attr( {
4879
+ "aria-valuenow": cType === "input" ? newval : control.find( "option" ).eq( newval ).attr( "value" ),
4880
+ "aria-valuetext": cType === "input" ? newval : control.find( "option" ).eq( newval ).text(),
4881
+ title: newval
4882
+ });
4883
+
4884
+ // add/remove classes for flip toggle switch
4885
+ if ( cType === "select" ) {
4886
+ if ( newval === 0 ) {
4887
+ this.slider.addClass( "ui-slider-switch-a" )
4888
+ .removeClass( "ui-slider-switch-b" );
4889
+ } else {
4890
+ this.slider.addClass( "ui-slider-switch-b" )
4891
+ .removeClass( "ui-slider-switch-a" );
4892
+ }
4893
+ }
4894
+
4895
+ if ( !preventInputUpdate ) {
4896
+ // update control"s value
4897
+ if ( cType === "input" ) {
4898
+ control.val( newval );
4899
+ } else {
4900
+ control[ 0 ].selectedIndex = newval;
4901
+ }
4902
+ if ( !isfromControl ) {
4903
+ control.trigger( "change" );
4904
+ }
4905
+ }
4906
+ },
4907
+
4908
+ enable: function() {
4909
+ this.element.attr( "disabled", false );
4910
+ this.slider.removeClass( "ui-disabled" ).attr( "aria-disabled", false );
4911
+ return this._setOption( "disabled", false );
4912
+ },
4913
+
4914
+ disable: function() {
4915
+ this.element.attr( "disabled", true );
4916
+ this.slider.addClass( "ui-disabled" ).attr( "aria-disabled", true );
4917
+ return this._setOption( "disabled", true );
4918
+ }
4919
+
4920
+ });
4921
+
4922
+ //auto self-init widgets
4923
+ $( document ).bind( "pagecreate create", function( e ){
4924
+
4925
+ $( $.mobile.slider.prototype.options.initSelector, e.target )
4926
+ .not( ":jqmData(role='none'), :jqmData(role='nojs')" )
4927
+ .slider();
4928
+
4929
+ });
4930
+
4931
+ })( jQuery );
4932
+ /*
4933
+ * jQuery Mobile Framework : "textinput" plugin for text inputs, textareas
4934
+ * Copyright (c) jQuery Project
4935
+ * Dual licensed under the MIT or GPL Version 2 licenses.
4936
+ * http://jquery.org/license
4937
+ */
4938
+
4939
+ (function( $, undefined ) {
4940
+
4941
+ $.widget( "mobile.textinput", $.mobile.widget, {
4942
+ options: {
4943
+ theme: null,
4944
+ initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea"
4945
+ },
4946
+
4947
+ _create: function() {
4948
+
4949
+ var input = this.element,
4950
+ o = this.options,
4951
+ theme = o.theme,
4952
+ themedParent, themeclass, themeLetter, focusedEl, clearbtn;
4953
+
4954
+ if ( !theme ) {
4955
+ themedParent = this.element.closest( "[class*='ui-bar-'],[class*='ui-body-']" );
4956
+ themeLetter = themedParent.length && /ui-(bar|body)-([a-z])/.exec( themedParent.attr( "class" ) );
4957
+ theme = themeLetter && themeLetter[2] || "c";
4958
+ }
4959
+
4960
+ themeclass = " ui-body-" + theme;
4961
+
4962
+ $( "label[for='" + input.attr( "id" ) + "']" ).addClass( "ui-input-text" );
4963
+
4964
+ input.addClass("ui-input-text ui-body-"+ o.theme );
4965
+
4966
+ focusedEl = input;
4967
+
4968
+ // XXX: Temporary workaround for issue 785. Turn off autocorrect and
4969
+ // autocomplete since the popup they use can't be dismissed by
4970
+ // the user. Note that we test for the presence of the feature
4971
+ // by looking for the autocorrect property on the input element.
4972
+ if ( typeof input[0].autocorrect !== "undefined" ) {
4973
+ // Set the attribute instead of the property just in case there
4974
+ // is code that attempts to make modifications via HTML.
4975
+ input[0].setAttribute( "autocorrect", "off" );
4976
+ input[0].setAttribute( "autocomplete", "off" );
4977
+ }
4978
+
4979
+
4980
+ //"search" input widget
4981
+ if ( input.is( "[type='search'],:jqmData(type='search')" ) ) {
4982
+
4983
+ focusedEl = input.wrap( "<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield" + themeclass + "'></div>" ).parent();
4984
+ clearbtn = $( "<a href='#' class='ui-input-clear' title='clear text'>clear text</a>" )
4985
+ .tap(function( event ) {
4986
+ input.val( "" ).focus();
4987
+ input.trigger( "change" );
4988
+ clearbtn.addClass( "ui-input-clear-hidden" );
4989
+ event.preventDefault();
4990
+ })
4991
+ .appendTo( focusedEl )
4992
+ .buttonMarkup({
4993
+ icon: "delete",
4994
+ iconpos: "notext",
4995
+ corners: true,
4996
+ shadow: true
4997
+ });
4998
+
4999
+ function toggleClear() {
5000
+ if ( !input.val() ) {
5001
+ clearbtn.addClass( "ui-input-clear-hidden" );
5002
+ } else {
5003
+ clearbtn.removeClass( "ui-input-clear-hidden" );
5004
+ }
5005
+ }
5006
+
5007
+ toggleClear();
5008
+
5009
+ input.keyup( toggleClear )
5010
+ .focus( toggleClear );
5011
+
5012
+ } else {
5013
+ input.addClass( "ui-corner-all ui-shadow-inset" + themeclass );
5014
+ }
5015
+
5016
+ input.focus(function() {
5017
+ focusedEl.addClass( "ui-focus" );
5018
+ })
5019
+ .blur(function(){
5020
+ focusedEl.removeClass( "ui-focus" );
5021
+ });
5022
+
5023
+ // Autogrow
5024
+ if ( input.is( "textarea" ) ) {
5025
+ var extraLineHeight = 15,
5026
+ keyupTimeoutBuffer = 100,
5027
+ keyup = function() {
5028
+ var scrollHeight = input[ 0 ].scrollHeight,
5029
+ clientHeight = input[ 0 ].clientHeight;
5030
+
5031
+ if ( clientHeight < scrollHeight ) {
5032
+ input.css({
5033
+ height: (scrollHeight + extraLineHeight)
5034
+ });
5035
+ }
5036
+ },
5037
+ keyupTimeout;
5038
+
5039
+ input.keyup(function() {
5040
+ clearTimeout( keyupTimeout );
5041
+ keyupTimeout = setTimeout( keyup, keyupTimeoutBuffer );
5042
+ });
5043
+ }
5044
+ },
5045
+
5046
+ disable: function(){
5047
+ ( this.element.attr( "disabled", true ).is( "[type='search'],:jqmData(type='search')" ) ?
5048
+ this.element.parent() : this.element ).addClass( "ui-disabled" );
5049
+ },
5050
+
5051
+ enable: function(){
5052
+ ( this.element.attr( "disabled", false).is( "[type='search'],:jqmData(type='search')" ) ?
5053
+ this.element.parent() : this.element ).removeClass( "ui-disabled" );
5054
+ }
5055
+ });
5056
+
5057
+ //auto self-init widgets
5058
+ $( document ).bind( "pagecreate create", function( e ){
5059
+
5060
+ $( $.mobile.textinput.prototype.options.initSelector, e.target )
5061
+ .not( ":jqmData(role='none'), :jqmData(role='nojs')" )
5062
+ .textinput();
5063
+
5064
+ });
5065
+
5066
+ })( jQuery );
5067
+ /*
5068
+ * jQuery Mobile Framework : custom "selectmenu" plugin
5069
+ * Copyright (c) jQuery Project
5070
+ * Dual licensed under the MIT or GPL Version 2 licenses.
5071
+ * http://jquery.org/license
5072
+ */
5073
+
5074
+ (function( $, undefined ) {
5075
+ var extendSelect = function( widget ){
5076
+
5077
+ var select = widget.select,
5078
+ selectID = widget.selectID,
5079
+ label = widget.label,
5080
+ thisPage = widget.select.closest( ".ui-page" ),
5081
+ screen = $( "<div>", {"class": "ui-selectmenu-screen ui-screen-hidden"} ).appendTo( thisPage ),
5082
+ selectOptions = widget.select.find("option"),
5083
+ isMultiple = widget.isMultiple = widget.select[ 0 ].multiple,
5084
+ buttonId = selectID + "-button",
5085
+ menuId = selectID + "-menu",
5086
+ menuPage = $( "<div data-" + $.mobile.ns + "role='dialog' data-" +$.mobile.ns + "theme='"+ widget.options.menuPageTheme +"'>" +
5087
+ "<div data-" + $.mobile.ns + "role='header'>" +
5088
+ "<div class='ui-title'>" + label.text() + "</div>"+
5089
+ "</div>"+
5090
+ "<div data-" + $.mobile.ns + "role='content'></div>"+
5091
+ "</div>" ).appendTo( $.mobile.pageContainer ).page(),
5092
+
5093
+ listbox = $("<div>", { "class": "ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-body-" + widget.options.overlayTheme + " " + $.mobile.defaultDialogTransition } ).insertAfter(screen),
5094
+
5095
+ list = $( "<ul>", {
5096
+ "class": "ui-selectmenu-list",
5097
+ "id": menuId,
5098
+ "role": "listbox",
5099
+ "aria-labelledby": buttonId
5100
+ }).attr( "data-" + $.mobile.ns + "theme", widget.options.theme ).appendTo( listbox ),
5101
+
5102
+ header = $( "<div>", {
5103
+ "class": "ui-header ui-bar-" + widget.options.theme
5104
+ }).prependTo( listbox ),
5105
+
5106
+ headerTitle = $( "<h1>", {
5107
+ "class": "ui-title"
5108
+ }).appendTo( header ),
5109
+
5110
+ headerClose = $( "<a>", {
5111
+ "text": widget.options.closeText,
5112
+ "href": "#",
5113
+ "class": "ui-btn-left"
5114
+ }).attr( "data-" + $.mobile.ns + "iconpos", "notext" ).attr( "data-" + $.mobile.ns + "icon", "delete" ).appendTo( header ).buttonMarkup(),
5115
+
5116
+ menuPageContent = menuPage.find( ".ui-content" ),
5117
+
5118
+ menuPageClose = menuPage.find( ".ui-header a" );
5119
+
5120
+
5121
+ $.extend( widget, {
5122
+ select: widget.select,
5123
+ selectID: selectID,
5124
+ buttonId: buttonId,
5125
+ menuId: menuId,
5126
+ thisPage: thisPage,
5127
+ menuPage: menuPage,
5128
+ label: label,
5129
+ screen: screen,
5130
+ selectOptions: selectOptions,
5131
+ isMultiple: isMultiple,
5132
+ theme: widget.options.theme,
5133
+ listbox: listbox,
5134
+ list: list,
5135
+ header: header,
5136
+ headerTitle: headerTitle,
5137
+ headerClose: headerClose,
5138
+ menuPageContent: menuPageContent,
5139
+ menuPageClose: menuPageClose,
5140
+ placeholder: "",
5141
+
5142
+ build: function() {
5143
+ var self = this;
5144
+
5145
+ // Create list from select, update state
5146
+ self.refresh();
5147
+
5148
+ self.select.attr( "tabindex", "-1" ).focus(function() {
5149
+ $( this ).blur();
5150
+ self.button.focus();
5151
+ });
5152
+
5153
+ // Button events
5154
+ self.button.bind( "vclick keydown" , function( event ) {
5155
+ if ( event.type == "vclick" ||
5156
+ event.keyCode && ( event.keyCode === $.mobile.keyCode.ENTER ||
5157
+ event.keyCode === $.mobile.keyCode.SPACE ) ) {
5158
+
5159
+ self.open();
5160
+ event.preventDefault();
5161
+ }
5162
+ });
5163
+
5164
+ // Events for list items
5165
+ self.list.attr( "role", "listbox" )
5166
+ .delegate( ".ui-li>a", "focusin", function() {
5167
+ $( this ).attr( "tabindex", "0" );
5168
+ })
5169
+ .delegate( ".ui-li>a", "focusout", function() {
5170
+ $( this ).attr( "tabindex", "-1" );
5171
+ })
5172
+ .delegate( "li:not(.ui-disabled, .ui-li-divider)", "click", function( event ) {
5173
+
5174
+ // index of option tag to be selected
5175
+ var oldIndex = self.select[ 0 ].selectedIndex,
5176
+ newIndex = self.list.find( "li:not(.ui-li-divider)" ).index( this ),
5177
+ option = self.selectOptions.eq( newIndex )[ 0 ];
5178
+
5179
+ // toggle selected status on the tag for multi selects
5180
+ option.selected = self.isMultiple ? !option.selected : true;
5181
+
5182
+ // toggle checkbox class for multiple selects
5183
+ if ( self.isMultiple ) {
5184
+ $( this ).find( ".ui-icon" )
5185
+ .toggleClass( "ui-icon-checkbox-on", option.selected )
5186
+ .toggleClass( "ui-icon-checkbox-off", !option.selected );
5187
+ }
5188
+
5189
+ // trigger change if value changed
5190
+ if ( self.isMultiple || oldIndex !== newIndex ) {
5191
+ self.select.trigger( "change" );
5192
+ }
5193
+
5194
+ //hide custom select for single selects only
5195
+ if ( !self.isMultiple ) {
5196
+ self.close();
5197
+ }
5198
+
5199
+ event.preventDefault();
5200
+ })
5201
+ .keydown(function( event ) { //keyboard events for menu items
5202
+ var target = $( event.target ),
5203
+ li = target.closest( "li" ),
5204
+ prev, next;
5205
+
5206
+ // switch logic based on which key was pressed
5207
+ switch ( event.keyCode ) {
5208
+ // up or left arrow keys
5209
+ case 38:
5210
+ prev = li.prev();
5211
+
5212
+ // if there's a previous option, focus it
5213
+ if ( prev.length ) {
5214
+ target
5215
+ .blur()
5216
+ .attr( "tabindex", "-1" );
5217
+
5218
+ prev.find( "a" ).first().focus();
5219
+ }
5220
+
5221
+ return false;
5222
+ break;
5223
+
5224
+ // down or right arrow keys
5225
+ case 40:
5226
+ next = li.next();
5227
+
5228
+ // if there's a next option, focus it
5229
+ if ( next.length ) {
5230
+ target
5231
+ .blur()
5232
+ .attr( "tabindex", "-1" );
5233
+
5234
+ next.find( "a" ).first().focus();
5235
+ }
5236
+
5237
+ return false;
5238
+ break;
5239
+
5240
+ // If enter or space is pressed, trigger click
5241
+ case 13:
5242
+ case 32:
5243
+ target.trigger( "click" );
5244
+
5245
+ return false;
5246
+ break;
5247
+ }
5248
+ });
5249
+
5250
+ // button refocus ensures proper height calculation
5251
+ // by removing the inline style and ensuring page inclusion
5252
+ self.menuPage.bind( "pagehide", function() {
5253
+ self.list.appendTo( self.listbox );
5254
+ self._focusButton();
5255
+ });
5256
+
5257
+ // Events on "screen" overlay
5258
+ self.screen.bind( "vclick", function( event ) {
5259
+ self.close();
5260
+ });
5261
+
5262
+ // Close button on small overlays
5263
+ self.headerClose.click( function() {
5264
+ if ( self.menuType == "overlay" ) {
5265
+ self.close();
5266
+ return false;
5267
+ }
5268
+ });
5269
+ },
5270
+
5271
+ refresh: function( forceRebuild ){
5272
+ var self = this,
5273
+ select = this.element,
5274
+ isMultiple = this.isMultiple,
5275
+ options = this.selectOptions = select.find( "option" ),
5276
+ selected = this.selected(),
5277
+ // return an array of all selected index's
5278
+ indicies = this.selectedIndices();
5279
+
5280
+ if ( forceRebuild || select[0].options.length != self.list.find( "li" ).length ) {
5281
+ self._buildList();
5282
+ }
5283
+
5284
+ self.setButtonText();
5285
+ self.setButtonCount();
5286
+
5287
+ self.list.find( "li:not(.ui-li-divider)" )
5288
+ .removeClass( $.mobile.activeBtnClass )
5289
+ .attr( "aria-selected", false )
5290
+ .each(function( i ) {
5291
+
5292
+ if ( $.inArray( i, indicies ) > -1 ) {
5293
+ var item = $( this );
5294
+
5295
+ // Aria selected attr
5296
+ item.attr( "aria-selected", true );
5297
+
5298
+ // Multiple selects: add the "on" checkbox state to the icon
5299
+ if ( self.isMultiple ) {
5300
+ item.find( ".ui-icon" ).removeClass( "ui-icon-checkbox-off" ).addClass( "ui-icon-checkbox-on" );
5301
+ } else {
5302
+ item.addClass( $.mobile.activeBtnClass );
5303
+ }
5304
+ }
5305
+ });
5306
+ },
5307
+
5308
+ close: function() {
5309
+ if ( this.options.disabled || !this.isOpen ) {
5310
+ return;
5311
+ }
5312
+
5313
+ var self = this;
5314
+
5315
+ if ( self.menuType == "page" ) {
5316
+ // TODO centralize page removal binding / handling in the page plugin.
5317
+ // Suggestion from @jblas to do refcounting
5318
+ //
5319
+ // rebind the page remove that was unbound in the open function
5320
+ // to allow for the parent page removal from actions other than the use
5321
+ // of a dialog sized custom select
5322
+ if( !self.thisPage.data("page").options.domCache ){
5323
+ self.thisPage.bind( "pagehide.remove", function() {
5324
+ $(self).remove();
5325
+ });
5326
+ }
5327
+
5328
+ // doesn't solve the possible issue with calling change page
5329
+ // where the objects don't define data urls which prevents dialog key
5330
+ // stripping - changePage has incoming refactor
5331
+ window.history.back();
5332
+ } else {
5333
+ self.screen.addClass( "ui-screen-hidden" );
5334
+ self.listbox.addClass( "ui-selectmenu-hidden" ).removeAttr( "style" ).removeClass( "in" );
5335
+ self.list.appendTo( self.listbox );
5336
+ self._focusButton();
5337
+ }
5338
+
5339
+ // allow the dialog to be closed again
5340
+ self.isOpen = false;
5341
+ },
5342
+
5343
+ open: function() {
5344
+ if ( this.options.disabled ) {
5345
+ return;
5346
+ }
5347
+
5348
+ var self = this,
5349
+ menuHeight = self.list.parent().outerHeight(),
5350
+ menuWidth = self.list.parent().outerWidth(),
5351
+ scrollTop = $( window ).scrollTop(),
5352
+ btnOffset = self.button.offset().top,
5353
+ screenHeight = window.innerHeight,
5354
+ screenWidth = window.innerWidth;
5355
+
5356
+ //add active class to button
5357
+ self.button.addClass( $.mobile.activeBtnClass );
5358
+
5359
+ //remove after delay
5360
+ setTimeout( function() {
5361
+ self.button.removeClass( $.mobile.activeBtnClass );
5362
+ }, 300);
5363
+
5364
+ function focusMenuItem() {
5365
+ self.list.find( $.mobile.activeBtnClass ).focus();
5366
+ }
5367
+
5368
+ if ( menuHeight > screenHeight - 80 || !$.support.scrollTop ) {
5369
+ // prevent the parent page from being removed from the DOM,
5370
+ // otherwise the results of selecting a list item in the dialog
5371
+ // fall into a black hole
5372
+ self.thisPage.unbind( "pagehide.remove" );
5373
+
5374
+ //for webos (set lastscroll using button offset)
5375
+ if ( scrollTop == 0 && btnOffset > screenHeight ) {
5376
+ self.thisPage.one( "pagehide", function() {
5377
+ $( this ).jqmData( "lastScroll", btnOffset );
5378
+ });
5379
+ }
5380
+
5381
+ self.menuPage.one( "pageshow", function() {
5382
+ // silentScroll() is called whenever a page is shown to restore
5383
+ // any previous scroll position the page may have had. We need to
5384
+ // wait for the "silentscroll" event before setting focus to avoid
5385
+ // the browser"s "feature" which offsets rendering to make sure
5386
+ // whatever has focus is in view.
5387
+ $( window ).one( "silentscroll", function() {
5388
+ focusMenuItem();
5389
+ });
5390
+
5391
+ self.isOpen = true;
5392
+ });
5393
+
5394
+ self.menuType = "page";
5395
+ self.menuPageContent.append( self.list );
5396
+ $.mobile.changePage( self.menuPage, {
5397
+ transition: $.mobile.defaultDialogTransition
5398
+ });
5399
+ } else {
5400
+ self.menuType = "overlay";
5401
+
5402
+ self.screen.height( $(document).height() )
5403
+ .removeClass( "ui-screen-hidden" );
5404
+
5405
+ // Try and center the overlay over the button
5406
+ var roomtop = btnOffset - scrollTop,
5407
+ roombot = scrollTop + screenHeight - btnOffset,
5408
+ halfheight = menuHeight / 2,
5409
+ maxwidth = parseFloat( self.list.parent().css( "max-width" ) ),
5410
+ newtop, newleft;
5411
+
5412
+ if ( roomtop > menuHeight / 2 && roombot > menuHeight / 2 ) {
5413
+ newtop = btnOffset + ( self.button.outerHeight() / 2 ) - halfheight;
5414
+ } else {
5415
+ // 30px tolerance off the edges
5416
+ newtop = roomtop > roombot ? scrollTop + screenHeight - menuHeight - 30 : scrollTop + 30;
5417
+ }
5418
+
5419
+ // If the menuwidth is smaller than the screen center is
5420
+ if ( menuWidth < maxwidth ) {
5421
+ newleft = ( screenWidth - menuWidth ) / 2;
5422
+ } else {
5423
+
5424
+ //otherwise insure a >= 30px offset from the left
5425
+ newleft = self.button.offset().left + self.button.outerWidth() / 2 - menuWidth / 2;
5426
+
5427
+ // 30px tolerance off the edges
5428
+ if ( newleft < 30 ) {
5429
+ newleft = 30;
5430
+ } else if ( (newleft + menuWidth) > screenWidth ) {
5431
+ newleft = screenWidth - menuWidth - 30;
5432
+ }
5433
+ }
5434
+
5435
+ self.listbox.append( self.list )
5436
+ .removeClass( "ui-selectmenu-hidden" )
5437
+ .css({
5438
+ top: newtop,
5439
+ left: newleft
5440
+ })
5441
+ .addClass( "in" );
5442
+
5443
+ focusMenuItem();
5444
+
5445
+ // duplicate with value set in page show for dialog sized selects
5446
+ self.isOpen = true;
5447
+ }
5448
+ },
5449
+
5450
+ _buildList: function() {
5451
+ var self = this,
5452
+ o = this.options,
5453
+ placeholder = this.placeholder,
5454
+ optgroups = [],
5455
+ lis = [],
5456
+ dataIcon = self.isMultiple ? "checkbox-off" : "false";
5457
+
5458
+ self.list.empty().filter( ".ui-listview" ).listview( "destroy" );
5459
+
5460
+ // Populate menu with options from select element
5461
+ self.select.find( "option" ).each( function( i ) {
5462
+ var $this = $( this ),
5463
+ $parent = $this.parent(),
5464
+ text = $this.text(),
5465
+ anchor = "<a href='#'>"+ text +"</a>",
5466
+ classes = [],
5467
+ extraAttrs = [];
5468
+
5469
+ // Are we inside an optgroup?
5470
+ if ( $parent.is( "optgroup" ) ) {
5471
+ var optLabel = $parent.attr( "label" );
5472
+
5473
+ // has this optgroup already been built yet?
5474
+ if ( $.inArray( optLabel, optgroups ) === -1 ) {
5475
+ lis.push( "<li data-" + $.mobile.ns + "role='list-divider'>"+ optLabel +"</li>" );
5476
+ optgroups.push( optLabel );
5477
+ }
5478
+ }
5479
+
5480
+ // Find placeholder text
5481
+ // TODO: Are you sure you want to use getAttribute? ^RW
5482
+ if ( !this.getAttribute( "value" ) || text.length == 0 || $this.jqmData( "placeholder" ) ) {
5483
+ if ( o.hidePlaceholderMenuItems ) {
5484
+ classes.push( "ui-selectmenu-placeholder" );
5485
+ }
5486
+ placeholder = self.placeholder = text;
5487
+ }
5488
+
5489
+ // support disabled option tags
5490
+ if ( this.disabled ) {
5491
+ classes.push( "ui-disabled" );
5492
+ extraAttrs.push( "aria-disabled='true'" );
5493
+ }
5494
+
5495
+ lis.push( "<li data-" + $.mobile.ns + "option-index='" + i + "' data-" + $.mobile.ns + "icon='"+ dataIcon +"' class='"+ classes.join(" ") + "' " + extraAttrs.join(" ") +">"+ anchor +"</li>" );
5496
+ });
5497
+
5498
+ self.list.html( lis.join(" ") );
5499
+
5500
+ self.list.find( "li" )
5501
+ .attr({ "role": "option", "tabindex": "-1" })
5502
+ .first().attr( "tabindex", "0" );
5503
+
5504
+ // Hide header close link for single selects
5505
+ if ( !this.isMultiple ) {
5506
+ this.headerClose.hide();
5507
+ }
5508
+
5509
+ // Hide header if it's not a multiselect and there's no placeholder
5510
+ if ( !this.isMultiple && !placeholder.length ) {
5511
+ this.header.hide();
5512
+ } else {
5513
+ this.headerTitle.text( this.placeholder );
5514
+ }
5515
+
5516
+ // Now populated, create listview
5517
+ self.list.listview();
5518
+ },
5519
+
5520
+ _button: function(){
5521
+ return $( "<a>", {
5522
+ "href": "#",
5523
+ "role": "button",
5524
+ // TODO value is undefined at creation
5525
+ "id": this.buttonId,
5526
+ "aria-haspopup": "true",
5527
+
5528
+ // TODO value is undefined at creation
5529
+ "aria-owns": this.menuId
5530
+ });
5531
+ }
5532
+ });
5533
+ };
5534
+
5535
+ $( "select" ).live( "selectmenubeforecreate", function(){
5536
+ var selectmenuWidget = $( this ).data( "selectmenu" );
5537
+
5538
+ if( !selectmenuWidget.options.nativeMenu ){
5539
+ extendSelect( selectmenuWidget );
5540
+ }
5541
+ });
5542
+ })( jQuery );
5543
+ /*
5544
+ * jQuery Mobile Framework : "selectmenu" plugin
5545
+ * Copyright (c) jQuery Project
5546
+ * Dual licensed under the MIT or GPL Version 2 licenses.
5547
+ * http://jquery.org/license
5548
+ */
5549
+
5550
+ (function( $, undefined ) {
5551
+
5552
+ $.widget( "mobile.selectmenu", $.mobile.widget, {
5553
+ options: {
5554
+ theme: null,
5555
+ disabled: false,
5556
+ icon: "arrow-d",
5557
+ iconpos: "right",
5558
+ inline: null,
5559
+ corners: true,
5560
+ shadow: true,
5561
+ iconshadow: true,
5562
+ menuPageTheme: "b",
5563
+ overlayTheme: "a",
5564
+ hidePlaceholderMenuItems: true,
5565
+ closeText: "Close",
5566
+ nativeMenu: true,
5567
+ initSelector: "select:not(:jqmData(role='slider'))"
5568
+ },
5569
+
5570
+ _button: function(){
5571
+ return $( "<div/>" );
5572
+ },
5573
+
5574
+ _theme: function(){
5575
+ var themedParent, theme;
5576
+ // if no theme is defined, try to find closest theme container
5577
+ // TODO move to core as something like findCurrentTheme
5578
+ themedParent = this.select.closest( "[class*='ui-bar-'], [class*='ui-body-']" );
5579
+ theme = themedParent.length ?
5580
+ /ui-(bar|body)-([a-z])/.exec( themedParent.attr( "class" ) )[2] :
5581
+ "c";
5582
+
5583
+ return theme;
5584
+ },
5585
+
5586
+ _setDisabled: function( value ) {
5587
+ this.element.attr( "disabled", value );
5588
+ this.button.attr( "aria-disabled", value );
5589
+ return this._setOption( "disabled", value );
5590
+ },
5591
+
5592
+ _focusButton : function() {
5593
+ var self = this;
5594
+
5595
+ setTimeout( function() {
5596
+ self.button.focus();
5597
+ }, 40);
5598
+ },
5599
+
5600
+ // setup items that are generally necessary for select menu extension
5601
+ _preExtension: function(){
5602
+ this.select = this.element.wrap( "<div class='ui-select'>" );
5603
+ this.selectID = this.select.attr( "id" );
5604
+ this.label = $( "label[for='"+ this.selectID +"']" ).addClass( "ui-select" );
5605
+ this.isMultiple = this.select[ 0 ].multiple;
5606
+ this.options.theme = this._theme();
5607
+ this.selectOptions = this.select.find( "option" );
5608
+ },
5609
+
5610
+ _create: function() {
5611
+ this._preExtension();
5612
+
5613
+ // Allows for extension of the native select for custom selects and other plugins
5614
+ // see select.custom for example extension
5615
+ // TODO explore plugin registration
5616
+ this._trigger( "beforeCreate" );
5617
+
5618
+ this.button = this._button();
5619
+
5620
+ var self = this,
5621
+
5622
+ options = this.options,
5623
+
5624
+ // IE throws an exception at options.item() function when
5625
+ // there is no selected item
5626
+ // select first in this case
5627
+ selectedIndex = this.select[ 0 ].selectedIndex == -1 ? 0 : this.select[ 0 ].selectedIndex,
5628
+
5629
+ // TODO values buttonId and menuId are undefined here
5630
+ button = this.button
5631
+ .text( $( this.select[ 0 ].options.item( selectedIndex ) ).text() )
5632
+ .insertBefore( this.select )
5633
+ .buttonMarkup( {
5634
+ theme: options.theme,
5635
+ icon: options.icon,
5636
+ iconpos: options.iconpos,
5637
+ inline: options.inline,
5638
+ corners: options.corners,
5639
+ shadow: options.shadow,
5640
+ iconshadow: options.iconshadow
5641
+ });
5642
+
5643
+ // Opera does not properly support opacity on select elements
5644
+ // In Mini, it hides the element, but not its text
5645
+ // On the desktop,it seems to do the opposite
5646
+ // for these reasons, using the nativeMenu option results in a full native select in Opera
5647
+ if ( options.nativeMenu && window.opera && window.opera.version ) {
5648
+ this.select.addClass( "ui-select-nativeonly" );
5649
+ }
5650
+
5651
+ // Add counter for multi selects
5652
+ if ( this.isMultiple ) {
5653
+ this.buttonCount = $( "<span>" )
5654
+ .addClass( "ui-li-count ui-btn-up-c ui-btn-corner-all" )
5655
+ .hide()
5656
+ .appendTo( button );
5657
+ }
5658
+
5659
+ // Disable if specified
5660
+ if ( options.disabled ) {
5661
+ this.disable();
5662
+ }
5663
+
5664
+ // Events on native select
5665
+ this.select.change( function() {
5666
+ self.refresh();
5667
+ });
5668
+
5669
+ this.build();
5670
+ },
5671
+
5672
+ build: function() {
5673
+ var self = this;
5674
+
5675
+ this.select
5676
+ .appendTo( self.button )
5677
+ .bind( "vmousedown", function() {
5678
+ // Add active class to button
5679
+ self.button.addClass( $.mobile.activeBtnClass );
5680
+ })
5681
+ .bind( "focus vmouseover", function() {
5682
+ self.button.trigger( "vmouseover" );
5683
+ })
5684
+ .bind( "vmousemove", function() {
5685
+ // Remove active class on scroll/touchmove
5686
+ self.button.removeClass( $.mobile.activeBtnClass );
5687
+ })
5688
+ .bind( "change blur vmouseout", function() {
5689
+ self.button.trigger( "vmouseout" )
5690
+ .removeClass( $.mobile.activeBtnClass );
5691
+ })
5692
+ .bind( "change blur", function() {
5693
+ self.button.removeClass( "ui-btn-down-" + self.options.theme );
5694
+ });
5695
+ },
5696
+
5697
+ selected: function() {
5698
+ return this.selectOptions.filter( ":selected" );
5699
+ },
5700
+
5701
+ selectedIndices: function() {
5702
+ var self = this;
5703
+
5704
+ return this.selected().map( function() {
5705
+ return self.selectOptions.index( this );
5706
+ }).get();
5707
+ },
5708
+
5709
+ setButtonText: function() {
5710
+ var self = this, selected = this.selected();
5711
+
5712
+ this.button.find( ".ui-btn-text" ).text( function() {
5713
+ if ( !self.isMultiple ) {
5714
+ return selected.text();
5715
+ }
5716
+
5717
+ return selected.length ? selected.map( function() {
5718
+ return $( this ).text();
5719
+ }).get().join( ", " ) : self.placeholder;
5720
+ });
5721
+ },
5722
+
5723
+ setButtonCount: function() {
5724
+ var selected = this.selected();
5725
+
5726
+ // multiple count inside button
5727
+ if ( this.isMultiple ) {
5728
+ this.buttonCount[ selected.length > 1 ? "show" : "hide" ]().text( selected.length );
5729
+ }
5730
+ },
5731
+
5732
+ refresh: function() {
5733
+ this.setButtonText();
5734
+ this.setButtonCount();
5735
+ },
5736
+
5737
+ disable: function() {
5738
+ this._setDisabled( true );
5739
+ this.button.addClass( "ui-disabled" );
5740
+ },
5741
+
5742
+ enable: function() {
5743
+ this._setDisabled( false );
5744
+ this.button.removeClass( "ui-disabled" );
5745
+ }
5746
+ });
5747
+
5748
+ //auto self-init widgets
5749
+ $( document ).bind( "pagecreate create", function( e ){
5750
+ $( $.mobile.selectmenu.prototype.options.initSelector, e.target )
5751
+ .not( ":jqmData(role='none'), :jqmData(role='nojs')" )
5752
+ .selectmenu();
5753
+ });
5754
+ })( jQuery );
5755
+ /*
5756
+ * jQuery Mobile Framework : plugin for making button-like links
5757
+ * Copyright (c) jQuery Project
5758
+ * Dual licensed under the MIT or GPL Version 2 licenses.
5759
+ * http://jquery.org/license
5760
+ */
5761
+ ( function( $, undefined ) {
5762
+
5763
+ $.fn.buttonMarkup = function( options ) {
5764
+ return this.each( function() {
5765
+ var el = $( this ),
5766
+ o = $.extend( {}, $.fn.buttonMarkup.defaults, el.jqmData(), options ),
5767
+
5768
+ // Classes Defined
5769
+ innerClass = "ui-btn-inner",
5770
+ buttonClass, iconClass,
5771
+ themedParent, wrap;
5772
+
5773
+ if ( attachEvents ) {
5774
+ attachEvents();
5775
+ }
5776
+
5777
+ // if not, try to find closest theme container
5778
+ if ( !o.theme ) {
5779
+ themedParent = el.closest( "[class*='ui-bar-'],[class*='ui-body-']" );
5780
+ o.theme = themedParent.length ?
5781
+ /ui-(bar|body)-([a-z])/.exec( themedParent.attr( "class" ) )[2] :
5782
+ "c";
5783
+ }
5784
+
5785
+ buttonClass = "ui-btn ui-btn-up-" + o.theme;
5786
+
5787
+ if ( o.inline ) {
5788
+ buttonClass += " ui-btn-inline";
5789
+ }
5790
+
5791
+ if ( o.icon ) {
5792
+ o.icon = "ui-icon-" + o.icon;
5793
+ o.iconpos = o.iconpos || "left";
5794
+
5795
+ iconClass = "ui-icon " + o.icon;
5796
+
5797
+ if ( o.iconshadow ) {
5798
+ iconClass += " ui-icon-shadow";
5799
+ }
5800
+ }
5801
+
5802
+ if ( o.iconpos ) {
5803
+ buttonClass += " ui-btn-icon-" + o.iconpos;
5804
+
5805
+ if ( o.iconpos == "notext" && !el.attr( "title" ) ) {
5806
+ el.attr( "title", el.text() );
5807
+ }
5808
+ }
5809
+
5810
+ if ( o.corners ) {
5811
+ buttonClass += " ui-btn-corner-all";
5812
+ innerClass += " ui-btn-corner-all";
5813
+ }
5814
+
5815
+ if ( o.shadow ) {
5816
+ buttonClass += " ui-shadow";
5817
+ }
5818
+
5819
+ el.attr( "data-" + $.mobile.ns + "theme", o.theme )
5820
+ .addClass( buttonClass );
5821
+
5822
+ wrap = ( "<D class='" + innerClass + "'><D class='ui-btn-text'></D>" +
5823
+ ( o.icon ? "<span class='" + iconClass + "'></span>" : "" ) +
5824
+ "</D>" ).replace( /D/g, o.wrapperEls );
5825
+
5826
+ el.wrapInner( wrap );
5827
+ });
5828
+ };
5829
+
5830
+ $.fn.buttonMarkup.defaults = {
5831
+ corners: true,
5832
+ shadow: true,
5833
+ iconshadow: true,
5834
+ wrapperEls: "span"
5835
+ };
5836
+
5837
+ function closestEnabledButton( element ) {
5838
+ while ( element ) {
5839
+ var $ele = $( element );
5840
+ if ( $ele.hasClass( "ui-btn" ) && !$ele.hasClass( "ui-disabled" ) ) {
5841
+ break;
5842
+ }
5843
+ element = element.parentNode;
5844
+ }
5845
+ return element;
5846
+ }
5847
+
5848
+ var attachEvents = function() {
5849
+ $( document ).bind( {
5850
+ "vmousedown": function( event ) {
5851
+ var btn = closestEnabledButton( event.target ),
5852
+ $btn, theme;
5853
+
5854
+ if ( btn ) {
5855
+ $btn = $( btn );
5856
+ theme = $btn.attr( "data-" + $.mobile.ns + "theme" );
5857
+ $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme );
5858
+ }
5859
+ },
5860
+ "vmousecancel vmouseup": function( event ) {
5861
+ var btn = closestEnabledButton( event.target ),
5862
+ $btn, theme;
5863
+
5864
+ if ( btn ) {
5865
+ $btn = $( btn );
5866
+ theme = $btn.attr( "data-" + $.mobile.ns + "theme" );
5867
+ $btn.removeClass( "ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme );
5868
+ }
5869
+ },
5870
+ "vmouseover focus": function( event ) {
5871
+ var btn = closestEnabledButton( event.target ),
5872
+ $btn, theme;
5873
+
5874
+ if ( btn ) {
5875
+ $btn = $( btn );
5876
+ theme = $btn.attr( "data-" + $.mobile.ns + "theme" );
5877
+ $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme );
5878
+ }
5879
+ },
5880
+ "vmouseout blur": function( event ) {
5881
+ var btn = closestEnabledButton( event.target ),
5882
+ $btn, theme;
5883
+
5884
+ if ( btn ) {
5885
+ $btn = $( btn );
5886
+ theme = $btn.attr( "data-" + $.mobile.ns + "theme" );
5887
+ $btn.removeClass( "ui-btn-hover-" + theme ).addClass( "ui-btn-up-" + theme );
5888
+ }
5889
+ }
5890
+ });
5891
+
5892
+ attachEvents = null;
5893
+ };
5894
+
5895
+ //links in bars, or those with data-role become buttons
5896
+ //auto self-init widgets
5897
+ $( document ).bind( "pagecreate create", function( e ){
5898
+
5899
+ $( ":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a", e.target )
5900
+ .not( ".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')" )
5901
+ .buttonMarkup();
5902
+ });
5903
+
5904
+ })( jQuery );
5905
+ /*
5906
+ * jQuery Mobile Framework: "controlgroup" plugin - corner-rounding for groups of buttons, checks, radios, etc
5907
+ * Copyright (c) jQuery Project
5908
+ * Dual licensed under the MIT or GPL Version 2 licenses.
5909
+ * http://jquery.org/license
5910
+ */
5911
+ (function( $, undefined ) {
5912
+
5913
+ $.fn.controlgroup = function( options ) {
5914
+
5915
+ return this.each(function() {
5916
+
5917
+ var $el = $( this ),
5918
+ o = $.extend({
5919
+ direction: $el.jqmData( "type" ) || "vertical",
5920
+ shadow: false,
5921
+ excludeInvisible: true
5922
+ }, options ),
5923
+ groupheading = $el.find( ">legend" ),
5924
+ flCorners = o.direction == "horizontal" ? [ "ui-corner-left", "ui-corner-right" ] : [ "ui-corner-top", "ui-corner-bottom" ],
5925
+ type = $el.find( "input:eq(0)" ).attr( "type" );
5926
+
5927
+ // Replace legend with more stylable replacement div
5928
+ if ( groupheading.length ) {
5929
+ $el.wrapInner( "<div class='ui-controlgroup-controls'></div>" );
5930
+ $( "<div role='heading' class='ui-controlgroup-label'>" + groupheading.html() + "</div>" ).insertBefore( $el.children(0) );
5931
+ groupheading.remove();
5932
+ }
5933
+
5934
+ $el.addClass( "ui-corner-all ui-controlgroup ui-controlgroup-" + o.direction );
5935
+
5936
+ // TODO: This should be moved out to the closure
5937
+ // otherwise it is redefined each time controlgroup() is called
5938
+ function flipClasses( els ) {
5939
+ els.removeClass( "ui-btn-corner-all ui-shadow" )
5940
+ .eq( 0 ).addClass( flCorners[ 0 ] )
5941
+ .end()
5942
+ .filter( ":last" ).addClass( flCorners[ 1 ] ).addClass( "ui-controlgroup-last" );
5943
+ }
5944
+
5945
+ flipClasses( $el.find( ".ui-btn" + ( o.excludeInvisible ? ":visible" : "" ) ) );
5946
+ flipClasses( $el.find( ".ui-btn-inner" ) );
5947
+
5948
+ if ( o.shadow ) {
5949
+ $el.addClass( "ui-shadow" );
5950
+ }
5951
+ });
5952
+ };
5953
+
5954
+ //auto self-init widgets
5955
+ $( document ).bind( "pagecreate create", function( e ){
5956
+ $( ":jqmData(role='controlgroup')", e.target ).controlgroup({ excludeInvisible: false });
5957
+ });
5958
+
5959
+ })(jQuery);/*
5960
+ * jQuery Mobile Framework : "fieldcontain" plugin - simple class additions to make form row separators
5961
+ * Copyright (c) jQuery Project
5962
+ * Dual licensed under the MIT or GPL Version 2 licenses.
5963
+ * http://jquery.org/license
5964
+ */
5965
+
5966
+ (function( $, undefined ) {
5967
+
5968
+ $( document ).bind( "pagecreate create", function( e ){
5969
+
5970
+ //links within content areas
5971
+ $( e.target )
5972
+ .find( "a" )
5973
+ .not( ".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')" )
5974
+ .addClass( "ui-link" );
5975
+
5976
+ });
5977
+
5978
+ })( jQuery );/*
5979
+ * jQuery Mobile Framework : "fixHeaderFooter" plugin - on-demand positioning for headers,footers
5980
+ * Copyright (c) jQuery Project
5981
+ * Dual licensed under the MIT or GPL Version 2 licenses.
5982
+ * http://jquery.org/license
5983
+ */
5984
+
5985
+ (function( $, undefined ) {
5986
+
5987
+ var slideDownClass = "ui-header-fixed ui-fixed-inline fade",
5988
+ slideUpClass = "ui-footer-fixed ui-fixed-inline fade",
5989
+
5990
+ slideDownSelector = ".ui-header:jqmData(position='fixed')",
5991
+ slideUpSelector = ".ui-footer:jqmData(position='fixed')";
5992
+
5993
+ $.fn.fixHeaderFooter = function( options ) {
5994
+
5995
+ if ( !$.support.scrollTop ) {
5996
+ return this;
5997
+ }
5998
+
5999
+ return this.each(function() {
6000
+ var $this = $( this );
6001
+
6002
+ if ( $this.jqmData( "fullscreen" ) ) {
6003
+ $this.addClass( "ui-page-fullscreen" );
6004
+ }
6005
+
6006
+ // Should be slidedown
6007
+ $this.find( slideDownSelector ).addClass( slideDownClass );
6008
+
6009
+ // Should be slideup
6010
+ $this.find( slideUpSelector ).addClass( slideUpClass );
6011
+ });
6012
+ };
6013
+
6014
+ // single controller for all showing,hiding,toggling
6015
+ $.mobile.fixedToolbars = (function() {
6016
+
6017
+ if ( !$.support.scrollTop || $.support.touchOverflow ) {
6018
+ return;
6019
+ }
6020
+
6021
+ var stickyFooter, delayTimer,
6022
+ currentstate = "inline",
6023
+ autoHideMode = false,
6024
+ showDelay = 100,
6025
+ ignoreTargets = "a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed",
6026
+ toolbarSelector = ".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last",
6027
+ // for storing quick references to duplicate footers
6028
+ supportTouch = $.support.touch,
6029
+ touchStartEvent = supportTouch ? "touchstart" : "mousedown",
6030
+ touchStopEvent = supportTouch ? "touchend" : "mouseup",
6031
+ stateBefore = null,
6032
+ scrollTriggered = false,
6033
+ touchToggleEnabled = true;
6034
+
6035
+ function showEventCallback( event ) {
6036
+ // An event that affects the dimensions of the visual viewport has
6037
+ // been triggered. If the header and/or footer for the current page are in overlay
6038
+ // mode, we want to hide them, and then fire off a timer to show them at a later
6039
+ // point. Events like a resize can be triggered continuously during a scroll, on
6040
+ // some platforms, so the timer is used to delay the actual positioning until the
6041
+ // flood of events have subsided.
6042
+ //
6043
+ // If we are in autoHideMode, we don't do anything because we know the scroll
6044
+ // callbacks for the plugin will fire off a show when the scrolling has stopped.
6045
+ if ( !autoHideMode && currentstate === "overlay" ) {
6046
+ if ( !delayTimer ) {
6047
+ $.mobile.fixedToolbars.hide( true );
6048
+ }
6049
+
6050
+ $.mobile.fixedToolbars.startShowTimer();
6051
+ }
6052
+ }
6053
+
6054
+ $(function() {
6055
+ var $document = $( document ),
6056
+ $window = $( window );
6057
+
6058
+ $document
6059
+ .bind( "vmousedown", function( event ) {
6060
+ if ( touchToggleEnabled ) {
6061
+ stateBefore = currentstate;
6062
+ }
6063
+ })
6064
+ .bind( "vclick", function( event ) {
6065
+ if ( touchToggleEnabled ) {
6066
+
6067
+ if ( $(event.target).closest( ignoreTargets ).length ) {
6068
+ return;
6069
+ }
6070
+
6071
+ if ( !scrollTriggered ) {
6072
+ $.mobile.fixedToolbars.toggle( stateBefore );
6073
+ stateBefore = null;
6074
+ }
6075
+ }
6076
+ })
6077
+ .bind( "silentscroll", showEventCallback );
6078
+
6079
+
6080
+ // The below checks first for a $(document).scrollTop() value, and if zero, binds scroll events to $(window) instead.
6081
+ // If the scrollTop value is actually zero, both will return zero anyway.
6082
+ //
6083
+ // Works with $(document), not $(window) : Opera Mobile (WinMO phone; kinda broken anyway)
6084
+ // Works with $(window), not $(document) : IE 7/8
6085
+ // Works with either $(window) or $(document) : Chrome, FF 3.6/4, Android 1.6/2.1, iOS
6086
+ // Needs work either way : BB5, Opera Mobile (iOS)
6087
+
6088
+ ( ( $document.scrollTop() === 0 ) ? $window : $document )
6089
+ .bind( "scrollstart", function( event ) {
6090
+
6091
+ scrollTriggered = true;
6092
+
6093
+ if ( stateBefore === null ) {
6094
+ stateBefore = currentstate;
6095
+ }
6096
+
6097
+ // We only enter autoHideMode if the headers/footers are in
6098
+ // an overlay state or the show timer was started. If the
6099
+ // show timer is set, clear it so the headers/footers don't
6100
+ // show up until after we're done scrolling.
6101
+ var isOverlayState = stateBefore == "overlay";
6102
+
6103
+ autoHideMode = isOverlayState || !!delayTimer;
6104
+
6105
+ if ( autoHideMode ) {
6106
+ $.mobile.fixedToolbars.clearShowTimer();
6107
+
6108
+ if ( isOverlayState ) {
6109
+ $.mobile.fixedToolbars.hide( true );
6110
+ }
6111
+ }
6112
+ })
6113
+ .bind( "scrollstop", function( event ) {
6114
+
6115
+ if ( $( event.target ).closest( ignoreTargets ).length ) {
6116
+ return;
6117
+ }
6118
+
6119
+ scrollTriggered = false;
6120
+
6121
+ if ( autoHideMode ) {
6122
+ $.mobile.fixedToolbars.startShowTimer();
6123
+ autoHideMode = false;
6124
+ }
6125
+ stateBefore = null;
6126
+ });
6127
+
6128
+ $window.bind( "resize", showEventCallback );
6129
+ });
6130
+
6131
+ // 1. Before page is shown, check for duplicate footer
6132
+ // 2. After page is shown, append footer to new page
6133
+ $( ".ui-page" )
6134
+ .live( "pagebeforeshow", function( event, ui ) {
6135
+
6136
+ var page = $( event.target ),
6137
+ footer = page.find( ":jqmData(role='footer')" ),
6138
+ id = footer.data( "id" ),
6139
+ prevPage = ui.prevPage,
6140
+ prevFooter = prevPage && prevPage.find( ":jqmData(role='footer')" ),
6141
+ prevFooterMatches = prevFooter.length && prevFooter.jqmData( "id" ) === id;
6142
+
6143
+ if ( id && prevFooterMatches ) {
6144
+ stickyFooter = footer;
6145
+ setTop( stickyFooter.removeClass( "fade in out" ).appendTo( $.mobile.pageContainer ) );
6146
+ }
6147
+ })
6148
+ .live( "pageshow", function( event, ui ) {
6149
+
6150
+ var $this = $( this );
6151
+
6152
+ if ( stickyFooter && stickyFooter.length ) {
6153
+
6154
+ setTimeout(function() {
6155
+ setTop( stickyFooter.appendTo( $this ).addClass( "fade" ) );
6156
+ stickyFooter = null;
6157
+ }, 500);
6158
+ }
6159
+
6160
+ $.mobile.fixedToolbars.show( true, this );
6161
+ });
6162
+
6163
+ // When a collapsiable is hidden or shown we need to trigger the fixed toolbar to reposition itself (#1635)
6164
+ $( ".ui-collapsible-contain" ).live( "collapse expand", showEventCallback );
6165
+
6166
+ // element.getBoundingClientRect() is broken in iOS 3.2.1 on the iPad. The
6167
+ // coordinates inside of the rect it returns don't have the page scroll position
6168
+ // factored out of it like the other platforms do. To get around this,
6169
+ // we'll just calculate the top offset the old fashioned way until core has
6170
+ // a chance to figure out how to handle this situation.
6171
+ //
6172
+ // TODO: We'll need to get rid of getOffsetTop() once a fix gets folded into core.
6173
+
6174
+ function getOffsetTop( ele ) {
6175
+ var top = 0,
6176
+ op, body;
6177
+
6178
+ if ( ele ) {
6179
+ body = document.body;
6180
+ op = ele.offsetParent;
6181
+ top = ele.offsetTop;
6182
+
6183
+ while ( ele && ele != body ) {
6184
+ top += ele.scrollTop || 0;
6185
+
6186
+ if ( ele == op ) {
6187
+ top += op.offsetTop;
6188
+ op = ele.offsetParent;
6189
+ }
6190
+
6191
+ ele = ele.parentNode;
6192
+ }
6193
+ }
6194
+ return top;
6195
+ }
6196
+
6197
+ function setTop( el ) {
6198
+ var fromTop = $(window).scrollTop(),
6199
+ thisTop = getOffsetTop( el[ 0 ] ), // el.offset().top returns the wrong value on iPad iOS 3.2.1, call our workaround instead.
6200
+ thisCSStop = el.css( "top" ) == "auto" ? 0 : parseFloat(el.css( "top" )),
6201
+ screenHeight = window.innerHeight,
6202
+ thisHeight = el.outerHeight(),
6203
+ useRelative = el.parents( ".ui-page:not(.ui-page-fullscreen)" ).length,
6204
+ relval;
6205
+
6206
+ if ( el.is( ".ui-header-fixed" ) ) {
6207
+
6208
+ relval = fromTop - thisTop + thisCSStop;
6209
+
6210
+ if ( relval < thisTop ) {
6211
+ relval = 0;
6212
+ }
6213
+
6214
+ return el.css( "top", useRelative ? relval : fromTop );
6215
+ } else {
6216
+ // relval = -1 * (thisTop - (fromTop + screenHeight) + thisCSStop + thisHeight);
6217
+ // if ( relval > thisTop ) { relval = 0; }
6218
+ relval = fromTop + screenHeight - thisHeight - (thisTop - thisCSStop );
6219
+
6220
+ return el.css( "top", useRelative ? relval : fromTop + screenHeight - thisHeight );
6221
+ }
6222
+ }
6223
+
6224
+ // Exposed methods
6225
+ return {
6226
+
6227
+ show: function( immediately, page ) {
6228
+
6229
+ $.mobile.fixedToolbars.clearShowTimer();
6230
+
6231
+ currentstate = "overlay";
6232
+
6233
+ var $ap = page ? $( page ) :
6234
+ ( $.mobile.activePage ? $.mobile.activePage :
6235
+ $( ".ui-page-active" ) );
6236
+
6237
+ return $ap.children( toolbarSelector ).each(function() {
6238
+
6239
+ var el = $( this ),
6240
+ fromTop = $( window ).scrollTop(),
6241
+ // el.offset().top returns the wrong value on iPad iOS 3.2.1, call our workaround instead.
6242
+ thisTop = getOffsetTop( el[ 0 ] ),
6243
+ screenHeight = window.innerHeight,
6244
+ thisHeight = el.outerHeight(),
6245
+ alreadyVisible = ( el.is( ".ui-header-fixed" ) && fromTop <= thisTop + thisHeight ) ||
6246
+ ( el.is( ".ui-footer-fixed" ) && thisTop <= fromTop + screenHeight );
6247
+
6248
+ // Add state class
6249
+ el.addClass( "ui-fixed-overlay" ).removeClass( "ui-fixed-inline" );
6250
+
6251
+ if ( !alreadyVisible && !immediately ) {
6252
+ el.animationComplete(function() {
6253
+ el.removeClass( "in" );
6254
+ }).addClass( "in" );
6255
+ }
6256
+ setTop(el);
6257
+ });
6258
+ },
6259
+
6260
+ hide: function( immediately ) {
6261
+
6262
+ currentstate = "inline";
6263
+
6264
+ var $ap = $.mobile.activePage ? $.mobile.activePage :
6265
+ $( ".ui-page-active" );
6266
+
6267
+ return $ap.children( toolbarSelector ).each(function() {
6268
+
6269
+ var el = $(this),
6270
+ thisCSStop = el.css( "top" ),
6271
+ classes;
6272
+
6273
+ thisCSStop = thisCSStop == "auto" ? 0 :
6274
+ parseFloat(thisCSStop);
6275
+
6276
+ // Add state class
6277
+ el.addClass( "ui-fixed-inline" ).removeClass( "ui-fixed-overlay" );
6278
+
6279
+ if ( thisCSStop < 0 || ( el.is( ".ui-header-fixed" ) && thisCSStop !== 0 ) ) {
6280
+
6281
+ if ( immediately ) {
6282
+ el.css( "top", 0);
6283
+ } else {
6284
+
6285
+ if ( el.css( "top" ) !== "auto" && parseFloat( el.css( "top" ) ) !== 0 ) {
6286
+
6287
+ classes = "out reverse";
6288
+
6289
+ el.animationComplete(function() {
6290
+ el.removeClass( classes ).css( "top", 0 );
6291
+ }).addClass( classes );
6292
+ }
6293
+ }
6294
+ }
6295
+ });
6296
+ },
6297
+
6298
+ startShowTimer: function() {
6299
+
6300
+ $.mobile.fixedToolbars.clearShowTimer();
6301
+
6302
+ var args = [].slice.call( arguments );
6303
+
6304
+ delayTimer = setTimeout(function() {
6305
+ delayTimer = undefined;
6306
+ $.mobile.fixedToolbars.show.apply( null, args );
6307
+ }, showDelay);
6308
+ },
6309
+
6310
+ clearShowTimer: function() {
6311
+ if ( delayTimer ) {
6312
+ clearTimeout( delayTimer );
6313
+ }
6314
+ delayTimer = undefined;
6315
+ },
6316
+
6317
+ toggle: function( from ) {
6318
+ if ( from ) {
6319
+ currentstate = from;
6320
+ }
6321
+ return ( currentstate === "overlay" ) ? $.mobile.fixedToolbars.hide() :
6322
+ $.mobile.fixedToolbars.show();
6323
+ },
6324
+
6325
+ setTouchToggleEnabled: function( enabled ) {
6326
+ touchToggleEnabled = enabled;
6327
+ }
6328
+ };
6329
+ })();
6330
+
6331
+ // TODO - Deprecated namepace on $. Remove in a later release
6332
+ $.fixedToolbars = $.mobile.fixedToolbars;
6333
+
6334
+ //auto self-init widgets
6335
+ $( document ).bind( "pagecreate create", function( event ) {
6336
+
6337
+ if ( $( ":jqmData(position='fixed')", event.target ).length ) {
6338
+
6339
+ $( event.target ).each(function() {
6340
+
6341
+ if ( !$.support.scrollTop || $.support.touchOverflow ) {
6342
+ return this;
6343
+ }
6344
+
6345
+ var $this = $( this );
6346
+
6347
+ if ( $this.jqmData( "fullscreen" ) ) {
6348
+ $this.addClass( "ui-page-fullscreen" );
6349
+ }
6350
+
6351
+ // Should be slidedown
6352
+ $this.find( slideDownSelector ).addClass( slideDownClass );
6353
+
6354
+ // Should be slideup
6355
+ $this.find( slideUpSelector ).addClass( slideUpClass );
6356
+
6357
+ })
6358
+
6359
+ }
6360
+ });
6361
+
6362
+ })( jQuery );
6363
+ /*
6364
+ * jQuery Mobile Framework : "fixHeaderFooter" native plugin - Behavior for "fixed" headers,footers, and scrolling inner content
6365
+ * Copyright (c) jQuery Project
6366
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6367
+ * http://jquery.org/license
6368
+ */
6369
+
6370
+ (function( $, undefined ) {
6371
+
6372
+ $.mobile.touchOverflowEnabled = false;
6373
+
6374
+ $( document ).bind( "pagecreate", function( event ) {
6375
+ if( $.support.touchOverflow && $.mobile.touchOverflowEnabled ){
6376
+
6377
+ var $target = $( event.target ),
6378
+ scrollStartY = 0;
6379
+
6380
+ if( $target.is( ":jqmData(role='page')" ) ){
6381
+
6382
+ $target.each(function() {
6383
+ var $page = $( this ),
6384
+ $fixies = $page.find( ":jqmData(role='header'), :jqmData(role='footer')" ).filter( ":jqmData(position='fixed')" ),
6385
+ fullScreen = $page.jqmData( "fullscreen" ),
6386
+ $scrollElem = $fixies.length ? $page.find( ".ui-content" ) : $page;
6387
+
6388
+ $page.addClass( "ui-mobile-touch-overflow" );
6389
+
6390
+ $scrollElem.bind( "scrollstop", function(){
6391
+ if( $scrollElem.scrollTop() > 0 ){
6392
+ window.scrollTo( 0, $.mobile.defaultHomeScroll );
6393
+ }
6394
+ });
6395
+
6396
+ if( $fixies.length ){
6397
+
6398
+ $page.addClass( "ui-native-fixed" );
6399
+
6400
+ if( fullScreen ){
6401
+
6402
+ $page.addClass( "ui-native-fullscreen" );
6403
+
6404
+ $fixies.addClass( "fade in" );
6405
+
6406
+ $( document ).bind( "vclick", function(){
6407
+ $fixies
6408
+ .removeClass( "ui-native-bars-hidden" )
6409
+ .toggleClass( "in out" )
6410
+ .animationComplete(function(){
6411
+ $(this).not( ".in" ).addClass( "ui-native-bars-hidden" );
6412
+ });
6413
+ });
6414
+ }
6415
+ }
6416
+ });
6417
+ }
6418
+ }
6419
+ });
6420
+
6421
+ })( jQuery );
6422
+ /*
6423
+ * jQuery Mobile Framework : resolution and CSS media query related helpers and behavior
6424
+ * Copyright (c) jQuery Project
6425
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6426
+ * http://jquery.org/license
6427
+ */
6428
+ (function( $, undefined ) {
6429
+
6430
+ var $window = $( window ),
6431
+ $html = $( "html" ),
6432
+
6433
+ //media-query-like width breakpoints, which are translated to classes on the html element
6434
+ resolutionBreakpoints = [ 320, 480, 768, 1024 ];
6435
+
6436
+ /*
6437
+ private function for adding/removing breakpoint classes to HTML element for faux media-query support
6438
+ It does not require media query support, instead using JS to detect screen width > cross-browser support
6439
+ This function is called on orientationchange, resize, and mobileinit, and is bound via the 'htmlclass' event namespace
6440
+ */
6441
+ function detectResolutionBreakpoints() {
6442
+ var currWidth = $window.width(),
6443
+ minPrefix = "min-width-",
6444
+ maxPrefix = "max-width-",
6445
+ minBreakpoints = [],
6446
+ maxBreakpoints = [],
6447
+ unit = "px",
6448
+ breakpointClasses;
6449
+
6450
+ $html.removeClass( minPrefix + resolutionBreakpoints.join(unit + " " + minPrefix) + unit + " " +
6451
+ maxPrefix + resolutionBreakpoints.join( unit + " " + maxPrefix) + unit );
6452
+
6453
+ $.each( resolutionBreakpoints, function( i, breakPoint ) {
6454
+ if( currWidth >= breakPoint ) {
6455
+ minBreakpoints.push( minPrefix + breakPoint + unit );
6456
+ }
6457
+ if( currWidth <= breakPoint ) {
6458
+ maxBreakpoints.push( maxPrefix + breakPoint + unit );
6459
+ }
6460
+ });
6461
+
6462
+ if ( minBreakpoints.length ) {
6463
+ breakpointClasses = minBreakpoints.join(" ");
6464
+ }
6465
+ if ( maxBreakpoints.length ) {
6466
+ breakpointClasses += " " + maxBreakpoints.join(" ");
6467
+ }
6468
+
6469
+ $html.addClass( breakpointClasses );
6470
+ };
6471
+
6472
+ /* $.mobile.addResolutionBreakpoints method:
6473
+ pass either a number or an array of numbers and they'll be added to the min/max breakpoint classes
6474
+ Examples:
6475
+ $.mobile.addResolutionBreakpoints( 500 );
6476
+ $.mobile.addResolutionBreakpoints( [500, 1200] );
6477
+ */
6478
+ $.mobile.addResolutionBreakpoints = function( newbps ) {
6479
+ if( $.type( newbps ) === "array" ){
6480
+ resolutionBreakpoints = resolutionBreakpoints.concat( newbps );
6481
+ } else {
6482
+ resolutionBreakpoints.push( newbps );
6483
+ }
6484
+
6485
+ resolutionBreakpoints.sort(function( a, b ) {
6486
+ return a - b;
6487
+ });
6488
+
6489
+ detectResolutionBreakpoints();
6490
+ };
6491
+
6492
+ /* on mobileinit, add classes to HTML element
6493
+ and set handlers to update those on orientationchange and resize
6494
+ */
6495
+ $( document ).bind( "mobileinit.htmlclass", function() {
6496
+ // bind to orientationchange and resize
6497
+ // to add classes to HTML element for min/max breakpoints and orientation
6498
+
6499
+ var ev = $.support.orientation;
6500
+
6501
+ $window.bind( "orientationchange.htmlclass throttledresize.htmlclass", function( event ) {
6502
+
6503
+ // add orientation class to HTML element on flip/resize.
6504
+ if ( event.orientation ) {
6505
+ $html.removeClass( "portrait landscape" ).addClass( event.orientation );
6506
+ }
6507
+
6508
+ // add classes to HTML element for min/max breakpoints
6509
+ detectResolutionBreakpoints();
6510
+ });
6511
+ });
6512
+
6513
+ /* Manually trigger an orientationchange event when the dom ready event fires.
6514
+ This will ensure that any viewport meta tag that may have been injected
6515
+ has taken effect already, allowing us to properly calculate the width of the
6516
+ document.
6517
+ */
6518
+ $(function() {
6519
+ //trigger event manually
6520
+ $window.trigger( "orientationchange.htmlclass" );
6521
+ });
6522
+
6523
+ })(jQuery);/*!
6524
+ * jQuery Mobile v@VERSION
6525
+ * http://jquerymobile.com/
6526
+ *
6527
+ * Copyright 2010, jQuery Project
6528
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6529
+ * http://jquery.org/license
6530
+ */
6531
+
6532
+ (function( $, window, undefined ) {
6533
+ var $html = $( "html" ),
6534
+ $head = $( "head" ),
6535
+ $window = $( window );
6536
+
6537
+ // trigger mobileinit event - useful hook for configuring $.mobile settings before they're used
6538
+ $( window.document ).trigger( "mobileinit" );
6539
+
6540
+ // support conditions
6541
+ // if device support condition(s) aren't met, leave things as they are -> a basic, usable experience,
6542
+ // otherwise, proceed with the enhancements
6543
+ if ( !$.mobile.gradeA() ) {
6544
+ return;
6545
+ }
6546
+
6547
+ // override ajaxEnabled on platforms that have known conflicts with hash history updates
6548
+ // or generally work better browsing in regular http for full page refreshes (BB5, Opera Mini)
6549
+ if ( $.mobile.ajaxBlacklist ) {
6550
+ $.mobile.ajaxEnabled = false;
6551
+ }
6552
+
6553
+ // add mobile, initial load "rendering" classes to docEl
6554
+ $html.addClass( "ui-mobile ui-mobile-rendering" );
6555
+
6556
+ // loading div which appears during Ajax requests
6557
+ // will not appear if $.mobile.loadingMessage is false
6558
+ var $loader = $( "<div class='ui-loader ui-body-a ui-corner-all'><span class='ui-icon ui-icon-loading spin'></span><h1></h1></div>" );
6559
+
6560
+ $.extend($.mobile, {
6561
+ // turn on/off page loading message.
6562
+ showPageLoadingMsg: function() {
6563
+ if ( $.mobile.loadingMessage ) {
6564
+ var activeBtn = $( "." + $.mobile.activeBtnClass ).first();
6565
+
6566
+ $loader
6567
+ .find( "h1" )
6568
+ .text( $.mobile.loadingMessage )
6569
+ .end()
6570
+ .appendTo( $.mobile.pageContainer )
6571
+ // position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top
6572
+ .css({
6573
+ top: $.support.scrollTop && $window.scrollTop() + $window.height() / 2 ||
6574
+ activeBtn.length && activeBtn.offset().top || 100
6575
+ });
6576
+ }
6577
+
6578
+ $html.addClass( "ui-loading" );
6579
+ },
6580
+
6581
+ hidePageLoadingMsg: function() {
6582
+ $html.removeClass( "ui-loading" );
6583
+ },
6584
+
6585
+ // XXX: deprecate for 1.0
6586
+ pageLoading: function ( done ) {
6587
+ if ( done ) {
6588
+ $.mobile.hidePageLoadingMsg();
6589
+ } else {
6590
+ $.mobile.showPageLoadingMsg();
6591
+ }
6592
+ },
6593
+
6594
+ // find and enhance the pages in the dom and transition to the first page.
6595
+ initializePage: function() {
6596
+ // find present pages
6597
+ var $pages = $( ":jqmData(role='page')" );
6598
+
6599
+ // if no pages are found, create one with body's inner html
6600
+ if ( !$pages.length ) {
6601
+ $pages = $( "body" ).wrapInner( "<div data-" + $.mobile.ns + "role='page'></div>" ).children( 0 );
6602
+ }
6603
+
6604
+ // add dialogs, set data-url attrs
6605
+ $pages.add( ":jqmData(role='dialog')" ).each(function() {
6606
+ var $this = $(this);
6607
+
6608
+ // unless the data url is already set set it to the pathname
6609
+ if ( !$this.jqmData("url") ) {
6610
+ $this.attr( "data-" + $.mobile.ns + "url", $this.attr( "id" ) || location.pathname + location.search );
6611
+ }
6612
+ });
6613
+
6614
+ // define first page in dom case one backs out to the directory root (not always the first page visited, but defined as fallback)
6615
+ $.mobile.firstPage = $pages.first();
6616
+
6617
+ // define page container
6618
+ $.mobile.pageContainer = $pages.first().parent().addClass( "ui-mobile-viewport" );
6619
+
6620
+ // cue page loading message
6621
+ $.mobile.showPageLoadingMsg();
6622
+
6623
+ // if hashchange listening is disabled or there's no hash deeplink, change to the first page in the DOM
6624
+ if ( !$.mobile.hashListeningEnabled || !$.mobile.path.stripHash( location.hash ) ) {
6625
+ $.mobile.changePage( $.mobile.firstPage, { transition: "none", reverse: true, changeHash: false, fromHashChange: true } );
6626
+ }
6627
+ // otherwise, trigger a hashchange to load a deeplink
6628
+ else {
6629
+ $window.trigger( "hashchange", [ true ] );
6630
+ }
6631
+ }
6632
+ });
6633
+
6634
+ // initialize events now, after mobileinit has occurred
6635
+ $.mobile._registerInternalEvents();
6636
+
6637
+ // check which scrollTop value should be used by scrolling to 1 immediately at domready
6638
+ // then check what the scroll top is. Android will report 0... others 1
6639
+ // note that this initial scroll won't hide the address bar. It's just for the check.
6640
+ $(function() {
6641
+ window.scrollTo( 0, 1 );
6642
+
6643
+ // if defaultHomeScroll hasn't been set yet, see if scrollTop is 1
6644
+ // it should be 1 in most browsers, but android treats 1 as 0 (for hiding addr bar)
6645
+ // so if it's 1, use 0 from now on
6646
+ $.mobile.defaultHomeScroll = ( !$.support.scrollTop || $(window).scrollTop() === 1 ) ? 0 : 1;
6647
+
6648
+ //dom-ready inits
6649
+ if( $.mobile.autoInitializePage ){
6650
+ $.mobile.initializePage();
6651
+ }
6652
+
6653
+ // window load event
6654
+ // hide iOS browser chrome on load
6655
+ $window.load( $.mobile.silentScroll );
6656
+ });
6657
+ })( jQuery, this );
skin/frontend/smarttheme/default/jquery.mobile-1.0b3.min.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Mobile v1.0b3
3
+ * http://jquerymobile.com/
4
+ *
5
+ * Copyright 2010, jQuery Project
6
+ * Dual licensed under the MIT or GPL Version 2 licenses.
7
+ * http://jquery.org/license
8
+ */.ui-bar-a{border:1px solid #2a2a2a;background:#111;color:#fff;font-weight:bold;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#111));background-image:-webkit-linear-gradient(top,#3c3c3c,#111);background-image:-moz-linear-gradient(top,#3c3c3c,#111);background-image:-ms-linear-gradient(top,#3c3c3c,#111);background-image:-o-linear-gradient(top,#3c3c3c,#111);background-image:linear-gradient(top,#3c3c3c,#111)}.ui-bar-a,.ui-bar-a input,.ui-bar-a select,.ui-bar-a textarea,.ui-bar-a button{font-family:Helvetica,Arial,sans-serif}.ui-bar-a .ui-link-inherit{color:#fff}.ui-bar-a .ui-link{color:#7cc4e7;font-weight:bold}.ui-body-a{border:1px solid #2a2a2a;background:#222;color:#fff;text-shadow:0 1px 0 #000;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#222));background-image:-webkit-linear-gradient(top,#666,#222);background-image:-moz-linear-gradient(top,#666,#222);background-image:-ms-linear-gradient(top,#666,#222);background-image:-o-linear-gradient(top,#666,#222);background-image:linear-gradient(top,#666,#222)}.ui-body-a,.ui-body-a input,.ui-body-a select,.ui-body-a textarea,.ui-body-a button{font-family:Helvetica,Arial,sans-serif}.ui-body-a .ui-link-inherit{color:#fff}.ui-body-a .ui-link{color:#2489ce;font-weight:bold}.ui-br{border-bottom:#828282;border-bottom:rgba(130,130,130,.3);border-bottom-width:1px;border-bottom-style:solid}.ui-btn-up-a{border:1px solid #222;background:#333;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));background-image:-webkit-linear-gradient(top,#555,#333);background-image:-moz-linear-gradient(top,#555,#333);background-image:-ms-linear-gradient(top,#555,#333);background-image:-o-linear-gradient(top,#555,#333);background-image:linear-gradient(top,#555,#333)}.ui-btn-up-a a.ui-link-inherit{color:#fff}.ui-btn-hover-a{border:1px solid #000;background:#444;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#444));background-image:-webkit-linear-gradient(top,#666,#444);background-image:-moz-linear-gradient(top,#666,#444);background-image:-ms-linear-gradient(top,#666,#444);background-image:-o-linear-gradient(top,#666,#444);background-image:linear-gradient(top,#666,#444)}.ui-btn-hover-a a.ui-link-inherit{color:#fff}.ui-btn-down-a{border:1px solid #000;background:#3d3d3d;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#333),to(#5a5a5a));background-image:-webkit-linear-gradient(top,#333,#5a5a5a);background-image:-moz-linear-gradient(top,#333,#5a5a5a);background-image:-ms-linear-gradient(top,#333,#5a5a5a);background-image:-o-linear-gradient(top,#333,#5a5a5a);background-image:linear-gradient(top,#333,#5a5a5a)}.ui-btn-down-a a.ui-link-inherit{color:#fff}.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-b{border:1px solid #456f9a;background:#5e87b0;color:#fff;font-weight:bold;text-shadow:0 -1px 1px #254f7a;background-image:-webkit-gradient(linear,left top,left bottom,from(#81a8ce),to(#5e87b0));background-image:-webkit-linear-gradient(top,#81a8ce,#5e87b0);background-image:-moz-linear-gradient(top,#81a8ce,#5e87b0);background-image:-ms-linear-gradient(top,#81a8ce,#5e87b0);background-image:-o-linear-gradient(top,#81a8ce,#5e87b0);background-image:linear-gradient(top,#81a8ce,#5e87b0)}.ui-bar-b,.ui-bar-b input,.ui-bar-b select,.ui-bar-b textarea,.ui-bar-b button{font-family:Helvetica,Arial,sans-serif}.ui-bar-b .ui-link-inherit{color:#fff}.ui-bar-b .ui-link{color:#7cc4e7;font-weight:bold}.ui-body-b{border:1px solid #c6c6c6;background:#ccc;color:#333;text-shadow:0 1px 0 #fff;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from(#e6e6e6),to(#ccc));background-image:-webkit-linear-gradient(top,#e6e6e6,#ccc);background-image:-moz-linear-gradient(top,#e6e6e6,#ccc);background-image:-ms-linear-gradient(top,#e6e6e6,#ccc);background-image:-o-linear-gradient(top,#e6e6e6,#ccc);background-image:linear-gradient(top,#e6e6e6,#ccc)}.ui-body-b,.ui-body-b input,.ui-body-b select,.ui-body-b textarea,.ui-body-b button{font-family:Helvetica,Arial,sans-serif}.ui-body-b .ui-link-inherit{color:#333}.ui-body-b .ui-link{color:#2489ce;font-weight:bold}.ui-btn-up-b{border:1px solid #145072;background:#2567ab;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #145072;background-image:-webkit-gradient(linear,left top,left bottom,from(#5f9cc5),to(#396b9e));background-image:-webkit-linear-gradient(top,#5f9cc5,#396b9e);background-image:-moz-linear-gradient(top,#5f9cc5,#396b9e);background-image:-ms-linear-gradient(top,#5f9cc5,#396b9e);background-image:-o-linear-gradient(top,#5f9cc5,#396b9e);background-image:linear-gradient(top,#5f9cc5,#396b9e)}.ui-btn-up-b a.ui-link-inherit{color:#fff}.ui-btn-hover-b{border:1px solid #00516e;background:#4b88b6;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #014d68;background-image:-webkit-gradient(linear,left top,left bottom,from(#72b0d4),to(#4b88b6));background-image:-webkit-linear-gradient(top,#72b0d4,#4b88b6);background-image:-moz-linear-gradient(top,#72b0d4,#4b88b6);background-image:-ms-linear-gradient(top,#72b0d4,#4b88b6);background-image:-o-linear-gradient(top,#72b0d4,#4b88b6);background-image:linear-gradient(top,#72b0d4,#4b88b6)}.ui-btn-hover-b a.ui-link-inherit{color:#fff}.ui-btn-down-b{border:1px solid #225377;background:#4e89c5;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #225377;background-image:-webkit-gradient(linear,left top,left bottom,from(#396b9e),to(#4e89c5));background-image:-webkit-linear-gradient(top,#396b9e,#4e89c5);background-image:-moz-linear-gradient(top,#396b9e,#4e89c5);background-image:-ms-linear-gradient(top,#396b9e,#4e89c5);background-image:-o-linear-gradient(top,#396b9e,#4e89c5);background-image:linear-gradient(top,#396b9e,#4e89c5)}.ui-btn-down-b a.ui-link-inherit{color:#fff}.ui-btn-up-b,.ui-btn-hover-b,.ui-btn-down-b{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-c{border:1px solid #b3b3b3;background:#e9eaeb;color:#3e3e3e;font-weight:bold;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#f0f0f0),to(#e9eaeb));background-image:-webkit-linear-gradient(top,#f0f0f0,#e9eaeb);background-image:-moz-linear-gradient(top,#f0f0f0,#e9eaeb);background-image:-ms-linear-gradient(top,#f0f0f0,#e9eaeb);background-image:-o-linear-gradient(top,#f0f0f0,#e9eaeb);background-image:linear-gradient(top,#f0f0f0,#e9eaeb)}.ui-bar-c,.ui-bar-c input,.ui-bar-c select,.ui-bar-c textarea,.ui-bar-c button{font-family:Helvetica,Arial,sans-serif}.ui-body-c{border:1px solid #b3b3b3;color:#333;text-shadow:0 1px 0 #fff;background:#f0f0f0;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#ddd));background-image:-webkit-linear-gradient(top,#eee,#ddd);background-image:-moz-linear-gradient(top,#eee,#ddd);background-image:-ms-linear-gradient(top,#eee,#ddd);background-image:-o-linear-gradient(top,#eee,#ddd);background-image:linear-gradient(top,#eee,#ddd)}.ui-body-c,.ui-body-c input,.ui-body-c select,.ui-body-c textarea,.ui-body-c button{font-family:Helvetica,Arial,sans-serif}.ui-body-c .ui-link-inherit{color:#333}.ui-body-c .ui-link{color:#2489ce;font-weight:bold}.ui-btn-up-c{border:1px solid #ccc;background:#eee;font-weight:bold;color:#444;text-shadow:0 1px 1px #f6f6f6;background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);background-image:-moz-linear-gradient(top,#fdfdfd,#eee);background-image:-ms-linear-gradient(top,#fdfdfd,#eee);background-image:-o-linear-gradient(top,#fdfdfd,#eee);background-image:linear-gradient(top,#fdfdfd,#eee)}.ui-btn-up-c a.ui-link-inherit{color:#2f3e46}.ui-btn-hover-c{border:1px solid #bbb;background:#dadada;font-weight:bold;color:#101010;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#ededed),to(#dadada));background-image:-webkit-linear-gradient(top,#ededed,#dadada);background-image:-moz-linear-gradient(top,#ededed,#dadada);background-image:-ms-linear-gradient(top,#ededed,#dadada);background-image:-o-linear-gradient(top,#ededed,#dadada);background-image:linear-gradient(top,#ededed,#dadada)}.ui-btn-hover-c a.ui-link-inherit{color:#2f3e46}.ui-btn-down-c{border:1px solid #808080;background:#fdfdfd;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#fdfdfd));background-image:-webkit-linear-gradient(top,#eee,#fdfdfd);background-image:-moz-linear-gradient(top,#eee,#fdfdfd);background-image:-ms-linear-gradient(top,#eee,#fdfdfd);background-image:-o-linear-gradient(top,#eee,#fdfdfd);background-image:linear-gradient(top,#eee,#fdfdfd)}.ui-btn-down-c a.ui-link-inherit{color:#2f3e46}.ui-btn-up-c,.ui-btn-hover-c,.ui-btn-down-c{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-d{border:1px solid #ccc;background:#bbb;color:#333;text-shadow:0 1px 0 #eee;background-image:-webkit-gradient(linear,left top,left bottom,from(#ddd),to(#bbb));background-image:-webkit-linear-gradient(top,#ddd,#bbb);background-image:-moz-linear-gradient(top,#ddd,#bbb);background-image:-ms-linear-gradient(top,#ddd,#bbb);background-image:-o-linear-gradient(top,#ddd,#bbb);background-image:linear-gradient(top,#ddd,#bbb)}.ui-bar-d,.ui-bar-d input,.ui-bar-d select,.ui-bar-d textarea,.ui-bar-d button{font-family:Helvetica,Arial,sans-serif}.ui-bar-d .ui-link-inherit{color:#333}.ui-bar-d .ui-link{color:#2489ce;font-weight:bold}.ui-body-d{border:1px solid #ccc;color:#333;text-shadow:0 1px 0 #fff;background:#fff}.ui-body-d,.ui-body-d input,.ui-body-d select,.ui-body-d textarea,.ui-body-d button{font-family:Helvetica,Arial,sans-serif}.ui-body-d .ui-link-inherit{color:#333}.ui-body-d .ui-link{color:#2489ce;font-weight:bold}.ui-btn-up-d{border:1px solid #ccc;background:#fff;font-weight:bold;color:#444;text-shadow:0 1px 1px #fff}.ui-btn-up-d a.ui-link-inherit{color:#333}.ui-btn-hover-d{border:1px solid #aaa;background:#eee;font-weight:bold;color:#222;cursor:pointer;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));background-image:-webkit-linear-gradient(top,#fdfdfd,#eee);background-image:-moz-linear-gradient(top,#fdfdfd,#eee);background-image:-ms-linear-gradient(top,#fdfdfd,#eee);background-image:-o-linear-gradient(top,#fdfdfd,#eee);background-image:linear-gradient(top,#fdfdfd,#eee)}.ui-btn-hover-d a.ui-link-inherit{color:#222}.ui-btn-down-d{border:1px solid #aaa;background:#fff;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#fff));background-image:-webkit-linear-gradient(top,#eee,#fff);background-image:-moz-linear-gradient(top,#eee,#fff);background-image:-ms-linear-gradient(top,#eee,#fff);background-image:-o-linear-gradient(top,#eee,#fff);background-image:linear-gradient(top,#eee,#fff)}.ui-btn-down-d a.ui-link-inherit{color:#111}.ui-btn-up-d,.ui-btn-hover-d,.ui-btn-down-d{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-e{border:1px solid #f7c942;background:#fadb4e;color:#333;text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fceda7),to(#fadb4e));background-image:-webkit-linear-gradient(top,#fceda7,#fadb4e);background-image:-moz-linear-gradient(top,#fceda7,#fadb4e);background-image:-ms-linear-gradient(top,#fceda7,#fadb4e);background-image:-o-linear-gradient(top,#fceda7,#fadb4e);background-image:linear-gradient(top,#fceda7,#fadb4e)}.ui-bar-e,.ui-bar-e input,.ui-bar-e select,.ui-bar-e textarea,.ui-bar-e button{font-family:Helvetica,Arial,sans-serif}.ui-bar-e .ui-link-inherit{color:#333}.ui-bar-e .ui-link{color:#2489ce;font-weight:bold}.ui-body-e{border:1px solid #f7c942;color:#333;text-shadow:0 1px 0 #fff;background:#faeb9e;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#faeb9e));background-image:-webkit-linear-gradient(top,#fff,#faeb9e);background-image:-moz-linear-gradient(top,#fff,#faeb9e);background-image:-ms-linear-gradient(top,#fff,#faeb9e);background-image:-o-linear-gradient(top,#fff,#faeb9e);background-image:linear-gradient(top,#fff,#faeb9e)}.ui-body-e,.ui-body-e input,.ui-body-e select,.ui-body-e textarea,.ui-body-e button{font-family:Helvetica,Arial,sans-serif}.ui-body-e .ui-link-inherit{color:#333}.ui-body-e .ui-link{color:#2489ce;font-weight:bold}.ui-btn-up-e{border:1px solid #f7c942;background:#fadb4e;font-weight:bold;color:#333;text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fceda7),to(#fadb4e));background-image:-webkit-linear-gradient(top,#fceda7,#fadb4e);background-image:-moz-linear-gradient(top,#fceda7,#fadb4e);background-image:-ms-linear-gradient(top,#fceda7,#fadb4e);background-image:-o-linear-gradient(top,#fceda7,#fadb4e);background-image:linear-gradient(top,#fceda7,#fadb4e)}.ui-btn-up-e a.ui-link-inherit{color:#333}.ui-btn-hover-e{border:1px solid #e79952;background:#fbe26f;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf0b5),to(#fbe26f));background-image:-webkit-linear-gradient(top,#fcf0b5,#fbe26f);background-image:-moz-linear-gradient(top,#fcf0b5,#fbe26f);background-image:-ms-linear-gradient(top,#fcf0b5,#fbe26f);background-image:-o-linear-gradient(top,#fcf0b5,#fbe26f);background-image:linear-gradient(top,#fcf0b5,#fbe26f)}.ui-btn-hover-e a.ui-link-inherit{color:#333}.ui-btn-down-e{border:1px solid #f7c942;background:#fceda7;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fadb4e),to(#fceda7));background-image:-webkit-linear-gradient(top,#fadb4e,#fceda7);background-image:-moz-linear-gradient(top,#fadb4e,#fceda7);background-image:-ms-linear-gradient(top,#fadb4e,#fceda7);background-image:-o-linear-gradient(top,#fadb4e,#fceda7);background-image:linear-gradient(top,#fadb4e,#fceda7)}.ui-btn-down-e a.ui-link-inherit{color:#333}.ui-btn-up-e,.ui-btn-hover-e,.ui-btn-down-e{font-family:Helvetica,Arial,sans-serif;text-decoration:none}a.ui-link-inherit{text-decoration:none!important}.ui-btn-active{border:1px solid #155678;background:#4596ce;font-weight:bold;color:#fff;cursor:pointer;text-shadow:0 -1px 1px #145072;text-decoration:none;background-image:-webkit-gradient(linear,left top,left bottom,from(#85bae4),to(#5393c5));background-image:-webkit-linear-gradient(top,#85bae4,#5393c5);background-image:-moz-linear-gradient(top,#85bae4,#5393c5);background-image:-ms-linear-gradient(top,#85bae4,#5393c5);background-image:-o-linear-gradient(top,#85bae4,#5393c5);background-image:linear-gradient(top,#85bae4,#5393c5);outline:0}.ui-btn-active a.ui-link-inherit{color:#fff}.ui-btn-inner{border-top:1px solid #fff;border-color:rgba(255,255,255,.3)}.ui-corner-tl{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em}.ui-corner-tr{-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em}.ui-corner-bl{-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em}.ui-corner-br{-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em}.ui-corner-top{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em;-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em}.ui-corner-bottom{-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em;-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em}.ui-corner-right{-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em;-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em}.ui-corner-left{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em;-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em}.ui-corner-all{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em}.ui-corner-none{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.ui-disabled{opacity:.3}.ui-disabled,.ui-disabled a{cursor:default}.ui-icon{background:#666;background:rgba(0,0,0,.4);background-image:url(images/icons-18-white.png);background-repeat:no-repeat;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px}.ui-icon-alt{background:#fff;background:rgba(255,255,255,.3);background-image:url(images/icons-18-black.png);background-repeat:no-repeat}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-resolution:240dpi){.ui-icon-plus,.ui-icon-minus,.ui-icon-delete,.ui-icon-arrow-r,.ui-icon-arrow-l,.ui-icon-arrow-u,.ui-icon-arrow-d,.ui-icon-check,.ui-icon-gear,.ui-icon-refresh,.ui-icon-forward,.ui-icon-back,.ui-icon-grid,.ui-icon-star,.ui-icon-alert,.ui-icon-info,.ui-icon-home,.ui-icon-search,.ui-icon-checkbox-off,.ui-icon-checkbox-on,.ui-icon-radio-off,.ui-icon-radio-on{background-image:url(images/icons-36-white.png);-moz-background-size:776px 18px;-o-background-size:776px 18px;-webkit-background-size:776px 18px;background-size:776px 18px}.ui-icon-alt{background-image:url(images/icons-36-black.png)}}.ui-icon-plus{background-position:-0 50%}.ui-icon-minus{background-position:-36px 50%}.ui-icon-delete{background-position:-72px 50%}.ui-icon-arrow-r{background-position:-108px 50%}.ui-icon-arrow-l{background-position:-144px 50%}.ui-icon-arrow-u{background-position:-180px 50%}.ui-icon-arrow-d{background-position:-216px 50%}.ui-icon-check{background-position:-252px 50%}.ui-icon-gear{background-position:-288px 50%}.ui-icon-refresh{background-position:-324px 50%}.ui-icon-forward{background-position:-360px 50%}.ui-icon-back{background-position:-396px 50%}.ui-icon-grid{background-position:-432px 50%}.ui-icon-star{background-position:-468px 50%}.ui-icon-alert{background-position:-504px 50%}.ui-icon-info{background-position:-540px 50%}.ui-icon-home{background-position:-576px 50%}.ui-icon-search{background-position:-612px 50%}.ui-icon-checkbox-off{background-position:-684px 50%}.ui-icon-checkbox-on{background-position:-648px 50%}.ui-icon-radio-off{background-position:-756px 50%}.ui-icon-radio-on{background-position:-720px 50%}.ui-checkbox .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.ui-icon-checkbox-off,.ui-icon-radio-off{background-color:transparent}.ui-icon-checkbox-on,.ui-checkbox-on .ui-icon,.ui-radio-on .ui-icon{background-color:#4596ce}.ui-icon-searchfield{background-image:url(images/icon-search-black.png);background-size:16px 16px}.ui-icon-loading{background-image:url(images/ajax-loader.png);width:40px;height:40px;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;background-size:35px 35px}.ui-btn-corner-tl{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em}.ui-btn-corner-tr{-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em}.ui-btn-corner-bl{-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em}.ui-btn-corner-br{-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em}.ui-btn-corner-top{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em;-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em}.ui-btn-corner-bottom{-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em;-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em}.ui-btn-corner-right{-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em;-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em}.ui-btn-corner-left{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em;-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em}.ui-btn-corner-all{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em}.ui-corner-tl,.ui-corner-tr,.ui-corner-bl,.ui-corner-br,.ui-corner-top,.ui-corner-bottom,.ui-corner-right,.ui-corner-left,.ui-corner-all,.ui-btn-corner-tl,.ui-btn-corner-tr,.ui-btn-corner-bl,.ui-btn-corner-br,.ui-btn-corner-top,.ui-btn-corner-bottom,.ui-btn-corner-right,.ui-btn-corner-left,.ui-btn-corner-all{-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.ui-overlay{background:#666;opacity:.5;filter:Alpha(Opacity=50);position:absolute;width:100%;height:100%}.ui-overlay-shadow{-moz-box-shadow:0 0 12px rgba(0,0,0,.6);-webkit-box-shadow:0 0 12px rgba(0,0,0,.6);box-shadow:0 0 12px rgba(0,0,0,.6)}.ui-shadow{-moz-box-shadow:0 1px 4px rgba(0,0,0,.3);-webkit-box-shadow:0 1px 4px rgba(0,0,0,.3);box-shadow:0 1px 4px rgba(0,0,0,.3)}.ui-bar-a .ui-shadow,.ui-bar-b .ui-shadow,.ui-bar-c .ui-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.ui-shadow-inset{-moz-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);box-shadow:inset 0 1px 4px rgba(0,0,0,.2)}.ui-icon-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.4);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.4);box-shadow:0 1px 0 rgba(255,255,255,.4)}.ui-focus{-moz-box-shadow:0 0 12px #387bbe;-webkit-box-shadow:0 0 12px #387bbe;box-shadow:0 0 12px #387bbe}.ui-mobile-nosupport-boxshadow *{-moz-box-shadow:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.ui-mobile-nosupport-boxshadow .ui-focus{outline-width:2px}.ui-mobile,.ui-mobile body{height:100%}.ui-mobile fieldset,.ui-page{padding:0;margin:0}.ui-mobile a img,.ui-mobile fieldset{border:0}.ui-mobile-viewport{margin:0;overflow-x:hidden;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.ui-mobile [data-role=page],.ui-mobile [data-role=dialog],.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;border:0}.ui-mobile .ui-page-active{display:block;overflow:visible}.portrait,.portrait .ui-page{min-height:420px}.landscape,.landscape .ui-page{min-height:300px}.ui-page.ui-mobile-touch-overflow,.ui-mobile-touch-overflow.ui-native-fixed .ui-content{overflow:auto;height:100%;-webkit-overflow-scrolling:touch;-moz-overflow-scrolling:touch;-o-overflow-scrolling:touch;-ms-overflow-scrolling:touch;overflow-scrolling:touch}.ui-page.ui-mobile-pre-transition{display:block}.ui-loading .ui-mobile-viewport{overflow:hidden!important}.ui-loading .ui-loader{display:block}.ui-loading .ui-page{overflow:hidden}.ui-loader{display:none;position:absolute;opacity:.85;z-index:100;left:50%;width:200px;margin-left:-130px;margin-top:-35px;padding:10px 30px}.ui-loader h1{font-size:15px;text-align:center}.ui-loader .ui-icon{position:static;display:block;opacity:.9;margin:0 auto;width:35px;height:35px;background-color:transparent}.ui-mobile-rendering>*{visibility:hidden}.ui-bar,.ui-body{position:relative;padding:.4em 15px;overflow:hidden;display:block;clear:both}.ui-bar{font-size:16px;margin:0}.ui-bar h1,.ui-bar h2,.ui-bar h3,.ui-bar h4,.ui-bar h5,.ui-bar h6{margin:0;padding:0;font-size:16px;display:inline-block}.ui-header,.ui-footer{display:block}.ui-page .ui-header,.ui-page .ui-footer{position:relative}.ui-header .ui-btn-left{position:absolute;left:10px;top:.4em}.ui-header .ui-btn-right{position:absolute;right:10px;top:.4em}.ui-header .ui-title,.ui-footer .ui-title{min-height:1.1em;text-align:center;font-size:16px;display:block;margin:.6em 90px .8em;padding:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0!important}.ui-content{border-width:0;overflow:visible;overflow-x:hidden;padding:15px}.ui-page-fullscreen .ui-content{padding:0}.ui-mobile-touch-overflow.ui-page.ui-native-fixed,.ui-mobile-touch-overflow.ui-page.ui-native-fullscreen{overflow:visible}.ui-mobile-touch-overflow.ui-native-fixed .ui-header,.ui-mobile-touch-overflow.ui-native-fixed .ui-footer{position:fixed;left:0;right:0;top:0;z-index:200}.ui-mobile-touch-overflow.ui-page.ui-native-fixed .ui-footer{top:auto;bottom:0}.ui-mobile-touch-overflow.ui-native-fixed .ui-content{padding-top:2.5em;padding-bottom:3em;top:0;bottom:0;height:auto;position:absolute}.ui-mobile-touch-overflow.ui-native-fullscreen .ui-content{padding-top:0;padding-bottom:0}.ui-mobile-touch-overflow.ui-native-fullscreen .ui-header,.ui-mobile-touch-overflow.ui-native-fullscreen .ui-footer{opacity:.9}.ui-native-bars-hidden{display:none}.ui-icon{width:18px;height:18px}.ui-fullscreen img{max-width:100%}.ui-nojs{position:absolute;left:-9999px}.spin{-webkit-transform:rotate(360deg);-webkit-animation-name:spin;-webkit-animation-duration:1s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}@-webkit-keyframes spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}.in,.out{-webkit-animation-timing-function:ease-in-out;-webkit-animation-duration:350ms}.slide.in{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromright}.slide.out{-webkit-transform:translateX(-100%);-webkit-animation-name:slideouttoleft}.slide.in.reverse{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromleft}.slide.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:slideouttoright}.slideup.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfrombottom;z-index:10}.slideup.out{-webkit-animation-name:dontmove;z-index:0}.slideup.out.reverse{-webkit-transform:translateY(100%);z-index:10;-webkit-animation-name:slideouttobottom}.slideup.in.reverse{z-index:0;-webkit-animation-name:dontmove}.slidedown.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfromtop;z-index:10}.slidedown.out{-webkit-animation-name:dontmove;z-index:0}.slidedown.out.reverse{-webkit-transform:translateY(-100%);z-index:10;-webkit-animation-name:slideouttotop}.slidedown.in.reverse{z-index:0;-webkit-animation-name:dontmove}@-webkit-keyframes slideinfromright{from{-webkit-transform:translateX(100%)}to{-webkit-transform:translateX(0)}}@-webkit-keyframes slideinfromleft{from{-webkit-transform:translateX(-100%)}to{-webkit-transform:translateX(0)}}@-webkit-keyframes slideouttoleft{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(-100%)}}@-webkit-keyframes slideouttoright{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(100%)}}@-webkit-keyframes slideinfromtop{from{-webkit-transform:translateY(-100%)}to{-webkit-transform:translateY(0)}}@-webkit-keyframes slideinfrombottom{from{-webkit-transform:translateY(100%)}to{-webkit-transform:translateY(0)}}@-webkit-keyframes slideouttobottom{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(100%)}}@-webkit-keyframes slideouttotop{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(-100%)}}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeout{from{opacity:1}to{opacity:0}}.fade.in{opacity:1;z-index:10;-webkit-animation-name:fadein}.fade.out{z-index:0;-webkit-animation-name:fadeout}.viewport-flip{-webkit-perspective:1000;position:absolute}.ui-mobile-viewport-transitioning,.ui-mobile-viewport-transitioning .ui-page{width:100%;height:100%;overflow:hidden}.flip{-webkit-animation-duration:.65s;-webkit-backface-visibility:hidden;-webkit-transform:translateX(0)}.flip.in{-webkit-transform:rotateY(0) scale(1);-webkit-animation-name:flipinfromleft}.flip.out{-webkit-transform:rotateY(-180deg) scale(.8);-webkit-animation-name:flipouttoleft}.flip.in.reverse{-webkit-transform:rotateY(0) scale(1);-webkit-animation-name:flipinfromright}.flip.out.reverse{-webkit-transform:rotateY(180deg) scale(.8);-webkit-animation-name:flipouttoright}@-webkit-keyframes flipinfromright{from{-webkit-transform:rotateY(-180deg) scale(.8)}to{-webkit-transform:rotateY(0) scale(1)}}@-webkit-keyframes flipinfromleft{from{-webkit-transform:rotateY(180deg) scale(.8)}to{-webkit-transform:rotateY(0) scale(1)}}@-webkit-keyframes flipouttoleft{from{-webkit-transform:rotateY(0) scale(1)}to{-webkit-transform:rotateY(-180deg) scale(.8)}}@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0) scale(1)}to{-webkit-transform:rotateY(180deg) scale(.8)}}@-webkit-keyframes dontmove{from{opacity:1}to{opacity:1}}.pop{-webkit-transform-origin:50% 50%}.pop.in{-webkit-transform:scale(1);opacity:1;-webkit-animation-name:popin;z-index:10}.pop.out.reverse{-webkit-transform:scale(.2);opacity:0;-webkit-animation-name:popout;z-index:10}.pop.in.reverse{z-index:0;-webkit-animation-name:dontmove}@-webkit-keyframes popin{from{-webkit-transform:scale(.2);opacity:0}to{-webkit-transform:scale(1);opacity:1}}@-webkit-keyframes popout{from{-webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(.2);opacity:0}}.ui-grid-a,.ui-grid-b,.ui-grid-c,.ui-grid-d{overflow:hidden}.ui-block-a,.ui-block-b,.ui-block-c,.ui-block-d,.ui-block-e{margin:0;padding:0;border:0;float:left;min-height:1px}.ui-grid-solo .ui-block-a{width:100%;float:none}.ui-grid-a .ui-block-a,.ui-grid-a .ui-block-b{width:50%}.ui-grid-a .ui-block-a{clear:left}.ui-grid-b .ui-block-a,.ui-grid-b .ui-block-b,.ui-grid-b .ui-block-c{width:33.333%}.ui-grid-b .ui-block-a{clear:left}.ui-grid-c .ui-block-a,.ui-grid-c .ui-block-b,.ui-grid-c .ui-block-c,.ui-grid-c .ui-block-d{width:25%}.ui-grid-c .ui-block-a{clear:left}.ui-grid-d .ui-block-a,.ui-grid-d .ui-block-b,.ui-grid-d .ui-block-c,.ui-grid-d .ui-block-d,.ui-grid-d .ui-block-e{width:20%}.ui-grid-d .ui-block-a{clear:left}.ui-header,.ui-footer,.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{position:absolute;overflow:hidden;width:100%;border-left-width:0;border-right-width:0}.ui-header-fixed,.ui-footer-fixed{z-index:1000;-webkit-transform:translateZ(0)}.ui-footer-duplicate,.ui-page-fullscreen .ui-fixed-inline{display:none}.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{opacity:.9}.ui-navbar{overflow:hidden}.ui-navbar ul,.ui-navbar-expanded ul{list-style:none;padding:0;margin:0;position:relative;display:block;border:0}.ui-navbar-collapsed ul{float:left;width:75%;margin-right:-2px}.ui-navbar-collapsed .ui-navbar-toggle{float:left;width:25%}.ui-navbar li.ui-navbar-truncate{position:absolute;left:-9999px;top:-9999px}.ui-navbar li .ui-btn,.ui-navbar .ui-navbar-toggle .ui-btn{display:block;font-size:12px;text-align:center;margin:0;border-right-width:0}.ui-navbar li .ui-btn{margin-right:-1px}.ui-navbar li .ui-btn:last-child{margin-right:0}.ui-header .ui-navbar li .ui-btn,.ui-header .ui-navbar .ui-navbar-toggle .ui-btn,.ui-footer .ui-navbar li .ui-btn,.ui-footer .ui-navbar .ui-navbar-toggle .ui-btn{border-top-width:0;border-bottom-width:0}.ui-navbar .ui-btn-inner{padding-left:2px;padding-right:2px}.ui-navbar-noicons li .ui-btn .ui-btn-inner,.ui-navbar-noicons .ui-navbar-toggle .ui-btn-inner{padding-top:.8em;padding-bottom:.9em}.ui-navbar-expanded .ui-btn{margin:0;font-size:14px}.ui-navbar-expanded .ui-btn-inner{padding-left:5px;padding-right:5px}.ui-navbar-expanded .ui-btn-icon-top .ui-btn-inner{padding:45px 5px 15px;text-align:center}.ui-navbar-expanded .ui-btn-icon-top .ui-icon{top:15px}.ui-navbar-expanded .ui-btn-icon-bottom .ui-btn-inner{padding:15px 5px 45px;text-align:center}.ui-navbar-expanded .ui-btn-icon-bottom .ui-icon{bottom:15px}.ui-navbar-expanded li .ui-btn .ui-btn-inner{min-height:2.5em}.ui-navbar-expanded .ui-navbar-noicons .ui-btn .ui-btn-inner{padding-top:1.8em;padding-bottom:1.9em}.ui-btn{display:block;text-align:center;cursor:pointer;position:relative;margin:.5em 5px;padding:0}.ui-btn:focus,.ui-btn:active{outline:0}.ui-header .ui-btn,.ui-footer .ui-btn,.ui-bar .ui-btn{display:inline-block;font-size:13px;margin:0}.ui-btn-inline{display:inline-block}.ui-btn-inner{padding:.6em 25px;display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative;zoom:1}.ui-header .ui-btn-inner,.ui-footer .ui-btn-inner,.ui-bar .ui-btn-inner{padding:.4em 8px .5em}.ui-btn-icon-notext{display:inline-block;width:20px;height:20px;padding:2px 1px 2px 3px;text-indent:-9999px}.ui-btn-icon-notext .ui-btn-inner{padding:0}.ui-btn-icon-notext .ui-btn-text{position:absolute;left:-999px}.ui-btn-icon-left .ui-btn-inner{padding-left:33px}.ui-header .ui-btn-icon-left .ui-btn-inner,.ui-footer .ui-btn-icon-left .ui-btn-inner,.ui-bar .ui-btn-icon-left .ui-btn-inner{padding-left:27px}.ui-btn-icon-right .ui-btn-inner{padding-right:33px}.ui-header .ui-btn-icon-right .ui-btn-inner,.ui-footer .ui-btn-icon-right .ui-btn-inner,.ui-bar .ui-btn-icon-right .ui-btn-inner{padding-right:27px}.ui-btn-icon-top .ui-btn-inner{padding-top:33px}.ui-header .ui-btn-icon-top .ui-btn-inner,.ui-footer .ui-btn-icon-top .ui-btn-inner,.ui-bar .ui-btn-icon-top .ui-btn-inner{padding-top:27px}.ui-btn-icon-bottom .ui-btn-inner{padding-bottom:33px}.ui-header .ui-btn-icon-bottom .ui-btn-inner,.ui-footer .ui-btn-icon-bottom .ui-btn-inner,.ui-bar .ui-btn-icon-bottom .ui-btn-inner{padding-bottom:27px}.ui-btn-icon-notext .ui-icon{display:block}.ui-btn-icon-left .ui-icon,.ui-btn-icon-right .ui-icon{position:absolute;top:50%;margin-top:-9px}.ui-btn-icon-top .ui-icon,.ui-btn-icon-bottom .ui-icon{position:absolute;left:50%;margin-left:-9px}.ui-btn-icon-left .ui-icon{left:10px}.ui-btn-icon-right .ui-icon{right:10px}.ui-header .ui-btn-icon-left .ui-icon,.ui-footer .ui-btn-icon-left .ui-icon,.ui-bar .ui-btn-icon-left .ui-icon{left:4px}.ui-header .ui-btn-icon-right .ui-icon,.ui-footer .ui-btn-icon-right .ui-icon,.ui-bar .ui-btn-icon-right .ui-icon{right:4px}.ui-header .ui-btn-icon-top .ui-icon,.ui-footer .ui-btn-icon-top .ui-icon,.ui-bar .ui-btn-icon-top .ui-icon{top:4px}.ui-header .ui-btn-icon-bottom .ui-icon,.ui-footer .ui-btn-icon-bottom .ui-icon,.ui-bar .ui-btn-icon-bottom .ui-icon{bottom:4px}.ui-btn-icon-top .ui-icon{top:5px}.ui-btn-icon-bottom .ui-icon{bottom:5px}.ui-btn-hidden{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-appearance:button;opacity:0;cursor:pointer;-ms-filter:"alpha(opacity=0)";filter:alpha(opacity=0);background:transparent}.ui-collapsible-contain{margin:.5em 0}.ui-collapsible-heading{font-size:16px;display:block;margin:0 -8px;padding:0;border-width:0 0 1px 0;position:relative}.ui-collapsible-heading a{text-align:left;margin:0}.ui-collapsible-heading a .ui-btn-inner{padding-left:40px}.ui-collapsible-heading a span.ui-btn{position:absolute;left:6px;top:50%;margin:-12px 0 0 0;width:20px;height:20px;padding:1px 0 1px 2px;text-indent:-9999px}.ui-collapsible-heading a span.ui-btn .ui-btn-inner{padding:10px 0}.ui-collapsible-heading a span.ui-btn .ui-icon{left:0;margin-top:-10px}.ui-collapsible-heading-status{position:absolute;left:-9999px}.ui-collapsible-content{display:block;padding:10px 0 10px 8px}.ui-collapsible-content-collapsed{display:none}.ui-collapsible-set{margin:.5em 0}.ui-collapsible-set .ui-collapsible-contain{margin:-1px 0 0}.ui-controlgroup,fieldset.ui-controlgroup{padding:0;margin:.5em 0 1em}.ui-bar .ui-controlgroup{margin:0 .3em}.ui-controlgroup-label{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em}.ui-controlgroup-controls{display:block;width:95%}.ui-controlgroup li{list-style:none}.ui-controlgroup-vertical .ui-btn,.ui-controlgroup-vertical .ui-checkbox,.ui-controlgroup-vertical .ui-radio{margin:0;border-bottom-width:0}.ui-controlgroup-vertical .ui-controlgroup-last{border-bottom-width:1px}.ui-controlgroup-horizontal{padding:0}.ui-controlgroup-horizontal .ui-btn,.ui-controlgroup-horizontal .ui-checkbox,.ui-controlgroup-horizontal .ui-radio{display:inline-block;margin:0 -5px 0 0}.ui-controlgroup-horizontal .ui-checkbox,.ui-controlgroup-horizontal .ui-radio{display:inline}.ui-controlgroup-horizontal .ui-checkbox .ui-btn,.ui-controlgroup-horizontal .ui-radio .ui-btn,.ui-controlgroup-horizontal .ui-checkbox:last-child,.ui-controlgroup-horizontal .ui-radio:last-child{margin-right:0}.ui-controlgroup-horizontal .ui-controlgroup-last{margin-right:0}.ui-controlgroup .ui-checkbox label,.ui-controlgroup .ui-radio label{font-size:16px}@media all and (min-width:450px){.ui-controlgroup-label{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-controlgroup-controls{width:60%;display:inline-block}}.ui-dialog{min-height:480px}.ui-dialog .ui-header,.ui-dialog .ui-content,.ui-dialog .ui-footer{margin:15px;position:relative}.ui-dialog .ui-header,.ui-dialog .ui-footer{z-index:10;width:auto}.ui-dialog .ui-content,.ui-dialog .ui-footer{margin-top:-15px}.ui-checkbox,.ui-radio{position:relative;margin:.2em 0 .5em;z-index:1}.ui-checkbox .ui-btn,.ui-radio .ui-btn{margin:0;text-align:left;z-index:2}.ui-checkbox .ui-btn-inner,.ui-radio .ui-btn-inner{white-space:normal}.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner{padding-left:45px}.ui-checkbox .ui-btn-icon-right .ui-btn-inner,.ui-radio .ui-btn-icon-right .ui-btn-inner{padding-right:45px}.ui-checkbox .ui-icon,.ui-radio .ui-icon{top:1.1em}.ui-checkbox .ui-btn-icon-left .ui-icon,.ui-radio .ui-btn-icon-left .ui-icon{left:15px}.ui-checkbox .ui-btn-icon-right .ui-icon,.ui-radio .ui-btn-icon-right .ui-icon{right:15px}.ui-checkbox input,.ui-radio input{position:absolute;left:20px;top:50%;width:10px;height:10px;margin:-5px 0 0 0;outline:0!important;z-index:1}.ui-field-contain{padding:1.5em 0;margin:0;border-bottom-width:1px;overflow:visible}.ui-field-contain:first-child{border-top-width:0}@media all and (min-width:450px){.ui-field-contain{border-width:0;padding:0;margin:1em 0}}.ui-select{display:block;position:relative}.ui-select select{position:absolute;left:-9999px;top:-9999px}.ui-select .ui-btn{overflow:hidden}.ui-select .ui-btn select{cursor:pointer;-webkit-appearance:button;left:0;top:0;width:100%;height:100%;opacity:0;-ms-filter:"alpha(opacity=0)";filter:alpha(opacity=0)}@-moz-document url-prefix(){.ui-select .ui-btn select{opacity:.0001}}.ui-select .ui-btn select.ui-select-nativeonly{opacity:1;text-indent:0}.ui-select .ui-btn-icon-right .ui-btn-inner{padding-right:45px}.ui-select .ui-btn-icon-right .ui-icon{right:15px}label.ui-select{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;display:block}.ui-select .ui-btn-text,.ui-selectmenu .ui-btn-text{display:block;min-height:1em}.ui-select .ui-btn-text{text-overflow:ellipsis;overflow:hidden}.ui-selectmenu{position:absolute;padding:0;z-index:100!important;width:80%;max-width:350px;padding:6px}.ui-selectmenu .ui-listview{margin:0}.ui-selectmenu .ui-btn.ui-li-divider{cursor:default}.ui-selectmenu-hidden{top:-9999px;left:-9999px}.ui-selectmenu-screen{position:absolute;top:0;left:0;width:100%;height:100%;z-index:99}.ui-screen-hidden,.ui-selectmenu-list .ui-li .ui-icon{display:none}.ui-selectmenu-list .ui-li .ui-icon{display:block}.ui-li.ui-selectmenu-placeholder{display:none}.ui-selectmenu .ui-header .ui-title{margin:.6em 46px .8em}@media all and (min-width:450px){label.ui-select{display:inline-block;width:20%;margin:0 2% 0 0}.ui-select{width:60%;display:inline-block}}.ui-selectmenu .ui-header h1:after{content:'.';visibility:hidden}label.ui-input-text{font-size:16px;line-height:1.4;display:block;font-weight:normal;margin:0 0 .3em}input.ui-input-text,textarea.ui-input-text{background-image:none;padding:.4em;line-height:1.4;font-size:16px;display:block;width:95%}input.ui-input-text{-webkit-appearance:none}textarea.ui-input-text{height:50px;-webkit-transition:height 200ms linear;-moz-transition:height 200ms linear;-o-transition:height 200ms linear;transition:height 200ms linear}.ui-input-search{padding:0 30px;width:77%;background-position:8px 50%;background-repeat:no-repeat;position:relative}.ui-input-search input.ui-input-text{border:0;width:98%;padding:.4em 0;margin:0;display:block;background:transparent none;outline:0!important}.ui-input-search .ui-input-clear{position:absolute;right:0;top:50%;margin-top:-14px}.ui-input-search .ui-input-clear-hidden{display:none}@media all and (min-width:450px){label.ui-input-text{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}input.ui-input-text,textarea.ui-input-text,.ui-input-search{width:60%;display:inline-block}.ui-input-search{width:50%}.ui-input-search input.ui-input-text{width:98%}}.ui-listview{margin:0;counter-reset:listnumbering}.ui-content .ui-listview{margin:-15px}.ui-content .ui-listview-inset{margin:1em 0}.ui-listview,.ui-li{list-style:none;padding:0}.ui-li,.ui-li.ui-field-contain{display:block;margin:0;position:relative;overflow:visible;text-align:left;border-width:0;border-top-width:1px}.ui-li .ui-btn-text a.ui-link-inherit{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-divider,.ui-li-static{padding:.5em 15px;font-size:14px;font-weight:bold}.ui-li-divider{counter-reset:listnumbering}ol.ui-listview .ui-link-inherit:before,ol.ui-listview .ui-li-static:before,.ui-li-dec{font-size:.8em;display:inline-block;padding-right:.3em;font-weight:normal;counter-increment:listnumbering;content:counter(listnumbering) ". "}ol.ui-listview .ui-li-jsnumbering:before{content:""!important}.ui-listview-inset .ui-li{border-right-width:1px;border-left-width:1px}.ui-li:last-child,.ui-li.ui-field-contain:last-child{border-bottom-width:1px}.ui-li>.ui-btn-inner{display:block;position:relative;padding:0}.ui-li .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li{padding:.7em 15px .7em 15px;display:block}.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-thumb{min-height:60px;padding-left:100px}.ui-li-has-icon .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-icon{min-height:20px;padding-left:40px}.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-count{padding-right:45px}.ui-li-has-arrow .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-arrow{padding-right:30px}.ui-li-has-arrow.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-arrow.ui-li-has-count{padding-right:75px}.ui-li-heading{font-size:16px;font-weight:bold;display:block;margin:.6em 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-desc{font-size:12px;font-weight:normal;display:block;margin:-.5em 0 .6em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-thumb,.ui-li-icon{position:absolute;left:1px;top:0;max-height:80px;max-width:80px}.ui-li-icon{max-height:40px;max-width:40px;left:10px;top:.9em}.ui-li-thumb,.ui-li-icon,.ui-li-content{float:left;margin-right:10px}.ui-li-aside{float:right;width:50%;text-align:right;margin:.3em 0}@media all and (min-width:480px){.ui-li-aside{width:45%}}.ui-li-divider{cursor:default}.ui-li-has-alt .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-alt{padding-right:95px}.ui-li-count{position:absolute;font-size:11px;font-weight:bold;padding:.2em .5em;top:50%;margin-top:-.9em;right:38px}.ui-li-divider .ui-li-count,.ui-li-static .ui-li-count{right:10px}.ui-li-has-alt .ui-li-count{right:55px}.ui-li-link-alt{position:absolute;width:40px;height:100%;border-width:0;border-left-width:1px;top:0;right:0;margin:0;padding:0}.ui-li-link-alt .ui-btn{overflow:hidden;position:absolute;right:8px;top:50%;margin:-11px 0 0 0;border-bottom-width:1px}.ui-li-link-alt .ui-btn-inner{padding:0;position:static}.ui-li-link-alt .ui-btn .ui-icon{right:50%;margin-right:-9px}.ui-listview-filter{border-width:0;overflow:hidden;margin:-15px -15px 15px -15px}.ui-listview-filter .ui-input-search{margin:5px;width:auto;display:block}.ui-listview-filter-inset{margin:-15px -5px -15px -5px;background:transparent}.ui-li.ui-screen-hidden{display:none}@media only screen and (min-device-width:768px) and (max-device-width:1024px){.ui-li .ui-btn-text{overflow:visible}}label.ui-slider{display:block}input.ui-slider-input{display:inline-block;width:50px}select.ui-slider-switch{display:none}div.ui-slider{position:relative;display:inline-block;overflow:visible;height:15px;padding:0;margin:0 2% 0 20px;top:4px;width:66%}a.ui-slider-handle{position:absolute;z-index:10;top:50%;width:28px;height:28px;margin-top:-15px;margin-left:-15px}a.ui-slider-handle .ui-btn-inner{padding-left:0;padding-right:0}@media all and (min-width:480px){label.ui-slider{display:inline-block;width:20%;margin:0 2% 0 0}div.ui-slider{width:45%}}div.ui-slider-switch{height:32px;overflow:hidden;margin-left:0}div.ui-slider-inneroffset{margin-left:50%;position:absolute;top:1px;height:100%;width:50%}a.ui-slider-handle-snapping{-webkit-transition:left 100ms linear}div.ui-slider-labelbg{position:absolute;top:0;margin:0;border-width:0}div.ui-slider-switch div.ui-slider-labelbg-a{width:60%;height:100%;left:0}div.ui-slider-switch div.ui-slider-labelbg-b{width:60%;height:100%;right:0}.ui-slider-switch-a div.ui-slider-labelbg-a,.ui-slider-switch-b div.ui-slider-labelbg-b{z-index:-1}.ui-slider-switch-a div.ui-slider-labelbg-b,.ui-slider-switch-b div.ui-slider-labelbg-a{z-index:0}div.ui-slider-switch a.ui-slider-handle{z-index:20;width:101%;height:32px;margin-top:-18px;margin-left:-101%}span.ui-slider-label{width:100%;position:absolute;height:32px;font-size:16px;text-align:center;line-height:2;background:0;border-color:transparent}span.ui-slider-label-a{left:-100%;margin-right:-1px}span.ui-slider-label-b{right:-100%;margin-left:-1px}
skin/frontend/smarttheme/default/jquery.mobile-1.0b3.min.js ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Mobile v1.0b3
3
+ * http://jquerymobile.com/
4
+ *
5
+ * Copyright 2010, jQuery Project
6
+ * Dual licensed under the MIT or GPL Version 2 licenses.
7
+ * http://jquery.org/license
8
+ */
9
+ (function(a,d){if(a.cleanData){var b=a.cleanData;a.cleanData=function(c){for(var e=0,d;(d=c[e])!=null;e++)a(d).triggerHandler("remove");b(c)}}else{var c=a.fn.remove;a.fn.remove=function(b,e){return this.each(function(){e||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return c.call(a(this),b,e)})}}a.widget=function(c,b,d){var h=c.split(".")[0],j,c=c.split(".")[1];j=h+"-"+c;if(!d)d=b,b=a.Widget;a.expr[":"][j]=function(b){return!!a.data(b,
10
+ c)};a[h]=a[h]||{};a[h][c]=function(a,c){arguments.length&&this._createWidget(a,c)};b=new b;b.options=a.extend(!0,{},b.options);a[h][c].prototype=a.extend(!0,b,{namespace:h,widgetName:c,widgetEventPrefix:a[h][c].prototype.widgetEventPrefix||c,widgetBaseClass:j},d);a.widget.bridge(c,a[h][c])};a.widget.bridge=function(c,b){a.fn[c]=function(g){var h=typeof g==="string",j=Array.prototype.slice.call(arguments,1),l=this,g=!h&&j.length?a.extend.apply(null,[!0,g].concat(j)):g;if(h&&g.charAt(0)==="_")return l;
11
+ h?this.each(function(){var b=a.data(this,c);if(!b)throw"cannot call methods on "+c+" prior to initialization; attempted to call method '"+g+"'";if(!a.isFunction(b[g]))throw"no such method '"+g+"' for "+c+" widget instance";var e=b[g].apply(b,j);if(e!==b&&e!==d)return l=e,!1}):this.each(function(){var d=a.data(this,c);d?d.option(g||{})._init():a.data(this,c,new b(g,this))});return l}};a.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",
12
+ options:{disabled:!1},_createWidget:function(c,b){a.data(b,this.widgetName,this);this.element=a(b);this.options=a.extend(!0,{},this.options,this._getCreateOptions(),c);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var c={};a.metadata&&(c=a.metadata.get(element)[this.widgetName]);return c},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);
13
+ this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(c,b){var g=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c==="string"){if(b===d)return this.options[c];g={};g[c]=b}this._setOptions(g);return this},_setOptions:function(c){var b=this;a.each(c,function(a,c){b._setOption(a,c)});return this},_setOption:function(a,c){this.options[a]=c;a==="disabled"&&
14
+ this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(c,b,d){var h=this.options[c],b=a.Event(b);b.type=(c===this.widgetEventPrefix?c:this.widgetEventPrefix+c).toLowerCase();d=d||{};if(b.originalEvent)for(var c=a.event.props.length,j;c;)j=a.event.props[--c],b[j]=b.originalEvent[j];this.element.trigger(b,
15
+ d);return!(a.isFunction(h)&&h.call(this.element[0],b,d)===!1||b.isDefaultPrevented())}}})(jQuery);(function(a,d){a.widget("mobile.widget",{_getCreateOptions:function(){var b=this.element,c={};a.each(this.options,function(a){var e=b.jqmData(a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));e!==d&&(c[a]=e)});return c}})})(jQuery);
16
+ (function(a){a(window);var d=a("html");a.mobile.media=function(){var b={},c=a("<div id='jquery-mediatest'>"),f=a("<body>").append(c);return function(a){if(!(a in b)){var g=document.createElement("style"),h="@media "+a+" { #jquery-mediatest { position:absolute; } }";g.type="text/css";g.styleSheet?g.styleSheet.cssText=h:g.appendChild(document.createTextNode(h));d.prepend(f).prepend(g);b[a]=c.css("position")==="absolute";f.add(g).remove()}return b[a]}}()})(jQuery);
17
+ (function(a,d){function b(a){var c=a.charAt(0).toUpperCase()+a.substr(1),a=(a+" "+e.join(c+" ")+c).split(" "),b;for(b in a)if(f[a[b]]!==d)return!0}var c=a("<body>").prependTo("html"),f=c[0].style,e=["Webkit","Moz","O"],g="palmGetResource"in window,h=window.blackberry;a.mobile.browser={};a.mobile.browser.ie=function(){for(var a=3,c=document.createElement("div"),b=c.all||[];c.innerHTML="<\!--[if gt IE "+ ++a+"]><br><![endif]--\>",b[0];);return a>4?a:!a}();a.extend(a.support,{orientation:"orientation"in
18
+ window,touch:"ontouchend"in document,cssTransitions:"WebKitTransitionEvent"in window,pushState:"pushState"in history&&"replaceState"in history,mediaquery:a.mobile.media("only all"),cssPseudoElement:!!b("content"),touchOverflow:!!b("overflowScrolling"),boxShadow:!!b("boxShadow")&&!h,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in c[0])&&!g,dynamicBaseTag:function(){var b=location.protocol+"//"+location.host+location.pathname+"ui-dir/",d=a("head base"),f=null,
19
+ e="",g;d.length?e=d.attr("href"):d=f=a("<base>",{href:b}).appendTo("head");g=a("<a href='testurl'></a>").prependTo(c)[0].href;d[0].href=e?e:location.pathname;f&&f.remove();return g.indexOf(b)===0}(),eventCapture:"addEventListener"in document});c.remove();g=function(){var a=window.navigator.userAgent;return a.indexOf("Nokia")>-1&&(a.indexOf("Symbian/3")>-1||a.indexOf("Series60/5")>-1)&&a.indexOf("AppleWebKit")>-1&&a.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}();a.mobile.ajaxBlacklist=window.blackberry&&
20
+ !window.WebKitPoint||window.operamini&&Object.prototype.toString.call(window.operamini)==="[object OperaMini]"||g;g&&a(function(){a("head link[rel=stylesheet]").attr("rel","alternate stylesheet").attr("rel","stylesheet")});a.support.boxShadow||a("html").addClass("ui-mobile-nosupport-boxshadow")})(jQuery);
21
+ (function(a,d,b,c){function f(a){for(;a&&typeof a.originalEvent!=="undefined";)a=a.originalEvent;return a}function e(c){for(var b={},d,f;c;){d=a.data(c,o);for(f in d)if(d[f])b[f]=b.hasVirtualBinding=!0;c=c.parentNode}return b}function g(){v&&(clearTimeout(v),v=0);v=setTimeout(function(){B=v=0;x.length=0;r=!1;z=!0},a.vmouse.resetTimerDuration)}function h(b,d,r){var e,g;if(!(g=r&&r[b])){if(r=!r)a:{for(r=d.target;r;){if((g=a.data(r,o))&&(!b||g[b]))break a;r=r.parentNode}r=null}g=r}if(g){e=d;var r=e.type,
22
+ i,z;e=a.Event(e);e.type=b;g=e.originalEvent;i=a.event.props;if(g)for(z=i.length;z;)b=i[--z],e[b]=g[b];if(r.search(/^touch/)!==-1&&(b=f(g),r=b.touches,b=b.changedTouches,r=r&&r.length?r[0]:b&&b.length?b[0]:c)){g=0;for(len=y.length;g<len;g++)b=y[g],e[b]=r[b]}a(d.target).trigger(e)}return e}function j(c){var b=a.data(c.target,A);if(!r&&(!B||B!==b))if(b=h("v"+c.type,c))b.isDefaultPrevented()&&c.preventDefault(),b.isPropagationStopped()&&c.stopPropagation(),b.isImmediatePropagationStopped()&&c.stopImmediatePropagation()}
23
+ function l(c){var b=f(c).touches,d;if(b&&b.length===1&&(d=c.target,b=e(d),b.hasVirtualBinding))B=G++,a.data(d,A,B),v&&(clearTimeout(v),v=0),w=z=!1,d=f(c).touches[0],t=d.pageX,u=d.pageY,h("vmouseover",c,b),h("vmousedown",c,b)}function n(a){z||(w||h("vmousecancel",a,e(a.target)),w=!0,g())}function s(c){if(!z){var b=f(c).touches[0],d=w,r=a.vmouse.moveDistanceThreshold;w=w||Math.abs(b.pageX-t)>r||Math.abs(b.pageY-u)>r;flags=e(c.target);w&&!d&&h("vmousecancel",c,flags);h("vmousemove",c,flags);g()}}function p(a){if(!z){z=
24
+ !0;var c=e(a.target),b;h("vmouseup",a,c);if(!w&&(b=h("vclick",a,c))&&b.isDefaultPrevented())b=f(a).changedTouches[0],x.push({touchID:B,x:b.clientX,y:b.clientY}),r=!0;h("vmouseout",a,c);w=!1;g()}}function k(c){var c=a.data(c,o),b;if(c)for(b in c)if(c[b])return!0;return!1}function i(){}function m(c){var b=c.substr(1);return{setup:function(){k(this)||a.data(this,o,{});a.data(this,o)[c]=!0;q[c]=(q[c]||0)+1;q[c]===1&&C.bind(b,j);a(this).bind(b,i);if(E)q.touchstart=(q.touchstart||0)+1,q.touchstart===1&&
25
+ C.bind("touchstart",l).bind("touchend",p).bind("touchmove",s).bind("scroll",n)},teardown:function(){--q[c];q[c]||C.unbind(b,j);E&&(--q.touchstart,q.touchstart||C.unbind("touchstart",l).unbind("touchmove",s).unbind("touchend",p).unbind("scroll",n));var d=a(this),r=a.data(this,o);r&&(r[c]=!1);d.unbind(b,i);k(this)||d.removeData(o)}}}var o="virtualMouseBindings",A="virtualTouchID",d="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),y="clientX clientY pageX pageY screenX screenY".split(" "),
26
+ q={},v=0,t=0,u=0,w=!1,x=[],r=!1,z=!1,E=a.support.eventCapture,C=a(b),G=1,B=0;a.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var D=0;D<d.length;D++)a.event.special[d[D]]=m(d[D]);E&&b.addEventListener("click",function(c){var b=x.length,d=c.target,r,f,e,g,i;if(b){r=c.clientX;f=c.clientY;threshold=a.vmouse.clickDistanceThreshold;for(e=d;e;){for(g=0;g<b;g++)if(i=x[g],e===d&&Math.abs(i.x-r)<threshold&&Math.abs(i.y-f)<threshold||a.data(e,A)===i.touchID){c.preventDefault();
27
+ c.stopPropagation();return}e=e.parentNode}}},!0)})(jQuery,window,document);
28
+ (function(a,d,b){function c(c,b,d){var f=d.type;d.type=b;a.event.handle.call(c,d);d.type=f}a.each("touchstart touchmove touchend orientationchange throttledresize tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(c,b){a.fn[b]=function(a){return a?this.bind(b,a):this.trigger(b)};a.attrFn[b]=!0});var f=a.support.touch,e=f?"touchstart":"mousedown",g=f?"touchend":"mouseup",h=f?"touchmove":"mousemove";a.event.special.scrollstart={enabled:!0,setup:function(){function b(a,
29
+ e){f=e;c(d,f?"scrollstart":"scrollstop",a)}var d=this,f,e;a(d).bind("touchmove scroll",function(c){a.event.special.scrollstart.enabled&&(f||b(c,!0),clearTimeout(e),e=setTimeout(function(){b(c,!1)},50))})}};a.event.special.tap={setup:function(){var b=this,d=a(b);d.bind("vmousedown",function(f){function e(){clearTimeout(m)}function g(){e();d.unbind("vclick",h).unbind("vmouseup",e).unbind("vmousecancel",g)}function h(a){g();i==a.target&&c(b,"tap",a)}if(f.which&&f.which!==1)return!1;var i=f.target,m;
30
+ d.bind("vmousecancel",g).bind("vmouseup",e).bind("vclick",h);m=setTimeout(function(){c(b,"taphold",a.Event("taphold"))},750)})}};a.event.special.swipe={scrollSupressionThreshold:10,durationThreshold:1E3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var c=a(this);c.bind(e,function(d){function f(c){if(p){var b=c.originalEvent.touches?c.originalEvent.touches[0]:c;k={time:(new Date).getTime(),coords:[b.pageX,b.pageY]};Math.abs(p.coords[0]-k.coords[0])>a.event.special.swipe.scrollSupressionThreshold&&
31
+ c.preventDefault()}}var e=d.originalEvent.touches?d.originalEvent.touches[0]:d,p={time:(new Date).getTime(),coords:[e.pageX,e.pageY],origin:a(d.target)},k;c.bind(h,f).one(g,function(){c.unbind(h,f);p&&k&&k.time-p.time<a.event.special.swipe.durationThreshold&&Math.abs(p.coords[0]-k.coords[0])>a.event.special.swipe.horizontalDistanceThreshold&&Math.abs(p.coords[1]-k.coords[1])<a.event.special.swipe.verticalDistanceThreshold&&p.origin.trigger("swipe").trigger(p.coords[0]>k.coords[0]?"swipeleft":"swiperight");
32
+ p=k=b})})}};(function(a,c){function b(){var a=f();a!==e&&(e=a,d.trigger("orientationchange"))}var d=a(c),f,e;a.event.special.orientationchange={setup:function(){if(a.support.orientation)return!1;e=f();d.bind("throttledresize",b)},teardown:function(){if(a.support.orientation)return!1;d.unbind("throttledresize",b)},add:function(a){var c=a.handler;a.handler=function(a){a.orientation=f();return c.apply(this,arguments)}}};a.event.special.orientationchange.orientation=f=function(){var a=document.documentElement;
33
+ return a&&a.clientWidth/a.clientHeight<1.1?"portrait":"landscape"}})(jQuery,d);(function(){a.event.special.throttledresize={setup:function(){a(this).bind("resize",c)},teardown:function(){a(this).unbind("resize",c)}};var c=function(){f=(new Date).getTime();e=f-b;e>=250?(b=f,a(this).trigger("throttledresize")):(d&&clearTimeout(d),d=setTimeout(c,250-e))},b=0,d,f,e})();a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(c,b){a.event.special[c]={setup:function(){a(this).bind(b,
34
+ a.noop)}}})})(jQuery,this);
35
+ (function(a,d,b){function c(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var f="hashchange",e=document,g,h=a.event.special,j=e.documentMode,l="on"+f in d&&(j===b||j>7);a.fn[f]=function(a){return a?this.bind(f,a):this.trigger(f)};a.fn[f].delay=50;h[f]=a.extend(h[f],{setup:function(){if(l)return!1;a(g.start)},teardown:function(){if(l)return!1;a(g.stop)}});g=function(){function g(){var b=c(),e=o(k);if(b!==k)j(k=b,e),a(d).trigger(f);else if(e!==k)location.href=location.href.replace(/#.*/,
36
+ "")+e;p=setTimeout(g,a.fn[f].delay)}var h={},p,k=c(),i=function(a){return a},j=i,o=i;h.start=function(){p||g()};h.stop=function(){p&&clearTimeout(p);p=b};a.browser.msie&&!l&&function(){var b,d;h.start=function(){if(!b)d=(d=a.fn[f].src)&&d+c(),b=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){d||j(c());g()}).attr("src",d||"javascript:0").insertAfter("body")[0].contentWindow,e.onpropertychange=function(){try{if(event.propertyName==="title")b.document.title=e.title}catch(a){}}};
37
+ h.stop=i;o=function(){return c(b.location.href)};j=function(c,d){var g=b.document,i=a.fn[f].domain;if(c!==d)g.title=e.title,g.open(),i&&g.write('<script>document.domain="'+i+'"<\/script>'),g.close(),b.location.hash=c}}();return h}()})(jQuery,this);(function(a){a.widget("mobile.page",a.mobile.widget,{options:{theme:"c",domCache:!1},_create:function(){this._trigger("beforecreate");this.element.attr("tabindex","0").addClass("ui-page ui-body-"+this.options.theme)}})})(jQuery);
38
+ (function(a,d){a.extend(a.mobile,{ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",ajaxEnabled:!0,hashListeningEnabled:!0,defaultPageTransition:"slide",minScrollBack:250,defaultDialogTransition:"pop",loadingMessage:"loading",pageLoadErrorMessage:"Error Loading Page",autoInitializePage:!0,pushStateEnabled:!0,gradeA:function(){return a.support.mediaquery||a.mobile.browser.ie&&a.mobile.browser.ie>=7},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,
39
+ COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},silentScroll:function(c){if(a.type(c)!=="number")c=a.mobile.defaultHomeScroll;a.event.special.scrollstart.enabled=!1;setTimeout(function(){d.scrollTo(0,c);a(document).trigger("silentscroll",
40
+ {x:0,y:c})},20);setTimeout(function(){a.event.special.scrollstart.enabled=!0},150)},nsNormalize:function(c){if(c)return a.camelCase(a.mobile.ns+c)}});a.fn.jqmData=function(c,b){return this.data(c?a.mobile.nsNormalize(c):c,b)};a.jqmData=function(c,b,d){return a.data(c,a.mobile.nsNormalize(b),d)};a.fn.jqmRemoveData=function(c){return this.removeData(a.mobile.nsNormalize(c))};a.jqmRemoveData=function(c,b){return a.removeData(c,a.mobile.nsNormalize(b))};a.jqmHasData=function(b,d){return a.hasData(b,a.mobile.nsNormalize(d))};
41
+ var b=a.find;a.find=function(c,d,e,g){c=c.replace(/:jqmData\(([^)]*)\)/g,"[data-"+(a.mobile.ns||"")+"$1]");return b.call(this,c,d,e,g)};a.extend(a.find,b);a.find.matches=function(b,d){return a.find(b,null,null,d)};a.find.matchesSelector=function(b,d){return a.find(d,null,null,[b]).length>0}})(jQuery,this);
42
+ (function(a,d){function b(a){var b=a.find(".ui-title:eq(0)");b.length?b.focus():a.focus()}function c(b){m&&(!m.closest(".ui-page-active").length||b)&&m.removeClass(a.mobile.activeBtnClass);m=null}function f(){y=!1;A.length>0&&a.mobile.changePage.apply(null,A.pop())}function e(c,d,e,f){var i=a.mobile.urlHistory.getActive(),h=a.support.touchOverflow&&a.mobile.touchOverflowEnabled,q=i.lastScroll||(h?0:a.mobile.defaultHomeScroll),i=g();window.scrollTo(0,a.mobile.defaultHomeScroll);d&&d.data("page")._trigger("beforehide",
43
+ null,{nextPage:c});h||c.height(i+q);c.data("page")._trigger("beforeshow",null,{prevPage:d||a("")});a.mobile.hidePageLoadingMsg();h&&q&&(c.addClass("ui-mobile-pre-transition"),b(c),c.is(".ui-native-fixed")?c.find(".ui-content").scrollTop(q):c.scrollTop(q));e=(a.mobile.transitionHandlers[e||"none"]||a.mobile.defaultTransitionHandler)(e,f,c,d);e.done(function(){h||(c.height(""),b(c));h||a.mobile.silentScroll(q);d&&(h||d.height(""),d.data("page")._trigger("hide",null,{nextPage:c}));c.data("page")._trigger("show",
44
+ null,{prevPage:d||a("")})});return e}function g(){var b=jQuery.event.special.orientationchange.orientation()==="portrait",c=b?screen.availHeight:screen.availWidth,b=Math.max(b?480:320,a(window).height());return Math.min(c,b)}function h(){a("."+a.mobile.activePageClass).css("min-height",g())}function j(b,c){c&&b.attr("data-"+a.mobile.ns+"role",c);b.page()}function l(a){for(;a;){if(a.nodeName.toLowerCase()=="a")break;a=a.parentNode}return a}function n(b){var b=a(b).closest(".ui-page").jqmData("url"),
45
+ c=u.hrefNoHash;if(!b||!i.isPath(b))b=c;return i.makeUrlAbsolute(b,c)}var s=a(window),p=a("html"),k=a("head"),i={urlParseRE:/^(((([^:\/#\?]+:)?(?:\/\/((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(b){if(a.type(b)==="object")return b;var b=i.urlParseRE.exec(b),c;b&&(c={href:b[0]||"",hrefNoHash:b[1]||"",hrefNoSearch:b[2]||"",domain:b[3]||"",protocol:b[4]||"",authority:b[5]||"",username:b[7]||
46
+ "",password:b[8]||"",host:b[9]||"",hostname:b[10]||"",port:b[11]||"",pathname:b[12]||"",directory:b[13]||"",filename:b[14]||"",search:b[15]||"",hash:b[16]||""});return c||{}},makePathAbsolute:function(a,b){if(a&&a.charAt(0)==="/")return a;for(var a=a||"",c=(b=b?b.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"")?b.split("/"):[],d=a.split("/"),e=0;e<d.length;e++){var f=d[e];switch(f){case ".":break;case "..":c.length&&c.pop();break;default:c.push(f)}}return"/"+c.join("/")},isSameDomain:function(a,b){return i.parseUrl(a).domain===
47
+ i.parseUrl(b).domain},isRelativeUrl:function(a){return i.parseUrl(a).protocol===""},isAbsoluteUrl:function(a){return i.parseUrl(a).protocol!==""},makeUrlAbsolute:function(a,b){if(!i.isRelativeUrl(a))return a;var c=i.parseUrl(a),d=i.parseUrl(b),e=c.protocol||d.protocol,f=c.authority||d.authority,g=c.pathname!=="",h=i.makePathAbsolute(c.pathname||d.filename,d.pathname);return e+"//"+f+h+(c.search||!g&&d.search||"")+c.hash},addSearchParams:function(b,c){var d=i.parseUrl(b),e=typeof c==="object"?a.param(c):
48
+ c,f=d.search||"?";return d.hrefNoSearch+f+(f.charAt(f.length-1)!=="?"?"&":"")+e+(d.hash||"")},convertUrlToDataUrl:function(a){var b=i.parseUrl(a);if(i.isEmbeddedPage(b))return b.hash.split(q)[0].replace(/^#/,"");else if(i.isSameDomain(b,u))return b.hrefNoHash.replace(u.domain,"");return a},get:function(a){if(a===d)a=location.hash;return i.stripHash(a).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(b){var c="&"+a.mobile.subPageUrlKey;return b&&b.split(c)[0].split(q)[0]},set:function(a){location.hash=
49
+ a},isPath:function(a){return/\//.test(a)},clean:function(a){return a.replace(u.domain,"")},stripHash:function(a){return a.replace(/^#/,"")},cleanHash:function(a){return i.stripHash(a.replace(/\?.*$/,"").replace(q,""))},isExternal:function(a){a=i.parseUrl(a);return a.protocol&&a.domain!==t.domain?!0:!1},hasProtocol:function(a){return/^(:?\w+:)/.test(a)},isFirstPageUrl:function(b){var b=i.parseUrl(i.makeUrlAbsolute(b,u)),c=a.mobile.firstPage,c=c&&c[0]?c[0].id:d;return(b.hrefNoHash===t.hrefNoHash||w&&
50
+ b.hrefNoHash===u.hrefNoHash)&&(!b.hash||b.hash==="#"||c&&b.hash.replace(/^#/,"")===c)},isEmbeddedPage:function(a){a=i.parseUrl(a);if(a.protocol!=="")return a.hash&&(a.hrefNoHash===t.hrefNoHash||w&&a.hrefNoHash===u.hrefNoHash);return/^#/.test(a.href)}},m=null,o={stack:[],activeIndex:0,getActive:function(){return o.stack[o.activeIndex]},getPrev:function(){return o.stack[o.activeIndex-1]},getNext:function(){return o.stack[o.activeIndex+1]},addNew:function(a,b,c,d,e){o.getNext()&&o.clearForward();o.stack.push({url:a,
51
+ transition:b,title:c,pageUrl:d,role:e});o.activeIndex=o.stack.length-1},clearForward:function(){o.stack=o.stack.slice(0,o.activeIndex+1)},directHashChange:function(b){var c,e,f;this.getActive();a.each(o.stack,function(a,d){b.currentUrl===d.url&&(c=a<o.activeIndex,e=!c,f=a)});this.activeIndex=f!==d?f:this.activeIndex;c?(b.either||b.isBack)(!0):e&&(b.either||b.isForward)(!1)},ignoreNextHashChange:!1},A=[],y=!1,q="&ui-state=dialog",v=k.children("base"),t=i.parseUrl(location.href),u=v.length?i.parseUrl(i.makeUrlAbsolute(v.attr("href"),
52
+ t.href)):t,w=t.hrefNoHash!==u.hrefNoHash,x=a.support.dynamicBaseTag?{element:v.length?v:a("<base>",{href:u.hrefNoHash}).prependTo(k),set:function(a){x.element.attr("href",i.makeUrlAbsolute(a,u))},reset:function(){x.element.attr("href",u.hrefNoHash)}}:d,k=function(b){return function(){if(b){b=!1;var c=a.mobile.urlHistory.getActive(),d=a(".ui-page-active"),e=a(window);a.support.touchOverflow&&a.mobile.touchOverflowEnabled&&(e=d.is(".ui-native-fixed")?d.find(".ui-content"):d);if(c)d=e.scrollTop(),c.lastScroll=
53
+ d<a.mobile.minScrollBack?a.mobile.defaultHomeScroll:d}else b=!0}}(!0);a(document).bind("beforechangepage",k);a(window).bind(a.support.pushState?"popstate":"hashchange",k);a.mobile.getScreenHeight=g;a.fn.animationComplete=function(b){return a.support.cssTransitions?a(this).one("webkitAnimationEnd",b):(setTimeout(b,0),a(this))};a.mobile.updateHash=i.set;a.mobile.path=i;a.mobile.base=x;a.mobile.urlstack=o.stack;a.mobile.urlHistory=o;a.mobile.dialogHashKey=q;a.mobile.noneTransitionHandler=function(b,
54
+ c,d,e){e&&e.removeClass(a.mobile.activePageClass);d.addClass(a.mobile.activePageClass);return a.Deferred().resolve(b,c,d,e).promise()};a.mobile.defaultTransitionHandler=a.mobile.noneTransitionHandler;a.mobile.transitionHandlers={none:a.mobile.defaultTransitionHandler};a.mobile.allowCrossDomainPages=!1;a.mobile.getDocumentUrl=function(b){return b?a.extend({},t):t.href};a.mobile.getDocumentBase=function(b){return b?a.extend({},u):u.href};a.mobile.loadPage=function(b,c){var e=a.Deferred(),f=a.extend({},
55
+ a.mobile.loadPage.defaults,c),g=null,h=null,q=i.makeUrlAbsolute(b,a.mobile.activePage&&n(a.mobile.activePage)||u.hrefNoHash);if(f.data&&f.type==="get")q=i.addSearchParams(q,f.data),f.data=d;var k=i.getFilePath(q),p=i.convertUrlToDataUrl(q);f.pageContainer=f.pageContainer||a.mobile.pageContainer;g=f.pageContainer.children(":jqmData(url='"+p+"')");g.length===0&&a.mobile.firstPage&&i.isFirstPageUrl(q)&&(g=a(a.mobile.firstPage));x&&x.reset();if(g.length){if(!f.reloadPage)return j(g,f.role),e.resolve(q,
56
+ c,g),e.promise();h=g}if(f.showLoadMsg)var o=setTimeout(function(){a.mobile.showPageLoadingMsg()},f.loadMsgDelay);!a.mobile.allowCrossDomainPages&&!i.isSameDomain(t,q)?e.reject(q,c):a.ajax({url:k,type:f.type,data:f.data,dataType:"html",success:function(d){var l=a("<div></div>"),n=d.match(/<title[^>]*>([^<]*)/)&&RegExp.$1,v=RegExp("\\bdata-"+a.mobile.ns+"url=[\"']?([^\"'>]*)[\"']?");RegExp(".*(<[^>]+\\bdata-"+a.mobile.ns+"role=[\"']?page[\"']?[^>]*>).*").test(d)&&RegExp.$1&&v.test(RegExp.$1)&&RegExp.$1&&
57
+ (b=k=i.getFilePath(RegExp.$1));x&&x.set(k);l.get(0).innerHTML=d;g=l.find(":jqmData(role='page'), :jqmData(role='dialog')").first();g.length||(g=a("<div data-"+a.mobile.ns+"role='page'>"+d.split(/<\/?body[^>]*>/gmi)[1]+"</div>"));n&&!g.jqmData("title")&&g.jqmData("title",n);if(!a.support.dynamicBaseTag){var m=i.get(k);g.find("[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]").each(function(){var b=a(this).is("[href]")?"href":a(this).is("[src]")?"src":"action",c=a(this).attr(b),
58
+ c=c.replace(location.protocol+"//"+location.host+location.pathname,"");/^(\w+:|#|\/)/.test(c)||a(this).attr(b,m+c)})}g.attr("data-"+a.mobile.ns+"url",i.convertUrlToDataUrl(k)).appendTo(f.pageContainer);g.one("pagecreate",function(){g.data("page").options.domCache||g.bind("pagehide.remove",function(){a(this).remove()})});j(g,f.role);q.indexOf("&"+a.mobile.subPageUrlKey)>-1&&(g=f.pageContainer.children(":jqmData(url='"+p+"')"));f.showLoadMsg&&(clearTimeout(o),a.mobile.hidePageLoadingMsg());e.resolve(q,
59
+ c,g,h)},error:function(){x&&x.set(i.get());f.showLoadMsg&&(clearTimeout(o),a.mobile.hidePageLoadingMsg(),a("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>"+a.mobile.pageLoadErrorMessage+"</h1></div>").css({display:"block",opacity:0.96,top:s.scrollTop()+100}).appendTo(f.pageContainer).delay(800).fadeOut(400,function(){a(this).remove()}));e.reject(q,c)}});return e.promise()};a.mobile.loadPage.defaults={type:"get",data:d,reloadPage:!1,role:d,showLoadMsg:!1,pageContainer:d,loadMsgDelay:50};
60
+ a.mobile.changePage=function(b,g){if(typeof g!=="object"){var h=null;if(typeof b==="object"&&b.url&&b.type)h={type:b.type,data:b.data,forcePageLoad:!0},b=b.url;var k=arguments.length;if(k>1){var l=["transition","reverse","changeHash","fromHashChange"],n;for(n=1;n<k;n++){var v=arguments[n];typeof v!=="undefined"&&(h=h||{},h[l[n-1]]=v)}}if(h)return a.mobile.changePage(b,h)}if(y)A.unshift(arguments);else{var m=a.extend({},a.mobile.changePage.defaults,g);m.pageContainer=m.pageContainer||a.mobile.pageContainer;
61
+ m.fromPage=m.fromPage||a.mobile.activePage;var u=m.pageContainer,h=new a.Event("pagebeforechange"),t={toPage:b,options:m};u.trigger(h,t);u.trigger("beforechangepage",t);if(!h.isDefaultPrevented())if(b=t.toPage,y=!0,typeof b=="string")a.mobile.loadPage(b,m).done(function(b,c,d,e){y=!1;c.duplicateCachedPage=e;a.mobile.changePage(d,c)}).fail(function(){y=!1;c(!0);f();m.pageContainer.trigger("pagechangefailed",t);m.pageContainer.trigger("changepagefailed",t)});else{h=m.fromPage;l=k=m.dataUrl&&i.convertUrlToDataUrl(m.dataUrl)||
62
+ b.jqmData("url");i.getFilePath(k);n=o.getActive();var v=o.activeIndex===0,w=0,s=document.title,x=m.role==="dialog"||b.jqmData("role")==="dialog";if(h&&h[0]===b[0])y=!1,u.trigger("pagechange",t),u.trigger("changepage",t);else{j(b,m.role);m.fromHashChange&&o.directHashChange({currentUrl:k,isBack:function(){w=-1},isForward:function(){w=1}});try{a(document.activeElement||"").add("input:focus, textarea:focus, select:focus").blur()}catch(H){}x&&n&&(k=(n.url||"")+q);if(m.changeHash!==!1&&k)o.ignoreNextHashChange=
63
+ !0,i.set(k);var F=b.jqmData("title")||b.children(":jqmData(role='header')").find(".ui-title").text();F&&s==document.title&&(s=F);w||o.addNew(k,m.transition,s,l,m.role);document.title=o.getActive().title;a.mobile.activePage=b;m.transition=m.transition||(w&&!v?n.transition:d)||(x?a.mobile.defaultDialogTransition:a.mobile.defaultPageTransition);m.reverse=m.reverse||w<0;e(b,h,m.transition,m.reverse).done(function(){c();m.duplicateCachedPage&&m.duplicateCachedPage.remove();p.removeClass("ui-mobile-rendering");
64
+ f();u.trigger("pagechange",t);u.trigger("changepage",t)})}}}};a.mobile.changePage.defaults={transition:d,reverse:!1,changeHash:!0,fromHashChange:!1,role:d,duplicateCachedPage:d,pageContainer:d,showLoadMsg:!0,dataUrl:d,fromPage:d};a.mobile._registerInternalEvents=function(){a("form").live("submit",function(b){var c=a(this);if(a.mobile.ajaxEnabled&&!c.is(":jqmData(ajax='false')")){var d=c.attr("method"),e=c.attr("target"),f=c.attr("action");if(!f&&(f=n(c),f===u.hrefNoHash))f=t.hrefNoSearch;f=i.makeUrlAbsolute(f,
65
+ n(c));!i.isExternal(f)&&!e&&(a.mobile.changePage(f,{type:d&&d.length&&d.toLowerCase()||"get",data:c.serialize(),transition:c.jqmData("transition"),direction:c.jqmData("direction"),reloadPage:!0}),b.preventDefault())}});a(document).bind("vclick",function(b){if((b=l(b.target))&&i.parseUrl(b.getAttribute("href")||"#").hash!=="#")c(!0),m=a(b).closest(".ui-btn").not(".ui-disabled"),m.addClass(a.mobile.activeBtnClass),a("."+a.mobile.activePageClass+" .ui-btn").not(b).blur()});a(document).bind("click",function(b){var f=
66
+ l(b.target);if(f){var e=a(f),g=function(){window.setTimeout(function(){c(!0)},200)};if(e.is(":jqmData(rel='back')"))return window.history.back(),!1;if(a.mobile.ajaxEnabled){var h=n(e),f=i.makeUrlAbsolute(e.attr("href")||"#",h);if(f.search("#")!=-1)if(f=f.replace(/[^#]*#/,""))f=i.isPath(f)?i.makeUrlAbsolute(f,h):i.makeUrlAbsolute("#"+f,t.hrefNoHash);else{b.preventDefault();return}var h=e.is("[rel='external']")||e.is(":jqmData(ajax='false')")||e.is("[target]"),q=a.mobile.allowCrossDomainPages&&t.protocol===
67
+ "file:"&&f.search(/^https?:/)!=-1;h||i.isExternal(f)&&!q?g():(g=e.jqmData("transition"),h=(h=e.jqmData("direction"))&&h==="reverse"||e.jqmData("back"),e=e.attr("data-"+a.mobile.ns+"rel")||d,a.mobile.changePage(f,{transition:g,reverse:h,role:e}),b.preventDefault())}else g()}});a(".ui-page").live("pageshow.prefetch",function(){var b=[];a(this).find("a:jqmData(prefetch)").each(function(){var c=a(this).attr("href");c&&a.inArray(c,b)===-1&&(b.push(c),a.mobile.loadPage(c))})});a.mobile._handleHashChange=
68
+ function(b){var c=i.stripHash(b),f={transition:a.mobile.urlHistory.stack.length===0?"none":d,changeHash:!1,fromHashChange:!0};if(!a.mobile.hashListeningEnabled||o.ignoreNextHashChange)o.ignoreNextHashChange=!1;else{if(o.stack.length>1&&c.indexOf(q)>-1)if(a.mobile.activePage.is(".ui-dialog"))o.directHashChange({currentUrl:c,either:function(b){var d=a.mobile.urlHistory.getActive();c=d.pageUrl;a.extend(f,{role:d.role,transition:d.transition,reverse:b})}});else{o.directHashChange({currentUrl:c,isBack:function(){window.history.back()},
69
+ isForward:function(){window.history.forward()}});return}c?(c=typeof c==="string"&&!i.isPath(c)?"#"+c:c,a.mobile.changePage(c,f)):a.mobile.changePage(a.mobile.firstPage,f)}};s.bind("hashchange",function(){a.mobile._handleHashChange(location.hash)});a(document).bind("pageshow",h);a(window).bind("throttledresize",h)}})(jQuery);
70
+ (function(a,d){var b={},c=a(d),f=a.mobile.path.parseUrl(location.href);a.extend(b,{initialFilePath:f.pathname+f.search,initialHref:f.hrefNoHash,hashchangeFired:!1,state:function(){return{hash:location.hash||"#"+b.initialFilePath,title:document.title,initialHref:b.initialHref}},resetUIKeys:function(b){var c="&"+a.mobile.subPageUrlKey,d=b.indexOf(a.mobile.dialogHashKey);d>-1?b=b.slice(0,d)+"#"+b.slice(d):b.indexOf(c)>-1&&(b=b.split(c).join("#"+c));return b},onHashChange:function(){var c,d;b.hashchangeFired=
71
+ !0;a.mobile.path.isPath(location.hash)&&(d=b.state(),c=a.mobile.path.makeUrlAbsolute(d.hash.replace("#",""),location.href),c=b.resetUIKeys(c),history.replaceState(d,document.title,c))},onPopState:function(b){var c=b.originalEvent.state;if(c)a.mobile.urlHistory.ignoreNextHashChange=!0,setTimeout(function(){a.mobile.urlHistory.ignoreNextHashChange=!1;a.mobile._handleHashChange(c.hash)},100)},init:function(){c.bind("hashchange",b.onHashChange);c.bind("popstate",b.onPopState);location.hash===""&&history.replaceState(b.state(),
72
+ document.title,location.href)}});a(function(){a.mobile.pushStateEnabled&&a.support.pushState&&b.init()})})(jQuery,this);
73
+ (function(a){function d(b,c,d,e){var g=new a.Deferred,h=c?" reverse":"",j="ui-mobile-viewport-transitioning viewport-"+b;d.animationComplete(function(){d.add(e).removeClass("out in reverse "+b);e&&e.removeClass(a.mobile.activePageClass);d.parent().removeClass(j);g.resolve(b,c,d,e)});d.parent().addClass(j);e&&e.addClass(b+" out"+h);d.addClass(a.mobile.activePageClass+" "+b+" in"+h);return g.promise()}a.mobile.css3TransitionHandler=d;if(a.mobile.defaultTransitionHandler===a.mobile.noneTransitionHandler)a.mobile.defaultTransitionHandler=
74
+ d})(jQuery,this);
75
+ (function(a){a.mobile.page.prototype.options.degradeInputs={color:!1,date:!1,datetime:!1,"datetime-local":!1,email:!1,month:!1,number:!1,range:"number",search:"text",tel:!1,time:!1,url:!1,week:!1};a.mobile.page.prototype.options.keepNative=":jqmData(role='none'), :jqmData(role='nojs')";a(document).bind("pagecreate enhance",function(d){var b=a(d.target).data("page").options;a(d.target).find("input").not(b.keepNative).each(function(){var c=a(this),d=this.getAttribute("type"),e=b.degradeInputs[d]||"text";
76
+ b.degradeInputs[d]&&c.replaceWith(a("<div>").html(c.clone()).html().replace(/\s+type=["']?\w+['"]?/,' type="'+e+'" data-'+a.mobile.ns+'type="'+d+'" '))})})})(jQuery);
77
+ (function(a,d){a.widget("mobile.dialog",a.mobile.widget,{options:{closeBtnText:"Close",theme:"a",initSelector:":jqmData(role='dialog')"},_create:function(){var b=this.element,c=b.attr("class").match(/ui-body-[a-z]/);c.length&&b.removeClass(c[0]);b.addClass("ui-body-"+this.options.theme);b.attr("role","dialog").addClass("ui-dialog").find(":jqmData(role='header')").addClass("ui-corner-top ui-overlay-shadow").prepend("<a href='#' data-"+a.mobile.ns+"icon='delete' data-"+a.mobile.ns+"rel='back' data-"+
78
+ a.mobile.ns+"iconpos='notext'>"+this.options.closeBtnText+"</a>").end().find(":jqmData(role='content'),:jqmData(role='footer')").last().addClass("ui-corner-bottom ui-overlay-shadow");b.bind("vclick submit",function(b){var b=a(b.target).closest(b.type==="vclick"?"a":"form"),c;b.length&&!b.jqmData("transition")&&(c=a.mobile.urlHistory.getActive()||{},b.attr("data-"+a.mobile.ns+"transition",c.transition||a.mobile.defaultDialogTransition).attr("data-"+a.mobile.ns+"direction","reverse"))}).bind("pagehide",
79
+ function(){a(this).find("."+a.mobile.activeBtnClass).removeClass(a.mobile.activeBtnClass)})},close:function(){d.history.back()}});a(a.mobile.dialog.prototype.options.initSelector).live("pagecreate",function(){a(this).dialog()})})(jQuery,this);
80
+ (function(a){a.mobile.page.prototype.options.backBtnText="Back";a.mobile.page.prototype.options.addBackBtn=!1;a.mobile.page.prototype.options.backBtnTheme=null;a.mobile.page.prototype.options.headerTheme="a";a.mobile.page.prototype.options.footerTheme="a";a.mobile.page.prototype.options.contentTheme=null;a(":jqmData(role='page'), :jqmData(role='dialog')").live("pagecreate",function(){var d=a(this).data("page").options,b=d.theme;a(":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')",
81
+ this).each(function(){var c=a(this),f=c.jqmData("role"),e=c.jqmData("theme"),g,h,j;c.addClass("ui-"+f);if(f==="header"||f==="footer"){e=e||(f==="header"?d.headerTheme:d.footerTheme)||b;c.addClass("ui-bar-"+e);c.attr("role",f==="header"?"banner":"contentinfo");g=c.children("a");h=g.hasClass("ui-btn-left");j=g.hasClass("ui-btn-right");if(!h)h=g.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length;j||g.eq(1).addClass("ui-btn-right");d.addBackBtn&&f==="header"&&a(".ui-page").length>1&&c.jqmData("url")!==
82
+ a.mobile.path.stripHash(location.hash)&&!h&&(f=a("<a href='#' class='ui-btn-left' data-"+a.mobile.ns+"rel='back' data-"+a.mobile.ns+"icon='arrow-l'>"+d.backBtnText+"</a>").prependTo(c),f.attr("data-"+a.mobile.ns+"theme",d.backBtnTheme||e));c.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({tabindex:"0",role:"heading","aria-level":"1"})}else if(f==="content"){if(e||d.contentTheme)c.addClass("ui-body-"+(e||d.contentTheme));c.attr("role","main")}})})})(jQuery);
83
+ (function(a){a.widget("mobile.collapsible",a.mobile.widget,{options:{expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:!0,heading:">:header,>legend",theme:null,iconTheme:"d",initSelector:":jqmData(role='collapsible')"},_create:function(){var d=this.element,b=this.options,c=d.addClass("ui-collapsible-contain"),f=d.find(b.heading).eq(0),e=c.wrapInner("<div class='ui-collapsible-content'></div>").find(".ui-collapsible-content"),d=d.closest(":jqmData(role='collapsible-set')").addClass("ui-collapsible-set");
84
+ f.is("legend")&&(f=a("<div role='heading'>"+f.html()+"</div>").insertBefore(f),f.next().remove());f.insertBefore(e).addClass("ui-collapsible-heading").append("<span class='ui-collapsible-heading-status'></span>").wrapInner("<a href='#' class='ui-collapsible-heading-toggle'></a>").find("a:eq(0)").buttonMarkup({shadow:!d.length,corners:!1,iconPos:"left",icon:"plus",theme:b.theme}).find(".ui-icon").removeAttr("class").buttonMarkup({shadow:!0,corners:!0,iconPos:"notext",icon:"plus",theme:b.iconTheme});
85
+ d.length?c.jqmData("collapsible-last")&&f.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom"):f.find("a:eq(0)").addClass("ui-corner-all").find(".ui-btn-inner").addClass("ui-corner-all");c.bind("collapse",function(d){!d.isDefaultPrevented()&&a(d.target).closest(".ui-collapsible-contain").is(c)&&(d.preventDefault(),f.addClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(b.expandCueText).end().find(".ui-icon").removeClass("ui-icon-minus").addClass("ui-icon-plus"),
86
+ e.addClass("ui-collapsible-content-collapsed").attr("aria-hidden",!0),c.jqmData("collapsible-last")&&f.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom"))}).bind("expand",function(a){a.isDefaultPrevented()||(a.preventDefault(),f.removeClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(b.collapseCueText),f.find(".ui-icon").removeClass("ui-icon-plus").addClass("ui-icon-minus"),e.removeClass("ui-collapsible-content-collapsed").attr("aria-hidden",!1),c.jqmData("collapsible-last")&&
87
+ f.find("a:eq(0), .ui-btn-inner").removeClass("ui-corner-bottom"))}).trigger(b.collapsed?"collapse":"expand");d.length&&!d.jqmData("collapsiblebound")&&(d.jqmData("collapsiblebound",!0).bind("expand",function(b){a(b.target).closest(".ui-collapsible-contain").siblings(".ui-collapsible-contain").trigger("collapse")}),d=d.children(":jqmData(role='collapsible')"),d.first().find("a:eq(0)").addClass("ui-corner-top").find(".ui-btn-inner").addClass("ui-corner-top"),d.last().jqmData("collapsible-last",!0));
88
+ f.bind("vclick",function(a){var b=f.is(".ui-collapsible-heading-collapsed")?"expand":"collapse";c.trigger(b);a.preventDefault()})}});a(document).bind("pagecreate create",function(d){a(a.mobile.collapsible.prototype.options.initSelector,d.target).collapsible()})})(jQuery);(function(a){a.fn.fieldcontain=function(){return this.addClass("ui-field-contain ui-body ui-br")};a(document).bind("pagecreate create",function(d){a(":jqmData(role='fieldcontain')",d.target).fieldcontain()})})(jQuery);
89
+ (function(a){a.fn.grid=function(d){return this.each(function(){var b=a(this),c=a.extend({grid:null},d),f=b.children(),e={solo:1,a:2,b:3,c:4,d:5},c=c.grid;if(!c)if(f.length<=5)for(var g in e)e[g]===f.length&&(c=g);else c="a";e=e[c];b.addClass("ui-grid-"+c);f.filter(":nth-child("+e+"n+1)").addClass("ui-block-a");e>1&&f.filter(":nth-child("+e+"n+2)").addClass("ui-block-b");e>2&&f.filter(":nth-child(3n+3)").addClass("ui-block-c");e>3&&f.filter(":nth-child(4n+4)").addClass("ui-block-d");e>4&&f.filter(":nth-child(5n+5)").addClass("ui-block-e")})}})(jQuery);
90
+ (function(a,d){a.widget("mobile.navbar",a.mobile.widget,{options:{iconpos:"top",grid:null,initSelector:":jqmData(role='navbar')"},_create:function(){var b=this.element,c=b.find("a"),f=c.filter(":jqmData(icon)").length?this.options.iconpos:d;b.addClass("ui-navbar").attr("role","navigation").find("ul").grid({grid:this.options.grid});f||b.addClass("ui-navbar-noicons");c.buttonMarkup({corners:!1,shadow:!1,iconpos:f});b.delegate("a","vclick",function(){c.not(".ui-state-persist").removeClass(a.mobile.activeBtnClass);
91
+ a(this).addClass(a.mobile.activeBtnClass)})}});a(document).bind("pagecreate create",function(b){a(a.mobile.navbar.prototype.options.initSelector,b.target).navbar()})})(jQuery);
92
+ (function(a){var d={};a.widget("mobile.listview",a.mobile.widget,{options:{theme:"c",countTheme:"c",headerTheme:"b",dividerTheme:"b",splitIcon:"arrow-r",splitTheme:"b",inset:!1,initSelector:":jqmData(role='listview')"},_create:function(){var a=this;a.element.addClass(function(c,d){return d+" ui-listview "+(a.options.inset?" ui-listview-inset ui-corner-all ui-shadow ":"")});a.refresh(!0)},_itemApply:function(b,c){var d=c.find(".ui-li-count");d.length&&c.addClass("ui-li-has-count");d.addClass("ui-btn-up-"+
93
+ (b.jqmData("counttheme")||this.options.countTheme)+" ui-btn-corner-all");c.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading").end().find("p, dl").addClass("ui-li-desc").end().find(">img:eq(0), .ui-link-inherit>img:eq(0)").addClass("ui-li-thumb").each(function(){c.addClass(a(this).is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb")}).end().find(".ui-li-aside").each(function(){var b=a(this);b.prependTo(b.parent())})},_removeCorners:function(a,c){a=a.add(a.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb"));
94
+ c==="top"?a.removeClass("ui-corner-top ui-corner-tr ui-corner-tl"):c==="bottom"?a.removeClass("ui-corner-bottom ui-corner-br ui-corner-bl"):a.removeClass("ui-corner-top ui-corner-tr ui-corner-tl ui-corner-bottom ui-corner-br ui-corner-bl")},_refreshCorners:function(a){var c;this.options.inset&&(c=this.element.children("li"),a=a?c.not(".ui-screen-hidden"):c.filter(":visible"),this._removeCorners(c),c=a.first().addClass("ui-corner-top"),c.add(c.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-tr").end().find(".ui-li-thumb").addClass("ui-corner-tl"),
95
+ c=a.last().addClass("ui-corner-bottom"),c.add(c.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").addClass("ui-corner-bl"))},refresh:function(b){this.parentPage=this.element.closest(".ui-page");this._createSubPages();var c=this.options,d=this.element,e=d.jqmData("dividertheme")||c.dividerTheme,g=d.jqmData("splittheme"),h=d.jqmData("spliticon"),j=d.children("li"),l=a.support.cssPseudoElement||!a.nodeName(d[0],"ol")?0:1,n,s,p,k,i;l&&d.find(".ui-li-dec").remove();
96
+ for(var m=0,o=j.length;m<o;m++){n=j.eq(m);s="ui-li";if(b||!n.hasClass("ui-li"))p=n.jqmData("theme")||c.theme,k=n.children("a"),k.length?(i=n.jqmData("icon"),n.buttonMarkup({wrapperEls:"div",shadow:!1,corners:!1,iconpos:"right",icon:k.length>1||i===!1?!1:i||"arrow-r",theme:p}),i!=!1&&k.length==1&&n.addClass("ui-li-has-arrow"),k.first().addClass("ui-link-inherit"),k.length>1&&(s+=" ui-li-has-alt",k=k.last(),i=g||k.jqmData("theme")||c.splitTheme,k.appendTo(n).attr("title",k.text()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:!1,
97
+ corners:!1,theme:p,icon:!1,iconpos:!1}).find(".ui-btn-inner").append(a("<span />").buttonMarkup({shadow:!0,corners:!0,theme:i,iconpos:"notext",icon:h||k.jqmData("icon")||c.splitIcon})))):n.jqmData("role")==="list-divider"?(s+=" ui-li-divider ui-btn ui-bar-"+e,n.attr("role","heading"),l&&(l=1)):s+=" ui-li-static ui-body-"+p;l&&s.indexOf("ui-li-divider")<0&&(p=n.is(".ui-li-static:first")?n:n.find(".ui-link-inherit"),p.addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+l++ +". </span>"));
98
+ n.add(n.children(".ui-btn-inner")).addClass(s);this._itemApply(d,n)}this._refreshCorners(b)},_idStringEscape:function(a){return a.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var b=this.element,c=b.closest(".ui-page"),f=c.jqmData("url"),e=f||c[0][a.expando],g=b.attr("id"),h=this.options,j="data-"+a.mobile.ns,l=this,n=c.find(":jqmData(role='footer')").jqmData("id"),s;typeof d[e]==="undefined"&&(d[e]=-1);g=g||++d[e];a(b.find("li>ul, li>ol").toArray().reverse()).each(function(c){var d=a(this),
99
+ e=d.attr("id")||g+"-"+c,c=d.parent(),m=a(d.prevAll().toArray().reverse()),m=m.length?m:a("<span>"+a.trim(c.contents()[0].nodeValue)+"</span>"),o=m.first().text(),e=(f||"")+"&"+a.mobile.subPageUrlKey+"="+e,l=d.jqmData("theme")||h.theme,y=d.jqmData("counttheme")||b.jqmData("counttheme")||h.countTheme;s=!0;d.detach().wrap("<div "+j+"role='page' "+j+"url='"+e+"' "+j+"theme='"+l+"' "+j+"count-theme='"+y+"'><div "+j+"role='content'></div></div>").parent().before("<div "+j+"role='header' "+j+"theme='"+h.headerTheme+
100
+ "'><div class='ui-title'>"+o+"</div></div>").after(n?a("<div "+j+"role='footer' "+j+"id='"+n+"'>"):"").parent().appendTo(a.mobile.pageContainer).page();d=c.find("a:first");d.length||(d=a("<a/>").html(m||o).prependTo(c.empty()));d.attr("href","#"+e)}).listview();s&&c.data("page").options.domCache===!1&&c.unbind("pagehide.remove").bind("pagehide.remove",function(b,d){var e=d.nextPage;d.nextPage&&(e=e.jqmData("url"),e.indexOf(f+"&"+a.mobile.subPageUrlKey)!==0&&(l.childPages().remove(),c.remove()))})},
101
+ childPages:function(){var b=this.parentPage.jqmData("url");return a(":jqmData(url^='"+b+"&"+a.mobile.subPageUrlKey+"')")}});a(document).bind("pagecreate create",function(b){a(a.mobile.listview.prototype.options.initSelector,b.target).listview()})})(jQuery);
102
+ (function(a){a.mobile.listview.prototype.options.filter=!1;a.mobile.listview.prototype.options.filterPlaceholder="Filter items...";a.mobile.listview.prototype.options.filterTheme="c";a.mobile.listview.prototype.options.filterCallback=function(a,b){return a.toLowerCase().indexOf(b)===-1};a(":jqmData(role='listview')").live("listviewcreate",function(){var d=a(this),b=d.data("listview");if(b.options.filter){var c=a("<form>",{"class":"ui-listview-filter ui-bar-"+b.options.filterTheme,role:"search"});
103
+ a("<input>",{placeholder:b.options.filterPlaceholder}).attr("data-"+a.mobile.ns+"type","search").jqmData("lastval","").bind("keyup change",function(){var c=a(this),e=this.value.toLowerCase(),g=null,g=c.jqmData("lastval")+"",h=!1,j="";c.jqmData("lastval",e);j=e.replace(RegExp("^"+g),"");g=e.length<g.length||j.length!=e.length-g.length?d.children():d.children(":not(.ui-screen-hidden)");if(e){for(var l=g.length-1;l>=0;l--)c=a(g[l]),j=c.jqmData("filtertext")||c.text(),c.is("li:jqmData(role=list-divider)")?
104
+ (c.toggleClass("ui-filter-hidequeue",!h),h=!1):b.options.filterCallback(j,e)?c.toggleClass("ui-filter-hidequeue",!0):h=!0;g.filter(":not(.ui-filter-hidequeue)").toggleClass("ui-screen-hidden",!1);g.filter(".ui-filter-hidequeue").toggleClass("ui-screen-hidden",!0).toggleClass("ui-filter-hidequeue",!1)}else g.toggleClass("ui-screen-hidden",!1);b._refreshCorners()}).appendTo(c).textinput();a(this).jqmData("inset")&&c.addClass("ui-listview-filter-inset");c.bind("submit",function(){return!1}).insertBefore(d)}})})(jQuery);
105
+ (function(a){a(document).bind("pagecreate create",function(d){a(":jqmData(role='nojs')",d.target).addClass("ui-nojs")})})(jQuery);
106
+ (function(a,d){a.widget("mobile.checkboxradio",a.mobile.widget,{options:{theme:null,initSelector:"input[type='checkbox'],input[type='radio']"},_create:function(){var b=this,c=this.element,f=c.closest("form,fieldset,:jqmData(role='page')").find("label").filter("[for='"+c[0].id+"']"),e=c.attr("type"),g=e+"-on",h=e+"-off",j=c.parents(":jqmData(type='horizontal')").length?d:h;if(!(e!=="checkbox"&&e!=="radio")){a.extend(this,{label:f,inputtype:e,checkedClass:"ui-"+g+(j?"":" "+a.mobile.activeBtnClass),
107
+ uncheckedClass:"ui-"+h,checkedicon:"ui-icon-"+g,uncheckedicon:"ui-icon-"+h});if(!this.options.theme)this.options.theme=this.element.jqmData("theme");f.buttonMarkup({theme:this.options.theme,icon:j,shadow:!1});c.add(f).wrapAll("<div class='ui-"+e+"'></div>");f.bind({vmouseover:function(){if(a(this).parent().is(".ui-disabled"))return!1},vclick:function(a){if(c.is(":disabled"))a.preventDefault();else return b._cacheVals(),c.prop("checked",e==="radio"&&!0||!c.prop("checked")),b._getInputSet().not(c).prop("checked",
108
+ !1),b._updateAll(),!1}});c.bind({vmousedown:function(){this._cacheVals()},vclick:function(){var c=a(this);c.is(":checked")?(c.prop("checked",!0),b._getInputSet().not(c).prop("checked",!1)):c.prop("checked",!1);b._updateAll()},focus:function(){f.addClass("ui-focus")},blur:function(){f.removeClass("ui-focus")}});this.refresh()}},_cacheVals:function(){this._getInputSet().each(function(){var b=a(this);b.jqmData("cacheVal",b.is(":checked"))})},_getInputSet:function(){if(this.inputtype=="checkbox")return this.element;
109
+ return this.element.closest("form,fieldset,:jqmData(role='page')").find("input[name='"+this.element.attr("name")+"'][type='"+this.inputtype+"']")},_updateAll:function(){var b=this;this._getInputSet().each(function(){var c=a(this);(c.is(":checked")||b.inputtype==="checkbox")&&c.trigger("change")}).checkboxradio("refresh")},refresh:function(){var b=this.element,c=this.label,d=c.find(".ui-icon");a(b[0]).prop("checked")?(c.addClass(this.checkedClass).removeClass(this.uncheckedClass),d.addClass(this.checkedicon).removeClass(this.uncheckedicon)):
110
+ (c.removeClass(this.checkedClass).addClass(this.uncheckedClass),d.removeClass(this.checkedicon).addClass(this.uncheckedicon));b.is(":disabled")?this.disable():this.enable()},disable:function(){this.element.prop("disabled",!0).parent().addClass("ui-disabled")},enable:function(){this.element.prop("disabled",!1).parent().removeClass("ui-disabled")}});a(document).bind("pagecreate create",function(b){a(a.mobile.checkboxradio.prototype.options.initSelector,b.target).not(":jqmData(role='none'), :jqmData(role='nojs')").checkboxradio()})})(jQuery);
111
+ (function(a){a.widget("mobile.button",a.mobile.widget,{options:{theme:null,icon:null,iconpos:null,inline:null,corners:!0,shadow:!0,iconshadow:!0,initSelector:"button, [type='button'], [type='submit'], [type='reset'], [type='image']"},_create:function(){var d=this.element,b=this.options;this.button=a("<div></div>").text(d.text()||d.val()).buttonMarkup({theme:b.theme,icon:b.icon,iconpos:b.iconpos,inline:b.inline,corners:b.corners,shadow:b.shadow,iconshadow:b.iconshadow}).insertBefore(d).append(d.addClass("ui-btn-hidden"));
112
+ b=d.attr("type");b!=="button"&&b!=="reset"&&d.bind("vclick",function(){var b=a("<input>",{type:"hidden",name:d.attr("name"),value:d.attr("value")}).insertBefore(d);a(document).submit(function(){b.remove()})});this.refresh()},enable:function(){this.element.attr("disabled",!1);this.button.removeClass("ui-disabled").attr("aria-disabled",!1);return this._setOption("disabled",!1)},disable:function(){this.element.attr("disabled",!0);this.button.addClass("ui-disabled").attr("aria-disabled",!0);return this._setOption("disabled",
113
+ !0)},refresh:function(){this.element.attr("disabled")?this.disable():this.enable()}});a(document).bind("pagecreate create",function(d){a(a.mobile.button.prototype.options.initSelector,d.target).not(":jqmData(role='none'), :jqmData(role='nojs')").button()})})(jQuery);
114
+ (function(a,d){a.widget("mobile.slider",a.mobile.widget,{options:{theme:null,trackTheme:null,disabled:!1,initSelector:"input[type='range'], :jqmData(type='range'), :jqmData(role='slider')"},_create:function(){var b=this,c=this.element,f=c.parents("[class*='ui-bar-'],[class*='ui-body-']").eq(0),f=f.length?f.attr("class").match(/ui-(bar|body)-([a-z])/)[2]:"c",e=this.options.theme?this.options.theme:f,g=this.options.trackTheme?this.options.trackTheme:f,h=c[0].nodeName.toLowerCase(),f=h=="select"?"ui-slider-switch":
115
+ "",j=c.attr("id"),l=j+"-label",j=a("[for='"+j+"']").attr("id",l),n=function(){return h=="input"?parseFloat(c.val()):c[0].selectedIndex},s=h=="input"?parseFloat(c.attr("min")):0,p=h=="input"?parseFloat(c.attr("max")):c.find("option").length-1,k=window.parseFloat(c.attr("step")||1),i=a("<div class='ui-slider "+f+" ui-btn-down-"+g+" ui-btn-corner-all' role='application'></div>"),m=a("<a href='#' class='ui-slider-handle'></a>").appendTo(i).buttonMarkup({corners:!0,theme:e,shadow:!0}).attr({role:"slider",
116
+ "aria-valuemin":s,"aria-valuemax":p,"aria-valuenow":n(),"aria-valuetext":n(),title:n(),"aria-labelledby":l});a.extend(this,{slider:i,handle:m,dragging:!1,beforeStart:null,userModified:!1});h=="select"&&(i.wrapInner("<div class='ui-slider-inneroffset'></div>"),c.find("option"),c.find("option").each(function(b){var c=!b?"b":"a",d=!b?"right":"left",b=!b?" ui-btn-down-"+g:" "+a.mobile.activeBtnClass;a("<div class='ui-slider-labelbg ui-slider-labelbg-"+c+b+" ui-btn-corner-"+d+"'></div>").prependTo(i);
117
+ a("<span class='ui-slider-label ui-slider-label-"+c+b+" ui-btn-corner-"+d+"' role='img'>"+a(this).text()+"</span>").prependTo(m)}));j.addClass("ui-slider");c.addClass(h==="input"?"ui-slider-input":"ui-slider-switch").change(function(){b.refresh(n(),!0)}).keyup(function(){b.refresh(n(),!0,!0)}).blur(function(){b.refresh(n(),!0)});a(document).bind("vmousemove",function(a){if(b.dragging)return b.refresh(a),b.userModified=b.userModified||b.beforeStart!==c[0].selectedIndex,!1});i.bind("vmousedown",function(a){b.dragging=
118
+ !0;b.userModified=!1;if(h==="select")b.beforeStart=c[0].selectedIndex;b.refresh(a);return!1});i.add(document).bind("vmouseup",function(){if(b.dragging)return b.dragging=!1,h==="select"&&!b.userModified&&(m.addClass("ui-slider-handle-snapping"),b.refresh(!b.beforeStart?1:0)),!1});i.insertAfter(c);this.handle.bind("vmousedown",function(){a(this).focus()}).bind("vclick",!1);this.handle.bind("keydown",function(c){var d=n();if(!b.options.disabled){switch(c.keyCode){case a.mobile.keyCode.HOME:case a.mobile.keyCode.END:case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:if(c.preventDefault(),
119
+ !b._keySliding)b._keySliding=!0,a(this).addClass("ui-state-active")}switch(c.keyCode){case a.mobile.keyCode.HOME:b.refresh(s);break;case a.mobile.keyCode.END:b.refresh(p);break;case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:b.refresh(d+k);break;case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:b.refresh(d-k)}}}).keyup(function(){if(b._keySliding)b._keySliding=!1,a(this).removeClass("ui-state-active")});this.refresh(d,d,!0)},refresh:function(a,
120
+ c,d){if(!this.options.disabled){var e=this.element,g=e[0].nodeName.toLowerCase(),h=g==="input"?parseFloat(e.attr("min")):0,j=g==="input"?parseFloat(e.attr("max")):e.find("option").length-1;if(typeof a==="object"){if(!this.dragging||a.pageX<this.slider.offset().left-8||a.pageX>this.slider.offset().left+this.slider.width()+8)return;a=Math.round((a.pageX-this.slider.offset().left)/this.slider.width()*100)}else a==null&&(a=g==="input"?parseFloat(e.val()):e[0].selectedIndex),a=(parseFloat(a)-h)/(j-h)*
121
+ 100;if(!isNaN(a)){a<0&&(a=0);a>100&&(a=100);var l=Math.round(a/100*(j-h))+h;l<h&&(l=h);l>j&&(l=j);this.handle.css("left",a+"%");this.handle.attr({"aria-valuenow":g==="input"?l:e.find("option").eq(l).attr("value"),"aria-valuetext":g==="input"?l:e.find("option").eq(l).text(),title:l});g==="select"&&(l===0?this.slider.addClass("ui-slider-switch-a").removeClass("ui-slider-switch-b"):this.slider.addClass("ui-slider-switch-b").removeClass("ui-slider-switch-a"));if(!d)g==="input"?e.val(l):e[0].selectedIndex=
122
+ l,c||e.trigger("change")}}},enable:function(){this.element.attr("disabled",!1);this.slider.removeClass("ui-disabled").attr("aria-disabled",!1);return this._setOption("disabled",!1)},disable:function(){this.element.attr("disabled",!0);this.slider.addClass("ui-disabled").attr("aria-disabled",!0);return this._setOption("disabled",!0)}});a(document).bind("pagecreate create",function(b){a(a.mobile.slider.prototype.options.initSelector,b.target).not(":jqmData(role='none'), :jqmData(role='nojs')").slider()})})(jQuery);
123
+ (function(a){a.widget("mobile.textinput",a.mobile.widget,{options:{theme:null,initSelector:"input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea"},_create:function(){var i;var d=this.element,b=this.options,c=b.theme,f,e;c||(c=this.element.closest("[class*='ui-bar-'],[class*='ui-body-']"),i=(c=c.length&&/ui-(bar|body)-([a-z])/.exec(c.attr("class")))&&
124
+ c[2]||"c",c=i);c=" ui-body-"+c;a("label[for='"+d.attr("id")+"']").addClass("ui-input-text");d.addClass("ui-input-text ui-body-"+b.theme);f=d;typeof d[0].autocorrect!=="undefined"&&(d[0].setAttribute("autocorrect","off"),d[0].setAttribute("autocomplete","off"));d.is("[type='search'],:jqmData(type='search')")?(f=d.wrap("<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield"+c+"'></div>").parent(),e=a("<a href='#' class='ui-input-clear' title='clear text'>clear text</a>").tap(function(a){d.val("").focus();
125
+ d.trigger("change");e.addClass("ui-input-clear-hidden");a.preventDefault()}).appendTo(f).buttonMarkup({icon:"delete",iconpos:"notext",corners:!0,shadow:!0}),b=function(){d.val()?e.removeClass("ui-input-clear-hidden"):e.addClass("ui-input-clear-hidden")},b(),d.keyup(b).focus(b)):d.addClass("ui-corner-all ui-shadow-inset"+c);d.focus(function(){f.addClass("ui-focus")}).blur(function(){f.removeClass("ui-focus")});if(d.is("textarea")){var g=function(){var a=d[0].scrollHeight;d[0].clientHeight<a&&d.css({height:a+
126
+ 15})},h;d.keyup(function(){clearTimeout(h);h=setTimeout(g,100)})}},disable:function(){(this.element.attr("disabled",!0).is("[type='search'],:jqmData(type='search')")?this.element.parent():this.element).addClass("ui-disabled")},enable:function(){(this.element.attr("disabled",!1).is("[type='search'],:jqmData(type='search')")?this.element.parent():this.element).removeClass("ui-disabled")}});a(document).bind("pagecreate create",function(d){a(a.mobile.textinput.prototype.options.initSelector,d.target).not(":jqmData(role='none'), :jqmData(role='nojs')").textinput()})})(jQuery);
127
+ (function(a){var d=function(b){var c=b.selectID,d=b.label,e=b.select.closest(".ui-page"),g=a("<div>",{"class":"ui-selectmenu-screen ui-screen-hidden"}).appendTo(e),h=b.select.find("option"),j=b.isMultiple=b.select[0].multiple,l=c+"-button",n=c+"-menu",s=a("<div data-"+a.mobile.ns+"role='dialog' data-"+a.mobile.ns+"theme='"+b.options.menuPageTheme+"'><div data-"+a.mobile.ns+"role='header'><div class='ui-title'>"+d.text()+"</div></div><div data-"+a.mobile.ns+"role='content'></div></div>").appendTo(a.mobile.pageContainer).page(),
128
+ p=a("<div>",{"class":"ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-body-"+b.options.overlayTheme+" "+a.mobile.defaultDialogTransition}).insertAfter(g),k=a("<ul>",{"class":"ui-selectmenu-list",id:n,role:"listbox","aria-labelledby":l}).attr("data-"+a.mobile.ns+"theme",b.options.theme).appendTo(p),i=a("<div>",{"class":"ui-header ui-bar-"+b.options.theme}).prependTo(p),m=a("<h1>",{"class":"ui-title"}).appendTo(i),o=a("<a>",{text:b.options.closeText,href:"#","class":"ui-btn-left"}).attr("data-"+
129
+ a.mobile.ns+"iconpos","notext").attr("data-"+a.mobile.ns+"icon","delete").appendTo(i).buttonMarkup(),A=s.find(".ui-content"),y=s.find(".ui-header a");a.extend(b,{select:b.select,selectID:c,buttonId:l,menuId:n,thisPage:e,menuPage:s,label:d,screen:g,selectOptions:h,isMultiple:j,theme:b.options.theme,listbox:p,list:k,header:i,headerTitle:m,headerClose:o,menuPageContent:A,menuPageClose:y,placeholder:"",build:function(){var b=this;b.refresh();b.select.attr("tabindex","-1").focus(function(){a(this).blur();
130
+ b.button.focus()});b.button.bind("vclick keydown",function(c){if(c.type=="vclick"||c.keyCode&&(c.keyCode===a.mobile.keyCode.ENTER||c.keyCode===a.mobile.keyCode.SPACE))b.open(),c.preventDefault()});b.list.attr("role","listbox").delegate(".ui-li>a","focusin",function(){a(this).attr("tabindex","0")}).delegate(".ui-li>a","focusout",function(){a(this).attr("tabindex","-1")}).delegate("li:not(.ui-disabled, .ui-li-divider)","click",function(c){var d=b.select[0].selectedIndex,e=b.list.find("li:not(.ui-li-divider)").index(this),
131
+ f=b.selectOptions.eq(e)[0];f.selected=b.isMultiple?!f.selected:!0;b.isMultiple&&a(this).find(".ui-icon").toggleClass("ui-icon-checkbox-on",f.selected).toggleClass("ui-icon-checkbox-off",!f.selected);(b.isMultiple||d!==e)&&b.select.trigger("change");b.isMultiple||b.close();c.preventDefault()}).keydown(function(b){var c=a(b.target),d=c.closest("li");switch(b.keyCode){case 38:return b=d.prev(),b.length&&(c.blur().attr("tabindex","-1"),b.find("a").first().focus()),!1;case 40:return b=d.next(),b.length&&
132
+ (c.blur().attr("tabindex","-1"),b.find("a").first().focus()),!1;case 13:case 32:return c.trigger("click"),!1}});b.menuPage.bind("pagehide",function(){b.list.appendTo(b.listbox);b._focusButton()});b.screen.bind("vclick",function(){b.close()});b.headerClose.click(function(){if(b.menuType=="overlay")return b.close(),!1})},refresh:function(b){var c=this,d=this.element;this.selectOptions=d.find("option");this.selected();var e=this.selectedIndices();(b||d[0].options.length!=c.list.find("li").length)&&c._buildList();
133
+ c.setButtonText();c.setButtonCount();c.list.find("li:not(.ui-li-divider)").removeClass(a.mobile.activeBtnClass).attr("aria-selected",!1).each(function(b){a.inArray(b,e)>-1&&(b=a(this),b.attr("aria-selected",!0),c.isMultiple?b.find(".ui-icon").removeClass("ui-icon-checkbox-off").addClass("ui-icon-checkbox-on"):b.addClass(a.mobile.activeBtnClass))})},close:function(){if(!this.options.disabled&&this.isOpen){var b=this;b.menuType=="page"?(b.thisPage.data("page").options.domCache||b.thisPage.bind("pagehide.remove",
134
+ function(){a(b).remove()}),window.history.back()):(b.screen.addClass("ui-screen-hidden"),b.listbox.addClass("ui-selectmenu-hidden").removeAttr("style").removeClass("in"),b.list.appendTo(b.listbox),b._focusButton());b.isOpen=!1}},open:function(){if(!this.options.disabled){var b=this,c=b.list.parent().outerHeight(),d=b.list.parent().outerWidth(),e=a(window).scrollTop(),f=b.button.offset().top,g=window.innerHeight,h=window.innerWidth;b.button.addClass(a.mobile.activeBtnClass);setTimeout(function(){b.button.removeClass(a.mobile.activeBtnClass)},
135
+ 300);if(c>g-80||!a.support.scrollTop){b.thisPage.unbind("pagehide.remove");if(e==0&&f>g)b.thisPage.one("pagehide",function(){a(this).jqmData("lastScroll",f)});b.menuPage.one("pageshow",function(){a(window).one("silentscroll",function(){b.list.find(a.mobile.activeBtnClass).focus()});b.isOpen=!0});b.menuType="page";b.menuPageContent.append(b.list);a.mobile.changePage(b.menuPage,{transition:a.mobile.defaultDialogTransition})}else{b.menuType="overlay";b.screen.height(a(document).height()).removeClass("ui-screen-hidden");
136
+ var i=f-e,k=e+g-f,j=c/2,p=parseFloat(b.list.parent().css("max-width")),c=i>c/2&&k>c/2?f+b.button.outerHeight()/2-j:i>k?e+g-c-30:e+30;d<p?p=(h-d)/2:(p=b.button.offset().left+b.button.outerWidth()/2-d/2,p<30?p=30:p+d>h&&(p=h-d-30));b.listbox.append(b.list).removeClass("ui-selectmenu-hidden").css({top:c,left:p}).addClass("in");b.list.find(a.mobile.activeBtnClass).focus();b.isOpen=!0}}},_buildList:function(){var b=this,c=this.options,d=this.placeholder,e=[],f=[],g=b.isMultiple?"checkbox-off":"false";
137
+ b.list.empty().filter(".ui-listview").listview("destroy");b.select.find("option").each(function(h){var i=a(this),k=i.parent(),p=i.text(),j="<a href='#'>"+p+"</a>",m=[],o=[];k.is("optgroup")&&(k=k.attr("label"),a.inArray(k,e)===-1&&(f.push("<li data-"+a.mobile.ns+"role='list-divider'>"+k+"</li>"),e.push(k)));if(!this.getAttribute("value")||p.length==0||i.jqmData("placeholder"))c.hidePlaceholderMenuItems&&m.push("ui-selectmenu-placeholder"),d=b.placeholder=p;this.disabled&&(m.push("ui-disabled"),o.push("aria-disabled='true'"));
138
+ f.push("<li data-"+a.mobile.ns+"option-index='"+h+"' data-"+a.mobile.ns+"icon='"+g+"' class='"+m.join(" ")+"' "+o.join(" ")+">"+j+"</li>")});b.list.html(f.join(" "));b.list.find("li").attr({role:"option",tabindex:"-1"}).first().attr("tabindex","0");this.isMultiple||this.headerClose.hide();!this.isMultiple&&!d.length?this.header.hide():this.headerTitle.text(this.placeholder);b.list.listview()},_button:function(){return a("<a>",{href:"#",role:"button",id:this.buttonId,"aria-haspopup":"true","aria-owns":this.menuId})}})};
139
+ a("select").live("selectmenubeforecreate",function(){var b=a(this).data("selectmenu");b.options.nativeMenu||d(b)})})(jQuery);
140
+ (function(a){a.widget("mobile.selectmenu",a.mobile.widget,{options:{theme:null,disabled:!1,icon:"arrow-d",iconpos:"right",inline:null,corners:!0,shadow:!0,iconshadow:!0,menuPageTheme:"b",overlayTheme:"a",hidePlaceholderMenuItems:!0,closeText:"Close",nativeMenu:!0,initSelector:"select:not(:jqmData(role='slider'))"},_button:function(){return a("<div/>")},_theme:function(){var a;a=this.select.closest("[class*='ui-bar-'], [class*='ui-body-']");return a.length?/ui-(bar|body)-([a-z])/.exec(a.attr("class"))[2]:
141
+ "c"},_setDisabled:function(a){this.element.attr("disabled",a);this.button.attr("aria-disabled",a);return this._setOption("disabled",a)},_focusButton:function(){var a=this;setTimeout(function(){a.button.focus()},40)},_preExtension:function(){this.select=this.element.wrap("<div class='ui-select'>");this.selectID=this.select.attr("id");this.label=a("label[for='"+this.selectID+"']").addClass("ui-select");this.isMultiple=this.select[0].multiple;this.options.theme=this._theme();this.selectOptions=this.select.find("option")},
142
+ _create:function(){this._preExtension();this._trigger("beforeCreate");this.button=this._button();var d=this,b=this.options,c=this.button.text(a(this.select[0].options.item(this.select[0].selectedIndex==-1?0:this.select[0].selectedIndex)).text()).insertBefore(this.select).buttonMarkup({theme:b.theme,icon:b.icon,iconpos:b.iconpos,inline:b.inline,corners:b.corners,shadow:b.shadow,iconshadow:b.iconshadow});b.nativeMenu&&window.opera&&window.opera.version&&this.select.addClass("ui-select-nativeonly");
143
+ if(this.isMultiple)this.buttonCount=a("<span>").addClass("ui-li-count ui-btn-up-c ui-btn-corner-all").hide().appendTo(c);b.disabled&&this.disable();this.select.change(function(){d.refresh()});this.build()},build:function(){var d=this;this.select.appendTo(d.button).bind("vmousedown",function(){d.button.addClass(a.mobile.activeBtnClass)}).bind("focus vmouseover",function(){d.button.trigger("vmouseover")}).bind("vmousemove",function(){d.button.removeClass(a.mobile.activeBtnClass)}).bind("change blur vmouseout",
144
+ function(){d.button.trigger("vmouseout").removeClass(a.mobile.activeBtnClass)}).bind("change blur",function(){d.button.removeClass("ui-btn-down-"+d.options.theme)})},selected:function(){return this.selectOptions.filter(":selected")},selectedIndices:function(){var a=this;return this.selected().map(function(){return a.selectOptions.index(this)}).get()},setButtonText:function(){var d=this,b=this.selected();this.button.find(".ui-btn-text").text(function(){if(!d.isMultiple)return b.text();return b.length?
145
+ b.map(function(){return a(this).text()}).get().join(", "):d.placeholder})},setButtonCount:function(){var a=this.selected();this.isMultiple&&this.buttonCount[a.length>1?"show":"hide"]().text(a.length)},refresh:function(){this.setButtonText();this.setButtonCount()},disable:function(){this._setDisabled(!0);this.button.addClass("ui-disabled")},enable:function(){this._setDisabled(!1);this.button.removeClass("ui-disabled")}});a(document).bind("pagecreate create",function(d){a(a.mobile.selectmenu.prototype.options.initSelector,
146
+ d.target).not(":jqmData(role='none'), :jqmData(role='nojs')").selectmenu()})})(jQuery);
147
+ (function(a){function d(b){for(;b;){var d=a(b);if(d.hasClass("ui-btn")&&!d.hasClass("ui-disabled"))break;b=b.parentNode}return b}a.fn.buttonMarkup=function(c){return this.each(function(){var d=a(this),e=a.extend({},a.fn.buttonMarkup.defaults,d.jqmData(),c),g="ui-btn-inner",h,j;b&&b();if(!e.theme)h=d.closest("[class*='ui-bar-'],[class*='ui-body-']"),e.theme=h.length?/ui-(bar|body)-([a-z])/.exec(h.attr("class"))[2]:"c";h="ui-btn ui-btn-up-"+e.theme;e.inline&&(h+=" ui-btn-inline");if(e.icon)e.icon="ui-icon-"+
148
+ e.icon,e.iconpos=e.iconpos||"left",j="ui-icon "+e.icon,e.iconshadow&&(j+=" ui-icon-shadow");e.iconpos&&(h+=" ui-btn-icon-"+e.iconpos,e.iconpos=="notext"&&!d.attr("title")&&d.attr("title",d.text()));e.corners&&(h+=" ui-btn-corner-all",g+=" ui-btn-corner-all");e.shadow&&(h+=" ui-shadow");d.attr("data-"+a.mobile.ns+"theme",e.theme).addClass(h);e=("<D class='"+g+"'><D class='ui-btn-text'></D>"+(e.icon?"<span class='"+j+"'></span>":"")+"</D>").replace(/D/g,e.wrapperEls);d.wrapInner(e)})};a.fn.buttonMarkup.defaults=
149
+ {corners:!0,shadow:!0,iconshadow:!0,wrapperEls:"span"};var b=function(){a(document).bind({vmousedown:function(b){var b=d(b.target),f;b&&(b=a(b),f=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-up-"+f).addClass("ui-btn-down-"+f))},"vmousecancel vmouseup":function(b){var b=d(b.target),f;b&&(b=a(b),f=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-down-"+f).addClass("ui-btn-up-"+f))},"vmouseover focus":function(b){var b=d(b.target),f;b&&(b=a(b),f=b.attr("data-"+a.mobile.ns+"theme"),
150
+ b.removeClass("ui-btn-up-"+f).addClass("ui-btn-hover-"+f))},"vmouseout blur":function(b){var b=d(b.target),f;b&&(b=a(b),f=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-hover-"+f).addClass("ui-btn-up-"+f))}});b=null};a(document).bind("pagecreate create",function(b){a(":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a",b.target).not(".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')").buttonMarkup()})})(jQuery);
151
+ (function(a){a.fn.controlgroup=function(d){return this.each(function(){function b(a){a.removeClass("ui-btn-corner-all ui-shadow").eq(0).addClass(g[0]).end().filter(":last").addClass(g[1]).addClass("ui-controlgroup-last")}var c=a(this),f=a.extend({direction:c.jqmData("type")||"vertical",shadow:!1,excludeInvisible:!0},d),e=c.find(">legend"),g=f.direction=="horizontal"?["ui-corner-left","ui-corner-right"]:["ui-corner-top","ui-corner-bottom"];c.find("input:eq(0)").attr("type");e.length&&(c.wrapInner("<div class='ui-controlgroup-controls'></div>"),
152
+ a("<div role='heading' class='ui-controlgroup-label'>"+e.html()+"</div>").insertBefore(c.children(0)),e.remove());c.addClass("ui-corner-all ui-controlgroup ui-controlgroup-"+f.direction);b(c.find(".ui-btn"+(f.excludeInvisible?":visible":"")));b(c.find(".ui-btn-inner"));f.shadow&&c.addClass("ui-shadow")})};a(document).bind("pagecreate create",function(d){a(":jqmData(role='controlgroup')",d.target).controlgroup({excludeInvisible:!1})})})(jQuery);(function(a){a(document).bind("pagecreate create",function(d){a(d.target).find("a").not(".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')").addClass("ui-link")})})(jQuery);
153
+ (function(a,d){a.fn.fixHeaderFooter=function(){if(!a.support.scrollTop)return this;return this.each(function(){var b=a(this);b.jqmData("fullscreen")&&b.addClass("ui-page-fullscreen");b.find(".ui-header:jqmData(position='fixed')").addClass("ui-header-fixed ui-fixed-inline fade");b.find(".ui-footer:jqmData(position='fixed')").addClass("ui-footer-fixed ui-fixed-inline fade")})};a.mobile.fixedToolbars=function(){function b(){!j&&h==="overlay"&&(g||a.mobile.fixedToolbars.hide(!0),a.mobile.fixedToolbars.startShowTimer())}
154
+ function c(a){var b=0,c,d;if(a){d=document.body;c=a.offsetParent;for(b=a.offsetTop;a&&a!=d;){b+=a.scrollTop||0;if(a==c)b+=c.offsetTop,c=a.offsetParent;a=a.parentNode}}return b}function f(b){var d=a(window).scrollTop(),e=c(b[0]),f=b.css("top")=="auto"?0:parseFloat(b.css("top")),g=window.innerHeight,h=b.outerHeight(),j=b.parents(".ui-page:not(.ui-page-fullscreen)").length;return b.is(".ui-header-fixed")?(f=d-e+f,f<e&&(f=0),b.css("top",j?f:d)):b.css("top",j?d+g-h-(e-f):d+g-h)}if(a.support.scrollTop&&
155
+ !a.support.touchOverflow){var e,g,h="inline",j=!1,l=null,n=!1,s=!0;a(function(){var c=a(document),d=a(window);c.bind("vmousedown",function(){s&&(l=h)}).bind("vclick",function(b){s&&!a(b.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length&&!n&&(a.mobile.fixedToolbars.toggle(l),l=null)}).bind("silentscroll",b);(c.scrollTop()===0?d:c).bind("scrollstart",function(){n=!0;l===null&&(l=h);var b=l=="overlay";if(j=b||!!g)a.mobile.fixedToolbars.clearShowTimer(),
156
+ b&&a.mobile.fixedToolbars.hide(!0)}).bind("scrollstop",function(b){a(b.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length||(n=!1,j&&(a.mobile.fixedToolbars.startShowTimer(),j=!1),l=null)});d.bind("resize",b)});a(".ui-page").live("pagebeforeshow",function(b,c){var d=a(b.target).find(":jqmData(role='footer')"),g=d.data("id"),h=c.prevPage,h=h&&h.find(":jqmData(role='footer')"),h=h.length&&h.jqmData("id")===g;g&&h&&(e=d,f(e.removeClass("fade in out").appendTo(a.mobile.pageContainer)))}).live("pageshow",
157
+ function(){var b=a(this);e&&e.length&&setTimeout(function(){f(e.appendTo(b).addClass("fade"));e=null},500);a.mobile.fixedToolbars.show(!0,this)});a(".ui-collapsible-contain").live("collapse expand",b);return{show:function(b,d){a.mobile.fixedToolbars.clearShowTimer();h="overlay";return(d?a(d):a.mobile.activePage?a.mobile.activePage:a(".ui-page-active")).children(".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var d=a(this),e=a(window).scrollTop(),g=c(d[0]),
158
+ h=window.innerHeight,j=d.outerHeight(),e=d.is(".ui-header-fixed")&&e<=g+j||d.is(".ui-footer-fixed")&&g<=e+h;d.addClass("ui-fixed-overlay").removeClass("ui-fixed-inline");!e&&!b&&d.animationComplete(function(){d.removeClass("in")}).addClass("in");f(d)})},hide:function(b){h="inline";return(a.mobile.activePage?a.mobile.activePage:a(".ui-page-active")).children(".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var c=a(this),d=c.css("top"),d=d=="auto"?0:parseFloat(d);
159
+ c.addClass("ui-fixed-inline").removeClass("ui-fixed-overlay");if(d<0||c.is(".ui-header-fixed")&&d!==0)b?c.css("top",0):c.css("top")!=="auto"&&parseFloat(c.css("top"))!==0&&c.animationComplete(function(){c.removeClass("out reverse").css("top",0)}).addClass("out reverse")})},startShowTimer:function(){a.mobile.fixedToolbars.clearShowTimer();var b=[].slice.call(arguments);g=setTimeout(function(){g=d;a.mobile.fixedToolbars.show.apply(null,b)},100)},clearShowTimer:function(){g&&clearTimeout(g);g=d},toggle:function(b){b&&
160
+ (h=b);return h==="overlay"?a.mobile.fixedToolbars.hide():a.mobile.fixedToolbars.show()},setTouchToggleEnabled:function(a){s=a}}}}();a.fixedToolbars=a.mobile.fixedToolbars;a(document).bind("pagecreate create",function(b){a(":jqmData(position='fixed')",b.target).length&&a(b.target).each(function(){if(!a.support.scrollTop||a.support.touchOverflow)return this;var b=a(this);b.jqmData("fullscreen")&&b.addClass("ui-page-fullscreen");b.find(".ui-header:jqmData(position='fixed')").addClass("ui-header-fixed ui-fixed-inline fade");
161
+ b.find(".ui-footer:jqmData(position='fixed')").addClass("ui-footer-fixed ui-fixed-inline fade")})})})(jQuery);
162
+ (function(a){a.mobile.touchOverflowEnabled=!1;a(document).bind("pagecreate",function(d){a.support.touchOverflow&&a.mobile.touchOverflowEnabled&&(d=a(d.target),d.is(":jqmData(role='page')")&&d.each(function(){var b=a(this),c=b.find(":jqmData(role='header'), :jqmData(role='footer')").filter(":jqmData(position='fixed')"),d=b.jqmData("fullscreen"),e=c.length?b.find(".ui-content"):b;b.addClass("ui-mobile-touch-overflow");e.bind("scrollstop",function(){e.scrollTop()>0&&window.scrollTo(0,a.mobile.defaultHomeScroll)});
163
+ c.length&&(b.addClass("ui-native-fixed"),d&&(b.addClass("ui-native-fullscreen"),c.addClass("fade in"),a(document).bind("vclick",function(){c.removeClass("ui-native-bars-hidden").toggleClass("in out").animationComplete(function(){a(this).not(".in").addClass("ui-native-bars-hidden")})})))}))})})(jQuery);
164
+ (function(a){function d(){var d=b.width(),g=[],h=[],j;c.removeClass("min-width-"+f.join("px min-width-")+"px max-width-"+f.join("px max-width-")+"px");a.each(f,function(a,b){d>=b&&g.push("min-width-"+b+"px");d<=b&&h.push("max-width-"+b+"px")});g.length&&(j=g.join(" "));h.length&&(j+=" "+h.join(" "));c.addClass(j)}var b=a(window),c=a("html"),f=[320,480,768,1024];a.mobile.addResolutionBreakpoints=function(b){a.type(b)==="array"?f=f.concat(b):f.push(b);f.sort(function(a,b){return a-b});d()};a(document).bind("mobileinit.htmlclass",
165
+ function(){b.bind("orientationchange.htmlclass throttledresize.htmlclass",function(a){a.orientation&&c.removeClass("portrait landscape").addClass(a.orientation);d()})});a(function(){b.trigger("orientationchange.htmlclass")})})(jQuery);
166
+ (function(a,d){var b=a("html");a("head");var c=a(d);a(d.document).trigger("mobileinit");if(a.mobile.gradeA()){if(a.mobile.ajaxBlacklist)a.mobile.ajaxEnabled=!1;b.addClass("ui-mobile ui-mobile-rendering");var f=a("<div class='ui-loader ui-body-a ui-corner-all'><span class='ui-icon ui-icon-loading spin'></span><h1></h1></div>");a.extend(a.mobile,{showPageLoadingMsg:function(){if(a.mobile.loadingMessage){var d=a("."+a.mobile.activeBtnClass).first();f.find("h1").text(a.mobile.loadingMessage).end().appendTo(a.mobile.pageContainer).css({top:a.support.scrollTop&&
167
+ c.scrollTop()+c.height()/2||d.length&&d.offset().top||100})}b.addClass("ui-loading")},hidePageLoadingMsg:function(){b.removeClass("ui-loading")},pageLoading:function(b){b?a.mobile.hidePageLoadingMsg():a.mobile.showPageLoadingMsg()},initializePage:function(){var b=a(":jqmData(role='page')");b.length||(b=a("body").wrapInner("<div data-"+a.mobile.ns+"role='page'></div>").children(0));b.add(":jqmData(role='dialog')").each(function(){var b=a(this);b.jqmData("url")||b.attr("data-"+a.mobile.ns+"url",b.attr("id")||
168
+ location.pathname+location.search)});a.mobile.firstPage=b.first();a.mobile.pageContainer=b.first().parent().addClass("ui-mobile-viewport");a.mobile.showPageLoadingMsg();!a.mobile.hashListeningEnabled||!a.mobile.path.stripHash(location.hash)?a.mobile.changePage(a.mobile.firstPage,{transition:"none",reverse:!0,changeHash:!1,fromHashChange:!0}):c.trigger("hashchange",[!0])}});a.mobile._registerInternalEvents();a(function(){d.scrollTo(0,1);a.mobile.defaultHomeScroll=!a.support.scrollTop||a(d).scrollTop()===
169
+ 1?0:1;a.mobile.autoInitializePage&&a.mobile.initializePage();c.load(a.mobile.silentScroll)})}})(jQuery,this);
skin/frontend/smarttheme/default/main.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ .product-essential .product-image img {
2
+ width: 100%;
3
+ max-width: 700px;
4
+ }
5
+ li.ui-btn-icon-left a {
6
+ margin-left: 1em;
7
+ }
skin/frontend/smarttheme/default/main.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function roundNumber(num, dec) {
2
+ var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
3
+ return result;
4
+ }
5
+ $(document).bind("mobileinit", function(){
6
+ $.mobile.defaultTransition = 'none';
7
+ //$.mobile.ajaxEnabled = false;
8
+ $.mobile.page.prototype.options.addBackBtn = true;
9
+ });
10
+ function setCookie(c_name,value,exdays)
11
+ {
12
+ var exdate=new Date();
13
+ exdate.setDate(exdate.getDate() + exdays);
14
+ var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
15
+ document.cookie=c_name + "=" + c_value;
16
+ }
17
+ function getCookie(c_name)
18
+ {
19
+ var i,x,y,ARRcookies=document.cookie.split(";");
20
+ for (i=0;i<ARRcookies.length;i++)
21
+ {
22
+ x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
23
+ y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
24
+ x=x.replace(/^\s+|\s+$/g,"");
25
+ if (x==c_name)
26
+ {
27
+ return unescape(y);
28
+ }
29
+ }
30
+ }
smarttheme.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $d;
3
+ $d = array();
4
+ $useragent = strtolower($_SERVER['HTTP_USER_AGENT']);
5
+
6
+ // Feel free to add your device if its not listed
7
+ if (
8
+ preg_match('/android.+mobile|avantgo|bada\/|webos|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge|xoom |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)
9
+ ||
10
+ preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i',substr($useragent,0,4))
11
+ ) {
12
+ $_SERVER['MAGE_RUN_CODE'] = 'smarttheme_en';
13
+ $d = getDeviceConfig($device);
14
+ }
15
+
16
+ function getDeviceConfig($device) {
17
+ $scale = 0.75;
18
+ foreach (array('pad','xoom','kindle') as $pad) {
19
+ if (strpos($useragent,$pad)) {
20
+ $scale = 1.0;
21
+ break;
22
+ }
23
+ }
24
+ return array('devicestring' => $device, 'scale' => $scale);
25
+ }
26
+ ?>