윤혜원

index.ejs 템플릿 적용하기 성공!

Showing 62 changed files with 7488 additions and 107 deletions
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="ffe1a490-8fdb-4611-8537-4d1c03c40b8d" name="Default" comment=""> 4 <list default="true" id="ffe1a490-8fdb-4611-8537-4d1c03c40b8d" name="Default" comment="">
5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> 5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6 + <change beforePath="$PROJECT_DIR$/app.js" beforeDir="false" afterPath="$PROJECT_DIR$/app.js" afterDir="false" />
7 + <change beforePath="$PROJECT_DIR$/public/stylesheets/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/public/stylesheets/style.css" afterDir="false" />
6 <change beforePath="$PROJECT_DIR$/routes/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/routes/index.js" afterDir="false" /> 8 <change beforePath="$PROJECT_DIR$/routes/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/routes/index.js" afterDir="false" />
7 - <change beforePath="$PROJECT_DIR$/routes/mytoons.js" beforeDir="false" afterPath="$PROJECT_DIR$/routes/mytoons.js" afterDir="false" /> 9 + <change beforePath="$PROJECT_DIR$/views/index.ejs" beforeDir="false" afterPath="$PROJECT_DIR$/views/index.ejs" afterDir="false" />
8 - <change beforePath="$PROJECT_DIR$/routes/setting.js" beforeDir="false" afterPath="$PROJECT_DIR$/routes/setting.js" afterDir="false" />
9 - <change beforePath="$PROJECT_DIR$/routes/toonviewer.js" beforeDir="false" afterPath="$PROJECT_DIR$/routes/toonviewer.js" afterDir="false" />
10 <change beforePath="$PROJECT_DIR$/views/mytoons.ejs" beforeDir="false" afterPath="$PROJECT_DIR$/views/mytoons.ejs" afterDir="false" /> 10 <change beforePath="$PROJECT_DIR$/views/mytoons.ejs" beforeDir="false" afterPath="$PROJECT_DIR$/views/mytoons.ejs" afterDir="false" />
11 + <change beforePath="$PROJECT_DIR$/ytmtDB.zip" beforeDir="false" />
11 </list> 12 </list>
12 <ignored path="$PROJECT_DIR$/out/" /> 13 <ignored path="$PROJECT_DIR$/out/" />
13 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 14 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
...@@ -112,31 +113,36 @@ ...@@ -112,31 +113,36 @@
112 <entry key="project.closed" value="3" /> 113 <entry key="project.closed" value="3" />
113 <entry key="project.open.time.10" value="1" /> 114 <entry key="project.open.time.10" value="1" />
114 <entry key="project.open.time.13" value="1" /> 115 <entry key="project.open.time.13" value="1" />
115 - <entry key="project.opened" value="3" /> 116 + <entry key="project.open.time.2" value="1" />
117 + <entry key="project.opened" value="4" />
116 </counts> 118 </counts>
117 </usages-collector> 119 </usages-collector>
118 <usages-collector id="statistics.file.extensions.open"> 120 <usages-collector id="statistics.file.extensions.open">
119 <counts> 121 <counts>
120 - <entry key="ejs" value="4" /> 122 + <entry key="css" value="2" />
121 - <entry key="js" value="2" /> 123 + <entry key="ejs" value="6" />
124 + <entry key="html" value="1" />
125 + <entry key="js" value="9" />
122 </counts> 126 </counts>
123 </usages-collector> 127 </usages-collector>
124 <usages-collector id="statistics.file.types.open"> 128 <usages-collector id="statistics.file.types.open">
125 <counts> 129 <counts>
126 - <entry key="EJS" value="4" /> 130 + <entry key="CSS" value="2" />
127 - <entry key="JavaScript" value="2" /> 131 + <entry key="EJS" value="6" />
132 + <entry key="HTML" value="1" />
133 + <entry key="JavaScript" value="9" />
128 </counts> 134 </counts>
129 </usages-collector> 135 </usages-collector>
130 <usages-collector id="statistics.file.extensions.edit"> 136 <usages-collector id="statistics.file.extensions.edit">
131 <counts> 137 <counts>
132 - <entry key="ejs" value="358" /> 138 + <entry key="ejs" value="453" />
133 - <entry key="js" value="1290" /> 139 + <entry key="js" value="1398" />
134 </counts> 140 </counts>
135 </usages-collector> 141 </usages-collector>
136 <usages-collector id="statistics.file.types.edit"> 142 <usages-collector id="statistics.file.types.edit">
137 <counts> 143 <counts>
138 - <entry key="EJS" value="358" /> 144 + <entry key="EJS" value="453" />
139 - <entry key="JavaScript" value="1290" /> 145 + <entry key="JavaScript" value="1398" />
140 </counts> 146 </counts>
141 </usages-collector> 147 </usages-collector>
142 </session> 148 </session>
...@@ -146,71 +152,38 @@ ...@@ -146,71 +152,38 @@
146 <file pinned="false" current-in-tab="false"> 152 <file pinned="false" current-in-tab="false">
147 <entry file="file://$PROJECT_DIR$/routes/mytoons.js"> 153 <entry file="file://$PROJECT_DIR$/routes/mytoons.js">
148 <provider selected="true" editor-type-id="text-editor"> 154 <provider selected="true" editor-type-id="text-editor">
149 - <state relative-caret-position="171"> 155 + <state relative-caret-position="-152">
150 - <caret line="9" column="27" selection-start-line="9" selection-start-column="27" selection-end-line="9" selection-end-column="27" /> 156 + <caret line="7" column="1" selection-start-line="7" selection-start-column="1" selection-end-line="7" selection-end-column="1" />
151 </state> 157 </state>
152 </provider> 158 </provider>
153 </entry> 159 </entry>
154 </file> 160 </file>
155 <file pinned="false" current-in-tab="false"> 161 <file pinned="false" current-in-tab="false">
156 - <entry file="file://$PROJECT_DIR$/routes/toonviewer.js"> 162 + <entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
157 <provider selected="true" editor-type-id="text-editor"> 163 <provider selected="true" editor-type-id="text-editor">
158 - <state relative-caret-position="133"> 164 + <state relative-caret-position="-1862">
159 - <caret line="7" column="23" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" /> 165 + <caret line="19" column="4" selection-start-line="19" selection-start-column="4" selection-end-line="19" selection-end-column="4" />
160 </state> 166 </state>
161 </provider> 167 </provider>
162 </entry> 168 </entry>
163 </file> 169 </file>
164 <file pinned="false" current-in-tab="false"> 170 <file pinned="false" current-in-tab="false">
165 - <entry file="file://$PROJECT_DIR$/routes/setting.js"> 171 + <entry file="file://$PROJECT_DIR$/views/index.html">
166 <provider selected="true" editor-type-id="text-editor"> 172 <provider selected="true" editor-type-id="text-editor">
167 - <state relative-caret-position="1007"> 173 + <state relative-caret-position="361">
168 - <caret line="53" column="14" lean-forward="true" selection-start-line="53" selection-start-column="14" selection-end-line="53" selection-end-column="14" /> 174 + <caret line="28" lean-forward="true" selection-start-line="16" selection-end-line="28" />
169 </state> 175 </state>
170 </provider> 176 </provider>
171 </entry> 177 </entry>
172 </file> 178 </file>
173 <file pinned="false" current-in-tab="true"> 179 <file pinned="false" current-in-tab="true">
174 - <entry file="file://$PROJECT_DIR$/views/setting.ejs">
175 - <provider selected="true" editor-type-id="text-editor">
176 - <state relative-caret-position="551">
177 - <caret line="29" column="22" selection-start-line="29" selection-start-column="22" selection-end-line="29" selection-end-column="22" />
178 - </state>
179 - </provider>
180 - </entry>
181 - </file>
182 - <file pinned="false" current-in-tab="false">
183 - <entry file="file://$PROJECT_DIR$/views/toonviewer.ejs">
184 - <provider selected="true" editor-type-id="text-editor">
185 - <state relative-caret-position="152">
186 - <caret line="8" column="21" lean-forward="true" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="21" />
187 - </state>
188 - </provider>
189 - </entry>
190 - </file>
191 - <file pinned="false" current-in-tab="false">
192 - <entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
193 - <provider selected="true" editor-type-id="text-editor">
194 - <state relative-caret-position="475">
195 - <caret line="25" column="12" lean-forward="true" selection-start-line="25" selection-start-column="12" selection-end-line="25" selection-end-column="12" />
196 - </state>
197 - </provider>
198 - </entry>
199 - </file>
200 - <file pinned="false" current-in-tab="false">
201 <entry file="file://$PROJECT_DIR$/views/index.ejs"> 180 <entry file="file://$PROJECT_DIR$/views/index.ejs">
202 <provider selected="true" editor-type-id="text-editor"> 181 <provider selected="true" editor-type-id="text-editor">
203 - <state relative-caret-position="1881"> 182 + <state relative-caret-position="361">
204 - <caret line="99" column="14" lean-forward="true" selection-start-line="99" selection-start-column="14" selection-end-line="99" selection-end-column="14" /> 183 + <caret line="46" column="84" lean-forward="true" selection-start-line="46" selection-start-column="84" selection-end-line="46" selection-end-column="84" />
205 - </state> 184 + <folding>
206 - </provider> 185 + <element signature="n#style#0;n#div#2;n#body#0;n#html#0;n#!!top" expanded="true" />
207 - </entry> 186 + </folding>
208 - </file>
209 - <file pinned="false" current-in-tab="false">
210 - <entry file="file://$PROJECT_DIR$/routes/index.js">
211 - <provider selected="true" editor-type-id="text-editor">
212 - <state relative-caret-position="152">
213 - <caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
214 </state> 187 </state>
215 </provider> 188 </provider>
216 </entry> 189 </entry>
...@@ -227,8 +200,6 @@ ...@@ -227,8 +200,6 @@
227 </component> 200 </component>
228 <component name="FindInProjectRecents"> 201 <component name="FindInProjectRecents">
229 <findStrings> 202 <findStrings>
230 - <find>connection.</find>
231 - <find>connection.end</find>
232 <find>connection.connect()</find> 203 <find>connection.connect()</find>
233 <find>login</find> 204 <find>login</find>
234 <find>done(</find> 205 <find>done(</find>
...@@ -257,6 +228,8 @@ ...@@ -257,6 +228,8 @@
257 <find>로그인</find> 228 <find>로그인</find>
258 <find>console.log(</find> 229 <find>console.log(</find>
259 <find>des</find> 230 <find>des</find>
231 + <find>웹툰</find>
232 + <find>getall</find>
260 </findStrings> 233 </findStrings>
261 <dirStrings> 234 <dirStrings>
262 <dir>$PROJECT_DIR$/views</dir> 235 <dir>$PROJECT_DIR$/views</dir>
...@@ -296,14 +269,14 @@ ...@@ -296,14 +269,14 @@
296 <option value="$PROJECT_DIR$/node_modules/phantomjs/lib/phantom/examples/module.js" /> 269 <option value="$PROJECT_DIR$/node_modules/phantomjs/lib/phantom/examples/module.js" />
297 <option value="$PROJECT_DIR$/views/daum" /> 270 <option value="$PROJECT_DIR$/views/daum" />
298 <option value="$PROJECT_DIR$/views/daum.ejs" /> 271 <option value="$PROJECT_DIR$/views/daum.ejs" />
299 - <option value="$PROJECT_DIR$/views/index.ejs" />
300 <option value="$PROJECT_DIR$/routes/daum.js" /> 272 <option value="$PROJECT_DIR$/routes/daum.js" />
301 - <option value="$PROJECT_DIR$/app.js" />
302 - <option value="$PROJECT_DIR$/routes/index.js" />
303 <option value="$PROJECT_DIR$/routes/mytoons.js" /> 273 <option value="$PROJECT_DIR$/routes/mytoons.js" />
304 <option value="$PROJECT_DIR$/routes/toonviewer.js" /> 274 <option value="$PROJECT_DIR$/routes/toonviewer.js" />
305 <option value="$PROJECT_DIR$/routes/setting.js" /> 275 <option value="$PROJECT_DIR$/routes/setting.js" />
276 + <option value="$PROJECT_DIR$/app.js" />
277 + <option value="$PROJECT_DIR$/routes/index.js" />
306 <option value="$PROJECT_DIR$/views/mytoons.ejs" /> 278 <option value="$PROJECT_DIR$/views/mytoons.ejs" />
279 + <option value="$PROJECT_DIR$/views/index.ejs" />
307 </list> 280 </list>
308 </option> 281 </option>
309 </component> 282 </component>
...@@ -324,9 +297,9 @@ ...@@ -324,9 +297,9 @@
324 </packageJsonPaths> 297 </packageJsonPaths>
325 </component> 298 </component>
326 <component name="ProjectFrameBounds" extendedState="6"> 299 <component name="ProjectFrameBounds" extendedState="6">
327 - <option name="x" value="-9" /> 300 + <option name="x" value="-8" />
328 - <option name="width" value="978" /> 301 + <option name="width" value="977" />
329 - <option name="height" value="1039" /> 302 + <option name="height" value="1038" />
330 </component> 303 </component>
331 <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> 304 <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
332 <component name="ProjectView"> 305 <component name="ProjectView">
...@@ -334,6 +307,7 @@ ...@@ -334,6 +307,7 @@
334 <foldersAlwaysOnTop value="true" /> 307 <foldersAlwaysOnTop value="true" />
335 </navigator> 308 </navigator>
336 <panes> 309 <panes>
310 + <pane id="Scope" />
337 <pane id="ProjectPane"> 311 <pane id="ProjectPane">
338 <subPane> 312 <subPane>
339 <expand> 313 <expand>
...@@ -349,6 +323,17 @@ ...@@ -349,6 +323,17 @@
349 <path> 323 <path>
350 <item name="YTMT" type="b2602c69:ProjectViewProjectNode" /> 324 <item name="YTMT" type="b2602c69:ProjectViewProjectNode" />
351 <item name="YTMT" type="462c0819:PsiDirectoryNode" /> 325 <item name="YTMT" type="462c0819:PsiDirectoryNode" />
326 + <item name="public" type="462c0819:PsiDirectoryNode" />
327 + </path>
328 + <path>
329 + <item name="YTMT" type="b2602c69:ProjectViewProjectNode" />
330 + <item name="YTMT" type="462c0819:PsiDirectoryNode" />
331 + <item name="public" type="462c0819:PsiDirectoryNode" />
332 + <item name="stylesheets" type="462c0819:PsiDirectoryNode" />
333 + </path>
334 + <path>
335 + <item name="YTMT" type="b2602c69:ProjectViewProjectNode" />
336 + <item name="YTMT" type="462c0819:PsiDirectoryNode" />
352 <item name="routes" type="462c0819:PsiDirectoryNode" /> 337 <item name="routes" type="462c0819:PsiDirectoryNode" />
353 </path> 338 </path>
354 <path> 339 <path>
...@@ -360,7 +345,6 @@ ...@@ -360,7 +345,6 @@
360 <select /> 345 <select />
361 </subPane> 346 </subPane>
362 </pane> 347 </pane>
363 - <pane id="Scope" />
364 <pane id="AndroidView" /> 348 <pane id="AndroidView" />
365 <pane id="PackagesPane" /> 349 <pane id="PackagesPane" />
366 </panes> 350 </panes>
...@@ -522,6 +506,7 @@ ...@@ -522,6 +506,7 @@
522 <workItem from="1543588884449" duration="7362000" /> 506 <workItem from="1543588884449" duration="7362000" />
523 <workItem from="1543625351688" duration="5520000" /> 507 <workItem from="1543625351688" duration="5520000" />
524 <workItem from="1543732778568" duration="2000" /> 508 <workItem from="1543732778568" duration="2000" />
509 + <workItem from="1543986114264" duration="3571000" />
525 </task> 510 </task>
526 <task id="LOCAL-00001" summary="초기 commit by intellij"> 511 <task id="LOCAL-00001" summary="초기 commit by intellij">
527 <created>1512174269218</created> 512 <created>1512174269218</created>
...@@ -541,7 +526,7 @@ ...@@ -541,7 +526,7 @@
541 <servers /> 526 <servers />
542 </component> 527 </component>
543 <component name="TimeTrackingManager"> 528 <component name="TimeTrackingManager">
544 - <option name="totallyTimeSpent" value="232161000" /> 529 + <option name="totallyTimeSpent" value="235732000" />
545 </component> 530 </component>
546 <component name="TodoView"> 531 <component name="TodoView">
547 <todo-panel id="selected-file"> 532 <todo-panel id="selected-file">
...@@ -554,6 +539,7 @@ ...@@ -554,6 +539,7 @@
554 </component> 539 </component>
555 <component name="ToolWindowManager"> 540 <component name="ToolWindowManager">
556 <frame x="-7" y="-7" width="1550" height="838" extended-state="6" /> 541 <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
542 + <editor active="true" />
557 <layout> 543 <layout>
558 <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.48880598" visible="true" weight="0.16523464" /> 544 <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.48880598" visible="true" weight="0.16523464" />
559 <window_info id="Structure" order="1" weight="0.24964234" /> 545 <window_info id="Structure" order="1" weight="0.24964234" />
...@@ -732,66 +718,96 @@ ...@@ -732,66 +718,96 @@
732 </provider> 718 </provider>
733 </entry> 719 </entry>
734 <entry file="file://$USER_HOME$/Desktop/YTMT-master-f6ba581c2d39966c105a13a31a3246237b655d48/YTMT-master-f6ba581c2d39966c105a13a31a3246237b655d48/app.js" /> 720 <entry file="file://$USER_HOME$/Desktop/YTMT-master-f6ba581c2d39966c105a13a31a3246237b655d48/YTMT-master-f6ba581c2d39966c105a13a31a3246237b655d48/app.js" />
735 - <entry file="file://$PROJECT_DIR$/app.js"> 721 + <entry file="file://$PROJECT_DIR$/views/toonviewer.ejs">
722 + <provider selected="true" editor-type-id="text-editor">
723 + <state relative-caret-position="152">
724 + <caret line="8" column="21" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="21" />
725 + </state>
726 + </provider>
727 + </entry>
728 + <entry file="file://$PROJECT_DIR$/views/setting.ejs">
736 <provider selected="true" editor-type-id="text-editor"> 729 <provider selected="true" editor-type-id="text-editor">
737 - <state relative-caret-position="146"> 730 + <state relative-caret-position="589">
738 - <caret line="62" column="35" lean-forward="true" selection-start-line="62" selection-start-column="35" selection-end-line="62" selection-end-column="35" /> 731 + <caret line="31" column="15" lean-forward="true" selection-start-line="31" selection-start-column="15" selection-end-line="31" selection-end-column="15" />
739 </state> 732 </state>
740 </provider> 733 </provider>
741 </entry> 734 </entry>
742 - <entry file="file://$PROJECT_DIR$/routes/mytoons.js"> 735 + <entry file="file://$PROJECT_DIR$/routes/setting.js">
743 <provider selected="true" editor-type-id="text-editor"> 736 <provider selected="true" editor-type-id="text-editor">
744 - <state relative-caret-position="171"> 737 + <state relative-caret-position="1007">
745 - <caret line="9" column="27" selection-start-line="9" selection-start-column="27" selection-end-line="9" selection-end-column="27" /> 738 + <caret line="53" column="14" selection-start-line="53" selection-start-column="14" selection-end-line="53" selection-end-column="14" />
746 </state> 739 </state>
747 </provider> 740 </provider>
748 </entry> 741 </entry>
749 <entry file="file://$PROJECT_DIR$/routes/toonviewer.js"> 742 <entry file="file://$PROJECT_DIR$/routes/toonviewer.js">
750 <provider selected="true" editor-type-id="text-editor"> 743 <provider selected="true" editor-type-id="text-editor">
751 - <state relative-caret-position="133"> 744 + <state relative-caret-position="198">
752 - <caret line="7" column="23" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" /> 745 + <caret line="26" column="7" lean-forward="true" selection-start-line="26" selection-start-column="7" selection-end-line="26" selection-end-column="7" />
753 </state> 746 </state>
754 </provider> 747 </provider>
755 </entry> 748 </entry>
756 - <entry file="file://$PROJECT_DIR$/routes/setting.js"> 749 + <entry file="file://$PROJECT_DIR$/app.js">
757 <provider selected="true" editor-type-id="text-editor"> 750 <provider selected="true" editor-type-id="text-editor">
758 - <state relative-caret-position="1007"> 751 + <state relative-caret-position="274">
759 - <caret line="53" column="14" lean-forward="true" selection-start-line="53" selection-start-column="14" selection-end-line="53" selection-end-column="14" /> 752 + <caret line="71" column="16" lean-forward="true" selection-start-line="71" selection-start-column="16" selection-end-line="71" selection-end-column="16" />
760 </state> 753 </state>
761 </provider> 754 </provider>
762 </entry> 755 </entry>
763 - <entry file="file://$PROJECT_DIR$/views/toonviewer.ejs"> 756 + <entry file="file://$PROJECT_DIR$/routes/index.js">
764 <provider selected="true" editor-type-id="text-editor"> 757 <provider selected="true" editor-type-id="text-editor">
765 - <state relative-caret-position="152"> 758 + <state relative-caret-position="207">
766 - <caret line="8" column="21" lean-forward="true" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="21" /> 759 + <caret line="237" column="39" lean-forward="true" selection-start-line="237" selection-start-column="39" selection-end-line="237" selection-end-column="39" />
767 </state> 760 </state>
768 </provider> 761 </provider>
769 </entry> 762 </entry>
770 - <entry file="file://$PROJECT_DIR$/views/mytoons.ejs"> 763 + <entry file="file://$PROJECT_DIR$/views/nivo-lightbox.js">
771 <provider selected="true" editor-type-id="text-editor"> 764 <provider selected="true" editor-type-id="text-editor">
772 - <state relative-caret-position="475"> 765 + <state relative-caret-position="190">
773 - <caret line="25" column="12" lean-forward="true" selection-start-line="25" selection-start-column="12" selection-end-line="25" selection-end-column="12" /> 766 + <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" />
767 + <folding>
768 + <element signature="n#!!doc" expanded="true" />
769 + </folding>
774 </state> 770 </state>
775 </provider> 771 </provider>
776 </entry> 772 </entry>
777 - <entry file="file://$PROJECT_DIR$/views/index.ejs"> 773 + <entry file="file://$PROJECT_DIR$/public/stylesheets/style2.css">
774 + <provider selected="true" editor-type-id="text-editor" />
775 + </entry>
776 + <entry file="file://$PROJECT_DIR$/public/stylesheets/bootstrap.css">
778 <provider selected="true" editor-type-id="text-editor"> 777 <provider selected="true" editor-type-id="text-editor">
779 - <state relative-caret-position="1881"> 778 + <state relative-caret-position="209">
780 - <caret line="99" column="14" lean-forward="true" selection-start-line="99" selection-start-column="14" selection-end-line="99" selection-end-column="14" /> 779 + <caret line="11" column="1" lean-forward="true" selection-start-line="11" selection-start-column="1" selection-end-line="11" selection-end-column="1" />
781 </state> 780 </state>
782 </provider> 781 </provider>
783 </entry> 782 </entry>
784 - <entry file="file://$PROJECT_DIR$/routes/index.js"> 783 + <entry file="file://$PROJECT_DIR$/routes/mytoons.js">
785 <provider selected="true" editor-type-id="text-editor"> 784 <provider selected="true" editor-type-id="text-editor">
786 - <state relative-caret-position="152"> 785 + <state relative-caret-position="-152">
787 - <caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" /> 786 + <caret line="7" column="1" selection-start-line="7" selection-start-column="1" selection-end-line="7" selection-end-column="1" />
788 </state> 787 </state>
789 </provider> 788 </provider>
790 </entry> 789 </entry>
791 - <entry file="file://$PROJECT_DIR$/views/setting.ejs"> 790 + <entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
791 + <provider selected="true" editor-type-id="text-editor">
792 + <state relative-caret-position="-1862">
793 + <caret line="19" column="4" selection-start-line="19" selection-start-column="4" selection-end-line="19" selection-end-column="4" />
794 + </state>
795 + </provider>
796 + </entry>
797 + <entry file="file://$PROJECT_DIR$/views/index.html">
798 + <provider selected="true" editor-type-id="text-editor">
799 + <state relative-caret-position="361">
800 + <caret line="28" lean-forward="true" selection-start-line="16" selection-end-line="28" />
801 + </state>
802 + </provider>
803 + </entry>
804 + <entry file="file://$PROJECT_DIR$/views/index.ejs">
792 <provider selected="true" editor-type-id="text-editor"> 805 <provider selected="true" editor-type-id="text-editor">
793 - <state relative-caret-position="551"> 806 + <state relative-caret-position="361">
794 - <caret line="29" column="22" selection-start-line="29" selection-start-column="22" selection-end-line="29" selection-end-column="22" /> 807 + <caret line="46" column="84" lean-forward="true" selection-start-line="46" selection-start-column="84" selection-end-line="46" selection-end-column="84" />
808 + <folding>
809 + <element signature="n#style#0;n#div#2;n#body#0;n#html#0;n#!!top" expanded="true" />
810 + </folding>
795 </state> 811 </state>
796 </provider> 812 </provider>
797 </entry> 813 </entry>
......
...@@ -42,7 +42,7 @@ app.use(express.static(path.join(__dirname, 'public'))); ...@@ -42,7 +42,7 @@ app.use(express.static(path.join(__dirname, 'public')));
42 connection = mysql.createConnection({ 42 connection = mysql.createConnection({
43 host : 'localhost', 43 host : 'localhost',
44 user : 'root', 44 user : 'root',
45 - password : '6377', 45 + password : 'password',
46 port : 3306, 46 port : 3306,
47 database : 'YTMT' 47 database : 'YTMT'
48 }); 48 });
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
1 +/*
2 + * Nivo Lightbox Default Theme v1.0
3 + * http://dev7studios.com/nivo-lightbox
4 + *
5 + * Copyright 2013, Dev7studios
6 + * Free to use and abuse under the MIT license.
7 + * http://www.opensource.org/licenses/mit-license.php
8 + */
9 +
10 + .nivo-lightbox-theme-default * {
11 + -webkit-box-sizing: initial !important;
12 + -moz-box-sizing: initial !important;
13 + box-sizing: initial !important;
14 + }
15 +.nivo-lightbox-theme-default.nivo-lightbox-overlay {
16 + background: #666;
17 + background: rgba(0,0,0,0.6);
18 +}
19 +.nivo-lightbox-theme-default .nivo-lightbox-content.nivo-lightbox-loading { background: url(loading.gif) no-repeat 50% 50%; }
20 +
21 +.nivo-lightbox-theme-default .nivo-lightbox-nav {
22 + top: 10%;
23 + width: 8%;
24 + height: 80%;
25 + text-indent: -9999px;
26 + background-repeat: no-repeat;
27 + background-position: 50% 50%;
28 + opacity: 0.5;
29 +}
30 +.nivo-lightbox-theme-default .nivo-lightbox-nav:hover {
31 + opacity: 1;
32 + background-color: transparent;
33 +}
34 +.nivo-lightbox-theme-default .nivo-lightbox-prev {
35 + background-image: url(prev.png);
36 + border-radius: 0 3px 3px 0;
37 +}
38 +.nivo-lightbox-theme-default .nivo-lightbox-next {
39 + background-image: url(next.png);
40 + border-radius: 3px 0 0 3px;
41 +}
42 +
43 +.nivo-lightbox-theme-default .nivo-lightbox-close {
44 + display: block;
45 + background: url(close.png) no-repeat 5px 5px;
46 + width: 16px;
47 + height: 16px;
48 + text-indent: -9999px;
49 + padding: 5px;
50 + opacity: 0.5;
51 +}
52 +.nivo-lightbox-theme-default .nivo-lightbox-close:hover { opacity: 1; }
53 +
54 +.nivo-lightbox-theme-default .nivo-lightbox-title-wrap { bottom: -7%; }
55 +.nivo-lightbox-theme-default .nivo-lightbox-title {
56 + font: 14px/20px 'Helvetica Neue', Helvetica, Arial, sans-serif;
57 + font-style: normal;
58 + font-weight: normal;
59 + background: #000;
60 + color: #fff;
61 + padding: 7px 15px;
62 + border-radius: 30px;
63 +}
64 +
65 +.nivo-lightbox-theme-default .nivo-lightbox-image img {
66 + background: #fff;
67 + -webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
68 + -moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
69 + box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
70 +}
71 +.nivo-lightbox-theme-default .nivo-lightbox-ajax,
72 +.nivo-lightbox-theme-default .nivo-lightbox-inline {
73 + background: #fff;
74 + padding: 40px;
75 + -webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
76 + -moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
77 + box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
78 +}
79 +
80 +@media (-webkit-min-device-pixel-ratio: 1.3),
81 + (-o-min-device-pixel-ratio: 2.6/2),
82 + (min--moz-device-pixel-ratio: 1.3),
83 + (min-device-pixel-ratio: 1.3),
84 + (min-resolution: 1.3dppx) {
85 +
86 + .nivo-lightbox-theme-default .nivo-lightbox-content.nivo-lightbox-loading {
87 + background-image: url(loading@2x.gif);
88 + background-size: 32px 32px;
89 + }
90 + .nivo-lightbox-theme-default .nivo-lightbox-prev {
91 + background-image: url(prev@2x.png);
92 + background-size: 48px 48px;
93 + }
94 + .nivo-lightbox-theme-default .nivo-lightbox-next {
95 + background-image: url(next@2x.png);
96 + background-size: 48px 48px;
97 + }
98 + .nivo-lightbox-theme-default .nivo-lightbox-close {
99 + background-image: url(close@2x.png);
100 + background-size: 16px 16px;
101 + }
102 +
103 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Nivo Lightbox v1.2.0
3 + * http://dev7studios.com/nivo-lightbox
4 + *
5 + * Copyright 2013, Dev7studios
6 + * Free to use and abuse under the MIT license.
7 + * http://www.opensource.org/licenses/mit-license.php
8 + */
9 +
10 +.nivo-lightbox-overlay {
11 + position: fixed;
12 + top: 0;
13 + left: 0;
14 + z-index: 99998;
15 + width: 100%;
16 + height: 100%;
17 + overflow: hidden;
18 + visibility: hidden;
19 + opacity: 0;
20 + -webkit-box-sizing: border-box;
21 + -moz-box-sizing: border-box;
22 + box-sizing: border-box;
23 +}
24 +.nivo-lightbox-overlay.nivo-lightbox-open {
25 + visibility: visible;
26 + opacity: 1;
27 +}
28 +.nivo-lightbox-wrap {
29 + position: absolute;
30 + top: 10%;
31 + bottom: 10%;
32 + left: 10%;
33 + right: 10%;
34 +}
35 +.nivo-lightbox-content {
36 + width: 100%;
37 + height: 100%;
38 +}
39 +.nivo-lightbox-title-wrap {
40 + position: absolute;
41 + bottom: 0;
42 + left: 0;
43 + width: 100%;
44 + z-index: 99999;
45 + text-align: center;
46 +}
47 +.nivo-lightbox-nav { display: none; }
48 +.nivo-lightbox-prev {
49 + position: absolute;
50 + top: 50%;
51 + left: 0;
52 +}
53 +.nivo-lightbox-next {
54 + position: absolute;
55 + top: 50%;
56 + right: 0;
57 +}
58 +.nivo-lightbox-close {
59 + position: absolute;
60 + top: 2%;
61 + right: 2%;
62 +}
63 +
64 +.nivo-lightbox-image { text-align: center; }
65 +.nivo-lightbox-image img {
66 + max-width: 100%;
67 + max-height: 100%;
68 + width: auto;
69 + height: auto;
70 + vertical-align: middle;
71 +}
72 +.nivo-lightbox-content iframe {
73 + width: 100%;
74 + height: 100%;
75 +}
76 +.nivo-lightbox-inline,
77 +.nivo-lightbox-ajax {
78 + max-height: 100%;
79 + overflow: auto;
80 + -webkit-box-sizing: border-box;
81 + -moz-box-sizing: border-box;
82 + box-sizing: border-box;
83 + /* https://bugzilla.mozilla.org/show_bug.cgi?id=308801 */
84 +}
85 +.nivo-lightbox-error {
86 + display: table;
87 + text-align: center;
88 + width: 100%;
89 + height: 100%;
90 + color: #fff;
91 + text-shadow: 0 1px 1px #000;
92 +}
93 +.nivo-lightbox-error p {
94 + display: table-cell;
95 + vertical-align: middle;
96 +}
97 +
98 +/* Effects
99 + **********************************************/
100 +.nivo-lightbox-notouch .nivo-lightbox-effect-fade,
101 +.nivo-lightbox-notouch .nivo-lightbox-effect-fadeScale,
102 +.nivo-lightbox-notouch .nivo-lightbox-effect-slideLeft,
103 +.nivo-lightbox-notouch .nivo-lightbox-effect-slideRight,
104 +.nivo-lightbox-notouch .nivo-lightbox-effect-slideUp,
105 +.nivo-lightbox-notouch .nivo-lightbox-effect-slideDown,
106 +.nivo-lightbox-notouch .nivo-lightbox-effect-fall {
107 + -webkit-transition: all 0.2s ease-in-out;
108 + -moz-transition: all 0.2s ease-in-out;
109 + -ms-transition: all 0.2s ease-in-out;
110 + -o-transition: all 0.2s ease-in-out;
111 + transition: all 0.2s ease-in-out;
112 +}
113 +
114 +/* fadeScale */
115 +.nivo-lightbox-effect-fadeScale .nivo-lightbox-wrap {
116 + -webkit-transition: all 0.3s;
117 + -moz-transition: all 0.3s;
118 + -ms-transition: all 0.3s;
119 + -o-transition: all 0.3s;
120 + transition: all 0.3s;
121 + -webkit-transform: scale(0.7);
122 + -moz-transform: scale(0.7);
123 + -ms-transform: scale(0.7);
124 + transform: scale(0.7);
125 +}
126 +.nivo-lightbox-effect-fadeScale.nivo-lightbox-open .nivo-lightbox-wrap {
127 + -webkit-transform: scale(1);
128 + -moz-transform: scale(1);
129 + -ms-transform: scale(1);
130 + transform: scale(1);
131 +}
132 +
133 +/* slideLeft / slideRight / slideUp / slideDown */
134 +.nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap,
135 +.nivo-lightbox-effect-slideRight .nivo-lightbox-wrap,
136 +.nivo-lightbox-effect-slideUp .nivo-lightbox-wrap,
137 +.nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
138 + -webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
139 + -moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
140 + -ms-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
141 + -o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
142 + transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
143 +}
144 +.nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap {
145 + -webkit-transform: translateX(-10%);
146 + -moz-transform: translateX(-10%);
147 + -ms-transform: translateX(-10%);
148 + transform: translateX(-10%);
149 +}
150 +.nivo-lightbox-effect-slideRight .nivo-lightbox-wrap {
151 + -webkit-transform: translateX(10%);
152 + -moz-transform: translateX(10%);
153 + -ms-transform: translateX(10%);
154 + transform: translateX(10%);
155 +}
156 +.nivo-lightbox-effect-slideLeft.nivo-lightbox-open .nivo-lightbox-wrap,
157 +.nivo-lightbox-effect-slideRight.nivo-lightbox-open .nivo-lightbox-wrap {
158 + -webkit-transform: translateX(0);
159 + -moz-transform: translateX(0);
160 + -ms-transform: translateX(0);
161 + transform: translateX(0);
162 +}
163 +.nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
164 + -webkit-transform: translateY(-10%);
165 + -moz-transform: translateY(-10%);
166 + -ms-transform: translateY(-10%);
167 + transform: translateY(-10%);
168 +}
169 +.nivo-lightbox-effect-slideUp .nivo-lightbox-wrap {
170 + -webkit-transform: translateY(10%);
171 + -moz-transform: translateY(10%);
172 + -ms-transform: translateY(10%);
173 + transform: translateY(10%);
174 +}
175 +.nivo-lightbox-effect-slideUp.nivo-lightbox-open .nivo-lightbox-wrap,
176 +.nivo-lightbox-effect-slideDown.nivo-lightbox-open .nivo-lightbox-wrap {
177 + -webkit-transform: translateY(0);
178 + -moz-transform: translateY(0);
179 + -ms-transform: translateY(0);
180 + transform: translateY(0);
181 +}
182 +
183 +/* fall */
184 +.nivo-lightbox-body-effect-fall .nivo-lightbox-effect-fall {
185 + -webkit-perspective: 1000px;
186 + -moz-perspective: 1000px;
187 + perspective: 1000px;
188 +}
189 +.nivo-lightbox-effect-fall .nivo-lightbox-wrap {
190 + -webkit-transition: all 0.3s ease-out;
191 + -moz-transition: all 0.3s ease-out;
192 + -ms-transition: all 0.3s ease-out;
193 + -o-transition: all 0.3s ease-out;
194 + transition: all 0.3s ease-out;
195 + -webkit-transform: translateZ(300px);
196 + -moz-transform: translateZ(300px);
197 + -ms-transform: translateZ(300px);
198 + transform: translateZ(300px);
199 +}
200 +.nivo-lightbox-effect-fall.nivo-lightbox-open .nivo-lightbox-wrap {
201 + -webkit-transform: translateZ(0);
202 + -moz-transform: translateZ(0);
203 + -ms-transform: translateZ(0);
204 + transform: translateZ(0);
205 +}
1 -body { 1 +body, html {
2 - padding: 50px; 2 + font-family: 'Raleway', sans-serif;
3 - font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 3 + text-rendering: optimizeLegibility !important;
4 + -webkit-font-smoothing: antialiased !important;
5 + color: #777;
6 + font-weight: 300;
7 + width: 100% !important;
8 + height: 100% !important;
9 +}
10 +h2 {
11 + margin: 0 0 20px 0;
12 + font-weight: 500;
13 + font-size: 34px;
14 + color: #333;
15 + text-transform: uppercase;
16 +}
17 +h3 {
18 + font-size: 22px;
19 + font-weight: 500;
20 + color: #333;
21 +}
22 +h4 {
23 + font-size: 24px;
24 + text-transform: uppercase;
25 + font-weight: 400;
26 + color: #333;
27 +}
28 +h5 {
29 + text-transform: uppercase;
30 + font-weight: 700;
31 + line-height: 20px;
32 +}
33 +p {
34 + font-size: 16px;
35 +}
36 +p.intro {
37 + margin: 12px 0 0;
38 + line-height: 24px;
4 } 39 }
5 -
6 a { 40 a {
7 - color: #00B7FF; 41 + color: #8eb640;
42 +}
43 +a:hover, a:focus {
44 + text-decoration: none;
45 + color: #222;
46 +}
47 +ul, ol {
48 + list-style: none;
49 +}
50 +.clearfix:after {
51 + visibility: hidden;
52 + display: block;
53 + font-size: 0;
54 + content: " ";
55 + clear: both;
56 + height: 0;
57 +}
58 +.clearfix {
59 + display: inline-block;
60 +}
61 +* html .clearfix {
62 + height: 1%;
63 +}
64 +.clearfix {
65 + display: block;
66 +}
67 +ul, ol {
68 + padding: 0;
69 + webkit-padding: 0;
70 + moz-padding: 0;
71 +}
72 +hr {
73 + height: 2px;
74 + width: 70px;
75 + text-align: center;
76 + position: relative;
77 + background: #8eb640;
78 + margin: 0;
79 + margin-bottom: 40px;
80 + border: 0;
81 +}
82 +.btn:active, .btn.active {
83 + background-image: none;
84 + outline: 0;
85 + -webkit-box-shadow: none;
86 + box-shadow: none;
87 +}
88 +a:focus, .btn:focus, .btn:active:focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn.active.focus {
89 + outline: none;
90 + outline-offset: none;
91 +}
92 +/* Navigation */
93 +#menu {
94 + padding: 20px;
95 + transition: all 0.8s;
96 +}
97 +#menu.navbar-default {
98 + background-color: rgba(248, 248, 248, 0);
99 + border-color: rgba(231, 231, 231, 0);
100 +}
101 +#menu a.navbar-brand {
102 + font-family: 'Dancing Script', cursive;
103 + font-size: 36px;
104 + color: #8eb640;
105 + font-weight: 700;
106 + letter-spacing: 1px;
107 +}
108 +#menu.navbar-default .navbar-nav > li > a {
109 + text-transform: uppercase;
110 + color: #ddd;
111 + font-weight: 500;
112 + font-size: 15px;
113 + padding: 5px 0;
114 + border: 2px solid transparent;
115 + letter-spacing: 0.5px;
116 + margin: 10px 15px 0 15px;
117 +}
118 +#menu.navbar-default .navbar-nav > li > a:hover {
119 + color: #8eb640;
120 +}
121 +.on {
122 + background-color: #262626 !important;
123 + padding: 0 !important;
124 + padding: 10px 0 !important;
125 +}
126 +.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
127 + color: #8eb640 !important;
128 + background-color: transparent;
129 +}
130 +.navbar-toggle {
131 + border-radius: 0;
132 +}
133 +.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
134 + background-color: #8eb640;
135 + border-color: #8eb640;
136 +}
137 +.navbar-default .navbar-toggle:hover>.icon-bar {
138 + background-color: #FFF;
139 +}
140 +.section-title {
141 + margin-bottom: 70px;
142 +}
143 +.section-title .overlay {
144 + padding: 80px 0;
145 + background: rgba(0, 0, 0, 0.7);
146 +}
147 +.section-title p {
148 + font-size: 22px;
149 + color: rgba(255,255,255,0.8);
150 +}
151 +.section-title hr {
152 + margin: 0 auto;
153 + margin-bottom: 40px;
154 +}
155 +.btn-custom {
156 + text-transform: uppercase;
157 + color: #fff;
158 + background-color: #72a411;
159 + border: 0;
160 + padding: 14px 20px;
161 + margin: 0;
162 + font-size: 16px;
163 + font-weight: 500;
164 + letter-spacing: 0.5px;
165 + border-radius: 0;
166 + margin-top: 20px;
167 + transition: all 0.5s;
168 +}
169 +.btn-custom:hover, .btn-custom:focus, .btn-custom.focus, .btn-custom:active, .btn-custom.active {
170 + color: #fff;
171 + background-color: #628d0f;
172 +}
173 +/* Header Section */
174 +.intro {
175 + display: table;
176 + width: 100%;
177 + padding: 0;
178 + background: url(../img/intro-bg.jpg) no-repeat center center;
179 + background-color: #e5e5e5;
180 + -webkit-background-size: cover;
181 + -moz-background-size: cover;
182 + background-size: cover;
183 + -o-background-size: cover;
184 +}
185 +.intro .overlay {
186 + background: rgba(0,0,0,0.4);
187 +}
188 +.intro h1 {
189 + font-family: 'Dancing Script', cursive;
190 + color: #fff;
191 + font-size: 10em;
192 + font-weight: 700;
193 + margin-top: 0;
194 + margin-bottom: 10px;
195 +}
196 +.intro span {
197 + color: #a7c44c;
198 + font-weight: 600;
199 +}
200 +.intro p {
201 + color: #fff;
202 + font-size: 32px;
203 + font-weight: 300;
204 + margin-top: 10px;
205 + margin-bottom: 40px;
206 +}
207 +header .intro-text {
208 + padding-top: 250px;
209 + padding-bottom: 200px;
210 + text-align: center;
211 +}
212 +/* About Section */
213 +#about {
214 + padding: 120px 0;
215 +}
216 +#about h3 {
217 + font-size: 20px;
218 +}
219 +#about .about-text {
220 + margin-left: 10px;
221 +}
222 +#about .about-img {
223 + display: inline-block;
224 + position: relative;
225 +}
226 +#about .about-img:before {
227 + display: block;
228 + content: '';
229 + position: absolute;
230 + top: 8px;
231 + right: 8px;
232 + bottom: 8px;
233 + left: 8px;
234 + border: 1px solid rgba(255, 255, 255, 0.5);
235 +}
236 +#about p {
237 + line-height: 24px;
238 + margin: 15px 0 30px;
239 +}
240 +/* Menu Section */
241 +#restaurant-menu {
242 + padding: 0 0 60px 0;
243 +}
244 +#restaurant-menu .section-title {
245 + background: #444 url(../img/menu-bg.jpg) center center no-repeat fixed;
246 + background-size: cover;
247 +}
248 +#restaurant-menu .section-title h2 {
249 + color: #fff;
250 +}
251 +#restaurant-menu img {
252 + width: 300px;
253 + box-shadow: 15px 0 #a7c44c;
254 +}
255 +#restaurant-menu h3 {
256 + padding: 10px 0;
257 + text-transform: uppercase;
258 +}
259 +#restaurant-menu .menu-section hr {
260 + margin: 0 auto;
261 +}
262 +#restaurant-menu .menu-section {
263 + margin: 0 20px 80px;
264 +}
265 +#restaurant-menu .menu-section-title {
266 + font-size: 26px;
267 + display: block;
268 + font-weight: 500;
269 + color: #444;
270 + margin: 20px 0;
271 + text-align: center;
272 +}
273 +#restaurant-menu .menu-item {
274 + margin: 35px 0;
275 + font-size: 18px;
276 +}
277 +#restaurant-menu .menu-item-name {
278 + font-weight: 600;
279 + font-size: 17px;
280 + color: #555;
281 + border-bottom: 2px dotted rgb(213, 213, 213);
282 +}
283 +#restaurant-menu .menu-item-description {
284 + font-style: italic;
285 + font-size: 15px;
286 +}
287 +#restaurant-menu .menu-item-price {
288 + float: right;
289 + font-weight: 600;
290 + color: #555;
291 + margin-top: -26px;
292 +}
293 +/* Portfolio Section */
294 +#portfolio {
295 + padding: 0 0 120px 0;
296 +}
297 +#portfolio .section-title {
298 + background: #444 url(../img/gallery-bg.jpg) center center no-repeat fixed;
299 + background-size: cover;
300 + margin-bottom: 50px;
301 +}
302 +#portfolio .section-title h2 {
303 + color: #fff;
304 +}
305 +.categories {
306 + padding-bottom: 30px;
307 + text-align: center;
308 +}
309 +ul.cat li {
310 + display: inline-block;
311 +}
312 +ol.type li {
313 + display: inline-block;
314 + margin: 0 10px;
315 + padding: 20px 0;
316 +}
317 +ol.type li a {
318 + color: #999;
319 + font-weight: 500;
320 + font-size: 14px;
321 + padding: 12px 24px;
322 + background: #eee;
323 + border: 0;
324 + border-radius: 0;
325 + text-transform: uppercase;
326 + letter-spacing: 0.5px;
327 +}
328 +ol.type li a.active {
329 + color: #fff;
330 + background-color: #8eb640;
331 +}
332 +ol.type li a:hover {
333 + color: #fff;
334 + background-color: #8eb640;
335 +}
336 +.isotope-item {
337 + z-index: 2
338 +}
339 +.isotope-hidden.isotope-item {
340 + z-index: 1
341 +}
342 +.isotope, .isotope .isotope-item {
343 + /* change duration value to whatever you like */
344 + -webkit-transition-duration: 0.8s;
345 + -moz-transition-duration: 0.8s;
346 + transition-duration: 0.8s;
347 +}
348 +.isotope-item {
349 + margin-right: -1px;
350 + -webkit-backface-visibility: hidden;
351 + backface-visibility: hidden;
352 +}
353 +.isotope {
354 + -webkit-backface-visibility: hidden;
355 + backface-visibility: hidden;
356 + -webkit-transition-property: height, width;
357 + -moz-transition-property: height, width;
358 + transition-property: height, width;
359 +}
360 +.isotope .isotope-item {
361 + -webkit-backface-visibility: hidden;
362 + backface-visibility: hidden;
363 + -webkit-transition-property: -webkit-transform, opacity;
364 + -moz-transition-property: -moz-transform, opacity;
365 + transition-property: transform, opacity;
366 +}
367 +.portfolio-item {
368 + margin: 15px 0;
369 +}
370 +.portfolio-item .hover-bg {
371 + overflow: hidden;
372 + position: relative;
373 +}
374 +.portfolio-item .hover-bg:before {
375 + display: block;
376 + content: '';
377 + position: absolute;
378 + top: 6px;
379 + right: 6px;
380 + bottom: 6px;
381 + left: 6px;
382 + border: 1px solid rgba(255, 255, 255, 0.6);
383 +}
384 +.hover-bg .hover-text {
385 + position: absolute;
386 + text-align: center;
387 + margin: 0 auto;
388 + color: #fff;
389 + background: rgba(0, 0, 0, 0.6);
390 + padding: 30% 0 0 0;
391 + height: 100%;
392 + width: 100%;
393 + opacity: 0;
394 + transition: all 0.5s;
395 +}
396 +.hover-bg .hover-text>h4 {
397 + opacity: 0;
398 + color: #fff;
399 + -webkit-transform: translateY(100%);
400 + transform: translateY(100%);
401 + transition: all 0.3s;
402 + font-size: 17px;
403 + letter-spacing: 0.5px;
404 + font-weight: 500;
405 +}
406 +.hover-bg:hover .hover-text>h4 {
407 + opacity: 1;
408 + -webkit-backface-visibility: hidden;
409 + -webkit-transform: translateY(0);
410 + transform: translateY(0);
411 +}
412 +.hover-bg:hover .hover-text {
413 + opacity: 1;
414 +}
415 +/* Team Section */
416 +#team {
417 + color: #fff;
418 + background: #444 url(../img/team-bg.jpg) center top no-repeat fixed;
419 + background-size: cover;
420 +}
421 +#team .overlay {
422 + padding: 120px 0 80px 0;
423 + background: rgba(0, 0, 0, 0.6);
424 +}
425 +#team h2, #team p {
426 + color: #fff;
427 +}
428 +#team hr {
429 + background: #fff;
430 +}
431 +#team h3 {
432 + color: #fff;
433 + font-weight: 400;
434 + font-size: 20px;
435 + margin: 5px 0;
436 +}
437 +#team img {
438 + width: 280px;
439 +}
440 +#team .thumbnail {
441 + background: transparent;
442 + border: 0;
443 +}
444 +#team .thumbnail .team-img {
445 + display: inline-block;
446 + position: relative;
447 +}
448 +#team .thumbnail .team-img:before {
449 + display: block;
450 + content: '';
451 + position: absolute;
452 + top: 8px;
453 + right: 8px;
454 + bottom: 8px;
455 + left: 8px;
456 + border: 1px solid rgba(255, 255, 255, 0.2);
457 +}
458 +#team .thumbnail .caption {
459 + padding-top: 10px;
460 +}
461 +#team .thumbnail .caption p {
462 + color: rgba(255,255,255,0.7);
463 + padding: 0 10px;
464 + font-size: 15px;
465 +}
466 +/* Call Reservation Section */
467 +#call-reservation {
468 + padding: 90px 0;
469 + color: #fff;
470 + /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#8eb640+50,779936+100 */
471 + background: rgb(142,182,64); /* Old browsers */
472 + background: -moz-linear-gradient(top, rgba(142,182,64,1) 50%, rgba(119,153,54,1) 100%); /* FF3.6-15 */
473 + background: -webkit-linear-gradient(top, rgba(142,182,64,1) 50%, rgba(119,153,54,1) 100%); /* Chrome10-25,Safari5.1-6 */
474 + background: linear-gradient(to bottom, rgba(142,182,64,1) 50%, rgba(119,153,54,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
475 +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8eb640', endColorstr='#779936', GradientType=0 ); /* IE6-9 */
476 +}
477 +#call-reservation .overlay {
478 + padding: 80px 0;
479 + background: #8eb640;
480 +}
481 +#call-reservation h2 {
482 + font-family: 'Open Sans', sans-serif;
483 + color: #fff;
484 + font-weight: 400;
485 + margin: 0;
486 +}
487 +#call-reservation hr {
488 + background: #fff;
489 +}
490 +#call-reservation h3 {
491 + color: #fff;
492 + font-weight: 500;
493 + font-size: 20px;
494 + margin: 5px 0;
495 +}
496 +/* Contact Section */
497 +#contact {
498 + padding: 100px 0 60px 0;
499 + background: #F6F6F6;
500 +}
501 +#contact .section-title p {
502 + color: #777;
503 +}
504 +#contact form {
505 + padding: 0;
506 +}
507 +#contact h3 {
508 + text-transform: uppercase;
509 + font-size: 20px;
510 + font-weight: 400;
511 + color: #555;
512 +}
513 +#contact .text-danger {
514 + color: #cc0033;
515 + text-align: left;
516 +}
517 +label {
518 + font-size: 12px;
519 + font-weight: 400;
520 + font-family: 'Open Sans', sans-serif;
521 + float: left;
522 +}
523 +#contact .form-control {
524 + display: block;
525 + width: 100%;
526 + padding: 6px 12px;
527 + font-size: 16px;
528 + line-height: 1.42857143;
529 + color: #444;
530 + background-color: #fff;
531 + background-image: none;
532 + border: 1px solid #ddd;
533 + border-radius: 0;
534 + -webkit-box-shadow: none;
535 + box-shadow: none;
536 + -webkit-transition: none;
537 + -o-transition: none;
538 + transition: none;
539 +}
540 +#contact .form-control:focus {
541 + border-color: #999;
542 + outline: 0;
543 + -webkit-box-shadow: transparent;
544 + box-shadow: transparent;
545 +}
546 +.form-control::-webkit-input-placeholder {
547 +color: #777;
548 +}
549 +.form-control:-moz-placeholder {
550 +color: #777;
551 +}
552 +.form-control::-moz-placeholder {
553 +color: #777;
554 +}
555 +.form-control:-ms-input-placeholder {
556 +color: #777;
557 +}
558 +#contact .contact-item {
559 + margin: 20px 0 40px 0;
560 +}
561 +#contact .contact-item span {
562 + font-weight: 400;
563 + color: #aaa;
564 + text-transform: uppercase;
565 + margin-bottom: 6px;
566 + display: inline-block;
567 +}
568 +#contact .contact-item p {
569 + font-size: 16px;
570 +}
571 +/* Footer Section*/
572 +#footer {
573 + background: #262626;
574 + padding: 50px 0 0 0;
575 +}
576 +#footer h3 {
577 + color: #8eb640;
578 + font-weight: 400;
579 + font-size: 18px;
580 + text-transform: uppercase;
581 + margin-bottom: 20px;
582 +}
583 +#footer .copyrights {
584 + padding: 20px 0;
585 + margin-top: 50px;
586 + /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#779936+0,8eb640+50 */
587 + background: rgb(119,153,54); /* Old browsers */
588 + background: -moz-linear-gradient(top, rgba(119,153,54,1) 0%, rgba(142,182,64,1) 50%); /* FF3.6-15 */
589 + background: -webkit-linear-gradient(top, rgba(119,153,54,1) 0%, rgba(142,182,64,1) 50%); /* Chrome10-25,Safari5.1-6 */
590 + background: linear-gradient(to bottom, rgba(119,153,54,1) 0%, rgba(142,182,64,1) 50%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
591 +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#779936', endColorstr='#8eb640', GradientType=0 ); /* IE6-9 */
592 +}
593 +#footer .social {
594 + margin: 20px 0 30px 0;
595 +}
596 +#footer .social ul li {
597 + display: inline-block;
598 + margin: 0 20px;
599 +}
600 +#footer .social i.fa {
601 + font-size: 26px;
602 + padding: 4px;
603 + color: #fff;
604 + transition: all 0.3s;
605 +}
606 +#footer .social i.fa:hover {
607 + color: #eee;
608 +}
609 +#footer p {
610 + font-size: 15px;
611 + color: rgba(255,255,255,0.8)
612 +}
613 +#footer a {
614 + color: #f6f6f6;
615 +}
616 +#footer a:hover {
617 + color: #333;
8 } 618 }
......
1 +body {
2 + padding: 50px;
3 + font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
4 +}
5 +
6 +a {
7 + color: #00B7FF;
8 +}
...@@ -231,6 +231,7 @@ function getAllToons() { ...@@ -231,6 +231,7 @@ function getAllToons() {
231 }); 231 });
232 }); 232 });
233 233
234 +//네이버 웹툰
234 var allWeeklyToonsUrl = "http://comic.naver.com/webtoon/weekday.nhn"; 235 var allWeeklyToonsUrl = "http://comic.naver.com/webtoon/weekday.nhn";
235 request(allWeeklyToonsUrl,function (err, res, html) { 236 request(allWeeklyToonsUrl,function (err, res, html) {
236 if(!err){ 237 if(!err){
...@@ -263,7 +264,7 @@ function getAllToons() { ...@@ -263,7 +264,7 @@ function getAllToons() {
263 if (err) { 264 if (err) {
264 console.log("웹툰 DB 에러 : " + err); 265 console.log("웹툰 DB 에러 : " + err);
265 } else { 266 } else {
266 - console.log("웹툰 DB처리 완료!"); 267 + // console.log("웹툰 DB처리 완료!");
267 } 268 }
268 }); 269 });
269 //}); 270 //});
......
1 +// SmoothScroll for websites v1.2.1
2 +// Licensed under the terms of the MIT license.
3 +
4 +// People involved
5 +// - Balazs Galambosi (maintainer)
6 +// - Michael Herf (Pulse Algorithm)
7 +
8 +(function(){
9 +
10 +// Scroll Variables (tweakable)
11 +var defaultOptions = {
12 +
13 + // Scrolling Core
14 + frameRate : 150, // [Hz]
15 + animationTime : 400, // [px]
16 + stepSize : 120, // [px]
17 +
18 + // Pulse (less tweakable)
19 + // ratio of "tail" to "acceleration"
20 + pulseAlgorithm : true,
21 + pulseScale : 8,
22 + pulseNormalize : 1,
23 +
24 + // Acceleration
25 + accelerationDelta : 20, // 20
26 + accelerationMax : 1, // 1
27 +
28 + // Keyboard Settings
29 + keyboardSupport : true, // option
30 + arrowScroll : 50, // [px]
31 +
32 + // Other
33 + touchpadSupport : true,
34 + fixedBackground : true,
35 + excluded : ""
36 +};
37 +
38 +var options = defaultOptions;
39 +
40 +
41 +// Other Variables
42 +var isExcluded = false;
43 +var isFrame = false;
44 +var direction = { x: 0, y: 0 };
45 +var initDone = false;
46 +var root = document.documentElement;
47 +var activeElement;
48 +var observer;
49 +var deltaBuffer = [ 120, 120, 120 ];
50 +
51 +var key = { left: 37, up: 38, right: 39, down: 40, spacebar: 32,
52 + pageup: 33, pagedown: 34, end: 35, home: 36 };
53 +
54 +
55 +/***********************************************
56 + * SETTINGS
57 + ***********************************************/
58 +
59 +var options = defaultOptions;
60 +
61 +
62 +/***********************************************
63 + * INITIALIZE
64 + ***********************************************/
65 +
66 +/**
67 + * Tests if smooth scrolling is allowed. Shuts down everything if not.
68 + */
69 +function initTest() {
70 +
71 + var disableKeyboard = false;
72 +
73 + // disable keyboard support if anything above requested it
74 + if (disableKeyboard) {
75 + removeEvent("keydown", keydown);
76 + }
77 +
78 + if (options.keyboardSupport && !disableKeyboard) {
79 + addEvent("keydown", keydown);
80 + }
81 +}
82 +
83 +/**
84 + * Sets up scrolls array, determines if frames are involved.
85 + */
86 +function init() {
87 +
88 + if (!document.body) return;
89 +
90 + var body = document.body;
91 + var html = document.documentElement;
92 + var windowHeight = window.innerHeight;
93 + var scrollHeight = body.scrollHeight;
94 +
95 + // check compat mode for root element
96 + root = (document.compatMode.indexOf('CSS') >= 0) ? html : body;
97 + activeElement = body;
98 +
99 + initTest();
100 + initDone = true;
101 +
102 + // Checks if this script is running in a frame
103 + if (top != self) {
104 + isFrame = true;
105 + }
106 +
107 + /**
108 + * This fixes a bug where the areas left and right to
109 + * the content does not trigger the onmousewheel event
110 + * on some pages. e.g.: html, body { height: 100% }
111 + */
112 + else if (scrollHeight > windowHeight &&
113 + (body.offsetHeight <= windowHeight ||
114 + html.offsetHeight <= windowHeight)) {
115 +
116 + html.style.height = 'auto';
117 + setTimeout(refresh, 10);
118 +
119 + // clearfix
120 + if (root.offsetHeight <= windowHeight) {
121 + var underlay = document.createElement("div");
122 + underlay.style.clear = "both";
123 + body.appendChild(underlay);
124 + }
125 + }
126 +
127 + // disable fixed background
128 + if (!options.fixedBackground && !isExcluded) {
129 + body.style.backgroundAttachment = "scroll";
130 + html.style.backgroundAttachment = "scroll";
131 + }
132 +}
133 +
134 +
135 +/************************************************
136 + * SCROLLING
137 + ************************************************/
138 +
139 +var que = [];
140 +var pending = false;
141 +var lastScroll = +new Date;
142 +
143 +/**
144 + * Pushes scroll actions to the scrolling queue.
145 + */
146 +function scrollArray(elem, left, top, delay) {
147 +
148 + delay || (delay = 1000);
149 + directionCheck(left, top);
150 +
151 + if (options.accelerationMax != 1) {
152 + var now = +new Date;
153 + var elapsed = now - lastScroll;
154 + if (elapsed < options.accelerationDelta) {
155 + var factor = (1 + (30 / elapsed)) / 2;
156 + if (factor > 1) {
157 + factor = Math.min(factor, options.accelerationMax);
158 + left *= factor;
159 + top *= factor;
160 + }
161 + }
162 + lastScroll = +new Date;
163 + }
164 +
165 + // push a scroll command
166 + que.push({
167 + x: left,
168 + y: top,
169 + lastX: (left < 0) ? 0.99 : -0.99,
170 + lastY: (top < 0) ? 0.99 : -0.99,
171 + start: +new Date
172 + });
173 +
174 + // don't act if there's a pending queue
175 + if (pending) {
176 + return;
177 + }
178 +
179 + var scrollWindow = (elem === document.body);
180 +
181 + var step = function (time) {
182 +
183 + var now = +new Date;
184 + var scrollX = 0;
185 + var scrollY = 0;
186 +
187 + for (var i = 0; i < que.length; i++) {
188 +
189 + var item = que[i];
190 + var elapsed = now - item.start;
191 + var finished = (elapsed >= options.animationTime);
192 +
193 + // scroll position: [0, 1]
194 + var position = (finished) ? 1 : elapsed / options.animationTime;
195 +
196 + // easing [optional]
197 + if (options.pulseAlgorithm) {
198 + position = pulse(position);
199 + }
200 +
201 + // only need the difference
202 + var x = (item.x * position - item.lastX) >> 0;
203 + var y = (item.y * position - item.lastY) >> 0;
204 +
205 + // add this to the total scrolling
206 + scrollX += x;
207 + scrollY += y;
208 +
209 + // update last values
210 + item.lastX += x;
211 + item.lastY += y;
212 +
213 + // delete and step back if it's over
214 + if (finished) {
215 + que.splice(i, 1); i--;
216 + }
217 + }
218 +
219 + // scroll left and top
220 + if (scrollWindow) {
221 + window.scrollBy(scrollX, scrollY);
222 + }
223 + else {
224 + if (scrollX) elem.scrollLeft += scrollX;
225 + if (scrollY) elem.scrollTop += scrollY;
226 + }
227 +
228 + // clean up if there's nothing left to do
229 + if (!left && !top) {
230 + que = [];
231 + }
232 +
233 + if (que.length) {
234 + requestFrame(step, elem, (delay / options.frameRate + 1));
235 + } else {
236 + pending = false;
237 + }
238 + };
239 +
240 + // start a new queue of actions
241 + requestFrame(step, elem, 0);
242 + pending = true;
243 +}
244 +
245 +
246 +/***********************************************
247 + * EVENTS
248 + ***********************************************/
249 +
250 +/**
251 + * Mouse wheel handler.
252 + * @param {Object} event
253 + */
254 +function wheel(event) {
255 +
256 + if (!initDone) {
257 + init();
258 + }
259 +
260 + var target = event.target;
261 + var overflowing = overflowingAncestor(target);
262 +
263 + // use default if there's no overflowing
264 + // element or default action is prevented
265 + if (!overflowing || event.defaultPrevented ||
266 + isNodeName(activeElement, "embed") ||
267 + (isNodeName(target, "embed") && /\.pdf/i.test(target.src))) {
268 + return true;
269 + }
270 +
271 + var deltaX = event.wheelDeltaX || 0;
272 + var deltaY = event.wheelDeltaY || 0;
273 +
274 + // use wheelDelta if deltaX/Y is not available
275 + if (!deltaX && !deltaY) {
276 + deltaY = event.wheelDelta || 0;
277 + }
278 +
279 + // check if it's a touchpad scroll that should be ignored
280 + if (!options.touchpadSupport && isTouchpad(deltaY)) {
281 + return true;
282 + }
283 +
284 + // scale by step size
285 + // delta is 120 most of the time
286 + // synaptics seems to send 1 sometimes
287 + if (Math.abs(deltaX) > 1.2) {
288 + deltaX *= options.stepSize / 120;
289 + }
290 + if (Math.abs(deltaY) > 1.2) {
291 + deltaY *= options.stepSize / 120;
292 + }
293 +
294 + scrollArray(overflowing, -deltaX, -deltaY);
295 + event.preventDefault();
296 +}
297 +
298 +/**
299 + * Keydown event handler.
300 + * @param {Object} event
301 + */
302 +function keydown(event) {
303 +
304 + var target = event.target;
305 + var modifier = event.ctrlKey || event.altKey || event.metaKey ||
306 + (event.shiftKey && event.keyCode !== key.spacebar);
307 +
308 + // do nothing if user is editing text
309 + // or using a modifier key (except shift)
310 + // or in a dropdown
311 + if ( /input|textarea|select|embed/i.test(target.nodeName) ||
312 + target.isContentEditable ||
313 + event.defaultPrevented ||
314 + modifier ) {
315 + return true;
316 + }
317 + // spacebar should trigger button press
318 + if (isNodeName(target, "button") &&
319 + event.keyCode === key.spacebar) {
320 + return true;
321 + }
322 +
323 + var shift, x = 0, y = 0;
324 + var elem = overflowingAncestor(activeElement);
325 + var clientHeight = elem.clientHeight;
326 +
327 + if (elem == document.body) {
328 + clientHeight = window.innerHeight;
329 + }
330 +
331 + switch (event.keyCode) {
332 + case key.up:
333 + y = -options.arrowScroll;
334 + break;
335 + case key.down:
336 + y = options.arrowScroll;
337 + break;
338 + case key.spacebar: // (+ shift)
339 + shift = event.shiftKey ? 1 : -1;
340 + y = -shift * clientHeight * 0.9;
341 + break;
342 + case key.pageup:
343 + y = -clientHeight * 0.9;
344 + break;
345 + case key.pagedown:
346 + y = clientHeight * 0.9;
347 + break;
348 + case key.home:
349 + y = -elem.scrollTop;
350 + break;
351 + case key.end:
352 + var damt = elem.scrollHeight - elem.scrollTop - clientHeight;
353 + y = (damt > 0) ? damt+10 : 0;
354 + break;
355 + case key.left:
356 + x = -options.arrowScroll;
357 + break;
358 + case key.right:
359 + x = options.arrowScroll;
360 + break;
361 + default:
362 + return true; // a key we don't care about
363 + }
364 +
365 + scrollArray(elem, x, y);
366 + event.preventDefault();
367 +}
368 +
369 +/**
370 + * Mousedown event only for updating activeElement
371 + */
372 +function mousedown(event) {
373 + activeElement = event.target;
374 +}
375 +
376 +
377 +/***********************************************
378 + * OVERFLOW
379 + ***********************************************/
380 +
381 +var cache = {}; // cleared out every once in while
382 +setInterval(function () { cache = {}; }, 10 * 1000);
383 +
384 +var uniqueID = (function () {
385 + var i = 0;
386 + return function (el) {
387 + return el.uniqueID || (el.uniqueID = i++);
388 + };
389 +})();
390 +
391 +function setCache(elems, overflowing) {
392 + for (var i = elems.length; i--;)
393 + cache[uniqueID(elems[i])] = overflowing;
394 + return overflowing;
395 +}
396 +
397 +function overflowingAncestor(el) {
398 + var elems = [];
399 + var rootScrollHeight = root.scrollHeight;
400 + do {
401 + var cached = cache[uniqueID(el)];
402 + if (cached) {
403 + return setCache(elems, cached);
404 + }
405 + elems.push(el);
406 + if (rootScrollHeight === el.scrollHeight) {
407 + if (!isFrame || root.clientHeight + 10 < rootScrollHeight) {
408 + return setCache(elems, document.body); // scrolling root in WebKit
409 + }
410 + } else if (el.clientHeight + 10 < el.scrollHeight) {
411 + overflow = getComputedStyle(el, "").getPropertyValue("overflow-y");
412 + if (overflow === "scroll" || overflow === "auto") {
413 + return setCache(elems, el);
414 + }
415 + }
416 + } while (el = el.parentNode);
417 +}
418 +
419 +
420 +/***********************************************
421 + * HELPERS
422 + ***********************************************/
423 +
424 +function addEvent(type, fn, bubble) {
425 + window.addEventListener(type, fn, (bubble||false));
426 +}
427 +
428 +function removeEvent(type, fn, bubble) {
429 + window.removeEventListener(type, fn, (bubble||false));
430 +}
431 +
432 +function isNodeName(el, tag) {
433 + return (el.nodeName||"").toLowerCase() === tag.toLowerCase();
434 +}
435 +
436 +function directionCheck(x, y) {
437 + x = (x > 0) ? 1 : -1;
438 + y = (y > 0) ? 1 : -1;
439 + if (direction.x !== x || direction.y !== y) {
440 + direction.x = x;
441 + direction.y = y;
442 + que = [];
443 + lastScroll = 0;
444 + }
445 +}
446 +
447 +var deltaBufferTimer;
448 +
449 +function isTouchpad(deltaY) {
450 + if (!deltaY) return;
451 + deltaY = Math.abs(deltaY)
452 + deltaBuffer.push(deltaY);
453 + deltaBuffer.shift();
454 + clearTimeout(deltaBufferTimer);
455 +
456 + var allEquals = (deltaBuffer[0] == deltaBuffer[1] &&
457 + deltaBuffer[1] == deltaBuffer[2]);
458 + var allDivisable = (isDivisible(deltaBuffer[0], 120) &&
459 + isDivisible(deltaBuffer[1], 120) &&
460 + isDivisible(deltaBuffer[2], 120));
461 + return !(allEquals || allDivisable);
462 +}
463 +
464 +function isDivisible(n, divisor) {
465 + return (Math.floor(n / divisor) == n / divisor);
466 +}
467 +
468 +var requestFrame = (function () {
469 + return window.requestAnimationFrame ||
470 + window.webkitRequestAnimationFrame ||
471 + function (callback, element, delay) {
472 + window.setTimeout(callback, delay || (1000/60));
473 + };
474 +})();
475 +
476 +
477 +/***********************************************
478 + * PULSE
479 + ***********************************************/
480 +
481 +/**
482 + * Viscous fluid with a pulse for part and decay for the rest.
483 + * - Applies a fixed force over an interval (a damped acceleration), and
484 + * - Lets the exponential bleed away the velocity over a longer interval
485 + * - Michael Herf, http://stereopsis.com/stopping/
486 + */
487 +function pulse_(x) {
488 + var val, start, expx;
489 + // test
490 + x = x * options.pulseScale;
491 + if (x < 1) { // acceleartion
492 + val = x - (1 - Math.exp(-x));
493 + } else { // tail
494 + // the previous animation ended here:
495 + start = Math.exp(-1);
496 + // simple viscous drag
497 + x -= 1;
498 + expx = 1 - Math.exp(-x);
499 + val = start + (expx * (1 - start));
500 + }
501 + return val * options.pulseNormalize;
502 +}
503 +
504 +function pulse(x) {
505 + if (x >= 1) return 1;
506 + if (x <= 0) return 0;
507 +
508 + if (options.pulseNormalize == 1) {
509 + options.pulseNormalize /= pulse_(1);
510 + }
511 + return pulse_(x);
512 +}
513 +
514 +var isChrome = /chrome/i.test(window.navigator.userAgent);
515 +var isMouseWheelSupported = 'onmousewheel' in document;
516 +
517 +if (isMouseWheelSupported && isChrome) {
518 + addEvent("mousedown", mousedown);
519 + addEvent("mousewheel", wheel);
520 + addEvent("load", init);
521 +};
522 +
523 +})();
...\ No newline at end of file ...\ No newline at end of file
1 +/*!
2 + * Bootstrap v3.3.4 (http://getbootstrap.com)
3 + * Copyright 2011-2015 Twitter, Inc.
4 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 + */
6 +
7 +if (typeof jQuery === 'undefined') {
8 + throw new Error('Bootstrap\'s JavaScript requires jQuery')
9 +}
10 +
11 ++function ($) {
12 + 'use strict';
13 + var version = $.fn.jquery.split(' ')[0].split('.')
14 + if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
15 + throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
16 + }
17 +}(jQuery);
18 +
19 +/* ========================================================================
20 + * Bootstrap: transition.js v3.3.4
21 + * http://getbootstrap.com/javascript/#transitions
22 + * ========================================================================
23 + * Copyright 2011-2015 Twitter, Inc.
24 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25 + * ======================================================================== */
26 +
27 +
28 ++function ($) {
29 + 'use strict';
30 +
31 + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
32 + // ============================================================
33 +
34 + function transitionEnd() {
35 + var el = document.createElement('bootstrap')
36 +
37 + var transEndEventNames = {
38 + WebkitTransition : 'webkitTransitionEnd',
39 + MozTransition : 'transitionend',
40 + OTransition : 'oTransitionEnd otransitionend',
41 + transition : 'transitionend'
42 + }
43 +
44 + for (var name in transEndEventNames) {
45 + if (el.style[name] !== undefined) {
46 + return { end: transEndEventNames[name] }
47 + }
48 + }
49 +
50 + return false // explicit for ie8 ( ._.)
51 + }
52 +
53 + // http://blog.alexmaccaw.com/css-transitions
54 + $.fn.emulateTransitionEnd = function (duration) {
55 + var called = false
56 + var $el = this
57 + $(this).one('bsTransitionEnd', function () { called = true })
58 + var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
59 + setTimeout(callback, duration)
60 + return this
61 + }
62 +
63 + $(function () {
64 + $.support.transition = transitionEnd()
65 +
66 + if (!$.support.transition) return
67 +
68 + $.event.special.bsTransitionEnd = {
69 + bindType: $.support.transition.end,
70 + delegateType: $.support.transition.end,
71 + handle: function (e) {
72 + if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
73 + }
74 + }
75 + })
76 +
77 +}(jQuery);
78 +
79 +/* ========================================================================
80 + * Bootstrap: alert.js v3.3.4
81 + * http://getbootstrap.com/javascript/#alerts
82 + * ========================================================================
83 + * Copyright 2011-2015 Twitter, Inc.
84 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
85 + * ======================================================================== */
86 +
87 +
88 ++function ($) {
89 + 'use strict';
90 +
91 + // ALERT CLASS DEFINITION
92 + // ======================
93 +
94 + var dismiss = '[data-dismiss="alert"]'
95 + var Alert = function (el) {
96 + $(el).on('click', dismiss, this.close)
97 + }
98 +
99 + Alert.VERSION = '3.3.4'
100 +
101 + Alert.TRANSITION_DURATION = 150
102 +
103 + Alert.prototype.close = function (e) {
104 + var $this = $(this)
105 + var selector = $this.attr('data-target')
106 +
107 + if (!selector) {
108 + selector = $this.attr('href')
109 + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
110 + }
111 +
112 + var $parent = $(selector)
113 +
114 + if (e) e.preventDefault()
115 +
116 + if (!$parent.length) {
117 + $parent = $this.closest('.alert')
118 + }
119 +
120 + $parent.trigger(e = $.Event('close.bs.alert'))
121 +
122 + if (e.isDefaultPrevented()) return
123 +
124 + $parent.removeClass('in')
125 +
126 + function removeElement() {
127 + // detach from parent, fire event then clean up data
128 + $parent.detach().trigger('closed.bs.alert').remove()
129 + }
130 +
131 + $.support.transition && $parent.hasClass('fade') ?
132 + $parent
133 + .one('bsTransitionEnd', removeElement)
134 + .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
135 + removeElement()
136 + }
137 +
138 +
139 + // ALERT PLUGIN DEFINITION
140 + // =======================
141 +
142 + function Plugin(option) {
143 + return this.each(function () {
144 + var $this = $(this)
145 + var data = $this.data('bs.alert')
146 +
147 + if (!data) $this.data('bs.alert', (data = new Alert(this)))
148 + if (typeof option == 'string') data[option].call($this)
149 + })
150 + }
151 +
152 + var old = $.fn.alert
153 +
154 + $.fn.alert = Plugin
155 + $.fn.alert.Constructor = Alert
156 +
157 +
158 + // ALERT NO CONFLICT
159 + // =================
160 +
161 + $.fn.alert.noConflict = function () {
162 + $.fn.alert = old
163 + return this
164 + }
165 +
166 +
167 + // ALERT DATA-API
168 + // ==============
169 +
170 + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
171 +
172 +}(jQuery);
173 +
174 +/* ========================================================================
175 + * Bootstrap: button.js v3.3.4
176 + * http://getbootstrap.com/javascript/#buttons
177 + * ========================================================================
178 + * Copyright 2011-2015 Twitter, Inc.
179 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
180 + * ======================================================================== */
181 +
182 +
183 ++function ($) {
184 + 'use strict';
185 +
186 + // BUTTON PUBLIC CLASS DEFINITION
187 + // ==============================
188 +
189 + var Button = function (element, options) {
190 + this.$element = $(element)
191 + this.options = $.extend({}, Button.DEFAULTS, options)
192 + this.isLoading = false
193 + }
194 +
195 + Button.VERSION = '3.3.4'
196 +
197 + Button.DEFAULTS = {
198 + loadingText: 'loading...'
199 + }
200 +
201 + Button.prototype.setState = function (state) {
202 + var d = 'disabled'
203 + var $el = this.$element
204 + var val = $el.is('input') ? 'val' : 'html'
205 + var data = $el.data()
206 +
207 + state = state + 'Text'
208 +
209 + if (data.resetText == null) $el.data('resetText', $el[val]())
210 +
211 + // push to event loop to allow forms to submit
212 + setTimeout($.proxy(function () {
213 + $el[val](data[state] == null ? this.options[state] : data[state])
214 +
215 + if (state == 'loadingText') {
216 + this.isLoading = true
217 + $el.addClass(d).attr(d, d)
218 + } else if (this.isLoading) {
219 + this.isLoading = false
220 + $el.removeClass(d).removeAttr(d)
221 + }
222 + }, this), 0)
223 + }
224 +
225 + Button.prototype.toggle = function () {
226 + var changed = true
227 + var $parent = this.$element.closest('[data-toggle="buttons"]')
228 +
229 + if ($parent.length) {
230 + var $input = this.$element.find('input')
231 + if ($input.prop('type') == 'radio') {
232 + if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
233 + else $parent.find('.active').removeClass('active')
234 + }
235 + if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
236 + } else {
237 + this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
238 + }
239 +
240 + if (changed) this.$element.toggleClass('active')
241 + }
242 +
243 +
244 + // BUTTON PLUGIN DEFINITION
245 + // ========================
246 +
247 + function Plugin(option) {
248 + return this.each(function () {
249 + var $this = $(this)
250 + var data = $this.data('bs.button')
251 + var options = typeof option == 'object' && option
252 +
253 + if (!data) $this.data('bs.button', (data = new Button(this, options)))
254 +
255 + if (option == 'toggle') data.toggle()
256 + else if (option) data.setState(option)
257 + })
258 + }
259 +
260 + var old = $.fn.button
261 +
262 + $.fn.button = Plugin
263 + $.fn.button.Constructor = Button
264 +
265 +
266 + // BUTTON NO CONFLICT
267 + // ==================
268 +
269 + $.fn.button.noConflict = function () {
270 + $.fn.button = old
271 + return this
272 + }
273 +
274 +
275 + // BUTTON DATA-API
276 + // ===============
277 +
278 + $(document)
279 + .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
280 + var $btn = $(e.target)
281 + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
282 + Plugin.call($btn, 'toggle')
283 + e.preventDefault()
284 + })
285 + .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
286 + $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
287 + })
288 +
289 +}(jQuery);
290 +
291 +/* ========================================================================
292 + * Bootstrap: carousel.js v3.3.4
293 + * http://getbootstrap.com/javascript/#carousel
294 + * ========================================================================
295 + * Copyright 2011-2015 Twitter, Inc.
296 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
297 + * ======================================================================== */
298 +
299 +
300 ++function ($) {
301 + 'use strict';
302 +
303 + // CAROUSEL CLASS DEFINITION
304 + // =========================
305 +
306 + var Carousel = function (element, options) {
307 + this.$element = $(element)
308 + this.$indicators = this.$element.find('.carousel-indicators')
309 + this.options = options
310 + this.paused = null
311 + this.sliding = null
312 + this.interval = null
313 + this.$active = null
314 + this.$items = null
315 +
316 + this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
317 +
318 + this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
319 + .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
320 + .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
321 + }
322 +
323 + Carousel.VERSION = '3.3.4'
324 +
325 + Carousel.TRANSITION_DURATION = 600
326 +
327 + Carousel.DEFAULTS = {
328 + interval: 5000,
329 + pause: 'hover',
330 + wrap: true,
331 + keyboard: true
332 + }
333 +
334 + Carousel.prototype.keydown = function (e) {
335 + if (/input|textarea/i.test(e.target.tagName)) return
336 + switch (e.which) {
337 + case 37: this.prev(); break
338 + case 39: this.next(); break
339 + default: return
340 + }
341 +
342 + e.preventDefault()
343 + }
344 +
345 + Carousel.prototype.cycle = function (e) {
346 + e || (this.paused = false)
347 +
348 + this.interval && clearInterval(this.interval)
349 +
350 + this.options.interval
351 + && !this.paused
352 + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
353 +
354 + return this
355 + }
356 +
357 + Carousel.prototype.getItemIndex = function (item) {
358 + this.$items = item.parent().children('.item')
359 + return this.$items.index(item || this.$active)
360 + }
361 +
362 + Carousel.prototype.getItemForDirection = function (direction, active) {
363 + var activeIndex = this.getItemIndex(active)
364 + var willWrap = (direction == 'prev' && activeIndex === 0)
365 + || (direction == 'next' && activeIndex == (this.$items.length - 1))
366 + if (willWrap && !this.options.wrap) return active
367 + var delta = direction == 'prev' ? -1 : 1
368 + var itemIndex = (activeIndex + delta) % this.$items.length
369 + return this.$items.eq(itemIndex)
370 + }
371 +
372 + Carousel.prototype.to = function (pos) {
373 + var that = this
374 + var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
375 +
376 + if (pos > (this.$items.length - 1) || pos < 0) return
377 +
378 + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
379 + if (activeIndex == pos) return this.pause().cycle()
380 +
381 + return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
382 + }
383 +
384 + Carousel.prototype.pause = function (e) {
385 + e || (this.paused = true)
386 +
387 + if (this.$element.find('.next, .prev').length && $.support.transition) {
388 + this.$element.trigger($.support.transition.end)
389 + this.cycle(true)
390 + }
391 +
392 + this.interval = clearInterval(this.interval)
393 +
394 + return this
395 + }
396 +
397 + Carousel.prototype.next = function () {
398 + if (this.sliding) return
399 + return this.slide('next')
400 + }
401 +
402 + Carousel.prototype.prev = function () {
403 + if (this.sliding) return
404 + return this.slide('prev')
405 + }
406 +
407 + Carousel.prototype.slide = function (type, next) {
408 + var $active = this.$element.find('.item.active')
409 + var $next = next || this.getItemForDirection(type, $active)
410 + var isCycling = this.interval
411 + var direction = type == 'next' ? 'left' : 'right'
412 + var that = this
413 +
414 + if ($next.hasClass('active')) return (this.sliding = false)
415 +
416 + var relatedTarget = $next[0]
417 + var slideEvent = $.Event('slide.bs.carousel', {
418 + relatedTarget: relatedTarget,
419 + direction: direction
420 + })
421 + this.$element.trigger(slideEvent)
422 + if (slideEvent.isDefaultPrevented()) return
423 +
424 + this.sliding = true
425 +
426 + isCycling && this.pause()
427 +
428 + if (this.$indicators.length) {
429 + this.$indicators.find('.active').removeClass('active')
430 + var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
431 + $nextIndicator && $nextIndicator.addClass('active')
432 + }
433 +
434 + var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
435 + if ($.support.transition && this.$element.hasClass('slide')) {
436 + $next.addClass(type)
437 + $next[0].offsetWidth // force reflow
438 + $active.addClass(direction)
439 + $next.addClass(direction)
440 + $active
441 + .one('bsTransitionEnd', function () {
442 + $next.removeClass([type, direction].join(' ')).addClass('active')
443 + $active.removeClass(['active', direction].join(' '))
444 + that.sliding = false
445 + setTimeout(function () {
446 + that.$element.trigger(slidEvent)
447 + }, 0)
448 + })
449 + .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
450 + } else {
451 + $active.removeClass('active')
452 + $next.addClass('active')
453 + this.sliding = false
454 + this.$element.trigger(slidEvent)
455 + }
456 +
457 + isCycling && this.cycle()
458 +
459 + return this
460 + }
461 +
462 +
463 + // CAROUSEL PLUGIN DEFINITION
464 + // ==========================
465 +
466 + function Plugin(option) {
467 + return this.each(function () {
468 + var $this = $(this)
469 + var data = $this.data('bs.carousel')
470 + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
471 + var action = typeof option == 'string' ? option : options.slide
472 +
473 + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
474 + if (typeof option == 'number') data.to(option)
475 + else if (action) data[action]()
476 + else if (options.interval) data.pause().cycle()
477 + })
478 + }
479 +
480 + var old = $.fn.carousel
481 +
482 + $.fn.carousel = Plugin
483 + $.fn.carousel.Constructor = Carousel
484 +
485 +
486 + // CAROUSEL NO CONFLICT
487 + // ====================
488 +
489 + $.fn.carousel.noConflict = function () {
490 + $.fn.carousel = old
491 + return this
492 + }
493 +
494 +
495 + // CAROUSEL DATA-API
496 + // =================
497 +
498 + var clickHandler = function (e) {
499 + var href
500 + var $this = $(this)
501 + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
502 + if (!$target.hasClass('carousel')) return
503 + var options = $.extend({}, $target.data(), $this.data())
504 + var slideIndex = $this.attr('data-slide-to')
505 + if (slideIndex) options.interval = false
506 +
507 + Plugin.call($target, options)
508 +
509 + if (slideIndex) {
510 + $target.data('bs.carousel').to(slideIndex)
511 + }
512 +
513 + e.preventDefault()
514 + }
515 +
516 + $(document)
517 + .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
518 + .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
519 +
520 + $(window).on('load', function () {
521 + $('[data-ride="carousel"]').each(function () {
522 + var $carousel = $(this)
523 + Plugin.call($carousel, $carousel.data())
524 + })
525 + })
526 +
527 +}(jQuery);
528 +
529 +/* ========================================================================
530 + * Bootstrap: collapse.js v3.3.4
531 + * http://getbootstrap.com/javascript/#collapse
532 + * ========================================================================
533 + * Copyright 2011-2015 Twitter, Inc.
534 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
535 + * ======================================================================== */
536 +
537 +
538 ++function ($) {
539 + 'use strict';
540 +
541 + // COLLAPSE PUBLIC CLASS DEFINITION
542 + // ================================
543 +
544 + var Collapse = function (element, options) {
545 + this.$element = $(element)
546 + this.options = $.extend({}, Collapse.DEFAULTS, options)
547 + this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
548 + '[data-toggle="collapse"][data-target="#' + element.id + '"]')
549 + this.transitioning = null
550 +
551 + if (this.options.parent) {
552 + this.$parent = this.getParent()
553 + } else {
554 + this.addAriaAndCollapsedClass(this.$element, this.$trigger)
555 + }
556 +
557 + if (this.options.toggle) this.toggle()
558 + }
559 +
560 + Collapse.VERSION = '3.3.4'
561 +
562 + Collapse.TRANSITION_DURATION = 350
563 +
564 + Collapse.DEFAULTS = {
565 + toggle: true
566 + }
567 +
568 + Collapse.prototype.dimension = function () {
569 + var hasWidth = this.$element.hasClass('width')
570 + return hasWidth ? 'width' : 'height'
571 + }
572 +
573 + Collapse.prototype.show = function () {
574 + if (this.transitioning || this.$element.hasClass('in')) return
575 +
576 + var activesData
577 + var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
578 +
579 + if (actives && actives.length) {
580 + activesData = actives.data('bs.collapse')
581 + if (activesData && activesData.transitioning) return
582 + }
583 +
584 + var startEvent = $.Event('show.bs.collapse')
585 + this.$element.trigger(startEvent)
586 + if (startEvent.isDefaultPrevented()) return
587 +
588 + if (actives && actives.length) {
589 + Plugin.call(actives, 'hide')
590 + activesData || actives.data('bs.collapse', null)
591 + }
592 +
593 + var dimension = this.dimension()
594 +
595 + this.$element
596 + .removeClass('collapse')
597 + .addClass('collapsing')[dimension](0)
598 + .attr('aria-expanded', true)
599 +
600 + this.$trigger
601 + .removeClass('collapsed')
602 + .attr('aria-expanded', true)
603 +
604 + this.transitioning = 1
605 +
606 + var complete = function () {
607 + this.$element
608 + .removeClass('collapsing')
609 + .addClass('collapse in')[dimension]('')
610 + this.transitioning = 0
611 + this.$element
612 + .trigger('shown.bs.collapse')
613 + }
614 +
615 + if (!$.support.transition) return complete.call(this)
616 +
617 + var scrollSize = $.camelCase(['scroll', dimension].join('-'))
618 +
619 + this.$element
620 + .one('bsTransitionEnd', $.proxy(complete, this))
621 + .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
622 + }
623 +
624 + Collapse.prototype.hide = function () {
625 + if (this.transitioning || !this.$element.hasClass('in')) return
626 +
627 + var startEvent = $.Event('hide.bs.collapse')
628 + this.$element.trigger(startEvent)
629 + if (startEvent.isDefaultPrevented()) return
630 +
631 + var dimension = this.dimension()
632 +
633 + this.$element[dimension](this.$element[dimension]())[0].offsetHeight
634 +
635 + this.$element
636 + .addClass('collapsing')
637 + .removeClass('collapse in')
638 + .attr('aria-expanded', false)
639 +
640 + this.$trigger
641 + .addClass('collapsed')
642 + .attr('aria-expanded', false)
643 +
644 + this.transitioning = 1
645 +
646 + var complete = function () {
647 + this.transitioning = 0
648 + this.$element
649 + .removeClass('collapsing')
650 + .addClass('collapse')
651 + .trigger('hidden.bs.collapse')
652 + }
653 +
654 + if (!$.support.transition) return complete.call(this)
655 +
656 + this.$element
657 + [dimension](0)
658 + .one('bsTransitionEnd', $.proxy(complete, this))
659 + .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
660 + }
661 +
662 + Collapse.prototype.toggle = function () {
663 + this[this.$element.hasClass('in') ? 'hide' : 'show']()
664 + }
665 +
666 + Collapse.prototype.getParent = function () {
667 + return $(this.options.parent)
668 + .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
669 + .each($.proxy(function (i, element) {
670 + var $element = $(element)
671 + this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
672 + }, this))
673 + .end()
674 + }
675 +
676 + Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
677 + var isOpen = $element.hasClass('in')
678 +
679 + $element.attr('aria-expanded', isOpen)
680 + $trigger
681 + .toggleClass('collapsed', !isOpen)
682 + .attr('aria-expanded', isOpen)
683 + }
684 +
685 + function getTargetFromTrigger($trigger) {
686 + var href
687 + var target = $trigger.attr('data-target')
688 + || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
689 +
690 + return $(target)
691 + }
692 +
693 +
694 + // COLLAPSE PLUGIN DEFINITION
695 + // ==========================
696 +
697 + function Plugin(option) {
698 + return this.each(function () {
699 + var $this = $(this)
700 + var data = $this.data('bs.collapse')
701 + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
702 +
703 + if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
704 + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
705 + if (typeof option == 'string') data[option]()
706 + })
707 + }
708 +
709 + var old = $.fn.collapse
710 +
711 + $.fn.collapse = Plugin
712 + $.fn.collapse.Constructor = Collapse
713 +
714 +
715 + // COLLAPSE NO CONFLICT
716 + // ====================
717 +
718 + $.fn.collapse.noConflict = function () {
719 + $.fn.collapse = old
720 + return this
721 + }
722 +
723 +
724 + // COLLAPSE DATA-API
725 + // =================
726 +
727 + $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
728 + var $this = $(this)
729 +
730 + if (!$this.attr('data-target')) e.preventDefault()
731 +
732 + var $target = getTargetFromTrigger($this)
733 + var data = $target.data('bs.collapse')
734 + var option = data ? 'toggle' : $this.data()
735 +
736 + Plugin.call($target, option)
737 + })
738 +
739 +}(jQuery);
740 +
741 +/* ========================================================================
742 + * Bootstrap: dropdown.js v3.3.4
743 + * http://getbootstrap.com/javascript/#dropdowns
744 + * ========================================================================
745 + * Copyright 2011-2015 Twitter, Inc.
746 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
747 + * ======================================================================== */
748 +
749 +
750 ++function ($) {
751 + 'use strict';
752 +
753 + // DROPDOWN CLASS DEFINITION
754 + // =========================
755 +
756 + var backdrop = '.dropdown-backdrop'
757 + var toggle = '[data-toggle="dropdown"]'
758 + var Dropdown = function (element) {
759 + $(element).on('click.bs.dropdown', this.toggle)
760 + }
761 +
762 + Dropdown.VERSION = '3.3.4'
763 +
764 + Dropdown.prototype.toggle = function (e) {
765 + var $this = $(this)
766 +
767 + if ($this.is('.disabled, :disabled')) return
768 +
769 + var $parent = getParent($this)
770 + var isActive = $parent.hasClass('open')
771 +
772 + clearMenus()
773 +
774 + if (!isActive) {
775 + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
776 + // if mobile we use a backdrop because click events don't delegate
777 + $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
778 + }
779 +
780 + var relatedTarget = { relatedTarget: this }
781 + $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
782 +
783 + if (e.isDefaultPrevented()) return
784 +
785 + $this
786 + .trigger('focus')
787 + .attr('aria-expanded', 'true')
788 +
789 + $parent
790 + .toggleClass('open')
791 + .trigger('shown.bs.dropdown', relatedTarget)
792 + }
793 +
794 + return false
795 + }
796 +
797 + Dropdown.prototype.keydown = function (e) {
798 + if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
799 +
800 + var $this = $(this)
801 +
802 + e.preventDefault()
803 + e.stopPropagation()
804 +
805 + if ($this.is('.disabled, :disabled')) return
806 +
807 + var $parent = getParent($this)
808 + var isActive = $parent.hasClass('open')
809 +
810 + if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
811 + if (e.which == 27) $parent.find(toggle).trigger('focus')
812 + return $this.trigger('click')
813 + }
814 +
815 + var desc = ' li:not(.disabled):visible a'
816 + var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
817 +
818 + if (!$items.length) return
819 +
820 + var index = $items.index(e.target)
821 +
822 + if (e.which == 38 && index > 0) index-- // up
823 + if (e.which == 40 && index < $items.length - 1) index++ // down
824 + if (!~index) index = 0
825 +
826 + $items.eq(index).trigger('focus')
827 + }
828 +
829 + function clearMenus(e) {
830 + if (e && e.which === 3) return
831 + $(backdrop).remove()
832 + $(toggle).each(function () {
833 + var $this = $(this)
834 + var $parent = getParent($this)
835 + var relatedTarget = { relatedTarget: this }
836 +
837 + if (!$parent.hasClass('open')) return
838 +
839 + $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
840 +
841 + if (e.isDefaultPrevented()) return
842 +
843 + $this.attr('aria-expanded', 'false')
844 + $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
845 + })
846 + }
847 +
848 + function getParent($this) {
849 + var selector = $this.attr('data-target')
850 +
851 + if (!selector) {
852 + selector = $this.attr('href')
853 + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
854 + }
855 +
856 + var $parent = selector && $(selector)
857 +
858 + return $parent && $parent.length ? $parent : $this.parent()
859 + }
860 +
861 +
862 + // DROPDOWN PLUGIN DEFINITION
863 + // ==========================
864 +
865 + function Plugin(option) {
866 + return this.each(function () {
867 + var $this = $(this)
868 + var data = $this.data('bs.dropdown')
869 +
870 + if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
871 + if (typeof option == 'string') data[option].call($this)
872 + })
873 + }
874 +
875 + var old = $.fn.dropdown
876 +
877 + $.fn.dropdown = Plugin
878 + $.fn.dropdown.Constructor = Dropdown
879 +
880 +
881 + // DROPDOWN NO CONFLICT
882 + // ====================
883 +
884 + $.fn.dropdown.noConflict = function () {
885 + $.fn.dropdown = old
886 + return this
887 + }
888 +
889 +
890 + // APPLY TO STANDARD DROPDOWN ELEMENTS
891 + // ===================================
892 +
893 + $(document)
894 + .on('click.bs.dropdown.data-api', clearMenus)
895 + .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
896 + .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
897 + .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
898 + .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
899 + .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
900 +
901 +}(jQuery);
902 +
903 +/* ========================================================================
904 + * Bootstrap: modal.js v3.3.4
905 + * http://getbootstrap.com/javascript/#modals
906 + * ========================================================================
907 + * Copyright 2011-2015 Twitter, Inc.
908 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
909 + * ======================================================================== */
910 +
911 +
912 ++function ($) {
913 + 'use strict';
914 +
915 + // MODAL CLASS DEFINITION
916 + // ======================
917 +
918 + var Modal = function (element, options) {
919 + this.options = options
920 + this.$body = $(document.body)
921 + this.$element = $(element)
922 + this.$dialog = this.$element.find('.modal-dialog')
923 + this.$backdrop = null
924 + this.isShown = null
925 + this.originalBodyPad = null
926 + this.scrollbarWidth = 0
927 + this.ignoreBackdropClick = false
928 +
929 + if (this.options.remote) {
930 + this.$element
931 + .find('.modal-content')
932 + .load(this.options.remote, $.proxy(function () {
933 + this.$element.trigger('loaded.bs.modal')
934 + }, this))
935 + }
936 + }
937 +
938 + Modal.VERSION = '3.3.4'
939 +
940 + Modal.TRANSITION_DURATION = 300
941 + Modal.BACKDROP_TRANSITION_DURATION = 150
942 +
943 + Modal.DEFAULTS = {
944 + backdrop: true,
945 + keyboard: true,
946 + show: true
947 + }
948 +
949 + Modal.prototype.toggle = function (_relatedTarget) {
950 + return this.isShown ? this.hide() : this.show(_relatedTarget)
951 + }
952 +
953 + Modal.prototype.show = function (_relatedTarget) {
954 + var that = this
955 + var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
956 +
957 + this.$element.trigger(e)
958 +
959 + if (this.isShown || e.isDefaultPrevented()) return
960 +
961 + this.isShown = true
962 +
963 + this.checkScrollbar()
964 + this.setScrollbar()
965 + this.$body.addClass('modal-open')
966 +
967 + this.escape()
968 + this.resize()
969 +
970 + this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
971 +
972 + this.$dialog.on('mousedown.dismiss.bs.modal', function () {
973 + that.$element.one('mouseup.dismiss.bs.modal', function (e) {
974 + if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
975 + })
976 + })
977 +
978 + this.backdrop(function () {
979 + var transition = $.support.transition && that.$element.hasClass('fade')
980 +
981 + if (!that.$element.parent().length) {
982 + that.$element.appendTo(that.$body) // don't move modals dom position
983 + }
984 +
985 + that.$element
986 + .show()
987 + .scrollTop(0)
988 +
989 + that.adjustDialog()
990 +
991 + if (transition) {
992 + that.$element[0].offsetWidth // force reflow
993 + }
994 +
995 + that.$element
996 + .addClass('in')
997 + .attr('aria-hidden', false)
998 +
999 + that.enforceFocus()
1000 +
1001 + var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
1002 +
1003 + transition ?
1004 + that.$dialog // wait for modal to slide in
1005 + .one('bsTransitionEnd', function () {
1006 + that.$element.trigger('focus').trigger(e)
1007 + })
1008 + .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1009 + that.$element.trigger('focus').trigger(e)
1010 + })
1011 + }
1012 +
1013 + Modal.prototype.hide = function (e) {
1014 + if (e) e.preventDefault()
1015 +
1016 + e = $.Event('hide.bs.modal')
1017 +
1018 + this.$element.trigger(e)
1019 +
1020 + if (!this.isShown || e.isDefaultPrevented()) return
1021 +
1022 + this.isShown = false
1023 +
1024 + this.escape()
1025 + this.resize()
1026 +
1027 + $(document).off('focusin.bs.modal')
1028 +
1029 + this.$element
1030 + .removeClass('in')
1031 + .attr('aria-hidden', true)
1032 + .off('click.dismiss.bs.modal')
1033 + .off('mouseup.dismiss.bs.modal')
1034 +
1035 + this.$dialog.off('mousedown.dismiss.bs.modal')
1036 +
1037 + $.support.transition && this.$element.hasClass('fade') ?
1038 + this.$element
1039 + .one('bsTransitionEnd', $.proxy(this.hideModal, this))
1040 + .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1041 + this.hideModal()
1042 + }
1043 +
1044 + Modal.prototype.enforceFocus = function () {
1045 + $(document)
1046 + .off('focusin.bs.modal') // guard against infinite focus loop
1047 + .on('focusin.bs.modal', $.proxy(function (e) {
1048 + if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
1049 + this.$element.trigger('focus')
1050 + }
1051 + }, this))
1052 + }
1053 +
1054 + Modal.prototype.escape = function () {
1055 + if (this.isShown && this.options.keyboard) {
1056 + this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
1057 + e.which == 27 && this.hide()
1058 + }, this))
1059 + } else if (!this.isShown) {
1060 + this.$element.off('keydown.dismiss.bs.modal')
1061 + }
1062 + }
1063 +
1064 + Modal.prototype.resize = function () {
1065 + if (this.isShown) {
1066 + $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1067 + } else {
1068 + $(window).off('resize.bs.modal')
1069 + }
1070 + }
1071 +
1072 + Modal.prototype.hideModal = function () {
1073 + var that = this
1074 + this.$element.hide()
1075 + this.backdrop(function () {
1076 + that.$body.removeClass('modal-open')
1077 + that.resetAdjustments()
1078 + that.resetScrollbar()
1079 + that.$element.trigger('hidden.bs.modal')
1080 + })
1081 + }
1082 +
1083 + Modal.prototype.removeBackdrop = function () {
1084 + this.$backdrop && this.$backdrop.remove()
1085 + this.$backdrop = null
1086 + }
1087 +
1088 + Modal.prototype.backdrop = function (callback) {
1089 + var that = this
1090 + var animate = this.$element.hasClass('fade') ? 'fade' : ''
1091 +
1092 + if (this.isShown && this.options.backdrop) {
1093 + var doAnimate = $.support.transition && animate
1094 +
1095 + this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
1096 + .appendTo(this.$body)
1097 +
1098 + this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
1099 + if (this.ignoreBackdropClick) {
1100 + this.ignoreBackdropClick = false
1101 + return
1102 + }
1103 + if (e.target !== e.currentTarget) return
1104 + this.options.backdrop == 'static'
1105 + ? this.$element[0].focus()
1106 + : this.hide()
1107 + }, this))
1108 +
1109 + if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1110 +
1111 + this.$backdrop.addClass('in')
1112 +
1113 + if (!callback) return
1114 +
1115 + doAnimate ?
1116 + this.$backdrop
1117 + .one('bsTransitionEnd', callback)
1118 + .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1119 + callback()
1120 +
1121 + } else if (!this.isShown && this.$backdrop) {
1122 + this.$backdrop.removeClass('in')
1123 +
1124 + var callbackRemove = function () {
1125 + that.removeBackdrop()
1126 + callback && callback()
1127 + }
1128 + $.support.transition && this.$element.hasClass('fade') ?
1129 + this.$backdrop
1130 + .one('bsTransitionEnd', callbackRemove)
1131 + .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1132 + callbackRemove()
1133 +
1134 + } else if (callback) {
1135 + callback()
1136 + }
1137 + }
1138 +
1139 + // these following methods are used to handle overflowing modals
1140 +
1141 + Modal.prototype.handleUpdate = function () {
1142 + this.adjustDialog()
1143 + }
1144 +
1145 + Modal.prototype.adjustDialog = function () {
1146 + var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1147 +
1148 + this.$element.css({
1149 + paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1150 + paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1151 + })
1152 + }
1153 +
1154 + Modal.prototype.resetAdjustments = function () {
1155 + this.$element.css({
1156 + paddingLeft: '',
1157 + paddingRight: ''
1158 + })
1159 + }
1160 +
1161 + Modal.prototype.checkScrollbar = function () {
1162 + var fullWindowWidth = window.innerWidth
1163 + if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
1164 + var documentElementRect = document.documentElement.getBoundingClientRect()
1165 + fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
1166 + }
1167 + this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
1168 + this.scrollbarWidth = this.measureScrollbar()
1169 + }
1170 +
1171 + Modal.prototype.setScrollbar = function () {
1172 + var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1173 + this.originalBodyPad = document.body.style.paddingRight || ''
1174 + if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1175 + }
1176 +
1177 + Modal.prototype.resetScrollbar = function () {
1178 + this.$body.css('padding-right', this.originalBodyPad)
1179 + }
1180 +
1181 + Modal.prototype.measureScrollbar = function () { // thx walsh
1182 + var scrollDiv = document.createElement('div')
1183 + scrollDiv.className = 'modal-scrollbar-measure'
1184 + this.$body.append(scrollDiv)
1185 + var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1186 + this.$body[0].removeChild(scrollDiv)
1187 + return scrollbarWidth
1188 + }
1189 +
1190 +
1191 + // MODAL PLUGIN DEFINITION
1192 + // =======================
1193 +
1194 + function Plugin(option, _relatedTarget) {
1195 + return this.each(function () {
1196 + var $this = $(this)
1197 + var data = $this.data('bs.modal')
1198 + var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1199 +
1200 + if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1201 + if (typeof option == 'string') data[option](_relatedTarget)
1202 + else if (options.show) data.show(_relatedTarget)
1203 + })
1204 + }
1205 +
1206 + var old = $.fn.modal
1207 +
1208 + $.fn.modal = Plugin
1209 + $.fn.modal.Constructor = Modal
1210 +
1211 +
1212 + // MODAL NO CONFLICT
1213 + // =================
1214 +
1215 + $.fn.modal.noConflict = function () {
1216 + $.fn.modal = old
1217 + return this
1218 + }
1219 +
1220 +
1221 + // MODAL DATA-API
1222 + // ==============
1223 +
1224 + $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1225 + var $this = $(this)
1226 + var href = $this.attr('href')
1227 + var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
1228 + var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1229 +
1230 + if ($this.is('a')) e.preventDefault()
1231 +
1232 + $target.one('show.bs.modal', function (showEvent) {
1233 + if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1234 + $target.one('hidden.bs.modal', function () {
1235 + $this.is(':visible') && $this.trigger('focus')
1236 + })
1237 + })
1238 + Plugin.call($target, option, this)
1239 + })
1240 +
1241 +}(jQuery);
1242 +
1243 +/* ========================================================================
1244 + * Bootstrap: tooltip.js v3.3.4
1245 + * http://getbootstrap.com/javascript/#tooltip
1246 + * Inspired by the original jQuery.tipsy by Jason Frame
1247 + * ========================================================================
1248 + * Copyright 2011-2015 Twitter, Inc.
1249 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1250 + * ======================================================================== */
1251 +
1252 +
1253 ++function ($) {
1254 + 'use strict';
1255 +
1256 + // TOOLTIP PUBLIC CLASS DEFINITION
1257 + // ===============================
1258 +
1259 + var Tooltip = function (element, options) {
1260 + this.type = null
1261 + this.options = null
1262 + this.enabled = null
1263 + this.timeout = null
1264 + this.hoverState = null
1265 + this.$element = null
1266 +
1267 + this.init('tooltip', element, options)
1268 + }
1269 +
1270 + Tooltip.VERSION = '3.3.4'
1271 +
1272 + Tooltip.TRANSITION_DURATION = 150
1273 +
1274 + Tooltip.DEFAULTS = {
1275 + animation: true,
1276 + placement: 'top',
1277 + selector: false,
1278 + template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1279 + trigger: 'hover focus',
1280 + title: '',
1281 + delay: 0,
1282 + html: false,
1283 + container: false,
1284 + viewport: {
1285 + selector: 'body',
1286 + padding: 0
1287 + }
1288 + }
1289 +
1290 + Tooltip.prototype.init = function (type, element, options) {
1291 + this.enabled = true
1292 + this.type = type
1293 + this.$element = $(element)
1294 + this.options = this.getOptions(options)
1295 + this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
1296 +
1297 + if (this.$element[0] instanceof document.constructor && !this.options.selector) {
1298 + throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
1299 + }
1300 +
1301 + var triggers = this.options.trigger.split(' ')
1302 +
1303 + for (var i = triggers.length; i--;) {
1304 + var trigger = triggers[i]
1305 +
1306 + if (trigger == 'click') {
1307 + this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1308 + } else if (trigger != 'manual') {
1309 + var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
1310 + var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1311 +
1312 + this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1313 + this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1314 + }
1315 + }
1316 +
1317 + this.options.selector ?
1318 + (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1319 + this.fixTitle()
1320 + }
1321 +
1322 + Tooltip.prototype.getDefaults = function () {
1323 + return Tooltip.DEFAULTS
1324 + }
1325 +
1326 + Tooltip.prototype.getOptions = function (options) {
1327 + options = $.extend({}, this.getDefaults(), this.$element.data(), options)
1328 +
1329 + if (options.delay && typeof options.delay == 'number') {
1330 + options.delay = {
1331 + show: options.delay,
1332 + hide: options.delay
1333 + }
1334 + }
1335 +
1336 + return options
1337 + }
1338 +
1339 + Tooltip.prototype.getDelegateOptions = function () {
1340 + var options = {}
1341 + var defaults = this.getDefaults()
1342 +
1343 + this._options && $.each(this._options, function (key, value) {
1344 + if (defaults[key] != value) options[key] = value
1345 + })
1346 +
1347 + return options
1348 + }
1349 +
1350 + Tooltip.prototype.enter = function (obj) {
1351 + var self = obj instanceof this.constructor ?
1352 + obj : $(obj.currentTarget).data('bs.' + this.type)
1353 +
1354 + if (self && self.$tip && self.$tip.is(':visible')) {
1355 + self.hoverState = 'in'
1356 + return
1357 + }
1358 +
1359 + if (!self) {
1360 + self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1361 + $(obj.currentTarget).data('bs.' + this.type, self)
1362 + }
1363 +
1364 + clearTimeout(self.timeout)
1365 +
1366 + self.hoverState = 'in'
1367 +
1368 + if (!self.options.delay || !self.options.delay.show) return self.show()
1369 +
1370 + self.timeout = setTimeout(function () {
1371 + if (self.hoverState == 'in') self.show()
1372 + }, self.options.delay.show)
1373 + }
1374 +
1375 + Tooltip.prototype.leave = function (obj) {
1376 + var self = obj instanceof this.constructor ?
1377 + obj : $(obj.currentTarget).data('bs.' + this.type)
1378 +
1379 + if (!self) {
1380 + self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1381 + $(obj.currentTarget).data('bs.' + this.type, self)
1382 + }
1383 +
1384 + clearTimeout(self.timeout)
1385 +
1386 + self.hoverState = 'out'
1387 +
1388 + if (!self.options.delay || !self.options.delay.hide) return self.hide()
1389 +
1390 + self.timeout = setTimeout(function () {
1391 + if (self.hoverState == 'out') self.hide()
1392 + }, self.options.delay.hide)
1393 + }
1394 +
1395 + Tooltip.prototype.show = function () {
1396 + var e = $.Event('show.bs.' + this.type)
1397 +
1398 + if (this.hasContent() && this.enabled) {
1399 + this.$element.trigger(e)
1400 +
1401 + var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
1402 + if (e.isDefaultPrevented() || !inDom) return
1403 + var that = this
1404 +
1405 + var $tip = this.tip()
1406 +
1407 + var tipId = this.getUID(this.type)
1408 +
1409 + this.setContent()
1410 + $tip.attr('id', tipId)
1411 + this.$element.attr('aria-describedby', tipId)
1412 +
1413 + if (this.options.animation) $tip.addClass('fade')
1414 +
1415 + var placement = typeof this.options.placement == 'function' ?
1416 + this.options.placement.call(this, $tip[0], this.$element[0]) :
1417 + this.options.placement
1418 +
1419 + var autoToken = /\s?auto?\s?/i
1420 + var autoPlace = autoToken.test(placement)
1421 + if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1422 +
1423 + $tip
1424 + .detach()
1425 + .css({ top: 0, left: 0, display: 'block' })
1426 + .addClass(placement)
1427 + .data('bs.' + this.type, this)
1428 +
1429 + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1430 +
1431 + var pos = this.getPosition()
1432 + var actualWidth = $tip[0].offsetWidth
1433 + var actualHeight = $tip[0].offsetHeight
1434 +
1435 + if (autoPlace) {
1436 + var orgPlacement = placement
1437 + var $container = this.options.container ? $(this.options.container) : this.$element.parent()
1438 + var containerDim = this.getPosition($container)
1439 +
1440 + placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
1441 + placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
1442 + placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
1443 + placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
1444 + placement
1445 +
1446 + $tip
1447 + .removeClass(orgPlacement)
1448 + .addClass(placement)
1449 + }
1450 +
1451 + var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1452 +
1453 + this.applyPlacement(calculatedOffset, placement)
1454 +
1455 + var complete = function () {
1456 + var prevHoverState = that.hoverState
1457 + that.$element.trigger('shown.bs.' + that.type)
1458 + that.hoverState = null
1459 +
1460 + if (prevHoverState == 'out') that.leave(that)
1461 + }
1462 +
1463 + $.support.transition && this.$tip.hasClass('fade') ?
1464 + $tip
1465 + .one('bsTransitionEnd', complete)
1466 + .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1467 + complete()
1468 + }
1469 + }
1470 +
1471 + Tooltip.prototype.applyPlacement = function (offset, placement) {
1472 + var $tip = this.tip()
1473 + var width = $tip[0].offsetWidth
1474 + var height = $tip[0].offsetHeight
1475 +
1476 + // manually read margins because getBoundingClientRect includes difference
1477 + var marginTop = parseInt($tip.css('margin-top'), 10)
1478 + var marginLeft = parseInt($tip.css('margin-left'), 10)
1479 +
1480 + // we must check for NaN for ie 8/9
1481 + if (isNaN(marginTop)) marginTop = 0
1482 + if (isNaN(marginLeft)) marginLeft = 0
1483 +
1484 + offset.top = offset.top + marginTop
1485 + offset.left = offset.left + marginLeft
1486 +
1487 + // $.fn.offset doesn't round pixel values
1488 + // so we use setOffset directly with our own function B-0
1489 + $.offset.setOffset($tip[0], $.extend({
1490 + using: function (props) {
1491 + $tip.css({
1492 + top: Math.round(props.top),
1493 + left: Math.round(props.left)
1494 + })
1495 + }
1496 + }, offset), 0)
1497 +
1498 + $tip.addClass('in')
1499 +
1500 + // check to see if placing tip in new offset caused the tip to resize itself
1501 + var actualWidth = $tip[0].offsetWidth
1502 + var actualHeight = $tip[0].offsetHeight
1503 +
1504 + if (placement == 'top' && actualHeight != height) {
1505 + offset.top = offset.top + height - actualHeight
1506 + }
1507 +
1508 + var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
1509 +
1510 + if (delta.left) offset.left += delta.left
1511 + else offset.top += delta.top
1512 +
1513 + var isVertical = /top|bottom/.test(placement)
1514 + var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
1515 + var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
1516 +
1517 + $tip.offset(offset)
1518 + this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
1519 + }
1520 +
1521 + Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
1522 + this.arrow()
1523 + .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1524 + .css(isVertical ? 'top' : 'left', '')
1525 + }
1526 +
1527 + Tooltip.prototype.setContent = function () {
1528 + var $tip = this.tip()
1529 + var title = this.getTitle()
1530 +
1531 + $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1532 + $tip.removeClass('fade in top bottom left right')
1533 + }
1534 +
1535 + Tooltip.prototype.hide = function (callback) {
1536 + var that = this
1537 + var $tip = $(this.$tip)
1538 + var e = $.Event('hide.bs.' + this.type)
1539 +
1540 + function complete() {
1541 + if (that.hoverState != 'in') $tip.detach()
1542 + that.$element
1543 + .removeAttr('aria-describedby')
1544 + .trigger('hidden.bs.' + that.type)
1545 + callback && callback()
1546 + }
1547 +
1548 + this.$element.trigger(e)
1549 +
1550 + if (e.isDefaultPrevented()) return
1551 +
1552 + $tip.removeClass('in')
1553 +
1554 + $.support.transition && $tip.hasClass('fade') ?
1555 + $tip
1556 + .one('bsTransitionEnd', complete)
1557 + .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1558 + complete()
1559 +
1560 + this.hoverState = null
1561 +
1562 + return this
1563 + }
1564 +
1565 + Tooltip.prototype.fixTitle = function () {
1566 + var $e = this.$element
1567 + if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
1568 + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1569 + }
1570 + }
1571 +
1572 + Tooltip.prototype.hasContent = function () {
1573 + return this.getTitle()
1574 + }
1575 +
1576 + Tooltip.prototype.getPosition = function ($element) {
1577 + $element = $element || this.$element
1578 +
1579 + var el = $element[0]
1580 + var isBody = el.tagName == 'BODY'
1581 +
1582 + var elRect = el.getBoundingClientRect()
1583 + if (elRect.width == null) {
1584 + // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
1585 + elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
1586 + }
1587 + var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
1588 + var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
1589 + var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
1590 +
1591 + return $.extend({}, elRect, scroll, outerDims, elOffset)
1592 + }
1593 +
1594 + Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1595 + return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1596 + placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1597 + placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1598 + /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1599 +
1600 + }
1601 +
1602 + Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
1603 + var delta = { top: 0, left: 0 }
1604 + if (!this.$viewport) return delta
1605 +
1606 + var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
1607 + var viewportDimensions = this.getPosition(this.$viewport)
1608 +
1609 + if (/right|left/.test(placement)) {
1610 + var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
1611 + var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
1612 + if (topEdgeOffset < viewportDimensions.top) { // top overflow
1613 + delta.top = viewportDimensions.top - topEdgeOffset
1614 + } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
1615 + delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
1616 + }
1617 + } else {
1618 + var leftEdgeOffset = pos.left - viewportPadding
1619 + var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1620 + if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1621 + delta.left = viewportDimensions.left - leftEdgeOffset
1622 + } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
1623 + delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1624 + }
1625 + }
1626 +
1627 + return delta
1628 + }
1629 +
1630 + Tooltip.prototype.getTitle = function () {
1631 + var title
1632 + var $e = this.$element
1633 + var o = this.options
1634 +
1635 + title = $e.attr('data-original-title')
1636 + || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
1637 +
1638 + return title
1639 + }
1640 +
1641 + Tooltip.prototype.getUID = function (prefix) {
1642 + do prefix += ~~(Math.random() * 1000000)
1643 + while (document.getElementById(prefix))
1644 + return prefix
1645 + }
1646 +
1647 + Tooltip.prototype.tip = function () {
1648 + return (this.$tip = this.$tip || $(this.options.template))
1649 + }
1650 +
1651 + Tooltip.prototype.arrow = function () {
1652 + return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
1653 + }
1654 +
1655 + Tooltip.prototype.enable = function () {
1656 + this.enabled = true
1657 + }
1658 +
1659 + Tooltip.prototype.disable = function () {
1660 + this.enabled = false
1661 + }
1662 +
1663 + Tooltip.prototype.toggleEnabled = function () {
1664 + this.enabled = !this.enabled
1665 + }
1666 +
1667 + Tooltip.prototype.toggle = function (e) {
1668 + var self = this
1669 + if (e) {
1670 + self = $(e.currentTarget).data('bs.' + this.type)
1671 + if (!self) {
1672 + self = new this.constructor(e.currentTarget, this.getDelegateOptions())
1673 + $(e.currentTarget).data('bs.' + this.type, self)
1674 + }
1675 + }
1676 +
1677 + self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1678 + }
1679 +
1680 + Tooltip.prototype.destroy = function () {
1681 + var that = this
1682 + clearTimeout(this.timeout)
1683 + this.hide(function () {
1684 + that.$element.off('.' + that.type).removeData('bs.' + that.type)
1685 + })
1686 + }
1687 +
1688 +
1689 + // TOOLTIP PLUGIN DEFINITION
1690 + // =========================
1691 +
1692 + function Plugin(option) {
1693 + return this.each(function () {
1694 + var $this = $(this)
1695 + var data = $this.data('bs.tooltip')
1696 + var options = typeof option == 'object' && option
1697 +
1698 + if (!data && /destroy|hide/.test(option)) return
1699 + if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1700 + if (typeof option == 'string') data[option]()
1701 + })
1702 + }
1703 +
1704 + var old = $.fn.tooltip
1705 +
1706 + $.fn.tooltip = Plugin
1707 + $.fn.tooltip.Constructor = Tooltip
1708 +
1709 +
1710 + // TOOLTIP NO CONFLICT
1711 + // ===================
1712 +
1713 + $.fn.tooltip.noConflict = function () {
1714 + $.fn.tooltip = old
1715 + return this
1716 + }
1717 +
1718 +}(jQuery);
1719 +
1720 +/* ========================================================================
1721 + * Bootstrap: popover.js v3.3.4
1722 + * http://getbootstrap.com/javascript/#popovers
1723 + * ========================================================================
1724 + * Copyright 2011-2015 Twitter, Inc.
1725 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1726 + * ======================================================================== */
1727 +
1728 +
1729 ++function ($) {
1730 + 'use strict';
1731 +
1732 + // POPOVER PUBLIC CLASS DEFINITION
1733 + // ===============================
1734 +
1735 + var Popover = function (element, options) {
1736 + this.init('popover', element, options)
1737 + }
1738 +
1739 + if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1740 +
1741 + Popover.VERSION = '3.3.4'
1742 +
1743 + Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1744 + placement: 'right',
1745 + trigger: 'click',
1746 + content: '',
1747 + template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1748 + })
1749 +
1750 +
1751 + // NOTE: POPOVER EXTENDS tooltip.js
1752 + // ================================
1753 +
1754 + Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1755 +
1756 + Popover.prototype.constructor = Popover
1757 +
1758 + Popover.prototype.getDefaults = function () {
1759 + return Popover.DEFAULTS
1760 + }
1761 +
1762 + Popover.prototype.setContent = function () {
1763 + var $tip = this.tip()
1764 + var title = this.getTitle()
1765 + var content = this.getContent()
1766 +
1767 + $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1768 + $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
1769 + this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1770 + ](content)
1771 +
1772 + $tip.removeClass('fade top bottom left right in')
1773 +
1774 + // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1775 + // this manually by checking the contents.
1776 + if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1777 + }
1778 +
1779 + Popover.prototype.hasContent = function () {
1780 + return this.getTitle() || this.getContent()
1781 + }
1782 +
1783 + Popover.prototype.getContent = function () {
1784 + var $e = this.$element
1785 + var o = this.options
1786 +
1787 + return $e.attr('data-content')
1788 + || (typeof o.content == 'function' ?
1789 + o.content.call($e[0]) :
1790 + o.content)
1791 + }
1792 +
1793 + Popover.prototype.arrow = function () {
1794 + return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1795 + }
1796 +
1797 +
1798 + // POPOVER PLUGIN DEFINITION
1799 + // =========================
1800 +
1801 + function Plugin(option) {
1802 + return this.each(function () {
1803 + var $this = $(this)
1804 + var data = $this.data('bs.popover')
1805 + var options = typeof option == 'object' && option
1806 +
1807 + if (!data && /destroy|hide/.test(option)) return
1808 + if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1809 + if (typeof option == 'string') data[option]()
1810 + })
1811 + }
1812 +
1813 + var old = $.fn.popover
1814 +
1815 + $.fn.popover = Plugin
1816 + $.fn.popover.Constructor = Popover
1817 +
1818 +
1819 + // POPOVER NO CONFLICT
1820 + // ===================
1821 +
1822 + $.fn.popover.noConflict = function () {
1823 + $.fn.popover = old
1824 + return this
1825 + }
1826 +
1827 +}(jQuery);
1828 +
1829 +/* ========================================================================
1830 + * Bootstrap: scrollspy.js v3.3.4
1831 + * http://getbootstrap.com/javascript/#scrollspy
1832 + * ========================================================================
1833 + * Copyright 2011-2015 Twitter, Inc.
1834 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1835 + * ======================================================================== */
1836 +
1837 +
1838 ++function ($) {
1839 + 'use strict';
1840 +
1841 + // SCROLLSPY CLASS DEFINITION
1842 + // ==========================
1843 +
1844 + function ScrollSpy(element, options) {
1845 + this.$body = $(document.body)
1846 + this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
1847 + this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1848 + this.selector = (this.options.target || '') + ' .nav li > a'
1849 + this.offsets = []
1850 + this.targets = []
1851 + this.activeTarget = null
1852 + this.scrollHeight = 0
1853 +
1854 + this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
1855 + this.refresh()
1856 + this.process()
1857 + }
1858 +
1859 + ScrollSpy.VERSION = '3.3.4'
1860 +
1861 + ScrollSpy.DEFAULTS = {
1862 + offset: 10
1863 + }
1864 +
1865 + ScrollSpy.prototype.getScrollHeight = function () {
1866 + return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
1867 + }
1868 +
1869 + ScrollSpy.prototype.refresh = function () {
1870 + var that = this
1871 + var offsetMethod = 'offset'
1872 + var offsetBase = 0
1873 +
1874 + this.offsets = []
1875 + this.targets = []
1876 + this.scrollHeight = this.getScrollHeight()
1877 +
1878 + if (!$.isWindow(this.$scrollElement[0])) {
1879 + offsetMethod = 'position'
1880 + offsetBase = this.$scrollElement.scrollTop()
1881 + }
1882 +
1883 + this.$body
1884 + .find(this.selector)
1885 + .map(function () {
1886 + var $el = $(this)
1887 + var href = $el.data('target') || $el.attr('href')
1888 + var $href = /^#./.test(href) && $(href)
1889 +
1890 + return ($href
1891 + && $href.length
1892 + && $href.is(':visible')
1893 + && [[$href[offsetMethod]().top + offsetBase, href]]) || null
1894 + })
1895 + .sort(function (a, b) { return a[0] - b[0] })
1896 + .each(function () {
1897 + that.offsets.push(this[0])
1898 + that.targets.push(this[1])
1899 + })
1900 + }
1901 +
1902 + ScrollSpy.prototype.process = function () {
1903 + var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
1904 + var scrollHeight = this.getScrollHeight()
1905 + var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
1906 + var offsets = this.offsets
1907 + var targets = this.targets
1908 + var activeTarget = this.activeTarget
1909 + var i
1910 +
1911 + if (this.scrollHeight != scrollHeight) {
1912 + this.refresh()
1913 + }
1914 +
1915 + if (scrollTop >= maxScroll) {
1916 + return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
1917 + }
1918 +
1919 + if (activeTarget && scrollTop < offsets[0]) {
1920 + this.activeTarget = null
1921 + return this.clear()
1922 + }
1923 +
1924 + for (i = offsets.length; i--;) {
1925 + activeTarget != targets[i]
1926 + && scrollTop >= offsets[i]
1927 + && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
1928 + && this.activate(targets[i])
1929 + }
1930 + }
1931 +
1932 + ScrollSpy.prototype.activate = function (target) {
1933 + this.activeTarget = target
1934 +
1935 + this.clear()
1936 +
1937 + var selector = this.selector +
1938 + '[data-target="' + target + '"],' +
1939 + this.selector + '[href="' + target + '"]'
1940 +
1941 + var active = $(selector)
1942 + .parents('li')
1943 + .addClass('active')
1944 +
1945 + if (active.parent('.dropdown-menu').length) {
1946 + active = active
1947 + .closest('li.dropdown')
1948 + .addClass('active')
1949 + }
1950 +
1951 + active.trigger('activate.bs.scrollspy')
1952 + }
1953 +
1954 + ScrollSpy.prototype.clear = function () {
1955 + $(this.selector)
1956 + .parentsUntil(this.options.target, '.active')
1957 + .removeClass('active')
1958 + }
1959 +
1960 +
1961 + // SCROLLSPY PLUGIN DEFINITION
1962 + // ===========================
1963 +
1964 + function Plugin(option) {
1965 + return this.each(function () {
1966 + var $this = $(this)
1967 + var data = $this.data('bs.scrollspy')
1968 + var options = typeof option == 'object' && option
1969 +
1970 + if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
1971 + if (typeof option == 'string') data[option]()
1972 + })
1973 + }
1974 +
1975 + var old = $.fn.scrollspy
1976 +
1977 + $.fn.scrollspy = Plugin
1978 + $.fn.scrollspy.Constructor = ScrollSpy
1979 +
1980 +
1981 + // SCROLLSPY NO CONFLICT
1982 + // =====================
1983 +
1984 + $.fn.scrollspy.noConflict = function () {
1985 + $.fn.scrollspy = old
1986 + return this
1987 + }
1988 +
1989 +
1990 + // SCROLLSPY DATA-API
1991 + // ==================
1992 +
1993 + $(window).on('load.bs.scrollspy.data-api', function () {
1994 + $('[data-spy="scroll"]').each(function () {
1995 + var $spy = $(this)
1996 + Plugin.call($spy, $spy.data())
1997 + })
1998 + })
1999 +
2000 +}(jQuery);
2001 +
2002 +/* ========================================================================
2003 + * Bootstrap: tab.js v3.3.4
2004 + * http://getbootstrap.com/javascript/#tabs
2005 + * ========================================================================
2006 + * Copyright 2011-2015 Twitter, Inc.
2007 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2008 + * ======================================================================== */
2009 +
2010 +
2011 ++function ($) {
2012 + 'use strict';
2013 +
2014 + // TAB CLASS DEFINITION
2015 + // ====================
2016 +
2017 + var Tab = function (element) {
2018 + this.element = $(element)
2019 + }
2020 +
2021 + Tab.VERSION = '3.3.4'
2022 +
2023 + Tab.TRANSITION_DURATION = 150
2024 +
2025 + Tab.prototype.show = function () {
2026 + var $this = this.element
2027 + var $ul = $this.closest('ul:not(.dropdown-menu)')
2028 + var selector = $this.data('target')
2029 +
2030 + if (!selector) {
2031 + selector = $this.attr('href')
2032 + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
2033 + }
2034 +
2035 + if ($this.parent('li').hasClass('active')) return
2036 +
2037 + var $previous = $ul.find('.active:last a')
2038 + var hideEvent = $.Event('hide.bs.tab', {
2039 + relatedTarget: $this[0]
2040 + })
2041 + var showEvent = $.Event('show.bs.tab', {
2042 + relatedTarget: $previous[0]
2043 + })
2044 +
2045 + $previous.trigger(hideEvent)
2046 + $this.trigger(showEvent)
2047 +
2048 + if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
2049 +
2050 + var $target = $(selector)
2051 +
2052 + this.activate($this.closest('li'), $ul)
2053 + this.activate($target, $target.parent(), function () {
2054 + $previous.trigger({
2055 + type: 'hidden.bs.tab',
2056 + relatedTarget: $this[0]
2057 + })
2058 + $this.trigger({
2059 + type: 'shown.bs.tab',
2060 + relatedTarget: $previous[0]
2061 + })
2062 + })
2063 + }
2064 +
2065 + Tab.prototype.activate = function (element, container, callback) {
2066 + var $active = container.find('> .active')
2067 + var transition = callback
2068 + && $.support.transition
2069 + && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
2070 +
2071 + function next() {
2072 + $active
2073 + .removeClass('active')
2074 + .find('> .dropdown-menu > .active')
2075 + .removeClass('active')
2076 + .end()
2077 + .find('[data-toggle="tab"]')
2078 + .attr('aria-expanded', false)
2079 +
2080 + element
2081 + .addClass('active')
2082 + .find('[data-toggle="tab"]')
2083 + .attr('aria-expanded', true)
2084 +
2085 + if (transition) {
2086 + element[0].offsetWidth // reflow for transition
2087 + element.addClass('in')
2088 + } else {
2089 + element.removeClass('fade')
2090 + }
2091 +
2092 + if (element.parent('.dropdown-menu').length) {
2093 + element
2094 + .closest('li.dropdown')
2095 + .addClass('active')
2096 + .end()
2097 + .find('[data-toggle="tab"]')
2098 + .attr('aria-expanded', true)
2099 + }
2100 +
2101 + callback && callback()
2102 + }
2103 +
2104 + $active.length && transition ?
2105 + $active
2106 + .one('bsTransitionEnd', next)
2107 + .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
2108 + next()
2109 +
2110 + $active.removeClass('in')
2111 + }
2112 +
2113 +
2114 + // TAB PLUGIN DEFINITION
2115 + // =====================
2116 +
2117 + function Plugin(option) {
2118 + return this.each(function () {
2119 + var $this = $(this)
2120 + var data = $this.data('bs.tab')
2121 +
2122 + if (!data) $this.data('bs.tab', (data = new Tab(this)))
2123 + if (typeof option == 'string') data[option]()
2124 + })
2125 + }
2126 +
2127 + var old = $.fn.tab
2128 +
2129 + $.fn.tab = Plugin
2130 + $.fn.tab.Constructor = Tab
2131 +
2132 +
2133 + // TAB NO CONFLICT
2134 + // ===============
2135 +
2136 + $.fn.tab.noConflict = function () {
2137 + $.fn.tab = old
2138 + return this
2139 + }
2140 +
2141 +
2142 + // TAB DATA-API
2143 + // ============
2144 +
2145 + var clickHandler = function (e) {
2146 + e.preventDefault()
2147 + Plugin.call($(this), 'show')
2148 + }
2149 +
2150 + $(document)
2151 + .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
2152 + .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
2153 +
2154 +}(jQuery);
2155 +
2156 +/* ========================================================================
2157 + * Bootstrap: affix.js v3.3.4
2158 + * http://getbootstrap.com/javascript/#affix
2159 + * ========================================================================
2160 + * Copyright 2011-2015 Twitter, Inc.
2161 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2162 + * ======================================================================== */
2163 +
2164 +
2165 ++function ($) {
2166 + 'use strict';
2167 +
2168 + // AFFIX CLASS DEFINITION
2169 + // ======================
2170 +
2171 + var Affix = function (element, options) {
2172 + this.options = $.extend({}, Affix.DEFAULTS, options)
2173 +
2174 + this.$target = $(this.options.target)
2175 + .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
2176 + .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
2177 +
2178 + this.$element = $(element)
2179 + this.affixed = null
2180 + this.unpin = null
2181 + this.pinnedOffset = null
2182 +
2183 + this.checkPosition()
2184 + }
2185 +
2186 + Affix.VERSION = '3.3.4'
2187 +
2188 + Affix.RESET = 'affix affix-top affix-bottom'
2189 +
2190 + Affix.DEFAULTS = {
2191 + offset: 0,
2192 + target: window
2193 + }
2194 +
2195 + Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
2196 + var scrollTop = this.$target.scrollTop()
2197 + var position = this.$element.offset()
2198 + var targetHeight = this.$target.height()
2199 +
2200 + if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
2201 +
2202 + if (this.affixed == 'bottom') {
2203 + if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
2204 + return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
2205 + }
2206 +
2207 + var initializing = this.affixed == null
2208 + var colliderTop = initializing ? scrollTop : position.top
2209 + var colliderHeight = initializing ? targetHeight : height
2210 +
2211 + if (offsetTop != null && scrollTop <= offsetTop) return 'top'
2212 + if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
2213 +
2214 + return false
2215 + }
2216 +
2217 + Affix.prototype.getPinnedOffset = function () {
2218 + if (this.pinnedOffset) return this.pinnedOffset
2219 + this.$element.removeClass(Affix.RESET).addClass('affix')
2220 + var scrollTop = this.$target.scrollTop()
2221 + var position = this.$element.offset()
2222 + return (this.pinnedOffset = position.top - scrollTop)
2223 + }
2224 +
2225 + Affix.prototype.checkPositionWithEventLoop = function () {
2226 + setTimeout($.proxy(this.checkPosition, this), 1)
2227 + }
2228 +
2229 + Affix.prototype.checkPosition = function () {
2230 + if (!this.$element.is(':visible')) return
2231 +
2232 + var height = this.$element.height()
2233 + var offset = this.options.offset
2234 + var offsetTop = offset.top
2235 + var offsetBottom = offset.bottom
2236 + var scrollHeight = $(document.body).height()
2237 +
2238 + if (typeof offset != 'object') offsetBottom = offsetTop = offset
2239 + if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
2240 + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
2241 +
2242 + var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
2243 +
2244 + if (this.affixed != affix) {
2245 + if (this.unpin != null) this.$element.css('top', '')
2246 +
2247 + var affixType = 'affix' + (affix ? '-' + affix : '')
2248 + var e = $.Event(affixType + '.bs.affix')
2249 +
2250 + this.$element.trigger(e)
2251 +
2252 + if (e.isDefaultPrevented()) return
2253 +
2254 + this.affixed = affix
2255 + this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
2256 +
2257 + this.$element
2258 + .removeClass(Affix.RESET)
2259 + .addClass(affixType)
2260 + .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
2261 + }
2262 +
2263 + if (affix == 'bottom') {
2264 + this.$element.offset({
2265 + top: scrollHeight - height - offsetBottom
2266 + })
2267 + }
2268 + }
2269 +
2270 +
2271 + // AFFIX PLUGIN DEFINITION
2272 + // =======================
2273 +
2274 + function Plugin(option) {
2275 + return this.each(function () {
2276 + var $this = $(this)
2277 + var data = $this.data('bs.affix')
2278 + var options = typeof option == 'object' && option
2279 +
2280 + if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
2281 + if (typeof option == 'string') data[option]()
2282 + })
2283 + }
2284 +
2285 + var old = $.fn.affix
2286 +
2287 + $.fn.affix = Plugin
2288 + $.fn.affix.Constructor = Affix
2289 +
2290 +
2291 + // AFFIX NO CONFLICT
2292 + // =================
2293 +
2294 + $.fn.affix.noConflict = function () {
2295 + $.fn.affix = old
2296 + return this
2297 + }
2298 +
2299 +
2300 + // AFFIX DATA-API
2301 + // ==============
2302 +
2303 + $(window).on('load', function () {
2304 + $('[data-spy="affix"]').each(function () {
2305 + var $spy = $(this)
2306 + var data = $spy.data()
2307 +
2308 + data.offset = data.offset || {}
2309 +
2310 + if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
2311 + if (data.offsetTop != null) data.offset.top = data.offsetTop
2312 +
2313 + Plugin.call($spy, data)
2314 + })
2315 + })
2316 +
2317 +}(jQuery);
1 +/*!
2 + * Bootstrap v3.3.4 (http://getbootstrap.com)
3 + * Copyright 2011-2015 Twitter, Inc.
4 + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 + */
6 +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){
7 +var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
...\ No newline at end of file ...\ No newline at end of file
1 +$(function() {
2 +
3 + $("input,textarea").jqBootstrapValidation({
4 + preventSubmit: true,
5 + submitError: function($form, event, errors) {
6 + // additional error messages or events
7 + },
8 + submitSuccess: function($form, event) {
9 + event.preventDefault(); // prevent default submit behaviour
10 + // get values from FORM
11 + var name = $("input#name").val();
12 + var email = $("input#email").val();
13 + var message = $("textarea#message").val();
14 + var firstName = name; // For Success/Failure Message
15 + // Check for white space in name for Success/Fail message
16 + if (firstName.indexOf(' ') >= 0) {
17 + firstName = name.split(' ').slice(0, -1).join(' ');
18 + }
19 + $.ajax({
20 + url: "././mail/contact_me.php",
21 + type: "POST",
22 + data: {
23 + name: name,
24 + email: email,
25 + message: message
26 + },
27 + cache: false,
28 + success: function() {
29 + // Success message
30 + $('#success').html("<div class='alert alert-success'>");
31 + $('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
32 + .append("</button>");
33 + $('#success > .alert-success')
34 + .append("<strong>Your message has been sent. </strong>");
35 + $('#success > .alert-success')
36 + .append('</div>');
37 +
38 + //clear all fields
39 + $('#contactForm').trigger("reset");
40 + },
41 + error: function() {
42 + // Fail message
43 + $('#success').html("<div class='alert alert-danger'>");
44 + $('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
45 + .append("</button>");
46 + $('#success > .alert-danger').append("<strong>Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!");
47 + $('#success > .alert-danger').append('</div>');
48 + //clear all fields
49 + $('#contactForm').trigger("reset");
50 + },
51 + })
52 + },
53 + filter: function() {
54 + return $(this).is(":visible");
55 + },
56 + });
57 +
58 + $("a[data-toggle=\"tab\"]").click(function(e) {
59 + e.preventDefault();
60 + $(this).tab("show");
61 + });
62 +});
63 +
64 +
65 +/*When clicking on Full hide fail/success boxes */
66 +$('#name').focus(function() {
67 + $('#success').html('');
68 +});
...@@ -3,6 +3,20 @@ ...@@ -3,6 +3,20 @@
3 <head> 3 <head>
4 <title><%= title %></title> 4 <title><%= title %></title>
5 <link rel='stylesheet' href='/stylesheets/style.css' /> 5 <link rel='stylesheet' href='/stylesheets/style.css' />
6 + <<!-- Bootstrap -->
7 + <link rel="stylesheet" type="text/css" href="/stylesheets/bootstrap.css">
8 + <link rel="stylesheet" type="text/css" href="/stylesheets/font-awesome.css">
9 +
10 + <!-- Stylesheet
11 + ================================================== -->
12 + <link rel="stylesheet" type="text/css" href="/stylesheets/style.css">
13 + <link rel="stylesheet" type="text/css" href="/stylesheets/nivo-lightbox/nivo-lightbox.css">
14 + <link rel="stylesheet" type="text/css" href="/stylesheets/nivo-lightbox/default.css">
15 + <link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700" rel="stylesheet">
16 + <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
17 + <link href="https://fonts.googleapis.com/css?family=Dancing+Script:400,700" rel="stylesheet">
18 +
19 + <link href="https://fonts.googleapis.com/css?family=Gugi&amp;subset=korean" rel="stylesheet">
6 <script src="http://developers.kakao.com/sdk/js/kakao.min.js"> 20 <script src="http://developers.kakao.com/sdk/js/kakao.min.js">
7 function daum_click() 21 function daum_click()
8 { 22 {
...@@ -13,10 +27,208 @@ ...@@ -13,10 +27,208 @@
13 } 27 }
14 </script> 28 </script>
15 </head> 29 </head>
30 +
31 + <body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
32 + <!-- Navigation
33 + ==========================================-->
34 + <nav id="menu" class="navbar navbar-default navbar-fixed-top">
35 + <div class="container">
36 + <!-- Brand and toggle get grouped for better mobile display -->
37 + <div class="navbar-header">
38 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
39 + <a class="navbar-brand page-scroll" href="#page-top">Touché</a> </div>
40 +
41 + <!-- Collect the nav links, forms, and other content for toggling -->
42 + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
43 + <ul class="nav navbar-nav navbar-right">
44 + <li><a href="#about" class="page-scroll">About</a></li>
45 + <li><a href="#menu" class="page-scroll">Menu</a></li>
46 + <li><a href="#portfolio" class="page-scroll">Gallery</a></li>
47 + <li><a href="/auth/login/kakao" class="page-scroll">Login</a></li>
48 + </ul>
49 + </div>
50 + <!-- /.navbar-collapse -->
51 + </div>
52 + </nav>
53 + <!-- Header -->
54 + <header id="header">
55 + <div class="intro">
56 + <div class="overlay">
57 + <div class="container">
58 + <div class="row">
59 + <div class="intro-text">
60 + <h1>YTMT</h1>
61 + <p>NAVER / DAUM / WEBTOONS</p>
62 + <a href="#about" class="btn btn-custom btn-lg page-scroll">All the Webtoons</a> </div>
63 + </div>
64 + </div>
65 + </div>
66 + </div>
67 + </header>
68 +
69 + <!-- About Section -->
70 + <div id="about">
71 + <div class="container">
72 + <div class="row">
73 + <div class="col-xs-12 col-md-6 ">
74 + <div class="about-img"><img src="img/about.jpg" class="img-responsive" alt=""></div>
75 + </div>
76 + <div class="col-xs-12 col-md-6">
77 + <div class="about-text">
78 + <h2>Our Restaurant</h2>
79 + <hr>
80 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed dapibus leo nec ornare diam. Sed commodo nibh ante facilisis bibendum dolor feugiat at. Duis sed dapibus leo nec ornare diam commodo nibh.</p>
81 + <h3>Awarded Chefs</h3>
82 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed dapibus leo nec ornare diam. Sed commodo nibh ante facilisis bibendum dolor feugiat at. Duis sed dapibus leo nec ornare.</p>
83 + </div>
84 + </div>
85 + </div>
86 + </div>
87 + </div>
88 + <!-- Portfolio Section -->
89 + <div id="portfolio">
90 + <div class="section-title text-center center">
91 + <div class="overlay">
92 + <h2>Gallery</h2>
93 + <hr>
94 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit duis sed.</p>
95 + </div>
96 + </div>
97 + <div class="container">
98 + <div class="row">
99 + <div class="categories">
100 + <ul class="cat">
101 + <li>
102 + <ol class="type">
103 + <li><a href="#" data-filter="*" class="active">All</a></li>
104 + <li><a href="#" data-filter=".breakfast">Breakfast</a></li>
105 + <li><a href="#" data-filter=".lunch">Lunch</a></li>
106 + <li><a href="#" data-filter=".dinner">Dinner</a></li>
107 + </ol>
108 + </li>
109 + </ul>
110 + <div class="clearfix"></div>
111 + </div>
112 + </div>
113 + <div class="row">
114 + <div class="portfolio-items">
115 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
116 + <div class="portfolio-item">
117 + <div class="hover-bg"> <a href="img/portfolio/01-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
118 + <div class="hover-text">
119 + <h4>Dish Name</h4>
120 + </div>
121 + <img src="img/portfolio/01-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
122 + </div>
123 + </div>
124 + <div class="col-sm-6 col-md-4 col-lg-4 dinner">
125 + <div class="portfolio-item">
126 + <div class="hover-bg"> <a href="img/portfolio/02-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
127 + <div class="hover-text">
128 + <h4>Dish Name</h4>
129 + </div>
130 + <img src="img/portfolio/02-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
131 + </div>
132 + </div>
133 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
134 + <div class="portfolio-item">
135 + <div class="hover-bg"> <a href="img/portfolio/03-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
136 + <div class="hover-text">
137 + <h4>Dish Name</h4>
138 + </div>
139 + <img src="img/portfolio/03-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
140 + </div>
141 + </div>
142 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
143 + <div class="portfolio-item">
144 + <div class="hover-bg"> <a href="img/portfolio/04-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
145 + <div class="hover-text">
146 + <h4>Dish Name</h4>
147 + </div>
148 + <img src="img/portfolio/04-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
149 + </div>
150 + </div>
151 + <div class="col-sm-6 col-md-4 col-lg-4 dinner">
152 + <div class="portfolio-item">
153 + <div class="hover-bg"> <a href="img/portfolio/05-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
154 + <div class="hover-text">
155 + <h4>Dish Name</h4>
156 + </div>
157 + <img src="img/portfolio/05-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
158 + </div>
159 + </div>
160 + <div class="col-sm-6 col-md-4 col-lg-4 lunch">
161 + <div class="portfolio-item">
162 + <div class="hover-bg"> <a href="img/portfolio/06-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
163 + <div class="hover-text">
164 + <h4>Dish Name</h4>
165 + </div>
166 + <img src="img/portfolio/06-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
167 + </div>
168 + </div>
169 + <div class="col-sm-6 col-md-4 col-lg-4 lunch">
170 + <div class="portfolio-item">
171 + <div class="hover-bg"> <a href="img/portfolio/07-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
172 + <div class="hover-text">
173 + <h4>Dish Name</h4>
174 + </div>
175 + <img src="img/portfolio/07-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
176 + </div>
177 + </div>
178 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
179 + <div class="portfolio-item">
180 + <div class="hover-bg"> <a href="img/portfolio/08-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
181 + <div class="hover-text">
182 + <h4>Dish Name</h4>
183 + </div>
184 + <img src="img/portfolio/08-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
185 + </div>
186 + </div>
187 + <div class="col-sm-6 col-md-4 col-lg-4 dinner">
188 + <div class="portfolio-item">
189 + <div class="hover-bg"> <a href="img/portfolio/09-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
190 + <div class="hover-text">
191 + <h4>Dish Name</h4>
192 + </div>
193 + <img src="img/portfolio/09-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
194 + </div>
195 + </div>
196 + <div class="col-sm-6 col-md-4 col-lg-4 lunch">
197 + <div class="portfolio-item">
198 + <div class="hover-bg"> <a href="img/portfolio/10-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
199 + <div class="hover-text">
200 + <h4>Dish Name</h4>
201 + </div>
202 + <img src="img/portfolio/10-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
203 + </div>
204 + </div>
205 + <div class="col-sm-6 col-md-4 col-lg-4 lunch">
206 + <div class="portfolio-item">
207 + <div class="hover-bg"> <a href="img/portfolio/11-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
208 + <div class="hover-text">
209 + <h4>Dish Name</h4>
210 + </div>
211 + <img src="img/portfolio/11-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
212 + </div>
213 + </div>
214 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
215 + <div class="portfolio-item">
216 + <div class="hover-bg"> <a href="img/portfolio/12-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
217 + <div class="hover-text">
218 + <h4>Dish Name</h4>
219 + </div>
220 + <img src="img/portfolio/12-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
221 + </div>
222 + </div>
223 + </div>
224 + </div>
225 + </div>
226 + </div>
227 +
16 <h1><%= title %></h1> 228 <h1><%= title %></h1>
17 <p>웹툰 리스트</p> 229 <p>웹툰 리스트</p>
18 230
19 - <a href="/auth/login/kakao" class="btn btn-block btn-lg btn-warning btn_login">로그인</a> 231 +
20 232
21 <br> 233 <br>
22 <br> 234 <br>
...@@ -29,8 +241,8 @@ ...@@ -29,8 +241,8 @@
29 241
30 <a onclick="Daum_webtoons.style.display=(Daum_webtoons.style.display=='none')?'block':'none';" href="javascript:void(0)"> 242 <a onclick="Daum_webtoons.style.display=(Daum_webtoons.style.display=='none')?'block':'none';" href="javascript:void(0)">
31 <img src ='/images/daumicon.png' width="83" height="90" onclick="daum_click" /> 243 <img src ='/images/daumicon.png' width="83" height="90" onclick="daum_click" />
32 -</a> 244 + </a>
33 -<div style="display:none" id="Daum_webtoons"> 245 + <div style="display:none" id="Daum_webtoons">
34 <table> 246 <table>
35 <% 247 <%
36 var current = ""; 248 var current = "";
...@@ -71,7 +283,7 @@ ...@@ -71,7 +283,7 @@
71 </table> 283 </table>
72 </br> 284 </br>
73 </div> 285 </div>
74 -<br> 286 + <br>
75 287
76 <font size = 60> 288 <font size = 60>
77 네이버 웹툰 289 네이버 웹툰
...@@ -122,7 +334,6 @@ ...@@ -122,7 +334,6 @@
122 </br> 334 </br>
123 335
124 </div> 336 </div>
125 -
126 </body> 337 </body>
127 338
128 </html> 339 </html>
......
1 +<!DOCTYPE html>
2 +<html lang="en">
3 +<head>
4 +<meta charset="utf-8">
5 +<meta name="viewport" content="width=device-width, initial-scale=1">
6 +<title>Touché</title>
7 +<meta name="description" content="">
8 +<meta name="author" content="">
9 +
10 +<!-- Favicons
11 + ================================================== -->
12 +<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
13 +<link rel="apple-touch-icon" href="img/apple-touch-icon.png">
14 +<link rel="apple-touch-icon" sizes="72x72" href="img/apple-touch-icon-72x72.png">
15 +<link rel="apple-touch-icon" sizes="114x114" href="img/apple-touch-icon-114x114.png">
16 +
17 +<!-- Bootstrap -->
18 +<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
19 +<link rel="stylesheet" type="text/css" href="fonts/font-awesome/css/font-awesome.css">
20 +
21 +<!-- Stylesheet
22 + ================================================== -->
23 +<link rel="stylesheet" type="text/css" href="css/style.css">
24 +<link rel="stylesheet" type="text/css" href="css/nivo-lightbox/nivo-lightbox.css">
25 +<link rel="stylesheet" type="text/css" href="css/nivo-lightbox/default.css">
26 +<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700" rel="stylesheet">
27 +<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
28 +<link href="https://fonts.googleapis.com/css?family=Dancing+Script:400,700" rel="stylesheet">
29 +
30 +<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
31 +<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
32 +<!--[if lt IE 9]>
33 + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
34 + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
35 + <![endif]-->
36 +</head>
37 +<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
38 +<!-- Navigation
39 + ==========================================-->
40 +<nav id="menu" class="navbar navbar-default navbar-fixed-top">
41 + <div class="container">
42 + <!-- Brand and toggle get grouped for better mobile display -->
43 + <div class="navbar-header">
44 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
45 + <a class="navbar-brand page-scroll" href="#page-top">Touché</a> </div>
46 +
47 + <!-- Collect the nav links, forms, and other content for toggling -->
48 + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
49 + <ul class="nav navbar-nav navbar-right">
50 + <li><a href="#about" class="page-scroll">About</a></li>
51 + <li><a href="#restaurant-menu" class="page-scroll">Menu</a></li>
52 + <li><a href="#portfolio" class="page-scroll">Gallery</a></li>
53 + <li><a href="#team" class="page-scroll">Chefs</a></li>
54 + <li><a href="#call-reservation" class="page-scroll">Contact</a></li>
55 + </ul>
56 + </div>
57 + <!-- /.navbar-collapse -->
58 + </div>
59 +</nav>
60 +<!-- Header -->
61 +<header id="header">
62 + <div class="intro">
63 + <div class="overlay">
64 + <div class="container">
65 + <div class="row">
66 + <div class="intro-text">
67 + <h1>Touché</h1>
68 + <p>Restaurant / Coffee / Pub</p>
69 + <a href="#about" class="btn btn-custom btn-lg page-scroll">Discover Story</a> </div>
70 + </div>
71 + </div>
72 + </div>
73 + </div>
74 +</header>
75 +<!-- About Section -->
76 +<div id="about">
77 + <div class="container">
78 + <div class="row">
79 + <div class="col-xs-12 col-md-6 ">
80 + <div class="about-img"><img src="img/about.jpg" class="img-responsive" alt=""></div>
81 + </div>
82 + <div class="col-xs-12 col-md-6">
83 + <div class="about-text">
84 + <h2>Our Restaurant</h2>
85 + <hr>
86 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed dapibus leo nec ornare diam. Sed commodo nibh ante facilisis bibendum dolor feugiat at. Duis sed dapibus leo nec ornare diam commodo nibh.</p>
87 + <h3>Awarded Chefs</h3>
88 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed dapibus leo nec ornare diam. Sed commodo nibh ante facilisis bibendum dolor feugiat at. Duis sed dapibus leo nec ornare.</p>
89 + </div>
90 + </div>
91 + </div>
92 + </div>
93 +</div>
94 +<!-- Restaurant Menu Section -->
95 +<div id="restaurant-menu">
96 + <div class="section-title text-center center">
97 + <div class="overlay">
98 + <h2>Menu</h2>
99 + <hr>
100 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit duis sed.</p>
101 + </div>
102 + </div>
103 + <div class="container">
104 + <div class="row">
105 + <div class="col-xs-12 col-sm-6">
106 + <div class="menu-section">
107 + <h2 class="menu-section-title">Breakfast & Starters</h2>
108 + <hr>
109 + <div class="menu-item">
110 + <div class="menu-item-name"> Delicious Dish </div>
111 + <div class="menu-item-price"> $35 </div>
112 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
113 + </div>
114 + <div class="menu-item">
115 + <div class="menu-item-name"> Delicious Dish </div>
116 + <div class="menu-item-price"> $30 </div>
117 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
118 + </div>
119 + <div class="menu-item">
120 + <div class="menu-item-name"> Delicious Dish </div>
121 + <div class="menu-item-price"> $30 </div>
122 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
123 + </div>
124 + <div class="menu-item">
125 + <div class="menu-item-name"> Delicious Dish </div>
126 + <div class="menu-item-price"> $30 </div>
127 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
128 + </div>
129 + </div>
130 + </div>
131 + <div class="col-xs-12 col-sm-6">
132 + <div class="menu-section">
133 + <h2 class="menu-section-title">Main Course</h2>
134 + <hr>
135 + <div class="menu-item">
136 + <div class="menu-item-name"> Delicious Dish </div>
137 + <div class="menu-item-price"> $45 </div>
138 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
139 + </div>
140 + <div class="menu-item">
141 + <div class="menu-item-name"> Delicious Dish </div>
142 + <div class="menu-item-price"> $30 </div>
143 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
144 + </div>
145 + <div class="menu-item">
146 + <div class="menu-item-name"> Delicious Dish </div>
147 + <div class="menu-item-price"> $30 </div>
148 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
149 + </div>
150 + <div class="menu-item">
151 + <div class="menu-item-name"> Delicious Dish </div>
152 + <div class="menu-item-price"> $30 </div>
153 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
154 + </div>
155 + </div>
156 + </div>
157 + </div>
158 + <div class="row">
159 + <div class="col-xs-12 col-sm-6">
160 + <div class="menu-section">
161 + <h2 class="menu-section-title">Dinner</h2>
162 + <hr>
163 + <div class="menu-item">
164 + <div class="menu-item-name"> Delicious Dish </div>
165 + <div class="menu-item-price"> $45 </div>
166 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
167 + </div>
168 + <div class="menu-item">
169 + <div class="menu-item-name"> Delicious Dish </div>
170 + <div class="menu-item-price"> $350 </div>
171 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
172 + </div>
173 + <div class="menu-item">
174 + <div class="menu-item-name"> Delicious Dish </div>
175 + <div class="menu-item-price"> $30 </div>
176 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam.. </div>
177 + </div>
178 + <div class="menu-item">
179 + <div class="menu-item-name"> Delicious Dish </div>
180 + <div class="menu-item-price"> $30 </div>
181 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
182 + </div>
183 + </div>
184 + </div>
185 + <div class="col-xs-12 col-sm-6">
186 + <div class="menu-section">
187 + <h2 class="menu-section-title">Coffee & Drinks</h2>
188 + <hr>
189 + <div class="menu-item">
190 + <div class="menu-item-name"> Delicious Dish </div>
191 + <div class="menu-item-price"> $35 </div>
192 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
193 + </div>
194 + <div class="menu-item">
195 + <div class="menu-item-name"> Delicious Dish </div>
196 + <div class="menu-item-price"> $30 </div>
197 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
198 + </div>
199 + <div class="menu-item">
200 + <div class="menu-item-name"> Delicious Dish </div>
201 + <div class="menu-item-price"> $30 </div>
202 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
203 + </div>
204 + <div class="menu-item">
205 + <div class="menu-item-name"> Delicious Dish </div>
206 + <div class="menu-item-price"> $30 </div>
207 + <div class="menu-item-description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </div>
208 + </div>
209 + </div>
210 + </div>
211 + </div>
212 + </div>
213 +</div>
214 +<!-- Portfolio Section -->
215 +<div id="portfolio">
216 + <div class="section-title text-center center">
217 + <div class="overlay">
218 + <h2>Gallery</h2>
219 + <hr>
220 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit duis sed.</p>
221 + </div>
222 + </div>
223 + <div class="container">
224 + <div class="row">
225 + <div class="categories">
226 + <ul class="cat">
227 + <li>
228 + <ol class="type">
229 + <li><a href="#" data-filter="*" class="active">All</a></li>
230 + <li><a href="#" data-filter=".breakfast">Breakfast</a></li>
231 + <li><a href="#" data-filter=".lunch">Lunch</a></li>
232 + <li><a href="#" data-filter=".dinner">Dinner</a></li>
233 + </ol>
234 + </li>
235 + </ul>
236 + <div class="clearfix"></div>
237 + </div>
238 + </div>
239 + <div class="row">
240 + <div class="portfolio-items">
241 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
242 + <div class="portfolio-item">
243 + <div class="hover-bg"> <a href="img/portfolio/01-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
244 + <div class="hover-text">
245 + <h4>Dish Name</h4>
246 + </div>
247 + <img src="img/portfolio/01-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
248 + </div>
249 + </div>
250 + <div class="col-sm-6 col-md-4 col-lg-4 dinner">
251 + <div class="portfolio-item">
252 + <div class="hover-bg"> <a href="img/portfolio/02-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
253 + <div class="hover-text">
254 + <h4>Dish Name</h4>
255 + </div>
256 + <img src="img/portfolio/02-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
257 + </div>
258 + </div>
259 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
260 + <div class="portfolio-item">
261 + <div class="hover-bg"> <a href="img/portfolio/03-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
262 + <div class="hover-text">
263 + <h4>Dish Name</h4>
264 + </div>
265 + <img src="img/portfolio/03-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
266 + </div>
267 + </div>
268 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
269 + <div class="portfolio-item">
270 + <div class="hover-bg"> <a href="img/portfolio/04-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
271 + <div class="hover-text">
272 + <h4>Dish Name</h4>
273 + </div>
274 + <img src="img/portfolio/04-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
275 + </div>
276 + </div>
277 + <div class="col-sm-6 col-md-4 col-lg-4 dinner">
278 + <div class="portfolio-item">
279 + <div class="hover-bg"> <a href="img/portfolio/05-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
280 + <div class="hover-text">
281 + <h4>Dish Name</h4>
282 + </div>
283 + <img src="img/portfolio/05-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
284 + </div>
285 + </div>
286 + <div class="col-sm-6 col-md-4 col-lg-4 lunch">
287 + <div class="portfolio-item">
288 + <div class="hover-bg"> <a href="img/portfolio/06-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
289 + <div class="hover-text">
290 + <h4>Dish Name</h4>
291 + </div>
292 + <img src="img/portfolio/06-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
293 + </div>
294 + </div>
295 + <div class="col-sm-6 col-md-4 col-lg-4 lunch">
296 + <div class="portfolio-item">
297 + <div class="hover-bg"> <a href="img/portfolio/07-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
298 + <div class="hover-text">
299 + <h4>Dish Name</h4>
300 + </div>
301 + <img src="img/portfolio/07-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
302 + </div>
303 + </div>
304 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
305 + <div class="portfolio-item">
306 + <div class="hover-bg"> <a href="img/portfolio/08-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
307 + <div class="hover-text">
308 + <h4>Dish Name</h4>
309 + </div>
310 + <img src="img/portfolio/08-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
311 + </div>
312 + </div>
313 + <div class="col-sm-6 col-md-4 col-lg-4 dinner">
314 + <div class="portfolio-item">
315 + <div class="hover-bg"> <a href="img/portfolio/09-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
316 + <div class="hover-text">
317 + <h4>Dish Name</h4>
318 + </div>
319 + <img src="img/portfolio/09-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
320 + </div>
321 + </div>
322 + <div class="col-sm-6 col-md-4 col-lg-4 lunch">
323 + <div class="portfolio-item">
324 + <div class="hover-bg"> <a href="img/portfolio/10-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
325 + <div class="hover-text">
326 + <h4>Dish Name</h4>
327 + </div>
328 + <img src="img/portfolio/10-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
329 + </div>
330 + </div>
331 + <div class="col-sm-6 col-md-4 col-lg-4 lunch">
332 + <div class="portfolio-item">
333 + <div class="hover-bg"> <a href="img/portfolio/11-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
334 + <div class="hover-text">
335 + <h4>Dish Name</h4>
336 + </div>
337 + <img src="img/portfolio/11-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
338 + </div>
339 + </div>
340 + <div class="col-sm-6 col-md-4 col-lg-4 breakfast">
341 + <div class="portfolio-item">
342 + <div class="hover-bg"> <a href="img/portfolio/12-large.jpg" title="Dish Name" data-lightbox-gallery="gallery1">
343 + <div class="hover-text">
344 + <h4>Dish Name</h4>
345 + </div>
346 + <img src="img/portfolio/12-small.jpg" class="img-responsive" alt="Project Title"> </a> </div>
347 + </div>
348 + </div>
349 + </div>
350 + </div>
351 + </div>
352 +</div>
353 +<!-- Team Section -->
354 +<div id="team" class="text-center">
355 + <div class="overlay">
356 + <div class="container">
357 + <div class="col-md-10 col-md-offset-1 section-title">
358 + <h2>Meet Our Chefs</h2>
359 + <hr>
360 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit duis sed dapibus leonec.</p>
361 + </div>
362 + <div id="row">
363 + <div class="col-md-4 team">
364 + <div class="thumbnail">
365 + <div class="team-img"><img src="img/team/01.jpg" alt="..."></div>
366 + <div class="caption">
367 + <h3>Mike Doe</h3>
368 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed dapibus leo nec ornare diam.</p>
369 + </div>
370 + </div>
371 + </div>
372 + <div class="col-md-4 team">
373 + <div class="thumbnail">
374 + <div class="team-img"><img src="img/team/02.jpg" alt="..."></div>
375 + <div class="caption">
376 + <h3>Chris Doe</h3>
377 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed dapibus leo nec ornare diam.</p>
378 + </div>
379 + </div>
380 + </div>
381 + <div class="col-md-4 team">
382 + <div class="thumbnail">
383 + <div class="team-img"><img src="img/team/03.jpg" alt="..."></div>
384 + <div class="caption">
385 + <h3>Ethan Doe</h3>
386 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed dapibus leo nec ornare diam.</p>
387 + </div>
388 + </div>
389 + </div>
390 + </div>
391 + </div>
392 + </div>
393 +</div>
394 +<!-- Call Reservation Section -->
395 +<div id="call-reservation" class="text-center">
396 + <div class="container">
397 + <h2>Want to make a reservation? Call <strong>1-887-654-3210</strong></h2>
398 + </div>
399 +</div>
400 +<!-- Contact Section -->
401 +<div id="contact" class="text-center">
402 + <div class="container">
403 + <div class="section-title text-center">
404 + <h2>Contact Form</h2>
405 + <hr>
406 + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit duis sed.</p>
407 + </div>
408 + <div class="col-md-10 col-md-offset-1">
409 + <form name="sentMessage" id="contactForm" novalidate>
410 + <div class="row">
411 + <div class="col-md-6">
412 + <div class="form-group">
413 + <input type="text" id="name" class="form-control" placeholder="Name" required="required">
414 + <p class="help-block text-danger"></p>
415 + </div>
416 + </div>
417 + <div class="col-md-6">
418 + <div class="form-group">
419 + <input type="email" id="email" class="form-control" placeholder="Email" required="required">
420 + <p class="help-block text-danger"></p>
421 + </div>
422 + </div>
423 + </div>
424 + <div class="form-group">
425 + <textarea name="message" id="message" class="form-control" rows="4" placeholder="Message" required></textarea>
426 + <p class="help-block text-danger"></p>
427 + </div>
428 + <div id="success"></div>
429 + <button type="submit" class="btn btn-custom btn-lg">Send Message</button>
430 + </form>
431 + </div>
432 + </div>
433 +</div>
434 +<div id="footer">
435 + <div class="container text-center">
436 + <div class="col-md-4">
437 + <h3>Address</h3>
438 + <div class="contact-item">
439 + <p>4321 California St,</p>
440 + <p>San Francisco, CA 12345</p>
441 + </div>
442 + </div>
443 + <div class="col-md-4">
444 + <h3>Opening Hours</h3>
445 + <div class="contact-item">
446 + <p>Mon-Thurs: 10:00 AM - 11:00 PM</p>
447 + <p>Fri-Sun: 11:00 AM - 02:00 AM</p>
448 + </div>
449 + </div>
450 + <div class="col-md-4">
451 + <h3>Contact Info</h3>
452 + <div class="contact-item">
453 + <p>Phone: +1 123 456 1234</p>
454 + <p>Email: info@company.com</p>
455 + </div>
456 + </div>
457 + </div>
458 + <div class="container-fluid text-center copyrights">
459 + <div class="col-md-8 col-md-offset-2">
460 + <div class="social">
461 + <ul>
462 + <li><a href="#"><i class="fa fa-facebook"></i></a></li>
463 + <li><a href="#"><i class="fa fa-twitter"></i></a></li>
464 + <li><a href="#"><i class="fa fa-google-plus"></i></a></li>
465 + </ul>
466 + </div>
467 + <p>&copy; 2016 Touché. All rights reserved. Designed by <a href="http://www.templatewire.com" rel="nofollow">TemplateWire</a></p>
468 + </div>
469 + </div>
470 +</div>
471 +<script type="text/javascript" src="js/jquery.1.11.1.js"></script>
472 +<script type="text/javascript" src="js/bootstrap.js"></script>
473 +<script type="text/javascript" src="js/SmoothScroll.js"></script>
474 +<script type="text/javascript" src="js/nivo-lightbox.js"></script>
475 +<script type="text/javascript" src="js/jquery.isotope.js"></script>
476 +<script type="text/javascript" src="js/jqBootstrapValidation.js"></script>
477 +<script type="text/javascript" src="js/contact_me.js"></script>
478 +<script type="text/javascript" src="js/main.js"></script>
479 +</body>
480 +</html>
1 +/* jqBootstrapValidation
2 + * A plugin for automating validation on Twitter Bootstrap formatted forms.
3 + *
4 + * v1.3.6
5 + *
6 + * License: MIT <http://opensource.org/licenses/mit-license.php> - see LICENSE file
7 + *
8 + * http://ReactiveRaven.github.com/jqBootstrapValidation/
9 + */
10 +
11 +(function( $ ){
12 +
13 + var createdElements = [];
14 +
15 + var defaults = {
16 + options: {
17 + prependExistingHelpBlock: false,
18 + sniffHtml: true, // sniff for 'required', 'maxlength', etc
19 + preventSubmit: true, // stop the form submit event from firing if validation fails
20 + submitError: false, // function called if there is an error when trying to submit
21 + submitSuccess: false, // function called just before a successful submit event is sent to the server
22 + semanticallyStrict: false, // set to true to tidy up generated HTML output
23 + autoAdd: {
24 + helpBlocks: true
25 + },
26 + filter: function () {
27 + // return $(this).is(":visible"); // only validate elements you can see
28 + return true; // validate everything
29 + }
30 + },
31 + methods: {
32 + init : function( options ) {
33 +
34 + var settings = $.extend(true, {}, defaults);
35 +
36 + settings.options = $.extend(true, settings.options, options);
37 +
38 + var $siblingElements = this;
39 +
40 + var uniqueForms = $.unique(
41 + $siblingElements.map( function () {
42 + return $(this).parents("form")[0];
43 + }).toArray()
44 + );
45 +
46 + $(uniqueForms).bind("submit", function (e) {
47 + var $form = $(this);
48 + var warningsFound = 0;
49 + var $inputs = $form.find("input,textarea,select").not("[type=submit],[type=image]").filter(settings.options.filter);
50 + $inputs.trigger("submit.validation").trigger("validationLostFocus.validation");
51 +
52 + $inputs.each(function (i, el) {
53 + var $this = $(el),
54 + $controlGroup = $this.parents(".form-group").first();
55 + if (
56 + $controlGroup.hasClass("warning")
57 + ) {
58 + $controlGroup.removeClass("warning").addClass("error");
59 + warningsFound++;
60 + }
61 + });
62 +
63 + $inputs.trigger("validationLostFocus.validation");
64 +
65 + if (warningsFound) {
66 + if (settings.options.preventSubmit) {
67 + e.preventDefault();
68 + }
69 + $form.addClass("error");
70 + if ($.isFunction(settings.options.submitError)) {
71 + settings.options.submitError($form, e, $inputs.jqBootstrapValidation("collectErrors", true));
72 + }
73 + } else {
74 + $form.removeClass("error");
75 + if ($.isFunction(settings.options.submitSuccess)) {
76 + settings.options.submitSuccess($form, e);
77 + }
78 + }
79 + });
80 +
81 + return this.each(function(){
82 +
83 + // Get references to everything we're interested in
84 + var $this = $(this),
85 + $controlGroup = $this.parents(".form-group").first(),
86 + $helpBlock = $controlGroup.find(".help-block").first(),
87 + $form = $this.parents("form").first(),
88 + validatorNames = [];
89 +
90 + // create message container if not exists
91 + if (!$helpBlock.length && settings.options.autoAdd && settings.options.autoAdd.helpBlocks) {
92 + $helpBlock = $('<div class="help-block" />');
93 + $controlGroup.find('.controls').append($helpBlock);
94 + createdElements.push($helpBlock[0]);
95 + }
96 +
97 + // =============================================================
98 + // SNIFF HTML FOR VALIDATORS
99 + // =============================================================
100 +
101 + // *snort sniff snuffle*
102 +
103 + if (settings.options.sniffHtml) {
104 + var message = "";
105 + // ---------------------------------------------------------
106 + // PATTERN
107 + // ---------------------------------------------------------
108 + if ($this.attr("pattern") !== undefined) {
109 + message = "Not in the expected format<!-- data-validation-pattern-message to override -->";
110 + if ($this.data("validationPatternMessage")) {
111 + message = $this.data("validationPatternMessage");
112 + }
113 + $this.data("validationPatternMessage", message);
114 + $this.data("validationPatternRegex", $this.attr("pattern"));
115 + }
116 + // ---------------------------------------------------------
117 + // MAX
118 + // ---------------------------------------------------------
119 + if ($this.attr("max") !== undefined || $this.attr("aria-valuemax") !== undefined) {
120 + var max = ($this.attr("max") !== undefined ? $this.attr("max") : $this.attr("aria-valuemax"));
121 + message = "Too high: Maximum of '" + max + "'<!-- data-validation-max-message to override -->";
122 + if ($this.data("validationMaxMessage")) {
123 + message = $this.data("validationMaxMessage");
124 + }
125 + $this.data("validationMaxMessage", message);
126 + $this.data("validationMaxMax", max);
127 + }
128 + // ---------------------------------------------------------
129 + // MIN
130 + // ---------------------------------------------------------
131 + if ($this.attr("min") !== undefined || $this.attr("aria-valuemin") !== undefined) {
132 + var min = ($this.attr("min") !== undefined ? $this.attr("min") : $this.attr("aria-valuemin"));
133 + message = "Too low: Minimum of '" + min + "'<!-- data-validation-min-message to override -->";
134 + if ($this.data("validationMinMessage")) {
135 + message = $this.data("validationMinMessage");
136 + }
137 + $this.data("validationMinMessage", message);
138 + $this.data("validationMinMin", min);
139 + }
140 + // ---------------------------------------------------------
141 + // MAXLENGTH
142 + // ---------------------------------------------------------
143 + if ($this.attr("maxlength") !== undefined) {
144 + message = "Too long: Maximum of '" + $this.attr("maxlength") + "' characters<!-- data-validation-maxlength-message to override -->";
145 + if ($this.data("validationMaxlengthMessage")) {
146 + message = $this.data("validationMaxlengthMessage");
147 + }
148 + $this.data("validationMaxlengthMessage", message);
149 + $this.data("validationMaxlengthMaxlength", $this.attr("maxlength"));
150 + }
151 + // ---------------------------------------------------------
152 + // MINLENGTH
153 + // ---------------------------------------------------------
154 + if ($this.attr("minlength") !== undefined) {
155 + message = "Too short: Minimum of '" + $this.attr("minlength") + "' characters<!-- data-validation-minlength-message to override -->";
156 + if ($this.data("validationMinlengthMessage")) {
157 + message = $this.data("validationMinlengthMessage");
158 + }
159 + $this.data("validationMinlengthMessage", message);
160 + $this.data("validationMinlengthMinlength", $this.attr("minlength"));
161 + }
162 + // ---------------------------------------------------------
163 + // REQUIRED
164 + // ---------------------------------------------------------
165 + if ($this.attr("required") !== undefined || $this.attr("aria-required") !== undefined) {
166 + message = settings.builtInValidators.required.message;
167 + if ($this.data("validationRequiredMessage")) {
168 + message = $this.data("validationRequiredMessage");
169 + }
170 + $this.data("validationRequiredMessage", message);
171 + }
172 + // ---------------------------------------------------------
173 + // NUMBER
174 + // ---------------------------------------------------------
175 + if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "number") {
176 + message = settings.builtInValidators.number.message;
177 + if ($this.data("validationNumberMessage")) {
178 + message = $this.data("validationNumberMessage");
179 + }
180 + $this.data("validationNumberMessage", message);
181 + }
182 + // ---------------------------------------------------------
183 + // EMAIL
184 + // ---------------------------------------------------------
185 + if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "email") {
186 + message = "Not a valid email address<!-- data-validator-validemail-message to override -->";
187 + if ($this.data("validationValidemailMessage")) {
188 + message = $this.data("validationValidemailMessage");
189 + } else if ($this.data("validationEmailMessage")) {
190 + message = $this.data("validationEmailMessage");
191 + }
192 + $this.data("validationValidemailMessage", message);
193 + }
194 + // ---------------------------------------------------------
195 + // MINCHECKED
196 + // ---------------------------------------------------------
197 + if ($this.attr("minchecked") !== undefined) {
198 + message = "Not enough options checked; Minimum of '" + $this.attr("minchecked") + "' required<!-- data-validation-minchecked-message to override -->";
199 + if ($this.data("validationMincheckedMessage")) {
200 + message = $this.data("validationMincheckedMessage");
201 + }
202 + $this.data("validationMincheckedMessage", message);
203 + $this.data("validationMincheckedMinchecked", $this.attr("minchecked"));
204 + }
205 + // ---------------------------------------------------------
206 + // MAXCHECKED
207 + // ---------------------------------------------------------
208 + if ($this.attr("maxchecked") !== undefined) {
209 + message = "Too many options checked; Maximum of '" + $this.attr("maxchecked") + "' required<!-- data-validation-maxchecked-message to override -->";
210 + if ($this.data("validationMaxcheckedMessage")) {
211 + message = $this.data("validationMaxcheckedMessage");
212 + }
213 + $this.data("validationMaxcheckedMessage", message);
214 + $this.data("validationMaxcheckedMaxchecked", $this.attr("maxchecked"));
215 + }
216 + }
217 +
218 + // =============================================================
219 + // COLLECT VALIDATOR NAMES
220 + // =============================================================
221 +
222 + // Get named validators
223 + if ($this.data("validation") !== undefined) {
224 + validatorNames = $this.data("validation").split(",");
225 + }
226 +
227 + // Get extra ones defined on the element's data attributes
228 + $.each($this.data(), function (i, el) {
229 + var parts = i.replace(/([A-Z])/g, ",$1").split(",");
230 + if (parts[0] === "validation" && parts[1]) {
231 + validatorNames.push(parts[1]);
232 + }
233 + });
234 +
235 + // =============================================================
236 + // NORMALISE VALIDATOR NAMES
237 + // =============================================================
238 +
239 + var validatorNamesToInspect = validatorNames;
240 + var newValidatorNamesToInspect = [];
241 +
242 + do // repeatedly expand 'shortcut' validators into their real validators
243 + {
244 + // Uppercase only the first letter of each name
245 + $.each(validatorNames, function (i, el) {
246 + validatorNames[i] = formatValidatorName(el);
247 + });
248 +
249 + // Remove duplicate validator names
250 + validatorNames = $.unique(validatorNames);
251 +
252 + // Pull out the new validator names from each shortcut
253 + newValidatorNamesToInspect = [];
254 + $.each(validatorNamesToInspect, function(i, el) {
255 + if ($this.data("validation" + el + "Shortcut") !== undefined) {
256 + // Are these custom validators?
257 + // Pull them out!
258 + $.each($this.data("validation" + el + "Shortcut").split(","), function(i2, el2) {
259 + newValidatorNamesToInspect.push(el2);
260 + });
261 + } else if (settings.builtInValidators[el.toLowerCase()]) {
262 + // Is this a recognised built-in?
263 + // Pull it out!
264 + var validator = settings.builtInValidators[el.toLowerCase()];
265 + if (validator.type.toLowerCase() === "shortcut") {
266 + $.each(validator.shortcut.split(","), function (i, el) {
267 + el = formatValidatorName(el);
268 + newValidatorNamesToInspect.push(el);
269 + validatorNames.push(el);
270 + });
271 + }
272 + }
273 + });
274 +
275 + validatorNamesToInspect = newValidatorNamesToInspect;
276 +
277 + } while (validatorNamesToInspect.length > 0)
278 +
279 + // =============================================================
280 + // SET UP VALIDATOR ARRAYS
281 + // =============================================================
282 +
283 + var validators = {};
284 +
285 + $.each(validatorNames, function (i, el) {
286 + // Set up the 'override' message
287 + var message = $this.data("validation" + el + "Message");
288 + var hasOverrideMessage = (message !== undefined);
289 + var foundValidator = false;
290 + message =
291 + (
292 + message
293 + ? message
294 + : "'" + el + "' validation failed <!-- Add attribute 'data-validation-" + el.toLowerCase() + "-message' to input to change this message -->"
295 + )
296 + ;
297 +
298 + $.each(
299 + settings.validatorTypes,
300 + function (validatorType, validatorTemplate) {
301 + if (validators[validatorType] === undefined) {
302 + validators[validatorType] = [];
303 + }
304 + if (!foundValidator && $this.data("validation" + el + formatValidatorName(validatorTemplate.name)) !== undefined) {
305 + validators[validatorType].push(
306 + $.extend(
307 + true,
308 + {
309 + name: formatValidatorName(validatorTemplate.name),
310 + message: message
311 + },
312 + validatorTemplate.init($this, el)
313 + )
314 + );
315 + foundValidator = true;
316 + }
317 + }
318 + );
319 +
320 + if (!foundValidator && settings.builtInValidators[el.toLowerCase()]) {
321 +
322 + var validator = $.extend(true, {}, settings.builtInValidators[el.toLowerCase()]);
323 + if (hasOverrideMessage) {
324 + validator.message = message;
325 + }
326 + var validatorType = validator.type.toLowerCase();
327 +
328 + if (validatorType === "shortcut") {
329 + foundValidator = true;
330 + } else {
331 + $.each(
332 + settings.validatorTypes,
333 + function (validatorTemplateType, validatorTemplate) {
334 + if (validators[validatorTemplateType] === undefined) {
335 + validators[validatorTemplateType] = [];
336 + }
337 + if (!foundValidator && validatorType === validatorTemplateType.toLowerCase()) {
338 + $this.data("validation" + el + formatValidatorName(validatorTemplate.name), validator[validatorTemplate.name.toLowerCase()]);
339 + validators[validatorType].push(
340 + $.extend(
341 + validator,
342 + validatorTemplate.init($this, el)
343 + )
344 + );
345 + foundValidator = true;
346 + }
347 + }
348 + );
349 + }
350 + }
351 +
352 + if (! foundValidator) {
353 + $.error("Cannot find validation info for '" + el + "'");
354 + }
355 + });
356 +
357 + // =============================================================
358 + // STORE FALLBACK VALUES
359 + // =============================================================
360 +
361 + $helpBlock.data(
362 + "original-contents",
363 + (
364 + $helpBlock.data("original-contents")
365 + ? $helpBlock.data("original-contents")
366 + : $helpBlock.html()
367 + )
368 + );
369 +
370 + $helpBlock.data(
371 + "original-role",
372 + (
373 + $helpBlock.data("original-role")
374 + ? $helpBlock.data("original-role")
375 + : $helpBlock.attr("role")
376 + )
377 + );
378 +
379 + $controlGroup.data(
380 + "original-classes",
381 + (
382 + $controlGroup.data("original-clases")
383 + ? $controlGroup.data("original-classes")
384 + : $controlGroup.attr("class")
385 + )
386 + );
387 +
388 + $this.data(
389 + "original-aria-invalid",
390 + (
391 + $this.data("original-aria-invalid")
392 + ? $this.data("original-aria-invalid")
393 + : $this.attr("aria-invalid")
394 + )
395 + );
396 +
397 + // =============================================================
398 + // VALIDATION
399 + // =============================================================
400 +
401 + $this.bind(
402 + "validation.validation",
403 + function (event, params) {
404 +
405 + var value = getValue($this);
406 +
407 + // Get a list of the errors to apply
408 + var errorsFound = [];
409 +
410 + $.each(validators, function (validatorType, validatorTypeArray) {
411 + if (value || value.length || (params && params.includeEmpty) || (!!settings.validatorTypes[validatorType].blockSubmit && params && !!params.submitting)) {
412 + $.each(validatorTypeArray, function (i, validator) {
413 + if (settings.validatorTypes[validatorType].validate($this, value, validator)) {
414 + errorsFound.push(validator.message);
415 + }
416 + });
417 + }
418 + });
419 +
420 + return errorsFound;
421 + }
422 + );
423 +
424 + $this.bind(
425 + "getValidators.validation",
426 + function () {
427 + return validators;
428 + }
429 + );
430 +
431 + // =============================================================
432 + // WATCH FOR CHANGES
433 + // =============================================================
434 + $this.bind(
435 + "submit.validation",
436 + function () {
437 + return $this.triggerHandler("change.validation", {submitting: true});
438 + }
439 + );
440 + $this.bind(
441 + [
442 + "keyup",
443 + "focus",
444 + "blur",
445 + "click",
446 + "keydown",
447 + "keypress",
448 + "change"
449 + ].join(".validation ") + ".validation",
450 + function (e, params) {
451 +
452 + var value = getValue($this);
453 +
454 + var errorsFound = [];
455 +
456 + $controlGroup.find("input,textarea,select").each(function (i, el) {
457 + var oldCount = errorsFound.length;
458 + $.each($(el).triggerHandler("validation.validation", params), function (j, message) {
459 + errorsFound.push(message);
460 + });
461 + if (errorsFound.length > oldCount) {
462 + $(el).attr("aria-invalid", "true");
463 + } else {
464 + var original = $this.data("original-aria-invalid");
465 + $(el).attr("aria-invalid", (original !== undefined ? original : false));
466 + }
467 + });
468 +
469 + $form.find("input,select,textarea").not($this).not("[name=\"" + $this.attr("name") + "\"]").trigger("validationLostFocus.validation");
470 +
471 + errorsFound = $.unique(errorsFound.sort());
472 +
473 + // Were there any errors?
474 + if (errorsFound.length) {
475 + // Better flag it up as a warning.
476 + $controlGroup.removeClass("success error").addClass("warning");
477 +
478 + // How many errors did we find?
479 + if (settings.options.semanticallyStrict && errorsFound.length === 1) {
480 + // Only one? Being strict? Just output it.
481 + $helpBlock.html(errorsFound[0] +
482 + ( settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : "" ));
483 + } else {
484 + // Multiple? Being sloppy? Glue them together into an UL.
485 + $helpBlock.html("<ul role=\"alert\"><li>" + errorsFound.join("</li><li>") + "</li></ul>" +
486 + ( settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : "" ));
487 + }
488 + } else {
489 + $controlGroup.removeClass("warning error success");
490 + if (value.length > 0) {
491 + $controlGroup.addClass("success");
492 + }
493 + $helpBlock.html($helpBlock.data("original-contents"));
494 + }
495 +
496 + if (e.type === "blur") {
497 + $controlGroup.removeClass("success");
498 + }
499 + }
500 + );
501 + $this.bind("validationLostFocus.validation", function () {
502 + $controlGroup.removeClass("success");
503 + });
504 + });
505 + },
506 + destroy : function( ) {
507 +
508 + return this.each(
509 + function() {
510 +
511 + var
512 + $this = $(this),
513 + $controlGroup = $this.parents(".form-group").first(),
514 + $helpBlock = $controlGroup.find(".help-block").first();
515 +
516 + // remove our events
517 + $this.unbind('.validation'); // events are namespaced.
518 + // reset help text
519 + $helpBlock.html($helpBlock.data("original-contents"));
520 + // reset classes
521 + $controlGroup.attr("class", $controlGroup.data("original-classes"));
522 + // reset aria
523 + $this.attr("aria-invalid", $this.data("original-aria-invalid"));
524 + // reset role
525 + $helpBlock.attr("role", $this.data("original-role"));
526 + // remove all elements we created
527 + if (createdElements.indexOf($helpBlock[0]) > -1) {
528 + $helpBlock.remove();
529 + }
530 +
531 + }
532 + );
533 +
534 + },
535 + collectErrors : function(includeEmpty) {
536 +
537 + var errorMessages = {};
538 + this.each(function (i, el) {
539 + var $el = $(el);
540 + var name = $el.attr("name");
541 + var errors = $el.triggerHandler("validation.validation", {includeEmpty: true});
542 + errorMessages[name] = $.extend(true, errors, errorMessages[name]);
543 + });
544 +
545 + $.each(errorMessages, function (i, el) {
546 + if (el.length === 0) {
547 + delete errorMessages[i];
548 + }
549 + });
550 +
551 + return errorMessages;
552 +
553 + },
554 + hasErrors: function() {
555 +
556 + var errorMessages = [];
557 +
558 + this.each(function (i, el) {
559 + errorMessages = errorMessages.concat(
560 + $(el).triggerHandler("getValidators.validation") ? $(el).triggerHandler("validation.validation", {submitting: true}) : []
561 + );
562 + });
563 +
564 + return (errorMessages.length > 0);
565 + },
566 + override : function (newDefaults) {
567 + defaults = $.extend(true, defaults, newDefaults);
568 + }
569 + },
570 + validatorTypes: {
571 + callback: {
572 + name: "callback",
573 + init: function ($this, name) {
574 + return {
575 + validatorName: name,
576 + callback: $this.data("validation" + name + "Callback"),
577 + lastValue: $this.val(),
578 + lastValid: true,
579 + lastFinished: true
580 + };
581 + },
582 + validate: function ($this, value, validator) {
583 + if (validator.lastValue === value && validator.lastFinished) {
584 + return !validator.lastValid;
585 + }
586 +
587 + if (validator.lastFinished === true)
588 + {
589 + validator.lastValue = value;
590 + validator.lastValid = true;
591 + validator.lastFinished = false;
592 +
593 + var rrjqbvValidator = validator;
594 + var rrjqbvThis = $this;
595 + executeFunctionByName(
596 + validator.callback,
597 + window,
598 + $this,
599 + value,
600 + function (data) {
601 + if (rrjqbvValidator.lastValue === data.value) {
602 + rrjqbvValidator.lastValid = data.valid;
603 + if (data.message) {
604 + rrjqbvValidator.message = data.message;
605 + }
606 + rrjqbvValidator.lastFinished = true;
607 + rrjqbvThis.data("validation" + rrjqbvValidator.validatorName + "Message", rrjqbvValidator.message);
608 + // Timeout is set to avoid problems with the events being considered 'already fired'
609 + setTimeout(function () {
610 + rrjqbvThis.trigger("change.validation");
611 + }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
612 + }
613 + }
614 + );
615 + }
616 +
617 + return false;
618 +
619 + }
620 + },
621 + ajax: {
622 + name: "ajax",
623 + init: function ($this, name) {
624 + return {
625 + validatorName: name,
626 + url: $this.data("validation" + name + "Ajax"),
627 + lastValue: $this.val(),
628 + lastValid: true,
629 + lastFinished: true
630 + };
631 + },
632 + validate: function ($this, value, validator) {
633 + if (""+validator.lastValue === ""+value && validator.lastFinished === true) {
634 + return validator.lastValid === false;
635 + }
636 +
637 + if (validator.lastFinished === true)
638 + {
639 + validator.lastValue = value;
640 + validator.lastValid = true;
641 + validator.lastFinished = false;
642 + $.ajax({
643 + url: validator.url,
644 + data: "value=" + value + "&field=" + $this.attr("name"),
645 + dataType: "json",
646 + success: function (data) {
647 + if (""+validator.lastValue === ""+data.value) {
648 + validator.lastValid = !!(data.valid);
649 + if (data.message) {
650 + validator.message = data.message;
651 + }
652 + validator.lastFinished = true;
653 + $this.data("validation" + validator.validatorName + "Message", validator.message);
654 + // Timeout is set to avoid problems with the events being considered 'already fired'
655 + setTimeout(function () {
656 + $this.trigger("change.validation");
657 + }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
658 + }
659 + },
660 + failure: function () {
661 + validator.lastValid = true;
662 + validator.message = "ajax call failed";
663 + validator.lastFinished = true;
664 + $this.data("validation" + validator.validatorName + "Message", validator.message);
665 + // Timeout is set to avoid problems with the events being considered 'already fired'
666 + setTimeout(function () {
667 + $this.trigger("change.validation");
668 + }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
669 + }
670 + });
671 + }
672 +
673 + return false;
674 +
675 + }
676 + },
677 + regex: {
678 + name: "regex",
679 + init: function ($this, name) {
680 + return {regex: regexFromString($this.data("validation" + name + "Regex"))};
681 + },
682 + validate: function ($this, value, validator) {
683 + return (!validator.regex.test(value) && ! validator.negative)
684 + || (validator.regex.test(value) && validator.negative);
685 + }
686 + },
687 + required: {
688 + name: "required",
689 + init: function ($this, name) {
690 + return {};
691 + },
692 + validate: function ($this, value, validator) {
693 + return !!(value.length === 0 && ! validator.negative)
694 + || !!(value.length > 0 && validator.negative);
695 + },
696 + blockSubmit: true
697 + },
698 + match: {
699 + name: "match",
700 + init: function ($this, name) {
701 + var element = $this.parents("form").first().find("[name=\"" + $this.data("validation" + name + "Match") + "\"]").first();
702 + element.bind("validation.validation", function () {
703 + $this.trigger("change.validation", {submitting: true});
704 + });
705 + return {"element": element};
706 + },
707 + validate: function ($this, value, validator) {
708 + return (value !== validator.element.val() && ! validator.negative)
709 + || (value === validator.element.val() && validator.negative);
710 + },
711 + blockSubmit: true
712 + },
713 + max: {
714 + name: "max",
715 + init: function ($this, name) {
716 + return {max: $this.data("validation" + name + "Max")};
717 + },
718 + validate: function ($this, value, validator) {
719 + return (parseFloat(value, 10) > parseFloat(validator.max, 10) && ! validator.negative)
720 + || (parseFloat(value, 10) <= parseFloat(validator.max, 10) && validator.negative);
721 + }
722 + },
723 + min: {
724 + name: "min",
725 + init: function ($this, name) {
726 + return {min: $this.data("validation" + name + "Min")};
727 + },
728 + validate: function ($this, value, validator) {
729 + return (parseFloat(value) < parseFloat(validator.min) && ! validator.negative)
730 + || (parseFloat(value) >= parseFloat(validator.min) && validator.negative);
731 + }
732 + },
733 + maxlength: {
734 + name: "maxlength",
735 + init: function ($this, name) {
736 + return {maxlength: $this.data("validation" + name + "Maxlength")};
737 + },
738 + validate: function ($this, value, validator) {
739 + return ((value.length > validator.maxlength) && ! validator.negative)
740 + || ((value.length <= validator.maxlength) && validator.negative);
741 + }
742 + },
743 + minlength: {
744 + name: "minlength",
745 + init: function ($this, name) {
746 + return {minlength: $this.data("validation" + name + "Minlength")};
747 + },
748 + validate: function ($this, value, validator) {
749 + return ((value.length < validator.minlength) && ! validator.negative)
750 + || ((value.length >= validator.minlength) && validator.negative);
751 + }
752 + },
753 + maxchecked: {
754 + name: "maxchecked",
755 + init: function ($this, name) {
756 + var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
757 + elements.bind("click.validation", function () {
758 + $this.trigger("change.validation", {includeEmpty: true});
759 + });
760 + return {maxchecked: $this.data("validation" + name + "Maxchecked"), elements: elements};
761 + },
762 + validate: function ($this, value, validator) {
763 + return (validator.elements.filter(":checked").length > validator.maxchecked && ! validator.negative)
764 + || (validator.elements.filter(":checked").length <= validator.maxchecked && validator.negative);
765 + },
766 + blockSubmit: true
767 + },
768 + minchecked: {
769 + name: "minchecked",
770 + init: function ($this, name) {
771 + var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
772 + elements.bind("click.validation", function () {
773 + $this.trigger("change.validation", {includeEmpty: true});
774 + });
775 + return {minchecked: $this.data("validation" + name + "Minchecked"), elements: elements};
776 + },
777 + validate: function ($this, value, validator) {
778 + return (validator.elements.filter(":checked").length < validator.minchecked && ! validator.negative)
779 + || (validator.elements.filter(":checked").length >= validator.minchecked && validator.negative);
780 + },
781 + blockSubmit: true
782 + }
783 + },
784 + builtInValidators: {
785 + email: {
786 + name: "Email",
787 + type: "shortcut",
788 + shortcut: "validemail"
789 + },
790 + validemail: {
791 + name: "Validemail",
792 + type: "regex",
793 + regex: "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\.[A-Za-z]{2,4}",
794 + message: "Not a valid email address<!-- data-validator-validemail-message to override -->"
795 + },
796 + passwordagain: {
797 + name: "Passwordagain",
798 + type: "match",
799 + match: "password",
800 + message: "Does not match the given password<!-- data-validator-paswordagain-message to override -->"
801 + },
802 + positive: {
803 + name: "Positive",
804 + type: "shortcut",
805 + shortcut: "number,positivenumber"
806 + },
807 + negative: {
808 + name: "Negative",
809 + type: "shortcut",
810 + shortcut: "number,negativenumber"
811 + },
812 + number: {
813 + name: "Number",
814 + type: "regex",
815 + regex: "([+-]?\\\d+(\\\.\\\d*)?([eE][+-]?[0-9]+)?)?",
816 + message: "Must be a number<!-- data-validator-number-message to override -->"
817 + },
818 + integer: {
819 + name: "Integer",
820 + type: "regex",
821 + regex: "[+-]?\\\d+",
822 + message: "No decimal places allowed<!-- data-validator-integer-message to override -->"
823 + },
824 + positivenumber: {
825 + name: "Positivenumber",
826 + type: "min",
827 + min: 0,
828 + message: "Must be a positive number<!-- data-validator-positivenumber-message to override -->"
829 + },
830 + negativenumber: {
831 + name: "Negativenumber",
832 + type: "max",
833 + max: 0,
834 + message: "Must be a negative number<!-- data-validator-negativenumber-message to override -->"
835 + },
836 + required: {
837 + name: "Required",
838 + type: "required",
839 + message: "This is required<!-- data-validator-required-message to override -->"
840 + },
841 + checkone: {
842 + name: "Checkone",
843 + type: "minchecked",
844 + minchecked: 1,
845 + message: "Check at least one option<!-- data-validation-checkone-message to override -->"
846 + }
847 + }
848 + };
849 +
850 + var formatValidatorName = function (name) {
851 + return name
852 + .toLowerCase()
853 + .replace(
854 + /(^|\s)([a-z])/g ,
855 + function(m,p1,p2) {
856 + return p1+p2.toUpperCase();
857 + }
858 + )
859 + ;
860 + };
861 +
862 + var getValue = function ($this) {
863 + // Extract the value we're talking about
864 + var value = $this.val();
865 + var type = $this.attr("type");
866 + if (type === "checkbox") {
867 + value = ($this.is(":checked") ? value : "");
868 + }
869 + if (type === "radio") {
870 + value = ($('input[name="' + $this.attr("name") + '"]:checked').length > 0 ? value : "");
871 + }
872 + return value;
873 + };
874 +
875 + function regexFromString(inputstring) {
876 + return new RegExp("^" + inputstring + "$");
877 + }
878 +
879 + /**
880 + * Thanks to Jason Bunting via StackOverflow.com
881 + *
882 + * http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string#answer-359910
883 + * Short link: http://tinyurl.com/executeFunctionByName
884 + **/
885 + function executeFunctionByName(functionName, context /*, args*/) {
886 + var args = Array.prototype.slice.call(arguments).splice(2);
887 + var namespaces = functionName.split(".");
888 + var func = namespaces.pop();
889 + for(var i = 0; i < namespaces.length; i++) {
890 + context = context[namespaces[i]];
891 + }
892 + return context[func].apply(this, args);
893 + }
894 +
895 + $.fn.jqBootstrapValidation = function( method ) {
896 +
897 + if ( defaults.methods[method] ) {
898 + return defaults.methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
899 + } else if ( typeof method === 'object' || ! method ) {
900 + return defaults.methods.init.apply( this, arguments );
901 + } else {
902 + $.error( 'Method ' + method + ' does not exist on jQuery.jqBootstrapValidation' );
903 + return null;
904 + }
905 +
906 + };
907 +
908 + $.jqBootstrapValidation = function (options) {
909 + $(":input").not("[type=image],[type=submit]").jqBootstrapValidation.apply(this,arguments);
910 + };
911 +
912 +})( jQuery );
1 +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
2 +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
3 +if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
4 +},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.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 contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
...\ No newline at end of file ...\ No newline at end of file
1 +/**
2 + * Isotope v1.5.25
3 + * An exquisite jQuery plugin for magical layouts
4 + * http://isotope.metafizzy.co
5 + *
6 + * Commercial use requires one-time license fee
7 + * http://metafizzy.co/#licenses
8 + *
9 + * Copyright 2012 David DeSandro / Metafizzy
10 + */
11 +
12 +/*jshint asi: true, browser: true, curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, strict: true, undef: true */
13 +/*global jQuery: false */
14 +
15 +(function( window, $, undefined ){
16 +
17 + 'use strict';
18 +
19 + // get global vars
20 + var document = window.document;
21 + var Modernizr = window.Modernizr;
22 +
23 + // helper function
24 + var capitalize = function( str ) {
25 + return str.charAt(0).toUpperCase() + str.slice(1);
26 + };
27 +
28 + // ========================= getStyleProperty by kangax ===============================
29 + // http://perfectionkills.com/feature-testing-css-properties/
30 +
31 + var prefixes = 'Moz Webkit O Ms'.split(' ');
32 +
33 + var getStyleProperty = function( propName ) {
34 + var style = document.documentElement.style,
35 + prefixed;
36 +
37 + // test standard property first
38 + if ( typeof style[propName] === 'string' ) {
39 + return propName;
40 + }
41 +
42 + // capitalize
43 + propName = capitalize( propName );
44 +
45 + // test vendor specific properties
46 + for ( var i=0, len = prefixes.length; i < len; i++ ) {
47 + prefixed = prefixes[i] + propName;
48 + if ( typeof style[ prefixed ] === 'string' ) {
49 + return prefixed;
50 + }
51 + }
52 + };
53 +
54 + var transformProp = getStyleProperty('transform'),
55 + transitionProp = getStyleProperty('transitionProperty');
56 +
57 +
58 + // ========================= miniModernizr ===============================
59 + // <3<3<3 and thanks to Faruk and Paul for doing the heavy lifting
60 +
61 + /*!
62 + * Modernizr v1.6ish: miniModernizr for Isotope
63 + * http://www.modernizr.com
64 + *
65 + * Developed by:
66 + * - Faruk Ates http://farukat.es/
67 + * - Paul Irish http://paulirish.com/
68 + *
69 + * Copyright (c) 2009-2010
70 + * Dual-licensed under the BSD or MIT licenses.
71 + * http://www.modernizr.com/license/
72 + */
73 +
74 + /*
75 + * This version whittles down the script just to check support for
76 + * CSS transitions, transforms, and 3D transforms.
77 + */
78 +
79 + var tests = {
80 + csstransforms: function() {
81 + return !!transformProp;
82 + },
83 +
84 + csstransforms3d: function() {
85 + var test = !!getStyleProperty('perspective');
86 + // double check for Chrome's false positive
87 + if ( test ) {
88 + var vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '),
89 + mediaQuery = '@media (' + vendorCSSPrefixes.join('transform-3d),(') + 'modernizr)',
90 + $style = $('<style>' + mediaQuery + '{#modernizr{height:3px}}' + '</style>')
91 + .appendTo('head'),
92 + $div = $('<div id="modernizr" />').appendTo('html');
93 +
94 + test = $div.height() === 3;
95 +
96 + $div.remove();
97 + $style.remove();
98 + }
99 + return test;
100 + },
101 +
102 + csstransitions: function() {
103 + return !!transitionProp;
104 + }
105 + };
106 +
107 + var testName;
108 +
109 + if ( Modernizr ) {
110 + // if there's a previous Modernzir, check if there are necessary tests
111 + for ( testName in tests) {
112 + if ( !Modernizr.hasOwnProperty( testName ) ) {
113 + // if test hasn't been run, use addTest to run it
114 + Modernizr.addTest( testName, tests[ testName ] );
115 + }
116 + }
117 + } else {
118 + // or create new mini Modernizr that just has the 3 tests
119 + Modernizr = window.Modernizr = {
120 + _version : '1.6ish: miniModernizr for Isotope'
121 + };
122 +
123 + var classes = ' ';
124 + var result;
125 +
126 + // Run through tests
127 + for ( testName in tests) {
128 + result = tests[ testName ]();
129 + Modernizr[ testName ] = result;
130 + classes += ' ' + ( result ? '' : 'no-' ) + testName;
131 + }
132 +
133 + // Add the new classes to the <html> element.
134 + $('html').addClass( classes );
135 + }
136 +
137 +
138 + // ========================= isoTransform ===============================
139 +
140 + /**
141 + * provides hooks for .css({ scale: value, translate: [x, y] })
142 + * Progressively enhanced CSS transforms
143 + * Uses hardware accelerated 3D transforms for Safari
144 + * or falls back to 2D transforms.
145 + */
146 +
147 + if ( Modernizr.csstransforms ) {
148 +
149 + // i.e. transformFnNotations.scale(0.5) >> 'scale3d( 0.5, 0.5, 1)'
150 + var transformFnNotations = Modernizr.csstransforms3d ?
151 + { // 3D transform functions
152 + translate : function ( position ) {
153 + return 'translate3d(' + position[0] + 'px, ' + position[1] + 'px, 0) ';
154 + },
155 + scale : function ( scale ) {
156 + return 'scale3d(' + scale + ', ' + scale + ', 1) ';
157 + }
158 + } :
159 + { // 2D transform functions
160 + translate : function ( position ) {
161 + return 'translate(' + position[0] + 'px, ' + position[1] + 'px) ';
162 + },
163 + scale : function ( scale ) {
164 + return 'scale(' + scale + ') ';
165 + }
166 + }
167 + ;
168 +
169 + var setIsoTransform = function ( elem, name, value ) {
170 + // unpack current transform data
171 + var data = $.data( elem, 'isoTransform' ) || {},
172 + newData = {},
173 + fnName,
174 + transformObj = {},
175 + transformValue;
176 +
177 + // i.e. newData.scale = 0.5
178 + newData[ name ] = value;
179 + // extend new value over current data
180 + $.extend( data, newData );
181 +
182 + for ( fnName in data ) {
183 + transformValue = data[ fnName ];
184 + transformObj[ fnName ] = transformFnNotations[ fnName ]( transformValue );
185 + }
186 +
187 + // get proper order
188 + // ideally, we could loop through this give an array, but since we only have
189 + // a couple transforms we're keeping track of, we'll do it like so
190 + var translateFn = transformObj.translate || '',
191 + scaleFn = transformObj.scale || '',
192 + // sorting so translate always comes first
193 + valueFns = translateFn + scaleFn;
194 +
195 + // set data back in elem
196 + $.data( elem, 'isoTransform', data );
197 +
198 + // set name to vendor specific property
199 + elem.style[ transformProp ] = valueFns;
200 + };
201 +
202 + // ==================== scale ===================
203 +
204 + $.cssNumber.scale = true;
205 +
206 + $.cssHooks.scale = {
207 + set: function( elem, value ) {
208 + // uncomment this bit if you want to properly parse strings
209 + // if ( typeof value === 'string' ) {
210 + // value = parseFloat( value );
211 + // }
212 + setIsoTransform( elem, 'scale', value );
213 + },
214 + get: function( elem, computed ) {
215 + var transform = $.data( elem, 'isoTransform' );
216 + return transform && transform.scale ? transform.scale : 1;
217 + }
218 + };
219 +
220 + $.fx.step.scale = function( fx ) {
221 + $.cssHooks.scale.set( fx.elem, fx.now+fx.unit );
222 + };
223 +
224 +
225 + // ==================== translate ===================
226 +
227 + $.cssNumber.translate = true;
228 +
229 + $.cssHooks.translate = {
230 + set: function( elem, value ) {
231 +
232 + // uncomment this bit if you want to properly parse strings
233 + // if ( typeof value === 'string' ) {
234 + // value = value.split(' ');
235 + // }
236 + //
237 + // var i, val;
238 + // for ( i = 0; i < 2; i++ ) {
239 + // val = value[i];
240 + // if ( typeof val === 'string' ) {
241 + // val = parseInt( val );
242 + // }
243 + // }
244 +
245 + setIsoTransform( elem, 'translate', value );
246 + },
247 +
248 + get: function( elem, computed ) {
249 + var transform = $.data( elem, 'isoTransform' );
250 + return transform && transform.translate ? transform.translate : [ 0, 0 ];
251 + }
252 + };
253 +
254 + }
255 +
256 + // ========================= get transition-end event ===============================
257 + var transitionEndEvent, transitionDurProp;
258 +
259 + if ( Modernizr.csstransitions ) {
260 + transitionEndEvent = {
261 + WebkitTransitionProperty: 'webkitTransitionEnd', // webkit
262 + MozTransitionProperty: 'transitionend',
263 + OTransitionProperty: 'oTransitionEnd otransitionend',
264 + transitionProperty: 'transitionend'
265 + }[ transitionProp ];
266 +
267 + transitionDurProp = getStyleProperty('transitionDuration');
268 + }
269 +
270 + // ========================= smartresize ===============================
271 +
272 + /*
273 + * smartresize: debounced resize event for jQuery
274 + *
275 + * latest version and complete README available on Github:
276 + * https://github.com/louisremi/jquery.smartresize.js
277 + *
278 + * Copyright 2011 @louis_remi
279 + * Licensed under the MIT license.
280 + */
281 +
282 + var $event = $.event,
283 + dispatchMethod = $.event.handle ? 'handle' : 'dispatch',
284 + resizeTimeout;
285 +
286 + $event.special.smartresize = {
287 + setup: function() {
288 + $(this).bind( "resize", $event.special.smartresize.handler );
289 + },
290 + teardown: function() {
291 + $(this).unbind( "resize", $event.special.smartresize.handler );
292 + },
293 + handler: function( event, execAsap ) {
294 + // Save the context
295 + var context = this,
296 + args = arguments;
297 +
298 + // set correct event type
299 + event.type = "smartresize";
300 +
301 + if ( resizeTimeout ) { clearTimeout( resizeTimeout ); }
302 + resizeTimeout = setTimeout(function() {
303 + $event[ dispatchMethod ].apply( context, args );
304 + }, execAsap === "execAsap"? 0 : 100 );
305 + }
306 + };
307 +
308 + $.fn.smartresize = function( fn ) {
309 + return fn ? this.bind( "smartresize", fn ) : this.trigger( "smartresize", ["execAsap"] );
310 + };
311 +
312 +
313 +
314 +// ========================= Isotope ===============================
315 +
316 +
317 + // our "Widget" object constructor
318 + $.Isotope = function( options, element, callback ){
319 + this.element = $( element );
320 +
321 + this._create( options );
322 + this._init( callback );
323 + };
324 +
325 + // styles of container element we want to keep track of
326 + var isoContainerStyles = [ 'width', 'height' ];
327 +
328 + var $window = $(window);
329 +
330 + $.Isotope.settings = {
331 + resizable: true,
332 + layoutMode : 'masonry',
333 + containerClass : 'isotope',
334 + itemClass : 'isotope-item',
335 + hiddenClass : 'isotope-hidden',
336 + hiddenStyle: { opacity: 0, scale: 0.001 },
337 + visibleStyle: { opacity: 1, scale: 1 },
338 + containerStyle: {
339 + position: 'relative',
340 + overflow: 'hidden'
341 + },
342 + animationEngine: 'best-available',
343 + animationOptions: {
344 + queue: false,
345 + duration: 800
346 + },
347 + sortBy : 'original-order',
348 + sortAscending : true,
349 + resizesContainer : true,
350 + transformsEnabled: true,
351 + itemPositionDataEnabled: false
352 + };
353 +
354 + $.Isotope.prototype = {
355 +
356 + // sets up widget
357 + _create : function( options ) {
358 +
359 + this.options = $.extend( {}, $.Isotope.settings, options );
360 +
361 + this.styleQueue = [];
362 + this.elemCount = 0;
363 +
364 + // get original styles in case we re-apply them in .destroy()
365 + var elemStyle = this.element[0].style;
366 + this.originalStyle = {};
367 + // keep track of container styles
368 + var containerStyles = isoContainerStyles.slice(0);
369 + for ( var prop in this.options.containerStyle ) {
370 + containerStyles.push( prop );
371 + }
372 + for ( var i=0, len = containerStyles.length; i < len; i++ ) {
373 + prop = containerStyles[i];
374 + this.originalStyle[ prop ] = elemStyle[ prop ] || '';
375 + }
376 + // apply container style from options
377 + this.element.css( this.options.containerStyle );
378 +
379 + this._updateAnimationEngine();
380 + this._updateUsingTransforms();
381 +
382 + // sorting
383 + var originalOrderSorter = {
384 + 'original-order' : function( $elem, instance ) {
385 + instance.elemCount ++;
386 + return instance.elemCount;
387 + },
388 + random : function() {
389 + return Math.random();
390 + }
391 + };
392 +
393 + this.options.getSortData = $.extend( this.options.getSortData, originalOrderSorter );
394 +
395 + // need to get atoms
396 + this.reloadItems();
397 +
398 + // get top left position of where the bricks should be
399 + this.offset = {
400 + left: parseInt( ( this.element.css('padding-left') || 0 ), 10 ),
401 + top: parseInt( ( this.element.css('padding-top') || 0 ), 10 )
402 + };
403 +
404 + // add isotope class first time around
405 + var instance = this;
406 + setTimeout( function() {
407 + instance.element.addClass( instance.options.containerClass );
408 + }, 0 );
409 +
410 + // bind resize method
411 + if ( this.options.resizable ) {
412 + $window.bind( 'smartresize.isotope', function() {
413 + instance.resize();
414 + });
415 + }
416 +
417 + // dismiss all click events from hidden events
418 + this.element.delegate( '.' + this.options.hiddenClass, 'click', function(){
419 + return false;
420 + });
421 +
422 + },
423 +
424 + _getAtoms : function( $elems ) {
425 + var selector = this.options.itemSelector,
426 + // filter & find
427 + $atoms = selector ? $elems.filter( selector ).add( $elems.find( selector ) ) : $elems,
428 + // base style for atoms
429 + atomStyle = { position: 'absolute' };
430 +
431 + // filter out text nodes
432 + $atoms = $atoms.filter( function( i, atom ) {
433 + return atom.nodeType === 1;
434 + });
435 +
436 + if ( this.usingTransforms ) {
437 + atomStyle.left = 0;
438 + atomStyle.top = 0;
439 + }
440 +
441 + $atoms.css( atomStyle ).addClass( this.options.itemClass );
442 +
443 + this.updateSortData( $atoms, true );
444 +
445 + return $atoms;
446 + },
447 +
448 + // _init fires when your instance is first created
449 + // (from the constructor above), and when you
450 + // attempt to initialize the widget again (by the bridge)
451 + // after it has already been initialized.
452 + _init : function( callback ) {
453 +
454 + this.$filteredAtoms = this._filter( this.$allAtoms );
455 + this._sort();
456 + this.reLayout( callback );
457 +
458 + },
459 +
460 + option : function( opts ){
461 + // change options AFTER initialization:
462 + // signature: $('#foo').bar({ cool:false });
463 + if ( $.isPlainObject( opts ) ){
464 + this.options = $.extend( true, this.options, opts );
465 +
466 + // trigger _updateOptionName if it exists
467 + var updateOptionFn;
468 + for ( var optionName in opts ) {
469 + updateOptionFn = '_update' + capitalize( optionName );
470 + if ( this[ updateOptionFn ] ) {
471 + this[ updateOptionFn ]();
472 + }
473 + }
474 + }
475 + },
476 +
477 + // ====================== updaters ====================== //
478 + // kind of like setters
479 +
480 + _updateAnimationEngine : function() {
481 + var animationEngine = this.options.animationEngine.toLowerCase().replace( /[ _\-]/g, '');
482 + var isUsingJQueryAnimation;
483 + // set applyStyleFnName
484 + switch ( animationEngine ) {
485 + case 'css' :
486 + case 'none' :
487 + isUsingJQueryAnimation = false;
488 + break;
489 + case 'jquery' :
490 + isUsingJQueryAnimation = true;
491 + break;
492 + default : // best available
493 + isUsingJQueryAnimation = !Modernizr.csstransitions;
494 + }
495 + this.isUsingJQueryAnimation = isUsingJQueryAnimation;
496 + this._updateUsingTransforms();
497 + },
498 +
499 + _updateTransformsEnabled : function() {
500 + this._updateUsingTransforms();
501 + },
502 +
503 + _updateUsingTransforms : function() {
504 + var usingTransforms = this.usingTransforms = this.options.transformsEnabled &&
505 + Modernizr.csstransforms && Modernizr.csstransitions && !this.isUsingJQueryAnimation;
506 +
507 + // prevent scales when transforms are disabled
508 + if ( !usingTransforms ) {
509 + delete this.options.hiddenStyle.scale;
510 + delete this.options.visibleStyle.scale;
511 + }
512 +
513 + this.getPositionStyles = usingTransforms ? this._translate : this._positionAbs;
514 + },
515 +
516 +
517 + // ====================== Filtering ======================
518 +
519 + _filter : function( $atoms ) {
520 + var filter = this.options.filter === '' ? '*' : this.options.filter;
521 +
522 + if ( !filter ) {
523 + return $atoms;
524 + }
525 +
526 + var hiddenClass = this.options.hiddenClass,
527 + hiddenSelector = '.' + hiddenClass,
528 + $hiddenAtoms = $atoms.filter( hiddenSelector ),
529 + $atomsToShow = $hiddenAtoms;
530 +
531 + if ( filter !== '*' ) {
532 + $atomsToShow = $hiddenAtoms.filter( filter );
533 + var $atomsToHide = $atoms.not( hiddenSelector ).not( filter ).addClass( hiddenClass );
534 + this.styleQueue.push({ $el: $atomsToHide, style: this.options.hiddenStyle });
535 + }
536 +
537 + this.styleQueue.push({ $el: $atomsToShow, style: this.options.visibleStyle });
538 + $atomsToShow.removeClass( hiddenClass );
539 +
540 + return $atoms.filter( filter );
541 + },
542 +
543 + // ====================== Sorting ======================
544 +
545 + updateSortData : function( $atoms, isIncrementingElemCount ) {
546 + var instance = this,
547 + getSortData = this.options.getSortData,
548 + $this, sortData;
549 + $atoms.each(function(){
550 + $this = $(this);
551 + sortData = {};
552 + // get value for sort data based on fn( $elem ) passed in
553 + for ( var key in getSortData ) {
554 + if ( !isIncrementingElemCount && key === 'original-order' ) {
555 + // keep original order original
556 + sortData[ key ] = $.data( this, 'isotope-sort-data' )[ key ];
557 + } else {
558 + sortData[ key ] = getSortData[ key ]( $this, instance );
559 + }
560 + }
561 + // apply sort data to element
562 + $.data( this, 'isotope-sort-data', sortData );
563 + });
564 + },
565 +
566 + // used on all the filtered atoms
567 + _sort : function() {
568 +
569 + var sortBy = this.options.sortBy,
570 + getSorter = this._getSorter,
571 + sortDir = this.options.sortAscending ? 1 : -1,
572 + sortFn = function( alpha, beta ) {
573 + var a = getSorter( alpha, sortBy ),
574 + b = getSorter( beta, sortBy );
575 + // fall back to original order if data matches
576 + if ( a === b && sortBy !== 'original-order') {
577 + a = getSorter( alpha, 'original-order' );
578 + b = getSorter( beta, 'original-order' );
579 + }
580 + return ( ( a > b ) ? 1 : ( a < b ) ? -1 : 0 ) * sortDir;
581 + };
582 +
583 + this.$filteredAtoms.sort( sortFn );
584 + },
585 +
586 + _getSorter : function( elem, sortBy ) {
587 + return $.data( elem, 'isotope-sort-data' )[ sortBy ];
588 + },
589 +
590 + // ====================== Layout Helpers ======================
591 +
592 + _translate : function( x, y ) {
593 + return { translate : [ x, y ] };
594 + },
595 +
596 + _positionAbs : function( x, y ) {
597 + return { left: x, top: y };
598 + },
599 +
600 + _pushPosition : function( $elem, x, y ) {
601 + x = Math.round( x + this.offset.left );
602 + y = Math.round( y + this.offset.top );
603 + var position = this.getPositionStyles( x, y );
604 + this.styleQueue.push({ $el: $elem, style: position });
605 + if ( this.options.itemPositionDataEnabled ) {
606 + $elem.data('isotope-item-position', {x: x, y: y} );
607 + }
608 + },
609 +
610 +
611 + // ====================== General Layout ======================
612 +
613 + // used on collection of atoms (should be filtered, and sorted before )
614 + // accepts atoms-to-be-laid-out to start with
615 + layout : function( $elems, callback ) {
616 +
617 + var layoutMode = this.options.layoutMode;
618 +
619 + // layout logic
620 + this[ '_' + layoutMode + 'Layout' ]( $elems );
621 +
622 + // set the size of the container
623 + if ( this.options.resizesContainer ) {
624 + var containerStyle = this[ '_' + layoutMode + 'GetContainerSize' ]();
625 + this.styleQueue.push({ $el: this.element, style: containerStyle });
626 + }
627 +
628 + this._processStyleQueue( $elems, callback );
629 +
630 + this.isLaidOut = true;
631 + },
632 +
633 + _processStyleQueue : function( $elems, callback ) {
634 + // are we animating the layout arrangement?
635 + // use plugin-ish syntax for css or animate
636 + var styleFn = !this.isLaidOut ? 'css' : (
637 + this.isUsingJQueryAnimation ? 'animate' : 'css'
638 + ),
639 + animOpts = this.options.animationOptions,
640 + onLayout = this.options.onLayout,
641 + objStyleFn, processor,
642 + triggerCallbackNow, callbackFn;
643 +
644 + // default styleQueue processor, may be overwritten down below
645 + processor = function( i, obj ) {
646 + obj.$el[ styleFn ]( obj.style, animOpts );
647 + };
648 +
649 + if ( this._isInserting && this.isUsingJQueryAnimation ) {
650 + // if using styleQueue to insert items
651 + processor = function( i, obj ) {
652 + // only animate if it not being inserted
653 + objStyleFn = obj.$el.hasClass('no-transition') ? 'css' : styleFn;
654 + obj.$el[ objStyleFn ]( obj.style, animOpts );
655 + };
656 +
657 + } else if ( callback || onLayout || animOpts.complete ) {
658 + // has callback
659 + var isCallbackTriggered = false,
660 + // array of possible callbacks to trigger
661 + callbacks = [ callback, onLayout, animOpts.complete ],
662 + instance = this;
663 + triggerCallbackNow = true;
664 + // trigger callback only once
665 + callbackFn = function() {
666 + if ( isCallbackTriggered ) {
667 + return;
668 + }
669 + var hollaback;
670 + for (var i=0, len = callbacks.length; i < len; i++) {
671 + hollaback = callbacks[i];
672 + if ( typeof hollaback === 'function' ) {
673 + hollaback.call( instance.element, $elems, instance );
674 + }
675 + }
676 + isCallbackTriggered = true;
677 + };
678 +
679 + if ( this.isUsingJQueryAnimation && styleFn === 'animate' ) {
680 + // add callback to animation options
681 + animOpts.complete = callbackFn;
682 + triggerCallbackNow = false;
683 +
684 + } else if ( Modernizr.csstransitions ) {
685 + // detect if first item has transition
686 + var i = 0,
687 + firstItem = this.styleQueue[0],
688 + testElem = firstItem && firstItem.$el,
689 + styleObj;
690 + // get first non-empty jQ object
691 + while ( !testElem || !testElem.length ) {
692 + styleObj = this.styleQueue[ i++ ];
693 + // HACK: sometimes styleQueue[i] is undefined
694 + if ( !styleObj ) {
695 + return;
696 + }
697 + testElem = styleObj.$el;
698 + }
699 + // get transition duration of the first element in that object
700 + // yeah, this is inexact
701 + var duration = parseFloat( getComputedStyle( testElem[0] )[ transitionDurProp ] );
702 + if ( duration > 0 ) {
703 + processor = function( i, obj ) {
704 + obj.$el[ styleFn ]( obj.style, animOpts )
705 + // trigger callback at transition end
706 + .one( transitionEndEvent, callbackFn );
707 + };
708 + triggerCallbackNow = false;
709 + }
710 + }
711 + }
712 +
713 + // process styleQueue
714 + $.each( this.styleQueue, processor );
715 +
716 + if ( triggerCallbackNow ) {
717 + callbackFn();
718 + }
719 +
720 + // clear out queue for next time
721 + this.styleQueue = [];
722 + },
723 +
724 +
725 + resize : function() {
726 + if ( this[ '_' + this.options.layoutMode + 'ResizeChanged' ]() ) {
727 + this.reLayout();
728 + }
729 + },
730 +
731 +
732 + reLayout : function( callback ) {
733 +
734 + this[ '_' + this.options.layoutMode + 'Reset' ]();
735 + this.layout( this.$filteredAtoms, callback );
736 +
737 + },
738 +
739 + // ====================== Convenience methods ======================
740 +
741 + // ====================== Adding items ======================
742 +
743 + // adds a jQuery object of items to a isotope container
744 + addItems : function( $content, callback ) {
745 + var $newAtoms = this._getAtoms( $content );
746 + // add new atoms to atoms pools
747 + this.$allAtoms = this.$allAtoms.add( $newAtoms );
748 +
749 + if ( callback ) {
750 + callback( $newAtoms );
751 + }
752 + },
753 +
754 + // convienence method for adding elements properly to any layout
755 + // positions items, hides them, then animates them back in <--- very sezzy
756 + insert : function( $content, callback ) {
757 + // position items
758 + this.element.append( $content );
759 +
760 + var instance = this;
761 + this.addItems( $content, function( $newAtoms ) {
762 + var $newFilteredAtoms = instance._filter( $newAtoms );
763 + instance._addHideAppended( $newFilteredAtoms );
764 + instance._sort();
765 + instance.reLayout();
766 + instance._revealAppended( $newFilteredAtoms, callback );
767 + });
768 +
769 + },
770 +
771 + // convienence method for working with Infinite Scroll
772 + appended : function( $content, callback ) {
773 + var instance = this;
774 + this.addItems( $content, function( $newAtoms ) {
775 + instance._addHideAppended( $newAtoms );
776 + instance.layout( $newAtoms );
777 + instance._revealAppended( $newAtoms, callback );
778 + });
779 + },
780 +
781 + // adds new atoms, then hides them before positioning
782 + _addHideAppended : function( $newAtoms ) {
783 + this.$filteredAtoms = this.$filteredAtoms.add( $newAtoms );
784 + $newAtoms.addClass('no-transition');
785 +
786 + this._isInserting = true;
787 +
788 + // apply hidden styles
789 + this.styleQueue.push({ $el: $newAtoms, style: this.options.hiddenStyle });
790 + },
791 +
792 + // sets visible style on new atoms
793 + _revealAppended : function( $newAtoms, callback ) {
794 + var instance = this;
795 + // apply visible style after a sec
796 + setTimeout( function() {
797 + // enable animation
798 + $newAtoms.removeClass('no-transition');
799 + // reveal newly inserted filtered elements
800 + instance.styleQueue.push({ $el: $newAtoms, style: instance.options.visibleStyle });
801 + instance._isInserting = false;
802 + instance._processStyleQueue( $newAtoms, callback );
803 + }, 10 );
804 + },
805 +
806 + // gathers all atoms
807 + reloadItems : function() {
808 + this.$allAtoms = this._getAtoms( this.element.children() );
809 + },
810 +
811 + // removes elements from Isotope widget
812 + remove: function( $content, callback ) {
813 + // remove elements immediately from Isotope instance
814 + this.$allAtoms = this.$allAtoms.not( $content );
815 + this.$filteredAtoms = this.$filteredAtoms.not( $content );
816 + // remove() as a callback, for after transition / animation
817 + var instance = this;
818 + var removeContent = function() {
819 + $content.remove();
820 + if ( callback ) {
821 + callback.call( instance.element );
822 + }
823 + };
824 +
825 + if ( $content.filter( ':not(.' + this.options.hiddenClass + ')' ).length ) {
826 + // if any non-hidden content needs to be removed
827 + this.styleQueue.push({ $el: $content, style: this.options.hiddenStyle });
828 + this._sort();
829 + this.reLayout( removeContent );
830 + } else {
831 + // remove it now
832 + removeContent();
833 + }
834 +
835 + },
836 +
837 + shuffle : function( callback ) {
838 + this.updateSortData( this.$allAtoms );
839 + this.options.sortBy = 'random';
840 + this._sort();
841 + this.reLayout( callback );
842 + },
843 +
844 + // destroys widget, returns elements and container back (close) to original style
845 + destroy : function() {
846 +
847 + var usingTransforms = this.usingTransforms;
848 + var options = this.options;
849 +
850 + this.$allAtoms
851 + .removeClass( options.hiddenClass + ' ' + options.itemClass )
852 + .each(function(){
853 + var style = this.style;
854 + style.position = '';
855 + style.top = '';
856 + style.left = '';
857 + style.opacity = '';
858 + if ( usingTransforms ) {
859 + style[ transformProp ] = '';
860 + }
861 + });
862 +
863 + // re-apply saved container styles
864 + var elemStyle = this.element[0].style;
865 + for ( var prop in this.originalStyle ) {
866 + elemStyle[ prop ] = this.originalStyle[ prop ];
867 + }
868 +
869 + this.element
870 + .unbind('.isotope')
871 + .undelegate( '.' + options.hiddenClass, 'click' )
872 + .removeClass( options.containerClass )
873 + .removeData('isotope');
874 +
875 + $window.unbind('.isotope');
876 +
877 + },
878 +
879 +
880 + // ====================== LAYOUTS ======================
881 +
882 + // calculates number of rows or columns
883 + // requires columnWidth or rowHeight to be set on namespaced object
884 + // i.e. this.masonry.columnWidth = 200
885 + _getSegments : function( isRows ) {
886 + var namespace = this.options.layoutMode,
887 + measure = isRows ? 'rowHeight' : 'columnWidth',
888 + size = isRows ? 'height' : 'width',
889 + segmentsName = isRows ? 'rows' : 'cols',
890 + containerSize = this.element[ size ](),
891 + segments,
892 + // i.e. options.masonry && options.masonry.columnWidth
893 + segmentSize = this.options[ namespace ] && this.options[ namespace ][ measure ] ||
894 + // or use the size of the first item, i.e. outerWidth
895 + this.$filteredAtoms[ 'outer' + capitalize(size) ](true) ||
896 + // if there's no items, use size of container
897 + containerSize;
898 +
899 + segments = Math.floor( containerSize / segmentSize );
900 + segments = Math.max( segments, 1 );
901 +
902 + // i.e. this.masonry.cols = ....
903 + this[ namespace ][ segmentsName ] = segments;
904 + // i.e. this.masonry.columnWidth = ...
905 + this[ namespace ][ measure ] = segmentSize;
906 +
907 + },
908 +
909 + _checkIfSegmentsChanged : function( isRows ) {
910 + var namespace = this.options.layoutMode,
911 + segmentsName = isRows ? 'rows' : 'cols',
912 + prevSegments = this[ namespace ][ segmentsName ];
913 + // update cols/rows
914 + this._getSegments( isRows );
915 + // return if updated cols/rows is not equal to previous
916 + return ( this[ namespace ][ segmentsName ] !== prevSegments );
917 + },
918 +
919 + // ====================== Masonry ======================
920 +
921 + _masonryReset : function() {
922 + // layout-specific props
923 + this.masonry = {};
924 + // FIXME shouldn't have to call this again
925 + this._getSegments();
926 + var i = this.masonry.cols;
927 + this.masonry.colYs = [];
928 + while (i--) {
929 + this.masonry.colYs.push( 0 );
930 + }
931 + },
932 +
933 + _masonryLayout : function( $elems ) {
934 + var instance = this,
935 + props = instance.masonry;
936 + $elems.each(function(){
937 + var $this = $(this),
938 + //how many columns does this brick span
939 + colSpan = Math.ceil( $this.outerWidth(true) / props.columnWidth );
940 + colSpan = Math.min( colSpan, props.cols );
941 +
942 + if ( colSpan === 1 ) {
943 + // if brick spans only one column, just like singleMode
944 + instance._masonryPlaceBrick( $this, props.colYs );
945 + } else {
946 + // brick spans more than one column
947 + // how many different places could this brick fit horizontally
948 + var groupCount = props.cols + 1 - colSpan,
949 + groupY = [],
950 + groupColY,
951 + i;
952 +
953 + // for each group potential horizontal position
954 + for ( i=0; i < groupCount; i++ ) {
955 + // make an array of colY values for that one group
956 + groupColY = props.colYs.slice( i, i+colSpan );
957 + // and get the max value of the array
958 + groupY[i] = Math.max.apply( Math, groupColY );
959 + }
960 +
961 + instance._masonryPlaceBrick( $this, groupY );
962 + }
963 + });
964 + },
965 +
966 + // worker method that places brick in the columnSet
967 + // with the the minY
968 + _masonryPlaceBrick : function( $brick, setY ) {
969 + // get the minimum Y value from the columns
970 + var minimumY = Math.min.apply( Math, setY ),
971 + shortCol = 0;
972 +
973 + // Find index of short column, the first from the left
974 + for (var i=0, len = setY.length; i < len; i++) {
975 + if ( setY[i] === minimumY ) {
976 + shortCol = i;
977 + break;
978 + }
979 + }
980 +
981 + // position the brick
982 + var x = this.masonry.columnWidth * shortCol,
983 + y = minimumY;
984 + this._pushPosition( $brick, x, y );
985 +
986 + // apply setHeight to necessary columns
987 + var setHeight = minimumY + $brick.outerHeight(true),
988 + setSpan = this.masonry.cols + 1 - len;
989 + for ( i=0; i < setSpan; i++ ) {
990 + this.masonry.colYs[ shortCol + i ] = setHeight;
991 + }
992 +
993 + },
994 +
995 + _masonryGetContainerSize : function() {
996 + var containerHeight = Math.max.apply( Math, this.masonry.colYs );
997 + return { height: containerHeight };
998 + },
999 +
1000 + _masonryResizeChanged : function() {
1001 + return this._checkIfSegmentsChanged();
1002 + },
1003 +
1004 + // ====================== fitRows ======================
1005 +
1006 + _fitRowsReset : function() {
1007 + this.fitRows = {
1008 + x : 0,
1009 + y : 0,
1010 + height : 0
1011 + };
1012 + },
1013 +
1014 + _fitRowsLayout : function( $elems ) {
1015 + var instance = this,
1016 + containerWidth = this.element.width(),
1017 + props = this.fitRows;
1018 +
1019 + $elems.each( function() {
1020 + var $this = $(this),
1021 + atomW = $this.outerWidth(true),
1022 + atomH = $this.outerHeight(true);
1023 +
1024 + if ( props.x !== 0 && atomW + props.x > containerWidth ) {
1025 + // if this element cannot fit in the current row
1026 + props.x = 0;
1027 + props.y = props.height;
1028 + }
1029 +
1030 + // position the atom
1031 + instance._pushPosition( $this, props.x, props.y );
1032 +
1033 + props.height = Math.max( props.y + atomH, props.height );
1034 + props.x += atomW;
1035 +
1036 + });
1037 + },
1038 +
1039 + _fitRowsGetContainerSize : function () {
1040 + return { height : this.fitRows.height };
1041 + },
1042 +
1043 + _fitRowsResizeChanged : function() {
1044 + return true;
1045 + },
1046 +
1047 +
1048 + // ====================== cellsByRow ======================
1049 +
1050 + _cellsByRowReset : function() {
1051 + this.cellsByRow = {
1052 + index : 0
1053 + };
1054 + // get this.cellsByRow.columnWidth
1055 + this._getSegments();
1056 + // get this.cellsByRow.rowHeight
1057 + this._getSegments(true);
1058 + },
1059 +
1060 + _cellsByRowLayout : function( $elems ) {
1061 + var instance = this,
1062 + props = this.cellsByRow;
1063 + $elems.each( function(){
1064 + var $this = $(this),
1065 + col = props.index % props.cols,
1066 + row = Math.floor( props.index / props.cols ),
1067 + x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
1068 + y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
1069 + instance._pushPosition( $this, x, y );
1070 + props.index ++;
1071 + });
1072 + },
1073 +
1074 + _cellsByRowGetContainerSize : function() {
1075 + return { height : Math.ceil( this.$filteredAtoms.length / this.cellsByRow.cols ) * this.cellsByRow.rowHeight + this.offset.top };
1076 + },
1077 +
1078 + _cellsByRowResizeChanged : function() {
1079 + return this._checkIfSegmentsChanged();
1080 + },
1081 +
1082 +
1083 + // ====================== straightDown ======================
1084 +
1085 + _straightDownReset : function() {
1086 + this.straightDown = {
1087 + y : 0
1088 + };
1089 + },
1090 +
1091 + _straightDownLayout : function( $elems ) {
1092 + var instance = this;
1093 + $elems.each( function( i ){
1094 + var $this = $(this);
1095 + instance._pushPosition( $this, 0, instance.straightDown.y );
1096 + instance.straightDown.y += $this.outerHeight(true);
1097 + });
1098 + },
1099 +
1100 + _straightDownGetContainerSize : function() {
1101 + return { height : this.straightDown.y };
1102 + },
1103 +
1104 + _straightDownResizeChanged : function() {
1105 + return true;
1106 + },
1107 +
1108 +
1109 + // ====================== masonryHorizontal ======================
1110 +
1111 + _masonryHorizontalReset : function() {
1112 + // layout-specific props
1113 + this.masonryHorizontal = {};
1114 + // FIXME shouldn't have to call this again
1115 + this._getSegments( true );
1116 + var i = this.masonryHorizontal.rows;
1117 + this.masonryHorizontal.rowXs = [];
1118 + while (i--) {
1119 + this.masonryHorizontal.rowXs.push( 0 );
1120 + }
1121 + },
1122 +
1123 + _masonryHorizontalLayout : function( $elems ) {
1124 + var instance = this,
1125 + props = instance.masonryHorizontal;
1126 + $elems.each(function(){
1127 + var $this = $(this),
1128 + //how many rows does this brick span
1129 + rowSpan = Math.ceil( $this.outerHeight(true) / props.rowHeight );
1130 + rowSpan = Math.min( rowSpan, props.rows );
1131 +
1132 + if ( rowSpan === 1 ) {
1133 + // if brick spans only one column, just like singleMode
1134 + instance._masonryHorizontalPlaceBrick( $this, props.rowXs );
1135 + } else {
1136 + // brick spans more than one row
1137 + // how many different places could this brick fit horizontally
1138 + var groupCount = props.rows + 1 - rowSpan,
1139 + groupX = [],
1140 + groupRowX, i;
1141 +
1142 + // for each group potential horizontal position
1143 + for ( i=0; i < groupCount; i++ ) {
1144 + // make an array of colY values for that one group
1145 + groupRowX = props.rowXs.slice( i, i+rowSpan );
1146 + // and get the max value of the array
1147 + groupX[i] = Math.max.apply( Math, groupRowX );
1148 + }
1149 +
1150 + instance._masonryHorizontalPlaceBrick( $this, groupX );
1151 + }
1152 + });
1153 + },
1154 +
1155 + _masonryHorizontalPlaceBrick : function( $brick, setX ) {
1156 + // get the minimum Y value from the columns
1157 + var minimumX = Math.min.apply( Math, setX ),
1158 + smallRow = 0;
1159 + // Find index of smallest row, the first from the top
1160 + for (var i=0, len = setX.length; i < len; i++) {
1161 + if ( setX[i] === minimumX ) {
1162 + smallRow = i;
1163 + break;
1164 + }
1165 + }
1166 +
1167 + // position the brick
1168 + var x = minimumX,
1169 + y = this.masonryHorizontal.rowHeight * smallRow;
1170 + this._pushPosition( $brick, x, y );
1171 +
1172 + // apply setHeight to necessary columns
1173 + var setWidth = minimumX + $brick.outerWidth(true),
1174 + setSpan = this.masonryHorizontal.rows + 1 - len;
1175 + for ( i=0; i < setSpan; i++ ) {
1176 + this.masonryHorizontal.rowXs[ smallRow + i ] = setWidth;
1177 + }
1178 + },
1179 +
1180 + _masonryHorizontalGetContainerSize : function() {
1181 + var containerWidth = Math.max.apply( Math, this.masonryHorizontal.rowXs );
1182 + return { width: containerWidth };
1183 + },
1184 +
1185 + _masonryHorizontalResizeChanged : function() {
1186 + return this._checkIfSegmentsChanged(true);
1187 + },
1188 +
1189 +
1190 + // ====================== fitColumns ======================
1191 +
1192 + _fitColumnsReset : function() {
1193 + this.fitColumns = {
1194 + x : 0,
1195 + y : 0,
1196 + width : 0
1197 + };
1198 + },
1199 +
1200 + _fitColumnsLayout : function( $elems ) {
1201 + var instance = this,
1202 + containerHeight = this.element.height(),
1203 + props = this.fitColumns;
1204 + $elems.each( function() {
1205 + var $this = $(this),
1206 + atomW = $this.outerWidth(true),
1207 + atomH = $this.outerHeight(true);
1208 +
1209 + if ( props.y !== 0 && atomH + props.y > containerHeight ) {
1210 + // if this element cannot fit in the current column
1211 + props.x = props.width;
1212 + props.y = 0;
1213 + }
1214 +
1215 + // position the atom
1216 + instance._pushPosition( $this, props.x, props.y );
1217 +
1218 + props.width = Math.max( props.x + atomW, props.width );
1219 + props.y += atomH;
1220 +
1221 + });
1222 + },
1223 +
1224 + _fitColumnsGetContainerSize : function () {
1225 + return { width : this.fitColumns.width };
1226 + },
1227 +
1228 + _fitColumnsResizeChanged : function() {
1229 + return true;
1230 + },
1231 +
1232 +
1233 +
1234 + // ====================== cellsByColumn ======================
1235 +
1236 + _cellsByColumnReset : function() {
1237 + this.cellsByColumn = {
1238 + index : 0
1239 + };
1240 + // get this.cellsByColumn.columnWidth
1241 + this._getSegments();
1242 + // get this.cellsByColumn.rowHeight
1243 + this._getSegments(true);
1244 + },
1245 +
1246 + _cellsByColumnLayout : function( $elems ) {
1247 + var instance = this,
1248 + props = this.cellsByColumn;
1249 + $elems.each( function(){
1250 + var $this = $(this),
1251 + col = Math.floor( props.index / props.rows ),
1252 + row = props.index % props.rows,
1253 + x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
1254 + y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
1255 + instance._pushPosition( $this, x, y );
1256 + props.index ++;
1257 + });
1258 + },
1259 +
1260 + _cellsByColumnGetContainerSize : function() {
1261 + return { width : Math.ceil( this.$filteredAtoms.length / this.cellsByColumn.rows ) * this.cellsByColumn.columnWidth };
1262 + },
1263 +
1264 + _cellsByColumnResizeChanged : function() {
1265 + return this._checkIfSegmentsChanged(true);
1266 + },
1267 +
1268 + // ====================== straightAcross ======================
1269 +
1270 + _straightAcrossReset : function() {
1271 + this.straightAcross = {
1272 + x : 0
1273 + };
1274 + },
1275 +
1276 + _straightAcrossLayout : function( $elems ) {
1277 + var instance = this;
1278 + $elems.each( function( i ){
1279 + var $this = $(this);
1280 + instance._pushPosition( $this, instance.straightAcross.x, 0 );
1281 + instance.straightAcross.x += $this.outerWidth(true);
1282 + });
1283 + },
1284 +
1285 + _straightAcrossGetContainerSize : function() {
1286 + return { width : this.straightAcross.x };
1287 + },
1288 +
1289 + _straightAcrossResizeChanged : function() {
1290 + return true;
1291 + }
1292 +
1293 + };
1294 +
1295 +
1296 + // ======================= imagesLoaded Plugin ===============================
1297 + /*!
1298 + * jQuery imagesLoaded plugin v1.1.0
1299 + * http://github.com/desandro/imagesloaded
1300 + *
1301 + * MIT License. by Paul Irish et al.
1302 + */
1303 +
1304 +
1305 + // $('#my-container').imagesLoaded(myFunction)
1306 + // or
1307 + // $('img').imagesLoaded(myFunction)
1308 +
1309 + // execute a callback when all images have loaded.
1310 + // needed because .load() doesn't work on cached images
1311 +
1312 + // callback function gets image collection as argument
1313 + // `this` is the container
1314 +
1315 + $.fn.imagesLoaded = function( callback ) {
1316 + var $this = this,
1317 + $images = $this.find('img').add( $this.filter('img') ),
1318 + len = $images.length,
1319 + blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==',
1320 + loaded = [];
1321 +
1322 + function triggerCallback() {
1323 + callback.call( $this, $images );
1324 + }
1325 +
1326 + function imgLoaded( event ) {
1327 + var img = event.target;
1328 + if ( img.src !== blank && $.inArray( img, loaded ) === -1 ){
1329 + loaded.push( img );
1330 + if ( --len <= 0 ){
1331 + setTimeout( triggerCallback );
1332 + $images.unbind( '.imagesLoaded', imgLoaded );
1333 + }
1334 + }
1335 + }
1336 +
1337 + // if no images, trigger immediately
1338 + if ( !len ) {
1339 + triggerCallback();
1340 + }
1341 +
1342 + $images.bind( 'load.imagesLoaded error.imagesLoaded', imgLoaded ).each( function() {
1343 + // cached images don't fire load sometimes, so we reset src.
1344 + var src = this.src;
1345 + // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
1346 + // data uri bypasses webkit log warning (thx doug jones)
1347 + this.src = blank;
1348 + this.src = src;
1349 + });
1350 +
1351 + return $this;
1352 + };
1353 +
1354 +
1355 + // helper function for logging errors
1356 + // $.error breaks jQuery chaining
1357 + var logError = function( message ) {
1358 + if ( window.console ) {
1359 + window.console.error( message );
1360 + }
1361 + };
1362 +
1363 + // ======================= Plugin bridge ===============================
1364 + // leverages data method to either create or return $.Isotope constructor
1365 + // A bit from jQuery UI
1366 + // https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js
1367 + // A bit from jcarousel
1368 + // https://github.com/jsor/jcarousel/blob/master/lib/jquery.jcarousel.js
1369 +
1370 + $.fn.isotope = function( options, callback ) {
1371 + if ( typeof options === 'string' ) {
1372 + // call method
1373 + var args = Array.prototype.slice.call( arguments, 1 );
1374 +
1375 + this.each(function(){
1376 + var instance = $.data( this, 'isotope' );
1377 + if ( !instance ) {
1378 + logError( "cannot call methods on isotope prior to initialization; " +
1379 + "attempted to call method '" + options + "'" );
1380 + return;
1381 + }
1382 + if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
1383 + logError( "no such method '" + options + "' for isotope instance" );
1384 + return;
1385 + }
1386 + // apply method
1387 + instance[ options ].apply( instance, args );
1388 + });
1389 + } else {
1390 + this.each(function() {
1391 + var instance = $.data( this, 'isotope' );
1392 + if ( instance ) {
1393 + // apply options & init
1394 + instance.option( options );
1395 + instance._init( callback );
1396 + } else {
1397 + // initialize new instance
1398 + $.data( this, 'isotope', new $.Isotope( options, this, callback ) );
1399 + }
1400 + });
1401 + }
1402 + // return jQuery object
1403 + // so plugin methods do not have to
1404 + return this;
1405 + };
1406 +
1407 +})( window, jQuery );
...\ No newline at end of file ...\ No newline at end of file
1 +
2 +function main() {
3 +
4 +(function () {
5 + 'use strict';
6 +
7 + $('a.page-scroll').click(function() {
8 + if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
9 + var target = $(this.hash);
10 + target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
11 + if (target.length) {
12 + $('html,body').animate({
13 + scrollTop: target.offset().top - 40
14 + }, 900);
15 + return false;
16 + }
17 + }
18 + });
19 +
20 +
21 + // Show Menu on Book
22 + $(window).bind('scroll', function() {
23 + var navHeight = $(window).height() - 500;
24 + if ($(window).scrollTop() > navHeight) {
25 + $('.navbar-default').addClass('on');
26 + } else {
27 + $('.navbar-default').removeClass('on');
28 + }
29 + });
30 +
31 + $('body').scrollspy({
32 + target: '.navbar-default',
33 + offset: 80
34 + });
35 +
36 + // Hide nav on click
37 + $(".navbar-nav li a").click(function (event) {
38 + // check if window is small enough so dropdown is created
39 + var toggle = $(".navbar-toggle").is(":visible");
40 + if (toggle) {
41 + $(".navbar-collapse").collapse('hide');
42 + }
43 + });
44 +
45 + // Portfolio isotope filter
46 + $(window).load(function() {
47 + var $container = $('.portfolio-items');
48 + $container.isotope({
49 + filter: '*',
50 + animationOptions: {
51 + duration: 750,
52 + easing: 'linear',
53 + queue: false
54 + }
55 + });
56 + $('.cat a').click(function() {
57 + $('.cat .active').removeClass('active');
58 + $(this).addClass('active');
59 + var selector = $(this).attr('data-filter');
60 + $container.isotope({
61 + filter: selector,
62 + animationOptions: {
63 + duration: 750,
64 + easing: 'linear',
65 + queue: false
66 + }
67 + });
68 + return false;
69 + });
70 +
71 + });
72 +
73 + // Nivo Lightbox
74 + $('.portfolio-item a').nivoLightbox({
75 + effect: 'slideDown',
76 + keyboardNav: true,
77 + });
78 +
79 +}());
80 +
81 +
82 +}
83 +main();
...\ No newline at end of file ...\ No newline at end of file
...@@ -2,7 +2,39 @@ ...@@ -2,7 +2,39 @@
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>내툰</title> 4 <title>내툰</title>
5 - <link rel='stylesheet' href='/stylesheets/style.css' /> 5 + <link rel='stylesheet' href='/stylesheets/style2.css' />
6 + <meta charset="utf-8">
7 + <meta name="viewport" content="width=device-width, initial-scale=1">
8 + <title>Touché</title>
9 + <meta name="description" content="">
10 + <meta name="author" content="">
11 +
12 + <!-- Favicons
13 + ================================================== -->
14 + <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
15 + <link rel="apple-touch-icon" href="img/apple-touch-icon.png">
16 + <link rel="apple-touch-icon" sizes="72x72" href="img/apple-touch-icon-72x72.png">
17 + <link rel="apple-touch-icon" sizes="114x114" href="img/apple-touch-icon-114x114.png">
18 +
19 + <!-- Bootstrap -->
20 + <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
21 + <link rel="stylesheet" type="text/css" href="fonts/font-awesome/css/font-awesome.css">
22 +
23 + <!-- Stylesheet
24 + ================================================== -->
25 + <link rel="stylesheet" type="text/css" href="css/style.css">
26 + <link rel="stylesheet" type="text/css" href="css/nivo-lightbox/nivo-lightbox.css">
27 + <link rel="stylesheet" type="text/css" href="css/nivo-lightbox/default.css">
28 + <link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700" rel="stylesheet">
29 + <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
30 + <link href="https://fonts.googleapis.com/css?family=Dancing+Script:400,700" rel="stylesheet">
31 +
32 + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
33 + <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
34 + <!--[if lt IE 9]>
35 + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
36 + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
37 + <![endif]-->
6 <style> 38 <style>
7 .toon_name,.toon_thumbnail{ 39 .toon_name,.toon_thumbnail{
8 width:10%; 40 width:10%;
...@@ -24,6 +56,7 @@ ...@@ -24,6 +56,7 @@
24 border-bottom:2px solid #474747; 56 border-bottom:2px solid #474747;
25 } 57 }
26 </style> 58 </style>
59 +
27 </head> 60 </head>
28 <h1>내툰</h1> 61 <h1>내툰</h1>
29 <p>추가한 리스트</p> 62 <p>추가한 리스트</p>
......
1 +/*
2 + * Nivo Lightbox v1.2.0
3 + * http://dev7studios.com/nivo-lightbox
4 + *
5 + * Copyright 2013, Dev7studios
6 + * Free to use and abuse under the MIT license.
7 + * http://www.opensource.org/licenses/mit-license.php
8 + */
9 +
10 +;(function($, window, document, undefined){
11 +
12 + var pluginName = 'nivoLightbox',
13 + defaults = {
14 + effect: 'fade',
15 + theme: 'default',
16 + keyboardNav: true,
17 + clickOverlayToClose: true,
18 + onInit: function(){},
19 + beforeShowLightbox: function(){},
20 + afterShowLightbox: function(lightbox){},
21 + beforeHideLightbox: function(){},
22 + afterHideLightbox: function(){},
23 + onPrev: function(element){},
24 + onNext: function(element){},
25 + errorMessage: 'The requested content cannot be loaded. Please try again later.'
26 + };
27 +
28 + function NivoLightbox(element, options){
29 + this.el = element;
30 + this.$el = $(this.el);
31 +
32 + this.options = $.extend({}, defaults, options);
33 +
34 + this._defaults = defaults;
35 + this._name = pluginName;
36 +
37 + this.init();
38 + }
39 +
40 + NivoLightbox.prototype = {
41 +
42 + init: function(){
43 + var $this = this;
44 +
45 + // Need this so we don't use CSS transitions in mobile
46 + if(!$('html').hasClass('nivo-lightbox-notouch')) $('html').addClass('nivo-lightbox-notouch');
47 + if('ontouchstart' in document) $('html').removeClass('nivo-lightbox-notouch');
48 +
49 + // Setup the click
50 + this.$el.on('click', function(e){
51 + $this.showLightbox(e);
52 + });
53 +
54 + // keyboardNav
55 + if(this.options.keyboardNav){
56 + $('body').off('keyup').on('keyup', function(e){
57 + var code = (e.keyCode ? e.keyCode : e.which);
58 + // Escape
59 + if(code == 27) $this.destructLightbox();
60 + // Left
61 + if(code == 37) $('.nivo-lightbox-prev').trigger('click');
62 + // Right
63 + if(code == 39) $('.nivo-lightbox-next').trigger('click');
64 + });
65 + }
66 +
67 + this.options.onInit.call(this);
68 +
69 + },
70 +
71 + showLightbox: function(e){
72 + var $this = this,
73 + currentLink = this.$el;
74 +
75 + // Check content
76 + var check = this.checkContent(currentLink);
77 + if(!check) return;
78 +
79 + e.preventDefault();
80 + this.options.beforeShowLightbox.call(this);
81 + var lightbox = this.constructLightbox();
82 + if(!lightbox) return;
83 + var content = lightbox.find('.nivo-lightbox-content');
84 + if(!content) return;
85 +
86 + $('body').addClass('nivo-lightbox-body-effect-'+ this.options.effect);
87 +
88 + this.processContent( content, currentLink );
89 +
90 + // Nav
91 + if(this.$el.attr('data-lightbox-gallery')){
92 + var galleryItems = $('[data-lightbox-gallery="'+ this.$el.attr('data-lightbox-gallery') +'"]');
93 +
94 + $('.nivo-lightbox-nav').show();
95 +
96 + // Prev
97 + $('.nivo-lightbox-prev').off('click').on('click', function(e){
98 + e.preventDefault();
99 + var index = galleryItems.index(currentLink);
100 + currentLink = galleryItems.eq(index - 1);
101 + if(!$(currentLink).length) currentLink = galleryItems.last();
102 + $this.processContent(content, currentLink);
103 + $this.options.onPrev.call(this, [ currentLink ]);
104 + });
105 +
106 + // Next
107 + $('.nivo-lightbox-next').off('click').on('click', function(e){
108 + e.preventDefault();
109 + var index = galleryItems.index(currentLink);
110 + currentLink = galleryItems.eq(index + 1);
111 + if(!$(currentLink).length) currentLink = galleryItems.first();
112 + $this.processContent(content, currentLink);
113 + $this.options.onNext.call(this, [ currentLink ]);
114 + });
115 + }
116 +
117 + setTimeout(function(){
118 + lightbox.addClass('nivo-lightbox-open');
119 + $this.options.afterShowLightbox.call(this, [ lightbox ]);
120 + }, 1); // For CSS transitions
121 + },
122 +
123 + checkContent: function( link ) {
124 + var $this = this,
125 + href = link.attr('href'),
126 + video = href.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);
127 +
128 + if(href.match(/\.(jpeg|jpg|gif|png)$/i) !== null){
129 + return true;
130 + }
131 + // Video (Youtube/Vimeo)
132 + else if(video){
133 + return true;
134 + }
135 + // AJAX
136 + else if(link.attr('data-lightbox-type') == 'ajax'){
137 + return true;
138 + }
139 + // Inline HTML
140 + else if(href.substring(0, 1) == '#' && link.attr('data-lightbox-type') == 'inline'){
141 + return true;
142 + }
143 + // iFrame (default)
144 + else if(link.attr('data-lightbox-type') == 'iframe'){
145 + return true;
146 + }
147 +
148 + return false;
149 + },
150 +
151 + processContent: function(content, link){
152 + var $this = this,
153 + href = link.attr('href'),
154 + video = href.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);
155 +
156 + content.html('').addClass('nivo-lightbox-loading');
157 +
158 + // Is HiDPI?
159 + if(this.isHidpi() && link.attr('data-lightbox-hidpi')){
160 + href = link.attr('data-lightbox-hidpi');
161 + }
162 +
163 + // Image
164 + if(href.match(/\.(jpeg|jpg|gif|png)$/i) !== null){
165 + var img = $('<img>', { src: href });
166 + img.one('load', function() {
167 + var wrap = $('<div class="nivo-lightbox-image" />');
168 + wrap.append(img);
169 + content.html(wrap).removeClass('nivo-lightbox-loading');
170 +
171 + // Vertically center images
172 + wrap.css({
173 + 'line-height': $('.nivo-lightbox-content').height() +'px',
174 + 'height': $('.nivo-lightbox-content').height() +'px' // For Firefox
175 + });
176 + $(window).resize(function() {
177 + wrap.css({
178 + 'line-height': $('.nivo-lightbox-content').height() +'px',
179 + 'height': $('.nivo-lightbox-content').height() +'px' // For Firefox
180 + });
181 + });
182 + }).each(function() {
183 + if(this.complete) $(this).load();
184 + });
185 +
186 + img.error(function() {
187 + var wrap = $('<div class="nivo-lightbox-error"><p>'+ $this.options.errorMessage +'</p></div>');
188 + content.html(wrap).removeClass('nivo-lightbox-loading');
189 + });
190 + }
191 + // Video (Youtube/Vimeo)
192 + else if(video){
193 + var src = '',
194 + classTerm = 'nivo-lightbox-video';
195 +
196 + if(video[1] == 'youtube'){
197 + src = 'http://www.youtube.com/embed/'+ video[4];
198 + classTerm = 'nivo-lightbox-youtube';
199 + }
200 + if(video[1] == 'youtu'){
201 + src = 'http://www.youtube.com/embed/'+ video[3];
202 + classTerm = 'nivo-lightbox-youtube';
203 + }
204 + if(video[1] == 'vimeo'){
205 + src = 'http://player.vimeo.com/video/'+ video[3];
206 + classTerm = 'nivo-lightbox-vimeo';
207 + }
208 +
209 + if(src){
210 + var iframeVideo = $('<iframe>', {
211 + src: src,
212 + 'class': classTerm,
213 + frameborder: 0,
214 + vspace: 0,
215 + hspace: 0,
216 + scrolling: 'auto'
217 + });
218 + content.html(iframeVideo);
219 + iframeVideo.load(function(){ content.removeClass('nivo-lightbox-loading'); });
220 + }
221 + }
222 + // AJAX
223 + else if(link.attr('data-lightbox-type') == 'ajax'){
224 + $.ajax({
225 + url: href,
226 + cache: false,
227 + success: function(data) {
228 + var wrap = $('<div class="nivo-lightbox-ajax" />');
229 + wrap.append(data);
230 + content.html(wrap).removeClass('nivo-lightbox-loading');
231 +
232 + // Vertically center html
233 + if(wrap.outerHeight() < content.height()){
234 + wrap.css({
235 + 'position': 'relative',
236 + 'top': '50%',
237 + 'margin-top': -(wrap.outerHeight()/2) +'px'
238 + });
239 + }
240 + $(window).resize(function() {
241 + if(wrap.outerHeight() < content.height()){
242 + wrap.css({
243 + 'position': 'relative',
244 + 'top': '50%',
245 + 'margin-top': -(wrap.outerHeight()/2) +'px'
246 + });
247 + }
248 + });
249 + },
250 + error: function(){
251 + var wrap = $('<div class="nivo-lightbox-error"><p>'+ $this.options.errorMessage +'</p></div>');
252 + content.html(wrap).removeClass('nivo-lightbox-loading');
253 + }
254 + });
255 + }
256 + // Inline HTML
257 + else if(href.substring(0, 1) == '#' && link.attr('data-lightbox-type') == 'inline'){
258 + if($(href).length){
259 + var wrap = $('<div class="nivo-lightbox-inline" />');
260 + wrap.append($(href).clone().show());
261 + content.html(wrap).removeClass('nivo-lightbox-loading');
262 +
263 + // Vertically center html
264 + if(wrap.outerHeight() < content.height()){
265 + wrap.css({
266 + 'position': 'relative',
267 + 'top': '50%',
268 + 'margin-top': -(wrap.outerHeight()/2) +'px'
269 + });
270 + }
271 + $(window).resize(function() {
272 + if(wrap.outerHeight() < content.height()){
273 + wrap.css({
274 + 'position': 'relative',
275 + 'top': '50%',
276 + 'margin-top': -(wrap.outerHeight()/2) +'px'
277 + });
278 + }
279 + });
280 + } else {
281 + var wrapError = $('<div class="nivo-lightbox-error"><p>'+ $this.options.errorMessage +'</p></div>');
282 + content.html(wrapError).removeClass('nivo-lightbox-loading');
283 + }
284 + }
285 + // iFrame (default)
286 + else if(link.attr('data-lightbox-type') == 'iframe'){
287 + var iframe = $('<iframe>', {
288 + src: href,
289 + 'class': 'nivo-lightbox-item',
290 + frameborder: 0,
291 + vspace: 0,
292 + hspace: 0,
293 + scrolling: 'auto'
294 + });
295 + content.html(iframe);
296 + iframe.load(function(){ content.removeClass('nivo-lightbox-loading'); });
297 + } else {
298 + return false;
299 + }
300 +
301 + // Set the title
302 + if(link.attr('title')){
303 + var titleWrap = $('<span>', { 'class': 'nivo-lightbox-title' });
304 + titleWrap.text(link.attr('title'));
305 + $('.nivo-lightbox-title-wrap').html(titleWrap);
306 + } else {
307 + $('.nivo-lightbox-title-wrap').html('');
308 + }
309 + },
310 +
311 + constructLightbox: function(){
312 + if($('.nivo-lightbox-overlay').length) return $('.nivo-lightbox-overlay');
313 +
314 + var overlay = $('<div>', { 'class': 'nivo-lightbox-overlay nivo-lightbox-theme-'+ this.options.theme +' nivo-lightbox-effect-'+ this.options.effect });
315 + var wrap = $('<div>', { 'class': 'nivo-lightbox-wrap' });
316 + var content = $('<div>', { 'class': 'nivo-lightbox-content' });
317 + var nav = $('<a href="#" class="nivo-lightbox-nav nivo-lightbox-prev">Previous</a><a href="#" class="nivo-lightbox-nav nivo-lightbox-next">Next</a>');
318 + var close = $('<a href="#" class="nivo-lightbox-close" title="Close">Close</a>');
319 + var title = $('<div>', { 'class': 'nivo-lightbox-title-wrap' });
320 +
321 + var isMSIE = /*@cc_on!@*/0;
322 + if(isMSIE) overlay.addClass('nivo-lightbox-ie');
323 +
324 + wrap.append(content);
325 + wrap.append(title);
326 + overlay.append(wrap);
327 + overlay.append(nav);
328 + overlay.append(close);
329 + $('body').append(overlay);
330 +
331 + var $this = this;
332 + if($this.options.clickOverlayToClose){
333 + overlay.on('click', function(e){
334 + if(e.target === this || $(e.target).hasClass('nivo-lightbox-content') || $(e.target).hasClass('nivo-lightbox-image')){
335 + $this.destructLightbox();
336 + }
337 + });
338 + }
339 +
340 + close.on('click', function(e){
341 + e.preventDefault();
342 + $this.destructLightbox();
343 + });
344 +
345 + return overlay;
346 + },
347 +
348 + destructLightbox: function(){
349 + var $this = this;
350 + this.options.beforeHideLightbox.call(this);
351 +
352 + $('.nivo-lightbox-overlay').removeClass('nivo-lightbox-open');
353 + $('.nivo-lightbox-nav').hide();
354 + $('body').removeClass('nivo-lightbox-body-effect-'+ $this.options.effect);
355 +
356 + // For IE
357 + var isMSIE = /*@cc_on!@*/0;
358 + if(isMSIE){
359 + $('.nivo-lightbox-overlay iframe').attr("src", " ");
360 + $('.nivo-lightbox-overlay iframe').remove();
361 + }
362 +
363 + // Remove click handlers
364 + $('.nivo-lightbox-prev').off('click');
365 + $('.nivo-lightbox-next').off('click');
366 +
367 + // Empty content (for videos)
368 + $('.nivo-lightbox-content').empty();
369 +
370 + this.options.afterHideLightbox.call(this);
371 + },
372 +
373 + isHidpi: function(){
374 + var mediaQuery = "(-webkit-min-device-pixel-ratio: 1.5),\
375 + (min--moz-device-pixel-ratio: 1.5),\
376 + (-o-min-device-pixel-ratio: 3/2),\
377 + (min-resolution: 1.5dppx)";
378 + if(window.devicePixelRatio > 1) return true;
379 + if(window.matchMedia && window.matchMedia(mediaQuery).matches) return true;
380 + return false;
381 + }
382 +
383 + };
384 +
385 + $.fn[pluginName] = function(options){
386 + return this.each(function(){
387 + if(!$.data(this, pluginName)){
388 + $.data(this, pluginName, new NivoLightbox(this, options));
389 + }
390 + });
391 + };
392 +
393 +})(jQuery, window, document);
No preview for this file type