commit 0ae0b97ae4b672bdf774779d17ffb4f680c9e17f Author: Tobias Reich Date: Tue Oct 2 17:48:08 2012 +0200 Lychee V1.0 diff --git a/css/animations.css b/css/animations.css new file mode 100644 index 0000000..850393c --- /dev/null +++ b/css/animations.css @@ -0,0 +1,466 @@ +/* bounceInDown ------------------------------------------------*/ +@-webkit-keyframes bounceInDown { + 0% { + -webkit-transform: translateY(-2000px); + } + 60% { + -webkit-transform: translateY(30px); + } + 80% { + -webkit-transform: translateY(-10px); + } + 100% { + -webkit-transform: translateY(0); + } +} +@-moz-keyframes bounceInDown { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-ms-keyframes bounceInDown { + 0% { + -ms-transform: translateY(-2000px); + } + 60% { + -ms-transform: translateY(30px); + } + 80% { + -ms-transform: translateY(-10px); + } + 100% { + -ms-transform: translateY(0); + } +} +@-o-keyframes bounceInDown { + 0% { + -o-transform: translateY(-2000px); + } + 60% { + -o-transform: translateY(30px); + } + 80% { + -o-transform: translateY(-10px); + } + 100% { + -o-transform: translateY(0); + } +} +@keyframes bounceInDown { + 0% { + transform: translateY(-2000px); + } + 60% { + transform: translateY(30px); + } + 80% { + transform: translateY(-10px); + } + 100% { + transform: translateY(0); + } +} + +/* bounceOutUp ------------------------------------------------*/ +@-webkit-keyframes bounceOutUp { + 0% { + -webkit-transform: translateY(0); + } + 20% { + -webkit-transform: translateY(20px); + } + 100% { + -webkit-transform: translateY(-2000px); + } +} +@-moz-keyframes bounceOutUp { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +@-ms-keyframes bounceOutUp { + 0% { + -ms-transform: translateY(0); + } + 20% { + -ms-transform: translateY(20px); + } + 100% { + -ms-transform: translateY(-2000px); + } +} +@-o-keyframes bounceOutUp { + 0% { + -o-transform: translateY(0); + } + 20% { + -o-transform: translateY(20px); + } + 100% { + -o-transform: translateY(-2000px); + } +} +@keyframes bounceOutUp { + 0% { + transform: translateY(0); + } + 20% { + transform: translateY(20px); + } + 100% { + transform: translateY(-2000px); + } +} + +/* moveDown ------------------------------------------------*/ +@-webkit-keyframes moveDown { + 0% { + -webkit-transform: translateY(-100px); + } + 100% { + -webkit-transform: translateY(0); + } +} +@-moz-keyframes moveDown { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-ms-keyframes moveDown { + 0% { + -ms-transform: translateY(-100px); + } + 100% { + -ms-transform: translateY(0); + } +} +@-o-keyframes moveDown { + 0% { + -o-transform: translateY(-100px); + } + 100% { + -o-transform: translateY(0); + } +} +@keyframes moveDown { + 0% { + transform: translateY(-100px); + } + 100% { + transform: translateY(0); + } +} + +/* fadeIn ------------------------------------------------*/ +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-ms-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-o-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +/* fadeOut ------------------------------------------------*/ +@-webkit-keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +@-moz-keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +@-ms-keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +@-o-keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +@keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +/* moveBackground ------------------------------------------------*/ +@-webkit-keyframes moveBackground { + 0% { + background-position-x: 0px; + } + 100% { + background-position-x: -33px; + } +} +@-moz-keyframes moveBackground { + 0% { + background-position-x: 0px; + } + 100% { + background-position-x: -33px; + } +} +@-ms-keyframes moveBackground { + 0% { + background-position-x: 0px; + } + 100% { + background-position-x: -33px; + } +} +@-o-keyframes moveBackground { + 0% { + background-position-x: 0px; + } + 100% { + background-position-x: -33px; + } +} +@keyframes moveBackground { + 0% { + background-position-x: 0px; + } + 100% { + background-position-x: -33px; + } +} + +/* zoomOut ------------------------------------------------*/ +@-webkit-keyframes zoomOut { + 0% { + opacity: 1; + -webkit-transform: scale(1); + } + 100% { + opacity: 0; + -webkit-transform: scale(.5); + } +} +@-moz-keyframes zoomOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +@-ms-keyframes zoomOut { + 0% { + opacity: 1; + -ms-transform: scale(1); + } + 100% { + opacity: 0; + -ms-transform: scale(.5); + } +} +@-o-keyframes zoomOut { + 0% { + opacity: 1; + -o-transform: scale(1); + } + 100% { + opacity: 0; + -o-transform: scale(.5); + } +} +@keyframes zoomOut { + 0% { + opacity: 1; + transform: scale(1); + } + 100% { + opacity: 0; + transform: scale(.5); + } +} + +/* zoomIn ------------------------------------------------*/ +@-webkit-keyframes zoomIn { + 0% { + opacity: 0; + -webkit-transform: scale(.5); + } + 100% { + opacity: 1; + -webkit-transform: scale(1); + } +} +@-moz-keyframes zoomIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-ms-keyframes zoomIn { + 0% { + opacity: 0; + -ms-transform: scale(.5); + } + 100% { + opacity: 1; + -ms-transform: scale(1); + } +} +@-o-keyframes zoomIn { + 0% { + opacity: 0; + -o-transform: scale(.5); + } + 100% { + opacity: 1; + -o-transform: scale(1); + } +} +@keyframes zoomIn { + 0% { + opacity: 0; + transform: scale(.5); + } + 100% { + opacity: 1; + transform: scale(1); + } +} + +/* shake ------------------------------------------------*/ +@-webkit-keyframes shake { + 0%, 100% { -webkit-transform: translateX(0); } + 10%, 30%, 50%, 70%, 90% { -webkit-transform: translateX(-10px); } + 20%, 40%, 60%, 80% { -webkit-transform: translateX(10px); } +} +@-moz-keyframes shake { + 0%, 100% { -moz-transform: translateX(0);} + 10%, 30%, 50%, 70%, 90% { -moz-transform: translateX(-10px); } + 20%, 40%, 60%, 80% { -moz-transform: translateX(10px); } +} +@-o-keyframes shake { + 0%, 100% { -o-transform: translateX(0);} + 10%, 30%, 50%, 70%, 90% { -o-transform: translateX(-10px); } + 20%, 40%, 60%, 80% { -o-transform: translateX(10px); } +} +@keyframes shake { + 0%, 100% { transform: translateX(0);} + 10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); } + 20%, 40%, 60%, 80% { transform: translateX(10px); } +} + +/* pulse ------------------------------------------------*/ +@-webkit-keyframes pulse { + 0% { + opacity: 1; + } + 50% { + opacity: 0.3; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes pulse { + 0% { + opacity: 1; + } + 50% { + opacity: 0.8; + } + 100% { + opacity: 1; + } +} +@-ms-keyframes pulse { + 0% { + opacity: 1; + } + 50% { + opacity: 0.8; + } + 100% { + opacity: 1; + } +} +@-o-keyframes pulse { + 0% { + opacity: 1; + } + 50% { + opacity: 0.8; + } + 100% { + opacity: 1; + } +} +@keyframes pulse { + 0% { + opacity: 1; + } + 50% { + opacity: 0.8; + } + 100% { + opacity: 1; + } +} \ No newline at end of file diff --git a/css/font-awesome.css b/css/font-awesome.css new file mode 100644 index 0000000..f1b1458 --- /dev/null +++ b/css/font-awesome.css @@ -0,0 +1,303 @@ +/* Font Awesome + the iconic font designed for use with Twitter Bootstrap + ------------------------------------------------------- + The full suite of pictographic icons, examples, and documentation + can be found at: http://fortawesome.github.com/Font-Awesome/ + + License + ------------------------------------------------------- + The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0: + http://creativecommons.org/licenses/by/3.0/ A mention of + 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable + source code is considered acceptable attribution (most common on the web). + If human readable source code is not available to the end user, a mention in + an 'About' or 'Credits' screen is considered acceptable (most common in desktop + or mobile software). + + Contact + ------------------------------------------------------- + Email: dave@davegandy.com + Twitter: http://twitter.com/fortaweso_me + Work: http://lemonwi.se co-founder + + */ +@font-face { + font-family: 'FontAwesome'; + src: url('font/fontawesome-webfont.eot'); + src: url('font/fontawesome-webfont.eot?#iefix') format('eot'), url('font/fontawesome-webfont.woff') format('woff'), url('font/fontawesome-webfont.ttf') format('truetype'), url('font/fontawesome-webfont.svg#FontAwesome') format('svg'); + font-weight: normal; + font-style: normal; +} + +/* Font Awesome styles + ------------------------------------------------------- */ +[class^="icon-"]:before, [class*=" icon-"]:before { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + display: inline-block; + text-decoration: inherit; +} +a [class^="icon-"], a [class*=" icon-"] { + display: inline-block; + text-decoration: inherit; +} +/* makes the font 33% larger relative to the icon container */ +.icon-large:before { + vertical-align: top; + font-size: 1.3333333333333333em; +} +.btn [class^="icon-"], .btn [class*=" icon-"] { + /* keeps button heights with and without icons the same */ + + line-height: .9em; +} +li [class^="icon-"], li [class*=" icon-"] { + display: inline-block; + width: 1.25em; + text-align: center; +} +li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] { + /* 1.5 increased font size for icon-large * 1.25 width */ + + width: 1.875em; +} +li[class^="icon-"], li[class*=" icon-"] { + margin-left: 0; + list-style-type: none; +} +li[class^="icon-"]:before, li[class*=" icon-"]:before { + text-indent: -2em; + text-align: center; +} +li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before { + text-indent: -1.3333333333333333em; +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.icon-glass:before { content: "\f000"; } +.icon-music:before { content: "\f001"; } +.icon-search:before { content: "\f002"; } +.icon-envelope:before { content: "\f003"; } +.icon-heart:before { content: "\f004"; } +.icon-star:before { content: "\f005"; } +.icon-star-empty:before { content: "\f006"; } +.icon-user:before { content: "\f007"; } +.icon-film:before { content: "\f008"; } +.icon-th-large:before { content: "\f009"; } +.icon-th:before { content: "\f00a"; } +.icon-th-list:before { content: "\f00b"; } +.icon-ok:before { content: "\f00c"; } +.icon-remove:before { content: "\f00d"; } +.icon-zoom-in:before { content: "\f00e"; } + +.icon-zoom-out:before { content: "\f010"; } +.icon-off:before { content: "\f011"; } +.icon-signal:before { content: "\f012"; } +.icon-cog:before { content: "\f013"; } +.icon-trash:before { content: "\f014"; } +.icon-home:before { content: "\f015"; } +.icon-file:before { content: "\f016"; } +.icon-time:before { content: "\f017"; } +.icon-road:before { content: "\f018"; } +.icon-download-alt:before { content: "\f019"; } +.icon-download:before { content: "\f01a"; } +.icon-upload:before { content: "\f01b"; } +.icon-inbox:before { content: "\f01c"; } +.icon-play-circle:before { content: "\f01d"; } +.icon-repeat:before { content: "\f01e"; } + +/* \f020 doesn't work in Safari. all shifted one down */ +.icon-refresh:before { content: "\f021"; } +.icon-list-alt:before { content: "\f022"; } +.icon-lock:before { content: "\f023"; } +.icon-flag:before { content: "\f024"; } +.icon-headphones:before { content: "\f025"; } +.icon-volume-off:before { content: "\f026"; } +.icon-volume-down:before { content: "\f027"; } +.icon-volume-up:before { content: "\f028"; } +.icon-qrcode:before { content: "\f029"; } +.icon-barcode:before { content: "\f02a"; } +.icon-tag:before { content: "\f02b"; } +.icon-tags:before { content: "\f02c"; } +.icon-book:before { content: "\f02d"; } +.icon-bookmark:before { content: "\f02e"; } +.icon-print:before { content: "\f02f"; } + +.icon-camera:before { content: "\f030"; } +.icon-font:before { content: "\f031"; } +.icon-bold:before { content: "\f032"; } +.icon-italic:before { content: "\f033"; } +.icon-text-height:before { content: "\f034"; } +.icon-text-width:before { content: "\f035"; } +.icon-align-left:before { content: "\f036"; } +.icon-align-center:before { content: "\f037"; } +.icon-align-right:before { content: "\f038"; } +.icon-align-justify:before { content: "\f039"; } +.icon-list:before { content: "\f03a"; } +.icon-indent-left:before { content: "\f03b"; } +.icon-indent-right:before { content: "\f03c"; } +.icon-facetime-video:before { content: "\f03d"; } +.icon-picture:before { content: "\f03e"; } + +.icon-pencil:before { content: "\f040"; } +.icon-map-marker:before { content: "\f041"; } +.icon-adjust:before { content: "\f042"; } +.icon-tint:before { content: "\f043"; } +.icon-edit:before { content: "\f044"; } +.icon-share:before { content: "\f045"; } +.icon-check:before { content: "\f046"; } +.icon-move:before { content: "\f047"; } +.icon-step-backward:before { content: "\f048"; } +.icon-fast-backward:before { content: "\f049"; } +.icon-backward:before { content: "\f04a"; } +.icon-play:before { content: "\f04b"; } +.icon-pause:before { content: "\f04c"; } +.icon-stop:before { content: "\f04d"; } +.icon-forward:before { content: "\f04e"; } + +.icon-fast-forward:before { content: "\f050"; } +.icon-step-forward:before { content: "\f051"; } +.icon-eject:before { content: "\f052"; } +.icon-chevron-left:before { content: "\f053"; } +.icon-chevron-right:before { content: "\f054"; } +.icon-plus-sign:before { content: "\f055"; } +.icon-minus-sign:before { content: "\f056"; } +.icon-remove-sign:before { content: "\f057"; } +.icon-ok-sign:before { content: "\f058"; } +.icon-question-sign:before { content: "\f059"; } +.icon-info-sign:before { content: "\f05a"; } +.icon-screenshot:before { content: "\f05b"; } +.icon-remove-circle:before { content: "\f05c"; } +.icon-ok-circle:before { content: "\f05d"; } +.icon-ban-circle:before { content: "\f05e"; } + +.icon-arrow-left:before { content: "\f060"; } +.icon-arrow-right:before { content: "\f061"; } +.icon-arrow-up:before { content: "\f062"; } +.icon-arrow-down:before { content: "\f063"; } +.icon-share-alt:before { content: "\f064"; } +.icon-resize-full:before { content: "\f065"; } +.icon-resize-small:before { content: "\f066"; } +.icon-plus:before { content: "\f067"; } +.icon-minus:before { content: "\f068"; } +.icon-asterisk:before { content: "\f069"; } +.icon-exclamation-sign:before { content: "\f06a"; } +.icon-gift:before { content: "\f06b"; } +.icon-leaf:before { content: "\f06c"; } +.icon-fire:before { content: "\f06d"; } +.icon-eye-open:before { content: "\f06e"; } + +.icon-eye-close:before { content: "\f070"; } +.icon-warning-sign:before { content: "\f071"; } +.icon-plane:before { content: "\f072"; } +.icon-calendar:before { content: "\f073"; } +.icon-random:before { content: "\f074"; } +.icon-comment:before { content: "\f075"; } +.icon-magnet:before { content: "\f076"; } +.icon-chevron-up:before { content: "\f077"; } +.icon-chevron-down:before { content: "\f078"; } +.icon-retweet:before { content: "\f079"; } +.icon-shopping-cart:before { content: "\f07a"; } +.icon-folder-close:before { content: "\f07b"; } +.icon-folder-open:before { content: "\f07c"; } +.icon-resize-vertical:before { content: "\f07d"; } +.icon-resize-horizontal:before { content: "\f07e"; } + +.icon-bar-chart:before { content: "\f080"; } +.icon-twitter-sign:before { content: "\f081"; } +.icon-facebook-sign:before { content: "\f082"; } +.icon-camera-retro:before { content: "\f083"; } +.icon-key:before { content: "\f084"; } +.icon-cogs:before { content: "\f085"; } +.icon-comments:before { content: "\f086"; } +.icon-thumbs-up:before { content: "\f087"; } +.icon-thumbs-down:before { content: "\f088"; } +.icon-star-half:before { content: "\f089"; } +.icon-heart-empty:before { content: "\f08a"; } +.icon-signout:before { content: "\f08b"; } +.icon-linkedin-sign:before { content: "\f08c"; } +.icon-pushpin:before { content: "\f08d"; } +.icon-external-link:before { content: "\f08e"; } + +.icon-signin:before { content: "\f090"; } +.icon-trophy:before { content: "\f091"; } +.icon-github-sign:before { content: "\f092"; } +.icon-upload-alt:before { content: "\f093"; } +.icon-lemon:before { content: "\f094"; } +.icon-phone:before { content: "\f095"; } +.icon-check-empty:before { content: "\f096"; } +.icon-bookmark-empty:before { content: "\f097"; } +.icon-phone-sign:before { content: "\f098"; } +.icon-twitter:before { content: "\f099"; } +.icon-facebook:before { content: "\f09a"; } +.icon-github:before { content: "\f09b"; } +.icon-unlock:before { content: "\f09c"; } +.icon-credit-card:before { content: "\f09d"; } +.icon-rss:before { content: "\f09e"; } + +.icon-hdd:before { content: "\f0a0"; } +.icon-bullhorn:before { content: "\f0a1"; } +.icon-bell:before { content: "\f0a2"; } +.icon-certificate:before { content: "\f0a3"; } +.icon-hand-right:before { content: "\f0a4"; } +.icon-hand-left:before { content: "\f0a5"; } +.icon-hand-up:before { content: "\f0a6"; } +.icon-hand-down:before { content: "\f0a7"; } +.icon-circle-arrow-left:before { content: "\f0a8"; } +.icon-circle-arrow-right:before { content: "\f0a9"; } +.icon-circle-arrow-up:before { content: "\f0aa"; } +.icon-circle-arrow-down:before { content: "\f0ab"; } +.icon-globe:before { content: "\f0ac"; } +.icon-wrench:before { content: "\f0ad"; } +.icon-tasks:before { content: "\f0ae"; } + +.icon-filter:before { content: "\f0b0"; } +.icon-briefcase:before { content: "\f0b1"; } +.icon-fullscreen:before { content: "\f0b2"; } + +.icon-group:before { content: "\f0c0"; } +.icon-link:before { content: "\f0c1"; } +.icon-cloud:before { content: "\f0c2"; } +.icon-beaker:before { content: "\f0c3"; } +.icon-cut:before { content: "\f0c4"; } +.icon-copy:before { content: "\f0c5"; } +.icon-paper-clip:before { content: "\f0c6"; } +.icon-save:before { content: "\f0c7"; } +.icon-sign-blank:before { content: "\f0c8"; } +.icon-reorder:before { content: "\f0c9"; } +.icon-list-ul:before { content: "\f0ca"; } +.icon-list-ol:before { content: "\f0cb"; } +.icon-strikethrough:before { content: "\f0cc"; } +.icon-underline:before { content: "\f0cd"; } +.icon-table:before { content: "\f0ce"; } + +.icon-magic:before { content: "\f0d0"; } +.icon-truck:before { content: "\f0d1"; } +.icon-pinterest:before { content: "\f0d2"; } +.icon-pinterest-sign:before { content: "\f0d3"; } +.icon-google-plus-sign:before { content: "\f0d4"; } +.icon-google-plus:before { content: "\f0d5"; } +.icon-money:before { content: "\f0d6"; } +.icon-caret-down:before { content: "\f0d7"; } +.icon-caret-up:before { content: "\f0d8"; } +.icon-caret-left:before { content: "\f0d9"; } +.icon-caret-right:before { content: "\f0da"; } +.icon-columns:before { content: "\f0db"; } +.icon-sort:before { content: "\f0dc"; } +.icon-sort-down:before { content: "\f0dd"; } +.icon-sort-up:before { content: "\f0de"; } + +.icon-envelope-alt:before { content: "\f0e0"; } +.icon-linkedin:before { content: "\f0e1"; } +.icon-undo:before { content: "\f0e2"; } +.icon-legal:before { content: "\f0e3"; } +.icon-dashboard:before { content: "\f0e4"; } +.icon-comment-alt:before { content: "\f0e5"; } +.icon-comments-alt:before { content: "\f0e6"; } +.icon-bolt:before { content: "\f0e7"; } +.icon-sitemap:before { content: "\f0e8"; } +.icon-umbrella:before { content: "\f0e9"; } +.icon-paste:before { content: "\f0ea"; } + +.icon-user-md:before { content: "\f200"; } diff --git a/css/font/fontawesome-webfont.eot b/css/font/fontawesome-webfont.eot new file mode 100644 index 0000000..89070c1 Binary files /dev/null and b/css/font/fontawesome-webfont.eot differ diff --git a/css/font/fontawesome-webfont.svg b/css/font/fontawesome-webfont.svg new file mode 100644 index 0000000..1245f92 --- /dev/null +++ b/css/font/fontawesome-webfont.svg @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/font/fontawesome-webfont.ttf b/css/font/fontawesome-webfont.ttf new file mode 100644 index 0000000..c17e9f8 Binary files /dev/null and b/css/font/fontawesome-webfont.ttf differ diff --git a/css/font/fontawesome-webfont.woff b/css/font/fontawesome-webfont.woff new file mode 100644 index 0000000..09f2469 Binary files /dev/null and b/css/font/fontawesome-webfont.woff differ diff --git a/css/style.css b/css/style.css new file mode 100755 index 0000000..10d9028 --- /dev/null +++ b/css/style.css @@ -0,0 +1,1271 @@ +/* Reset -------------------------------------------------*/ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video { margin:0; padding:0; border:0; font-size:100%; font:inherit; vertical-align:baseline; } +article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section { display:block; } +body { line-height:1; } +ol,ul { list-style:none; } +blockquote,q { quotes:none; } +blockquote:before,blockquote:after,q:before,q:after { content:''; content:none; } +table { border-collapse:collapse; border-spacing:0; } + +/* Screen behavior -------------------------------------------------*/ +@media only screen and (max-width: 900px) { + #title span { display: none; } +} +@media only screen and (max-width: 600px) { + #title { display: none; } +} + +/* Basics -------------------------------------------------*/ +html, body { + min-height: 100%; + -webkit-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} +body { background-color: #222; background-image: url(../img/background.jpg); font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; -webkit-font-smoothing: antialiased; } +.center { left: 50%; top:50%; position: absolute; } +* { + -webkit-transition: opacity .3s ease-out, -webkit-transform .3s ease-out, box-shadow .3s; + -moz-transition: opacity .3s ease-out, -moz-transform .3s ease-out, box-shadow .3s; + -o-transition: opacity .3s ease-out, -o-transform .3s ease-out, box-shadow .3s; + transition: opacity .3s ease-out, transform .3s ease-out, box-shadow .3s; +} + +/* Tooltip ------------------------------------------------*/ +.tipsy { + padding: 4px; + font-size: 12px; + position: absolute; + z-index: 100000; + + /* Animation */ + -webkit-animation-name: fadeIn; + -webkit-animation-duration: .3s; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: fadeIn; + -moz-animation-duration: .3s; + -moz-animation-fill-mode: forwards; + -o-animation-name: fadeIn; + -o-animation-duration: .3s; + -o-animation-fill-mode: forwards; + animation-name: fadeIn; + animation-duration: .3s; + animation-fill-mode: forwards; +} +.tipsy-inner { + padding: 7px 10px 6px 10px; + color: white; + max-width: 200px; + text-align: center; + text-shadow: 0 -1px 0 #000; + background: #000; + box-shadow: 0 1px 2px hsla(0, 0%, 0%, .29); + border-radius: 3px; +} +.tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; } +.tipsy-arrow-n { border-bottom-color: #000; } +.tipsy-arrow-s { border-top-color: #000; } +.tipsy-arrow-e { border-left-color: #000; } +.tipsy-arrow-w { border-right-color: #000; } +.tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; } +.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} +.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} +.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } +.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } +.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } +.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; } +.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; } + +/* Overlay ------------------------------------------------*/ +.fadeIn { + -webkit-animation-name: fadeIn; + -webkit-animation-duration: .3s; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: fadeIn; + -moz-animation-duration: .3s; + -moz-animation-fill-mode: forwards; + -o-animation-name: fadeIn; + -o-animation-duration: .3s; + -o-animation-fill-mode: forwards; + animation-name: fadeIn; + animation-duration: .3s; + animation-fill-mode: forwards; +} +.fadeOut { + -webkit-animation-name: fadeOut; + -webkit-animation-duration: .3s; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: fadeOut; + -moz-animation-duration: .3s; + -moz-animation-fill-mode: forwards; + -o-animation-name: fadeOut; + -o-animation-duration: .3s; + -o-animation-fill-mode: forwards; + animation-name: fadeOut; + animation-duration: .3s; + animation-fill-mode: forwards; +} +.contentFadeIn { + -webkit-animation-name: bounceInDown; + -webkit-animation-duration: 1s; + -webkit-animation-timing-function: ease-out; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: bounceInDown; + -moz-animation-duration: .3s; + -moz-animation-fill-mode: forwards; + -o-animation-name: bounceInDown; + -o-animation-duration: 1s; + -o-animation-timing-function: ease-out; + -o-animation-fill-mode: forwards; + animation-name: bounceInDown; + animation-duration: 1s; + animation-timing-function: ease-out; + animation-fill-mode: forwards; +} +.contentFadeOut { + -webkit-animation-name: bounceOutUp; + -webkit-animation-duration: 1s; + -webkit-animation-timing-function: ease-out; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: bounceOutUp; + -moz-animation-duration: .3s; + -moz-animation-fill-mode: forwards; + -o-animation-name: bounceOutUp; + -o-animation-duration: 1s; + -o-animation-timing-function: ease-out; + -o-animation-fill-mode: forwards; + animation-name: bounceOutUp; + animation-duration: 1s; + animation-timing-function: ease-out; + animation-fill-mode: forwards; +} +.contentZoomOut { + -webkit-animation-name: zoomOut; + -webkit-animation-duration: .3s; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: zoomOut; + -moz-animation-duration: .3s; + -moz-animation-fill-mode: forwards; + -o-animation-name: zoomOut; + -o-animation-duration: .3s; + -o-animation-fill-mode: forwards; + animation-name: zoomOut; + animation-duration: .3s; + animation-fill-mode: forwards; +} +.contentZoomIn { + -webkit-animation-name: zoomIn; + -webkit-animation-duration: .3s; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: zoomIn; + -moz-animation-duration: .3s; + -moz-animation-fill-mode: forwards; + -o-animation-name: zoomIn; + -o-animation-duration: .3s; + -o-animation-fill-mode: forwards; + animation-name: zoomIn; + animation-duration: .3s; + animation-fill-mode: forwards; +} +.shake { + -webkit-animation-name: shake; + -webkit-animation-duration: 1s; + -webkit-animation-timing-function: ease-out; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: shake; + -moz-animation-duration: .3s; + -moz-animation-fill-mode: forwards; + -o-animation-name: shake; + -o-animation-duration: 1s; + -o-animation-timing-function: ease-out; + -o-animation-fill-mode: forwards; + animation-name: shake; + animation-duration: 1s; + animation-timing-function: ease-out; + animation-fill-mode: forwards; +} + +/* Loading ------------------------------------------------*/ +#loading { + position: fixed; + width: 100%; + height: 2px; + background-color: #2f0d0e; + background-repeat: repeat-x; + z-index: 1; + + /* Animation */ + -webkit-animation-name: moveBackground; + -webkit-animation-duration: .2s; + -webkit-animation-timing-function: linear; + -webkit-animation-iteration-count: infinite; + -moz-animation-name: moveBackground; + -moz-animation-duration: .2s; + -moz-animation-timing-function: linear; + -moz-animation-iteration-count: infinite; + -o-animation-name: moveBackground; + -o-animation-duration: .2s; + -o-animation-timing-function: linear; + -o-animation-iteration-count: infinite; + animation-name: moveBackground; + animation-duration: .2s; + animation-timing-function: linear; + animation-iteration-count: infinite; +} +#loading h1 { + margin: 13px; + color: #ddd; + font-size: 14px; + font-weight: bold; + text-shadow: 0px 1px 0px #000; + text-transform: capitalize; +} +#loading h1 span { + margin-left: 10px; + font-weight: normal; + text-transform: none; +} +#loading.loading { + background-image: url(../img/bar/loading.png); +} +#loading.error { + background-image: url(../img/bar/error.png); +} + +/* Header ------------------------------------------------*/ +header { + position: fixed; + height: 40px; + width: 100%; + + background-color: #333; + background-image: -webkit-gradient(linear, left top, left bottom, from(#555), to(#333)); + background-image: -webkit-linear-gradient(top, #555, #333); + background-image: -moz-linear-gradient(top, #555, #333); + background-image: -o-linear-gradient(top, #555, #333); + background-image: -ms-linear-gradient(top, #555, #333); + background-image: linear-gradient(top, #555, #333); + + box-shadow: inset 0px 1px 0px #666, inset 0px -1px 0px #393939, 0px 0px 3px #000; + border-top: 1px solid #222; + z-index: 1; + + -webkit-transition: opacity .3s ease-out, -webkit-transform .3s ease-out, box-shadow .3s, margin-top .3s; + -moz-transition: opacity .3s ease-out, -moz-transform .3s ease-out, box-shadow .3s, margin-top .3s; + -o-transition: opacity .3s ease-out, -o-transform .3s ease-out, box-shadow .3s, margin-top .3s; + transition: opacity .3s ease-out, transform .3s ease-out, box-shadow .3s, margin-top .3s; + + /* Animation */ + -webkit-animation-name: moveDown; + -webkit-animation-duration: .3s; + -webkit-animation-timing-function: ease-out; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: moveDown; + -moz-animation-duration: .3s; + -moz-animation-timing-function: ease-out; + -moz-animation-fill-mode: forwards; + -o-animation-name: moveDown; + -o-animation-duration: .3s; + -o-animation-timing-function: ease-out; + -o-animation-fill-mode: forwards; + animation-name: moveDown; + animation-duration: .3s; + animation-timing-function: ease-out; + animation-fill-mode: forwards; +} + + /* Title ------------------------------------------------*/ + #title { + position: absolute; + margin: 0px 30%; + width: 40%; + margin-top: 11px; + color: #fff; + font-size: 16px; + font-weight: bold; + text-align: center; + text-shadow: 0px -1px 0px #000; + } + #title.editable { + cursor: pointer; + } + #title span { + color: #aaa; + font-size: 16px; + font-weight: normal; + } + + /* Button ------------------------------------------------*/ + header .button { + float: left; + position: absolute; + padding: 7px 10px 8px 10px; + margin: 6px 0px 0px 8px; + font-size: 12px; + font-weight: bold; + color: #fff; + text-shadow: 0px -1px 0px #000; + text-decoration: none !important; + + background: #555; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(1, #555), color-stop(0, #333)); + background-image: -webkit-linear-gradient(top, #555 0%, #333 100%); + background-image: -moz-linear-gradient(top, #555 0%, #333 100%); + background-image: -o-linear-gradient(top, #555 0%, #333 100%); + background: linear-gradient(top, #555 0%, #333 100%); + + border: 1px solid #252525; + border-radius: 3px; + box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0px 1px 0px #444; + cursor: pointer; + } + header .button:hover { + background-color: #5c5c5c; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(92, 92, 92)), to(rgb(57, 57, 57))); + background-image: -webkit-linear-gradient(top, rgb(92, 92, 92), rgb(57, 57, 57)); + background-image: -moz-linear-gradient(top, rgb(92, 92, 92), rgb(57, 57, 57)); + background-image: -o-linear-gradient(top, rgb(92, 92, 92), rgb(57, 57, 57)); + background-image: -ms-linear-gradient(top, rgb(92, 92, 92), rgb(57, 57, 57)); + background-image: linear-gradient(top, rgb(92, 92, 92), rgb(57, 57, 57)); + } + header .button:active { + background-color: #393939; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(57, 57, 57)), to(rgb(68, 68, 68))); + background-image: -webkit-linear-gradient(top, rgb(57, 57, 57), rgb(68, 68, 68)); + background-image: -moz-linear-gradient(top, rgb(57, 57, 57), rgb(68, 68, 68)); + background-image: -o-linear-gradient(top, rgb(57, 57, 57), rgb(68, 68, 68)); + background-image: -ms-linear-gradient(top, rgb(57, 57, 57), rgb(68, 68, 68)); + background-image: linear-gradient(top, rgb(57, 57, 57), rgb(68, 68, 68)); + } + header .button.icon { + float: right; + position: relative; + padding: 7px 11px 4px 11px; + margin: 6px 8px 0px 0px; + font-family: 'FontAwesome'; + font-size: 16px; + } + #tools_albums, #tools_album, #tools_photo { + display: none; + } + + /* Button Divider ------------------------------------------------*/ + header .button_divider { + float: right; + position: relative; + margin-right: 11px; + margin-top: 1px; + width: 1px; + height: 39px; + background-color: transparent; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(68, 68, 68)), to(rgb(37, 37, 37))); + background-image: -webkit-linear-gradient(top, rgba(68, 68, 68, 0), rgb(25, 25, 25)); + background-image: -moz-linear-gradient(top, rgb(68, 68, 68), rgb(37, 37, 37)); + background-image: -o-linear-gradient(top, rgb(68, 68, 68), rgb(37, 37, 37)); + background-image: -ms-linear-gradient(top, rgb(68, 68, 68), rgb(37, 37, 37)); + background-image: linear-gradient(top, rgb(68, 68, 68), rgb(37, 37, 37)); + border-right: 1px solid #555; + } + header .button_divider.less { + margin-right: 8px; + } + + + /* Search ------------------------------------------------*/ + #search { + float: right; + width: 80px; + margin: 7px 8px 0px 0px; + padding: 5px 10px 7px 10px; + background-color: #444; + color: #fff; + border: none; + border: 1px solid #111; + box-shadow: 0px 1px 0px #555; + outline: none; + border-radius: 5px; + opacity: .6; + -webkit-transition: opacity .3s ease-out, -webkit-transform .3s ease-out, box-shadow .3s, width .2s ease-out; + -moz-transition: opacity .3s ease-out, -moz-transform .3s ease-out, box-shadow .3s, width .2s ease-out; + -o-transition: opacity .3s ease-out, -o-transform .3s ease-out, box-shadow .3s, width .2s ease-out; + transition: opacity .3s ease-out, transform .3s ease-out, box-shadow .3s, width .2s ease-out; + } + #search:focus { + box-shadow: 0px 1px 0px #555, inset 0px 0px 2px #333; + opacity: 1; + width: 180px; + } + + /* Tools ------------------------------------------------*/ + .tools { + float: right; + padding: 5px 5px 5px 5px; + margin: 5px 8px 0px 0px; + font-family: 'IconicStroke'; + color: #aaa; + font-size: 21px; + text-shadow: 0px -1px 0px #222; + border-radius: 3px; + cursor: pointer; + } + .tools a.list { + line-height: 21px; + } + .tools:hover a { + color: #fff; + } + .tools .icon-star { + color: #f0ef77; + } + .tools .icon-rss.active { + color: #ff9737; + } + + +/* Content ------------------------------------------------*/ +#content { + position: absolute; + padding: 41px 0px 33px 0px; + width: 100%; +} + + /* Photo ------------------------------------------------*/ + .photo { + float: left; + display: inline-block; + width: 206px; + height: 206px; + margin: 30px 0px 0px 30px; + cursor: pointer; + } + .photo img { + position: absolute; + width: 200px; + height: 200px; + background-image: url(../img/checks.png); + border-radius: 3px; + box-shadow: 0px 1px 5px #111; + border: 3px solid #ccc; + } + .photo:hover img, .photo.active img { + box-shadow: 0px 0px 10px #005ecc; + } + + /* Album ------------------------------------------------*/ + .album { + float: left; + display: inline-block; + width: 206px; + height: 206px; + margin: 30px 0px 0px 30px; + cursor: pointer; + } + .album img:first-child, .album img:nth-child(2) { + -webkit-transform: rotate(0deg) translateY(0px) translateX(0px); + -moz-transform: rotate(0deg) translateY(0px) translateX(0px); + -o-transform: rotate(0deg) translateY(0px) translateX(0px); + transform: rotate(0deg) translateY(0px) translateX(0px); + opacity: 0; + } + .album:hover img:first-child { + -webkit-transform: rotate(-2deg) translateY(10px) translateX(-12px); + -moz-transform: rotate(-2deg) translateY(10px) translateX(-12px); + -o-transform: rotate(-2deg) translateY(10px) translateX(-12px); + transform: rotate(-2deg) translateY(10px) translateX(-12px); + opacity: 1; + } + .album:hover img:nth-child(2) { + -webkit-transform: rotate(5deg) translateY(-8px) translateX(12px); + -moz-transform: rotate(5deg) translateY(-8px) translateX(12px); + -o-transform: rotate(5deg) translateY(-8px) translateX(12px); + transform: rotate(5deg) translateY(-8px) translateX(12px); + opacity: 1; + } + .album img { + position: absolute; + width: 200px; + height: 200px; + background-image: url(../img/checks.png); + border-radius: 3px; + box-shadow: 0px 1px 5px #111; + border: 3px solid #ccc; + } + .album:hover img { + box-shadow: 0px 0px 10px #005ecc; + } + + /* Album/Photo Overlay ------------------------------------------------*/ + .album .overlay, .photo .overlay { + position: absolute; + width: 200px; + height: 200px; + margin: 3px; + background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 20%, rgba(0,0,0,0.9) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(20%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.9))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 20%,rgba(0,0,0,0.9) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 20%,rgba(0,0,0,0.9) 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 20%,rgba(0,0,0,0.9) 100%); /* IE10+ */ + background: linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 20%,rgba(0,0,0,0.9) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#e6000000',GradientType=0 ); /* IE6-9 */ + } + .photo .overlay { + opacity: 0; + } + .photo:hover .overlay, .photo.active .overlay { + opacity: 1; + } + .album .overlay h1, .photo .overlay h1 { + min-height: 19px; + width: 190px; + margin: 153px 0px 3px 15px; + color: #fff; + font-size: 16px; + font-weight: bold; + text-shadow: 0px 1px 0px #000; + overflow: hidden; + } + .album .overlay a { + margin-left: 15px; + font-size: 11px; + color: #aaa; + text-shadow: 0px 1px 0px #000; + } + .photo .overlay a { + margin: 155px 0px 5px 15px; + font-size: 11px; + color: #aaa; + text-shadow: 0px 1px 0px #000; + } + + /* Badges ------------------------------------------------*/ + .album .badge, .photo .badge { + position: absolute; + margin-top: -1px; + margin-left: 12px; + padding: 12px 7px 3px 7px; + box-shadow: 0px 0px 3px #000; + border-radius: 0px 0px 3px 3px; + border: 1px solid #fff; + border-top: none; + color: #fff; + font-size: 24px; + text-shadow: 0px 1px 0px #000; + font-family: 'IconicStroke'; + opacity: 0.9; + } + .album .badge::after, .photo .badge::after { + content: ""; + position: absolute; + margin-top: -12px; + margin-left: -26px; + width: 34px; + height: 5px; + /* inset 0px 1px 1px rgba(0,0,0,.3); */ + background: -moz-linear-gradient(top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,1)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(0,0,0,1) 0%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(0,0,0,1) 0%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, rgba(0,0,0,1) 0%,rgba(0,0,0,0) 100%); /* IE10+ */ + background: linear-gradient(top, rgba(0,0,0,1) 0%,rgba(0,0,0,0) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */ + opacity: .4; + } + .album .badge.icon-star::after { + margin-left: -28px; + width: 36px; + } + .album .badge.icon-reorder::after { + margin-left: -30px; + width: 38px; + } + .album .badge:nth-child(2n), .photo .badge:nth-child(2n) { + margin-left: 55px; + } + .album .badge.red, .photo .badge.red { + background: #d64b4b; + background: -webkit-gradient(linear, left top, left bottom, from(#d64b4b), to(#ab2c2c)); + background: -webkit-linear-gradient(top, #d64b4b, #ab2c2c); + background: -moz-linear-gradient(top, #d64b4b, #ab2c2c); + background: -ms-linear-gradient(top, #d64b4b, #ab2c2c); + background: -o-linear-gradient(top, #d64b4b, #ab2c2c); + } + .album .badge.blue, .photo .badge.blue { + background: #d64b4b; + background: -webkit-gradient(linear, left top, left bottom, from(#347cd6), to(#2945ab)); + background: -webkit-linear-gradient(top, #347cd6, #2945ab); + background: -moz-linear-gradient(top, #347cd6, #2945ab); + background: -ms-linear-gradient(top, #347cd6, #2945ab); + background: -o-linear-gradient(top, #347cd6, #2945ab); + } + + /* Divider ------------------------------------------------*/ + .divider { + float: left; + width: 100%; + height: 31px; + margin-top: 50px; + opacity: 0; + + background-color: #2b2b2b; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(43, 43, 43)), to(rgb(35, 35, 35))); + background-image: -webkit-linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + background-image: -moz-linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + background-image: -o-linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + background-image: -ms-linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + background-image: linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + + box-shadow: 0px 1px 0px #111, inset 0px 1px 0px rgba(255, 255, 255, .1); + } + .divider:first-child { + margin-top: 1px; + } + .divider h1 { + margin: 8px 0px 0px 30px; + color: #fff; + font-size: 14px; + font-weight: bold; + text-shadow: 0px -1px 0px #000; + } + +/* Overlay ------------------------------------------------*/ +.message_overlay { + position: fixed; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,.3); + background-image: -webkit-gradient(radial, 50% 50%,0,50% 50%,200, from(rgba(0, 0, 0, 0.85)), to(rgba(0, 0, 0, 0.50))); + background-image: -webkit-radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + background-image: -moz-radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + background-image: -o-radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + background-image: -ms-radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + background-image: radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + z-index: 1000; +} + + .message { + position: absolute; + display: inline-block; + width: 500px; + margin-left: -250px; + margin-top: -85px; + background-color: #505050; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(80, 80, 80)), to(rgb(43, 42, 42))); + background-image: -webkit-linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + background-image: -moz-linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + background-image: -o-linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + background-image: -ms-linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + background-image: linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + border-radius: 5px; + border-bottom: 1px solid #000; + box-shadow: 0px 0px 5px #000, inset 0px 1px 0px rgba(255,255,255,.2), inset 1px 0px 0px rgba(255,255,255,.05), inset -1px 0px 0px rgba(255,255,255,.05); + + /* Animation */ + -webkit-animation-name: bounceInDown; + -webkit-animation-duration: 1s; + -webkit-animation-timing-function: ease-out; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: bounceInDown; + -moz-animation-duration: 1s; + -moz-animation-timing-function: ease-out; + -moz-animation-fill-mode: forwards; + -o-animation-name: bounceInDown; + -o-animation-duration: 1s; + -o-animation-timing-function: ease-out; + -o-animation-fill-mode: forwards; + animation-name: bounceInDown; + animation-duration: 1s; + animation-timing-function: ease-out; + animation-fill-mode: forwards; + } + .message.add { + margin-top: -155px; + } + .message h1 { + float: left; + width: 100%; + padding: 12px 0px; + background-color: rgba(0, 0, 0, .2); + color: #fff; + font-size: 16px; + font-weight: bold; + text-shadow: 0px -1px 0px #000; + text-align: center; + border-bottom: 1px solid #111; + box-shadow: 0px 1px 0px rgba(255,255,255,.2); + } + .message .close { + position: absolute; + top: 10px; + right: 12px; + color: #aaa; + font-size: 20px; + text-shadow: 0px -1px 0px #111; + cursor: pointer; + } + .message p { + float: left; + width: 470px; + margin-top: 1px; + padding: 12px 15px 15px 15px; + color: #eee; + font-size: 14px; + background-color: #555; + text-shadow: 0px -1px 0px #222; + line-height: 20px; + border-bottom: 1px solid #111; + box-shadow: 0px 1px 0px rgba(255,255,255,.1); + } + .message .button { + float: right; + margin: 15px 15px 15px 0px; + padding: 6px 10px 8px 10px; + background-color: #4e4e4e; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(78, 78, 78)), to(rgb(45, 45, 45))); + background-image: -webkit-linear-gradient(top, rgb(78, 78, 78), rgb(45, 45, 45)); + background-image: -moz-linear-gradient(top, rgb(78, 78, 78), rgb(45, 45, 45)); + background-image: -o-linear-gradient(top, rgb(78, 78, 78), rgb(45, 45, 45)); + background-image: -ms-linear-gradient(top, rgb(78, 78, 78), rgb(45, 45, 45)); + background-image: linear-gradient(top, rgb(78, 78, 78), rgb(45, 45, 45)); + + color: #ccc; + font-size: 14px; + font-weight: bold; + text-align: center; + text-shadow: 0px -1px 0px #000; + border-radius: 5px; + border: 1px solid #111; + box-shadow: inset 0px 1px 0px rgba(255,255,255,.2), 0px 1px 0px rgba(255,255,255,.1); + cursor: pointer; + } + .message .button.active { + color: #fff; + box-shadow: inset 0px 1px 0px rgba(255,255,255,.2), 0px 1px 0px rgba(255,255,255,.1), 0px 0px 5px #005ecc; + } + .message .button:hover { + background-color: #565757; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(86, 87, 87)), to(rgb(57, 57, 57))); + background-image: -webkit-linear-gradient(top, rgb(86, 87, 87), rgb(57, 57, 57)); + background-image: -moz-linear-gradient(top, rgb(86, 87, 87), rgb(57, 57, 57)); + background-image: -o-linear-gradient(top, rgb(86, 87, 87), rgb(57, 57, 57)); + background-image: -ms-linear-gradient(top, rgb(86, 87, 87), rgb(57, 57, 57)); + background-image: linear-gradient(top, rgb(86, 87, 87), rgb(57, 57, 57)); + } + .message .button:active, .message .button.pressed { + background-color: #393939; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(57, 57, 57)), to(rgb(75, 76, 76))); + background-image: -webkit-linear-gradient(top, rgb(57, 57, 57), rgb(75, 76, 76)); + background-image: -moz-linear-gradient(top, rgb(57, 57, 57), rgb(75, 76, 76)); + background-image: -o-linear-gradient(top, rgb(57, 57, 57), rgb(75, 76, 76)); + background-image: -ms-linear-gradient(top, rgb(57, 57, 57), rgb(75, 76, 76)); + background-image: linear-gradient(top, rgb(57, 57, 57), rgb(75, 76, 76)); + } + + /* Add Album ------------------------------------------------*/ + .add_album { + float: left; + display: inline-block; + width: 200px; + height: 200px; + margin: 30px 0px 30px 30px; + border-radius: 3px; + border: 3px dashed #777; + cursor: pointer; + -webkit-transition: border .3s; + -moz-transition: border .3s; + -o-transition: border .3s; + transition: border .3s; + } + .add_album:hover { + border: 3px dashed #fff; + } + .add_album .icon { + margin: 55px 65px 0px 65px; + color: #777; + font-family: 'FontAwesome'; + font-size: 80px; + text-shadow: 0px 1px 2px #000; + -webkit-transition: color .3s; + -moz-transition: color .3s; + -o-transition: color .3s; + transition: color .3s; + } + .add_album:hover .icon { + color: #fff; + } + .add_album a { + float: left; + width: 100%; + color: #777; + font-size: 14px; + font-weight: bold; + text-shadow: 0px 1px 0px #000; + text-align: center; + -webkit-transition: color .3s; + -moz-transition: color .3s; + -o-transition: color .3s; + transition: color .3s; + } + .add_album:hover a { + color: #fff; + } + + /* Sign in ------------------------------------------------*/ + .sign_in { + float: left; + width: 500px; + margin-top: 1px; + padding: 20px 0px; + color: #eee; + font-size: 14px; + background-color: #555; + text-shadow: 0px -1px 0px #222; + line-height: 20px; + border-bottom: 1px solid #111; + box-shadow: 0px 1px 0px rgba(255,255,255,.1); + } + .sign_in label { + float: left; + width: 20%; + margin: 6px 0px 0px 10%; + } + .sign_in label:first-of-type { + margin-bottom: 10px; + } + .sign_in input { + float: left; + width: 55%; + padding: 7px 10px 9px 10px; + background-color: #444; + color: #fff; + text-shadow: 0px 1px 0px #222; + border: none; + border: 1px solid #111; + box-shadow: 0px 1px 0px #777; + outline: none; + border-radius: 5px; + } + .sign_in input:first-of-type { + margin-bottom: 10px; + } + .sign_in input:focus { + box-shadow: 0px 1px 0px #777, inset 0px 0px 3px #333, 0px 0px 5px #005ecc; + } + .sign_in input.error:focus { + box-shadow: 0px 1px 0px #777, inset 0px 0px 3px #333, 0px 0px 5px #cc0007; + } + + /* Sign in ------------------------------------------------*/ + .copylink { + float: left; + width: 95%; + padding: 7px 10px 9px 10px; + margin-top: 10px; + background-color: #444; + color: #fff; + text-shadow: 0px 1px 0px #222; + border: none; + border: 1px solid #111; + box-shadow: 0px 1px 0px #777; + outline: none; + border-radius: 5px; + } + +/* Image View ------------------------------------------------*/ +#image_view { + position: fixed; + display: none; + width: 100%; + min-height: 100%; + background-color: rgba(30,30,30,.99); + box-shadow: 0px 2px 4px #000; + -webkit-transition: background-color .3s; +} + +#image_view #image { + position: absolute; + top: 70px; + right: 30px; + bottom: 30px; + left: 30px; + background-repeat: no-repeat; + background-position: 50% 50%; + background-size: contain; + -webkit-transition: top .3s, bottom .3s; + + -webkit-animation-name: zoomIn; + -webkit-animation-duration: .3s; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: zoomIn; + -moz-animation-duration: .3s; + -moz-animation-fill-mode: forwards; + -o-animation-name: zoomIn; + -o-animation-duration: .3s; + -o-animation-fill-mode: forwards; + animation-name: zoomIn; + animation-duration: .3s; + animation-fill-mode: forwards; +} + + /* Previous/Next Buttons ------------------------------------------------*/ + #image_view a { + position: fixed; + top: 50%; + margin-top: -10px; + color: #fff; + font-size: 50px; + text-shadow: 0px 1px 2px #000; + cursor: pointer; + opacity: .1; + z-index: 1; + } + #image_view a:hover { + opacity: .9; + } + #image_view a#previous { + left: 20px; + -webkit-transition: left .3s; + } + #image_view a#next { + right: 20px; + -webkit-transition: right .3s + } + + /* InfoBox ------------------------------------------------*/ + #infobox_overlay { + z-index: 2; + position: fixed; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,.7); + -webkit-animation-name: fadeIn; + -webkit-animation-duration: .5s; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: fadeIn; + -moz-animation-duration: .5s; + -moz-animation-fill-mode: forwards; + -o-animation-name: fadeIn; + -o-animation-duration: .5s; + -o-animation-fill-mode: forwards; + animation-name: fadeIn; + animation-duration: .5s; + animation-fill-mode: forwards; + } + #infobox { + z-index: 3; + position: fixed; + right: -320px; + width: 300px; + height: 100%; + background-color: rgba(20,20,20,0.98); + box-shadow: -1px 0px 2px #000; + display: none; + + -webkit-user-select: text; + -moz-user-select: text; + -o-user-select: text; + user-select: text; + + -webkit-transition: right .5s ease-out; + -moz-transition: right .5s; + -o-transition: right .5s; + transition: right .5s; + } + #infobox .wrapper { + float: left; + height: 100%; + overflow: scroll; + } + #infobox .header { + float: left; + height: 41px; + width: 100%; + + background-color: #1d1d1d; + background-image: -webkit-gradient(linear, left top, left bottom, from(#1d1d1d), to(#050505)); + background-image: -webkit-linear-gradient(top, #1d1d1d, #050505); + background-image: -moz-linear-gradient(top, #1d1d1d, #050505); + background-image: -o-linear-gradient(top, #1d1d1d, #050505); + background-image: -ms-linear-gradient(top, #1d1d1d, #050505); + background-image: linear-gradient(top, #1d1d1d, #050505); + + box-shadow: inset 0px 1px 0px #111, inset 0px -1px 0px #000; + border-top: 1px solid #000; + } + #infobox .header h1 { + position: absolute; + margin: 0px 30%; + width: 40%; + margin-top: 11px; + color: #fff; + font-size: 16px; + font-weight: bold; + text-align: center; + text-shadow: 0px -1px 0px #000; + } + #infobox .header a { + position: absolute; + right: 15px; + margin: 10px 0px; + color: #fff; + font-size: 21px; + font-weight: bold; + text-shadow: 0px -1px 0px #000; + opacity: .5; + cursor: pointer; + } + #infobox .header a:hover { + opacity: 1; + } + #infobox .separater { + float: left; + width: 100%; + height: 27px; + + background-color: #2b2b2b; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(43, 43, 43)), to(rgb(35, 35, 35))); + background-image: -webkit-linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + background-image: -moz-linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + background-image: -o-linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + background-image: -ms-linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + background-image: linear-gradient(top, rgb(43, 43, 43), rgb(35, 35, 35)); + + box-shadow: 0px 1px 0px #000, inset 0px 1px 0px rgba(255, 255, 255, .1); + } + #infobox .separater h1 { + margin: 5px 0px 0px 15px; + color: #fff; + font-size: 14px; + font-weight: bold; + text-shadow: 0px -1px 0px #000; + } + #infobox table { + float: left; + margin: 10px 0px 15px 15px; + } + #infobox table tr td { + padding: 5px 0px; + color: #fff; + font-size: 14px; + line-height: 19px; + } + #infobox table tr td:first-child { + width: 110px; + } + #infobox table tr td:last-child { + padding-right: 10px; + } + #infobox .bumper { + float: left; + width: 100%; + height: 35px; + } + #infobox #edit_description { + display: inline; + margin-left: 3px; + width: 20px; + height: 5px; + cursor: pointer; + } + +/* ContextMenu ------------------------------------------------*/ +.contextmenu_bg { + position: fixed; + height: 100%; + width: 100%; + z-index: 1000; +} +.contextmenu { + position: fixed; + top: 110%; + left: 110%; + padding: 5px 0px; + background-color: #393939; + background-image: -webkit-gradient(linear, left top, left bottom, from(#393939), to(#2d2d2d)); + background-image: -webkit-linear-gradient(top, #444, #2d2d2d); + background-image: -moz-linear-gradient(top, #393939, #2d2d2d); + background-image: -o-linear-gradient(top, #393939, #2d2d2d); + background-image: -ms-linear-gradient(top, #393939, #2d2d2d); + background-image: linear-gradient(top, #393939, #2d2d2d); + border: 1px solid rgba(0,0,0,0.7); + border-bottom: 1px solid rgba(0,0,0,.9); + border-radius: 5px; + box-shadow: 0px 3px 5px rgba(0,0,0,0.4), inset 0px 1px 0px rgba(255,255,255,0.2), inset 1px 0px 0px rgba(255,255,255,0.05), inset -1px 0px 0px rgba(255,255,255,0.05); + opacity: .98; + z-index: 1001; +} + + /* Items ------------------------------------------------*/ + .contextmenu tr { + font-size: 14px; + color: #eee; + text-shadow: 0px -1px 0px rgba(0,0,0,.7); + cursor: pointer; + } + .contextmenu tr:hover { + background-color: #6a84f2; + background-image: -webkit-gradient(linear, left top, left bottom, from(#6a84f2), to(#3959ef)); + background-image: -webkit-linear-gradient(top, #6a84f2, #3959ef); + background-image: -moz-linear-gradient(top, #6a84f2, #3959ef); + background-image: -o-linear-gradient(top, #6a84f2, #3959ef); + background-image: -ms-linear-gradient(top, #6a84f2, #3959ef); + background-image: linear-gradient(top, #6a84f2, #3959ef); + } + .contextmenu tr td { + padding: 5px 20px 5px 10px; + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; + } + .contextmenu tr:hover td { + color: #fff; + box-shadow: inset 0px 1px 0px rgba(255,255,255,.1); + text-shadow: 0px -1px 0px rgba(0,0,0,.7); + } + .contextmenu tr a { + float: left; + width: 10px; + margin-right: 10px; + text-align: center; + } + +/* Upload ------------------------------------------------*/ +#upload { + display: none; +} +.upload_overlay { + position: fixed; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,.3); + background-image: -webkit-gradient(radial, 50% 50%,0,50% 50%,200, from(rgba(0, 0, 0, 0.85)), to(rgba(0, 0, 0, 0.50))); + background-image: -webkit-radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + background-image: -moz-radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + background-image: -o-radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + background-image: -ms-radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + background-image: radial-gradient(50% 50%, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.85)); + z-index: 1000; +} +.upload_message { + position: absolute; + display: inline-block; + width: 200px; + margin-left: -100px; + margin-top: -85px; + background-color: #505050; + background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(80, 80, 80)), to(rgb(43, 42, 42))); + background-image: -webkit-linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + background-image: -moz-linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + background-image: -o-linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + background-image: -ms-linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + background-image: linear-gradient(top, rgb(80, 80, 80), rgb(43, 42, 42)); + border-radius: 5px; + border-bottom: 1px solid #000; + box-shadow: 0px 0px 5px #000, inset 0px 1px 0px rgba(255,255,255,.2), inset 1px 0px 0px rgba(255,255,255,.05), inset -1px 0px 0px rgba(255,255,255,.05); + + /* Animation */ + -webkit-animation-name: bounceInDown; + -webkit-animation-duration: 1s; + -webkit-animation-timing-function: ease-out; + -webkit-animation-fill-mode: forwards; + -moz-animation-name: bounceInDown; + -moz-animation-duration: 1s; + -moz-animation-timing-function: ease-out; + -moz-animation-fill-mode: forwards; + -o-animation-name: bounceInDown; + -o-animation-duration: 1s; + -o-animation-timing-function: ease-out; + -o-animation-fill-mode: forwards; + animation-name: bounceInDown; + animation-duration: 1s; + animation-timing-function: ease-out; + animation-fill-mode: forwards; +} +.upload_message a { + float: left; + margin: 35px 69px 5px 69px; + color: #fff; + font-size: 80px; + text-shadow: 0px 1px 2px #000; + z-index: 2; + + /* Animation */ + -webkit-animation-name: pulse; + -webkit-animation-duration: 2s; + -webkit-animation-timing-function: ease-in-out; + -webkit-animation-iteration-count: infinite; + -moz-animation-name: pulse; + -moz-animation-duration: 2s; + -moz-animation-timing-function: ease-in-out; + -moz-animation-iteration-count: infinite; + -o-animation-name: pulse; + -o-animation-duration: 2s; + -o-animation-timing-function: ease-in-out; + -o-animation-iteration-count: infinite; + animation-name: pulse; + animation-duration: 2s; + animation-timing-function: ease-in-out; + animation-iteration-count: infinite; +} +.upload_message p { + float: left; + width: 200px; + margin: 10px 0px; + color: #fff; + font-size: 14px; + text-align: center; + text-shadow: 0px -1px 0px #000; +} +.upload_message .progressbar { + float: left; + width: 170px; + height: 25px; + margin: 15px; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAZBAMAAABN41qcAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4VHX0Z+AxRzNRrtksUvwf7+Gm3BtzzHPDTNgQCqwKXfZwSeNHHJz1OIT8JjtAq6xWtCLwGPLzYZi+3YV8DGMiT4VVuG7oiZpGzrZJhcs/hL49xtzH/Dy6bdfTsXYNY+5yluWO4D4neK/ZUvok/17X0HPBLsF+vuUlhfwX4j/rSfAJ4H1H0qZJ9dN7nR19frRTeBt4Fe9FwpwtN+2p1MXscGLHR9SXrmMgjONd1ZxKzpBeA71b4tNhj6JGoyFNp4GHgwUp9qplfmnFW5oTdy7NamcwCI49kv6fN5IAHgD+0rbyoBc3SOjczohbyS1drbq6pQdqumllRC/0ymTtej8gpbbuVwpQfyw66dqEZyxZKxtHpJn+tZnpnEdrYBbueF9qQn93S7HQGGHnYP7w6L+YGHNtd1FJitqPAR+hERCNOFi1i1alKO6RQnjKUxL1GN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gogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxMi0wOS0yOFQxNDowOTozMDwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAyLjEuMTwveG1wOkNyZWF0b3JUb29sPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KhsXwcAAAABJQTFRFAAAA////////////////////PlKtOgAAAAZ0Uk5TAAECAwQF749peAAAAF1JREFUGNNjYIAA11AICIDyGZigAqEGMBFWmAhMgMEUKhAEFwlFN4YZJqIAExGFCoTgNoYRpskBJsICExHAbQzMC4EYxhjgNkYVKhCM2xhiQgLTGCJCgpWckMAwBgAeZ0aFTqsxyQAAAABJRU5ErkJggg==), #101010; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAZBAMAAABN41qcAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4VHX0Z+AxRzNRrtksUvwf7+Gm3BtzzHPDTNgQCqwKXfZwSeNHHJz1OIT8JjtAq6xWtCLwGPLzYZi+3YV8DGMiT4VVuG7oiZpGzrZJhcs/hL49xtzH/Dy6bdfTsXYNY+5yluWO4D4neK/ZUvok/17X0HPBLsF+vuUlhfwX4j/rSfAJ4H1H0qZJ9dN7nR19frRTeBt4Fe9FwpwtN+2p1MXscGLHR9SXrmMgjONd1ZxKzpBeA71b4tNhj6JGoyFNp4GHgwUp9qplfmnFW5oTdy7NamcwCI49kv6fN5IAHgD+0rbyoBc3SO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mRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxMi0wOS0yOFQxNDowOTozMDwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAyLjEuMTwveG1wOkNyZWF0b3JUb29sPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KhsXwcAAAABJQTFRFAAAA////////////////////PlKtOgAAAAZ0Uk5TAAECAwQF749peAAAAF1JREFUGNNjYIAA11AICIDyGZigAqEGMBFWmAhMgMEUKhAEFwlFN4YZJqIAExGFCoTgNoYRpskBJsICExHAbQzMC4EYxhjgNkYVKhCM2xhiQgLTGCJCgpWckMAwBgAeZ0aFTqsxyQAAAABJRU5ErkJggg==), -webkit-linear-gradient(top, #101010, #1f1f1f); + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAZBAMAAABN41qcAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4VHX0Z+AxRzNRrtksUvwf7+Gm3BtzzHPDTNgQCqwKXfZwSeNHHJz1OIT8JjtAq6xWtCLwGPLzYZi+3YV8DGMiT4VVuG7oiZpGzrZJhcs/hL49xtzH/Dy6bdfTsXYNY+5yluWO4D4neK/ZUvok/17X0HPB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AgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgogICAgICAgICA8ZGM6c3ViamVjdD4KICAgICAgICAgICAgPHJkZjpCYWcvPgogICAgICAgICA8L2RjOnN1YmplY3Q+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxMi0wOS0yOFQxNDowOTozMDwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAyLjEuMTwveG1wOkNyZWF0b3JUb29sPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KhsXwcAAAABJQTFRFAAAA////////////////////PlKtOgAAAAZ0Uk5TAAECAwQF749peAAAAF1JREFUGNNjYIAA11AICIDyGZigAqEGMBFWmAhMgMEUKhAEFwlFN4YZJqIAExGFCoTgNoYRpskBJsICExHAbQzMC4EYxhjgNkYVKhCM2xhiQgLTGCJCgpWckMAwBgAeZ0aFTqsxyQAAAABJRU5ErkJggg==), -moz-linear-gradient(top, #101010, #1f1f1f); + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAZBAMAAABN41qcAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4V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gICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4yNTwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgogICAgICAgICA8ZGM6c3ViamVjdD4KICAgICAgICAgICAgPHJkZjpCYWcvPgogICAgICAgICA8L2RjOnN1YmplY3Q+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxMi0wOS0yOFQxNDowOTozMDwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAyLjEuMTwveG1wOkNyZWF0b3JUb29sPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KhsXwcAAAABJQTFRFAAAA////////////////////PlKtOgAAAAZ0Uk5TAAECAwQF749peAAAAF1JREFUGNNjYIAA11AICIDyGZigAqEGMBFWmAhMgMEUKhAEFwlFN4YZJqIAExGFCoTgNoYRpskBJsICExHAbQzMC4EYxhjgNkYVKhCM2xhiQgLTGCJCgpWckMAwBgAeZ0aFTqsxyQAAAABJRU5ErkJggg==), -o-linear-gradient(top, #101010, #1f1f1f); + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAZBAMAAABN41qcAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3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XhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjMzPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4yNTwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgogICAgICAgICA8ZGM6c3ViamVjdD4KICAgICAgICAgICAgPHJkZjpCYWcvPgogICAgICAgICA8L2RjOnN1YmplY3Q+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxMi0wOS0yOFQxNDowOTozMDwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAyLjEuMTwveG1wOkNyZWF0b3JUb29sPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KhsXwcAAAABJQTFRFAAAA////////////////////PlKtOgAAAAZ0Uk5TAAECAwQF749peAAAAF1JREFUGNNjYIAA11AICIDyGZigAqEGMBFWmAhMgMEUKhAEFwlFN4YZJqIAExGFCoTgNoYRpskBJsICExHAbQzMC4EYxhjgNkYVKhCM2xhiQgLTGCJCgpWckMAwBgAeZ0aFTqsxyQAAAABJRU5ErkJggg==), -ms-linear-gradient(top, #101010, #1f1f1f); + background-image: url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MBFWmAhMgMEUKhAEFwlFN4YZJqIAExGFCoTgNoYRpskBJsICExHAbQzMC4EYxhjgNkYVKhCM2xhiQgLTGCJCgpWckMAwBgAeZ0aFTqsxyQAAAABJRU5ErkJggg==), linear-gradient(top, #101010, #1f1f1f); + border: 1px solid #000; + box-shadow: 0 1px 0 rgba(255,255,255,.2), inset 0px 0px 2px #111; + border-radius: 5px; + + /* Animation */ + -webkit-animation-name: moveBackground; + -webkit-animation-duration: .6s; + -webkit-animation-timing-function: linear; + -webkit-animation-iteration-count: infinite; + -moz-animation-name: moveBackground; + -moz-animation-duration: .6s; + -moz-animation-timing-function: linear; + -moz-animation-iteration-count: infinite; + -o-animation-name: moveBackground; + -o-animation-duration: .6s; + -o-animation-timing-function: linear; + -o-animation-iteration-count: infinite; + animation-name: moveBackground; + animation-duration: .6s; + animation-timing-function: linear; + animation-iteration-count: infinite; +} +.upload_message .progressbar div { + float: left; + width: 0%; + height: 100%; + box-shadow: 0 1px 0 #000, 1px 0px 2px #000; + background: rgb(255,255,255); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(241,241,241,1) 50%, rgba(225,225,225,1) 51%, rgba(246,246,246,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(50%,rgba(241,241,241,1)), color-stop(51%,rgba(225,225,225,1)), color-stop(100%,rgba(246,246,246,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,241,1) 50%,rgba(225,225,225,1) 51%,rgba(246,246,246,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,241,1) 50%,rgba(225,225,225,1) 51%,rgba(246,246,246,1) 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,241,1) 50%,rgba(225,225,225,1) 51%,rgba(246,246,246,1) 100%); /* IE10+ */ + background: linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,241,1) 50%,rgba(225,225,225,1) 51%,rgba(246,246,246,1) 100%); /* W3C */ + border-radius: 5px; + + -webkit-transition: width .2s; + -moz-transition: width .2s; + -o-transition: width .2s; + transition: width .2s; +} \ No newline at end of file diff --git a/img/background.jpg b/img/background.jpg new file mode 100644 index 0000000..e19d372 Binary files /dev/null and b/img/background.jpg differ diff --git a/img/bar/error.png b/img/bar/error.png new file mode 100644 index 0000000..ea61be0 Binary files /dev/null and b/img/bar/error.png differ diff --git a/img/bar/loading.png b/img/bar/loading.png new file mode 100644 index 0000000..e84a7d8 Binary files /dev/null and b/img/bar/loading.png differ diff --git a/img/checks.png b/img/checks.png new file mode 100644 index 0000000..8556378 Binary files /dev/null and b/img/checks.png differ diff --git a/img/favicon.png b/img/favicon.png new file mode 100644 index 0000000..de8b675 Binary files /dev/null and b/img/favicon.png differ diff --git a/img/no_images.png b/img/no_images.png new file mode 100644 index 0000000..07fbec1 Binary files /dev/null and b/img/no_images.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..d3f5362 --- /dev/null +++ b/index.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ Sign Out + + + +
+
+ Back + + + +
+
+
+
+ Back +
+
+
+ +
+
+ +
+
+
+ + + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ + + + + + + + + + \ No newline at end of file diff --git a/js/build.js b/js/build.js new file mode 100644 index 0000000..9e6beae --- /dev/null +++ b/js/build.js @@ -0,0 +1,246 @@ +/** + * @name build.js + * @author Philipp Maurer + * @author Tobias Reich + * @copyright 2012 by Philipp Maurer, Tobias Reich + */ + +/* + Build Functions + This functions are used to generate HTML-Code. +*/ + +function buildDivider(title) { + + return "

" + title + "

"; + +} + +function buildAlbum(albumJSON) { + + if(!albumJSON) return ""; + if(!albumJSON.thumb0) albumJSON.thumb0 = "img/no_images.png"; + if(!albumJSON.thumb1) albumJSON.thumb1 = "img/no_images.png"; + if(!albumJSON.thumb2) albumJSON.thumb2 = "img/no_images.png"; + if(!albumJSON.title) albumJSON.title = "Untitled"; + if(albumJSON.title.length>18) albumJSON.title = albumJSON.title.substr(0, 18) + "..."; + + var album = ""; + album += "
"; + album += "thumb"; + album += "thumb"; + album += "thumb"; + album += "
"; + album += "

" + albumJSON.title + "

"; + album += "" + albumJSON.sysdate + ""; + album += "
"; + + if(albumJSON.star=="1") album += ""; + if(albumJSON.public=="1") album += ""; + if(albumJSON.unsorted=="1") album += ""; + + album += "
"; + + return album; + +} + +function buildPhoto(photoJSON) { + + if(photoJSON=="") return ""; + if(!photoJSON.title) photoJSON.title = ""; + if(!photoJSON.thumbUrl) photoJSON.thumbUrl = "img/no_image.png"; + if(photoJSON.title.length>18) photoJSON.title = photoJSON.title.substr(0, 18) + "..."; + + var photo = ""; + photo += "
"; + photo += "thumb"; + photo += "
"; + photo += "

" + photoJSON.title + "

"; + photo += "" + photoJSON.sysdate + ""; + photo += "
"; + + if(photoJSON.star=="1") photo += ""; + if(photoJSON.public=="1") photo += ""; + + photo += "
"; + + return photo; + +} + +function buildModal(title, text, button, func) { + + var modal = ""; + modal += "
"; + modal += "
"; + modal += "

" + title + "

"; + modal += ""; + modal += "

" + text + "

"; + + $.each(button, function(index) { + + if (index==0) modal += "" + this + ""; + else modal += "" + this + ""; + + }); + + modal += "
"; + + modal += ""; + + modal += "
"; + + return modal; + +} + +function buildAddModal() { + + var modal = ""; + modal += "
"; + modal += "
"; + modal += "

Add Album or Photo

"; + modal += ""; + modal += "
"; + modal += "
"; + modal += "Add new Album"; + modal += "
"; + modal += "
"; + modal += "
"; + modal += "Upload new Photo"; + modal += "
"; + modal += "
"; + modal += "
"; + + return modal; + +} + +function buildSignInModal() { + + var modal = ""; + modal += "
"; + modal += "
"; + modal += "

Sign in

"; + modal += ""; + modal += "Sign in"; + modal += "
"; + modal += "
"; + + return modal; + +} + +function buildUploadModal() { + + var modal = ""; + modal += "
"; + modal += "
"; + modal += ""; + modal += "
"; + modal += "
"; + modal += "
"; + + return modal; + +} + +function buildContextMenu(items) { + + var menu = ""; + menu += "
"; + menu += "
"; + menu += ""; + menu += ""; + + $.each(items, function(index) { + + if (items[index][1].length!=0) { + menu += ""; + } + + }); + + menu += ""; + menu += "
" + items[index][0] + "
"; + menu += "
"; + + return menu; + +} + +function buildInfobox(photo) { + + var infobox = ""; + infobox += "

About

"; + infobox += "
"; + + if (photo.public==1) photo.public = "Public"; else photo.public = "Private"; + + infos = [ + ["", "Basics"], + ["Name", photo.title], + ["Uploaded", photo.sysdate], + ["Description", photo.description + "
"], + ["", "Image"], + ["Size", photo.size], + ["Format", photo.type], + ["Resolution", photo.width + " x " + photo.height], + ["", "Camera"], + ["Captured", photo.takedate], + ["Make", photo.make], + ["Type/Model", photo.model], + ["Shutter Speed", photo.shutter], + ["Aperture", photo.aperture], + ["Focal Length", photo.focal], + ["ISO", photo.iso], + ["", "Share"], + ["Privacy", photo.public], + ["Short Link", photo.shortlink] + ]; + + $.each(infos, function(index) { + + if (infos[index][1]==""||infos[index][1]==undefined||infos[index][1]==null) infos[index][1] = "-"; + + if (infos[index][0]=="") { + + infobox += ""; + infobox += "

" + infos[index][1] + "

"; + infobox += ""; + + } else { + + infobox += ""; + infobox += ""; + infobox += ""; + infobox += ""; + + } + + }); + + infobox += "
" + infos[index][0] + "" + infos[index][1] + "
"; + infobox += "
"; + infobox += "
"; + + return infobox; + +} \ No newline at end of file diff --git a/js/frameworks.js b/js/frameworks.js new file mode 100755 index 0000000..a4bc91c --- /dev/null +++ b/js/frameworks.js @@ -0,0 +1,33 @@ +/* jQuery v1.7.2 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); +/* Timer */ +jQuery.timer = function(time,func,callback){ + var a = {timer:setTimeout(func,time),callback:null} + if(typeof(callback) == 'function'){a.callback = callback;} + return a; +}; +/* ToolTips */ +(function(c){function b(e,d){return(typeof e=="function")?(e.call(d)):e}function a(e,d){this.$element=c(e);this.options=d;this.enabled=true;this.fixTitle()}a.prototype={show:function(){var g=this.getTitle();if(g&&this.enabled){var f=this.tip();f.find(".tipsy-inner")[this.options.html?"html":"text"](g);f[0].className="tipsy";f.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var j=c.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight}); +var d=f[0].offsetWidth,i=f[0].offsetHeight,h=b(this.options.gravity,this.$element[0]);var e;switch(h.charAt(0)){case"n":e={top:j.top+j.height+this.options.offset,left:j.left+j.width/2-d/2};break;case"s":e={top:j.top-i-this.options.offset,left:j.left+j.width/2-d/2};break;case"e":e={top:j.top+j.height/2-i/2,left:j.left-d-this.options.offset};break;case"w":e={top:j.top+j.height/2-i/2,left:j.left+j.width+this.options.offset};break}if(h.length==2){if(h.charAt(1)=="w"){e.left=j.left+j.width/2-15}else{e.left=j.left+j.width/2-d+15 +}}f.css(e).addClass("tipsy-"+h);f.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+h.charAt(0);if(this.options.className){f.addClass(b(this.options.className,this.$element[0]))}if(this.options.fade){f.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity})}else{f.css({visibility:"visible",opacity:this.options.opacity})}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){c(this).remove()})}else{this.tip().remove()}},fixTitle:function(){var d=this.$element; +if(d.attr("title")||typeof(d.attr("original-title"))!="string"){d.attr("original-title",d.attr("title")||"").removeAttr("title")}},getTitle:function(){var f,d=this.$element,e=this.options;this.fixTitle();var f,e=this.options;if(typeof e.title=="string"){f=d.attr(e.title=="title"?"original-title":e.title)}else{if(typeof e.title=="function"){f=e.title.call(d[0])}}f=(""+f).replace(/(^\s*|\s*$)/,"");return f||e.fallback},tip:function(){if(!this.$tip){this.$tip=c('
').html('
') +}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};c.fn.tipsy=function(h){if(h===true){return this.data("tipsy")}else{if(typeof h=="string"){var j=this.data("tipsy");if(j){j[h]()}return this}}h=c.extend({},c.fn.tipsy.defaults,h);function g(l){var m=c.data(l,"tipsy");if(!m){m=new a(l,c.fn.tipsy.elementOptions(l,h)); +c.data(l,"tipsy",m)}return m}function k(){var l=g(this);l.hoverState="in";if(h.delayIn==0){l.show()}else{l.fixTitle();setTimeout(function(){if(l.hoverState=="in"){l.show()}},h.delayIn)}}function f(){var l=g(this);l.hoverState="out";if(h.delayOut==0){l.hide()}else{setTimeout(function(){if(l.hoverState=="out"){l.hide()}},h.delayOut)}}if(!h.live){this.each(function(){g(this)})}if(h.trigger!="manual"){var d=h.live?"live":"bind",i=h.trigger=="hover"?"mouseenter":"focus",e=h.trigger=="hover"?"mouseleave":"blur"; +this[d](i,k)[d](e,f)}return this};c.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};c.fn.tipsy.elementOptions=function(e,d){return c.metadata?c.extend({},d,c(e).metadata()):d};c.fn.tipsy.autoNS=function(){return c(this).offset().top>(c(document).scrollTop()+c(window).height()/2)?"s":"n"};c.fn.tipsy.autoWE=function(){return c(this).offset().left>(c(document).scrollLeft()+c(window).width()/2)?"e":"w" +};c.fn.tipsy.autoBounds=function(e,d){return function(){var f={ns:d[0],ew:(d.length>1?d[1]:false)},i=c(document).scrollTop()+e,g=c(document).scrollLeft()+e,h=c(this);if(h.offset().top", ""); + f1 = "loadDeleteAlbum(" + content.attr("data-id") + ", true);"; + f2 = "loadDeleteAlbum(" + content.attr("data-id") + ", false);"; + modal = buildModal("Delete Album", "Are you sure you want to delete the album '" + albumTitle + "' and all of the photos it contains? This action can't be undone!", ["Delete Album and Photos", "Keep Photos"], [f1, f2]); + $("body").append(modal); + +} + +function deleteUnsorted() { + + albumTitle = headerTitle.html().replace($("#title span").html(), "").replace("", ""); + f1 = "loadDeleteAlbum(" + content.attr("data-id") + ", true);"; + f2 = ""; + modal = buildModal("Clear Unsorted", "Are you sure you want to delete all photos from 'Unsorted'?
This action can't be undone!", ["Clear Unsorted", "Keep Photos"], [f1, f2]); + $("body").append(modal); + +} + +function deletePhoto(photoID) { + + if (photoID==undefined) photoTitle = " '" + headerTitle.html() + "'"; else photoTitle = ""; + if (photoID==undefined) photoID = image_view.attr("data-id"); + + f1 = "loadDeletePhoto(" + photoID + ");"; + f2 = ""; + modal = buildModal("Delete Photo", "Are you sure you want to delete the photo" + photoTitle + "?
This action can't be undone!", ["Delete Photo", "Keep Photo"], [f1, f2]); + $("body").append(modal); + +} + +function closeModal() { + $(".message_overlay").removeClass("fadeIn").css("opacity", 0); + $.timer(300,function(){ $(".message_overlay").remove() }); +} + +/* + Show/Hide Functions + This functions are used to show/hide content. +*/ + +function loadingFadeIn(status, errorTitle, errorText) { + switch (status) { + case "error": + loading.removeClass("loading uploading error").addClass(status); + if (!errorTitle||!errorText) { + errorTitle = "Error"; + errorText = "Whoops, it looks like something went wrong. Please reload the site and try again!" + } + loading.html("

" + errorTitle + ": " + errorText + "

"); + loading.css("height", "40px"); + header.css("margin-Top", "40px"); + $.timer(3000,function(){ loadingFadeOut() }); + break; + case "loading": + loading.removeClass("loading uploading error").addClass(status); + if (visibleControls()) header.css("margin-Top", "3px"); + break; + } +} +function loadingFadeOut() { + loading.html("").css("height", "3px"); + if (visibleControls()) header.css("marginTop", "0px"); +} + +function showImageview(photoID) { + // Change toolbar-buttons + $("#tools_albums, #tools_album").hide(); + $("#tools_photo").show(); + // Make body scrollable + $("body").css("overflow", "hidden"); + // Load photo + loadPhotoInfo(photoID); +} +function hideImageview() { + // Change toolbar-buttons + $("#tools_photo, #tools_albums").hide(); + $("#tools_album").show(); + // Make body scrollable + $("body").css("overflow", "scroll"); + // Change website title and url by using loadAlbumInfo + loadAlbumInfo(content.attr("data-id")); + // Hide ImageViewer + image_view.removeClass("fadeIn").addClass("fadeOut"); + $.timer(300,function(){ image_view.hide() }); +} +function visibleImageview() { + if ($("#image_view.fadeIn").length>0) return true; + else return false; +} + +function showControls() { + clearTimeout($(window).data("timeout")); + if (visibleImageview()&&!runningDiashow()) { + $("#image_view a#previous").css("left", "20px"); + $("#image_view a#next").css("right", "20px"); + image_view.css("background-color", "rgba(30,30,30,.99)"); + loading.css("opacity", 1); + header.css("margin-Top", "0px"); + $("#image_view #image").css({ + top: 70, + right: 30, + bottom: 30, + left: 30 + }); + } +} +function hideControls() { + if (visibleImageview()) { + clearTimeout($(window).data("timeout")); + $(window).data("timeout", setTimeout( function () { + $("#image_view a#previous").css("left", "-50px"); + $("#image_view a#next").css("right", "-50px"); + image_view.css("background-color", "#111"); + loading.css("opacity", 0); + header.css("margin-Top", "-45px"); + $("#image_view #image").css({ + top: 0, + right: 0, + bottom: 0, + left: 0 + }); + }, 500)); + } +} +function visibleControls() { + if (loading.css("opacity")>0) return true; + else return false; +} + +function showContextMenuPhoto(photoID, mouse_x, mouse_y) { + + mouse_y -= $(document).scrollTop(); + + items = [ + ["Rename", "renamePhoto(" + photoID + ")"], + ["Move to Album", "showContextMenuMove(" + photoID + ", " + (mouse_x+150) + ", " + (mouse_y+$(document).scrollTop()) + ")"], + ["Delete", "deletePhoto(" + photoID + ")"] + ]; + + closeContextMenu(); + $("body").css("overflow", "hidden"); + $(".photo[data-id='" + photoID + "']").addClass("active"); + $("body").append(buildContextMenu(items)); + $(".contextmenu").css({ + "top": mouse_y, + "left": mouse_x + }); + +} +function showContextMenuMove(photoID, mouse_x, mouse_y) { + + mouse_y -= $(document).scrollTop(); + + params = "function=getAlbums"; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + if (content.attr("data-id")==0) { + items = new Array(); + } else { + items = [ + ["Unsorted", "loadMovePhoto(" + photoID + ", 0)"] + ]; + } + + $.each(data, function(index) { + if (this.id!=content.attr("data-id")) { + if(!this.title) this.title = "Untitled"; + items[items.length] = new Array(this.title, "loadMovePhoto(" + photoID + ", " + this.id + ")"); + } else { + items[items.length] = new Array("", ""); + } + }); + + if (items.length==0) { + items = [ + ["Create new Album", "addAlbum()"] + ]; + } + + closeContextMenu(); + $("body").css("overflow", "hidden"); + $(".photo[data-id='" + photoID + "']").addClass("active"); + $("body").append(buildContextMenu(items)); + $(".contextmenu").css({ + "top": mouse_y, + "left": mouse_x-150 + }); + + }, error: ajaxError }); + +} +function showContextMenuShare(photoID, mouse_x, mouse_y) { + + mouse_y -= $(document).scrollTop(); + + items = [ + [" Make Private", "setPhotoPublic()"], + [" Twitter", "loadSharePhoto(0, " + photoID + ")"], + [" Facebook", "loadSharePhoto(1, " + photoID + ")"], + [" Tumblr", "loadSharePhoto(2, " + photoID + ")"], + [" Pinterest", "loadSharePhoto(3, " + photoID + ")"], + [" Mail", "loadSharePhoto(4, " + photoID + ")"], + [" Copy Link", "loadSharePhoto(5, " + photoID + ")"], + [" Copy Shortlink", "loadSharePhoto(6, " + photoID + ")"] + ]; + + closeContextMenu(); + $("body").css("overflow", "hidden"); + $(".photo[data-id='" + photoID + "']").addClass("active"); + $("body").append(buildContextMenu(items)); + $(".contextmenu").css({ + "top": mouse_y, + "left": mouse_x + }); + +} +function closeContextMenu() { + $(".contextmenu_bg, .contextmenu").remove(); + $(".photo.active").removeClass("active"); + $("body").css("overflow", "scroll"); +} + +function hidePhoto(photoID) { + $(".photo[data-id='" + photoID + "']").css("opacity", 0).animate({ + width: 0, + marginLeft: 0 + }, 300, function() { + $(this).remove(); + imgNum = parseInt($("#title span").html().replace("- ", "").replace(" photos", ""))-1; + $("#title span").html(" - " + imgNum + " photos"); + }); +} + +function startDiashow() { + image_view.attr("data-diashow", "play"); + clearInterval($(window).data("diashow")); + hideControls(); + $(window).data("diashow", setInterval(function() { loadNextPhoto() }, 3000)); +} +function stopDiashow() { + image_view.attr("data-diashow", "stop"); + clearInterval($(window).data("diashow")); + showControls(); +} +function runningDiashow() { + if (image_view.attr("data-diashow")=="play") return true; + else return false; +} + +function showInfobox() { + $("body").append("
"); + infobox.css("right", "0px"); +} +function hideInfobox() { + $("#infobox_overlay").remove(); + infobox.css("right", "-320px"); +} +function visibleInfobox() { + if (parseInt(infobox.css("right").replace("px", ""))<0) return false; + else return true; +} + +/* + Key Function + This function triggers events when a special key is pressed. +*/ + +function key(e) { + + code = (e.keyCode ? e.keyCode : e.which); + + if (code==13||code==37||code==39||code==32||code==27) e.preventDefault(); + + if (code==13&&$(".message .button.active").length) $(".message .button.active").addClass("pressed").click(); + if (code==37&&visibleImageview()) loadPreviousPhoto(); + if (code==39&&visibleImageview()) loadNextPhoto(); + if (code==32&&visibleImageview()&&!runningDiashow()) startDiashow(); + else if (code==32&&visibleImageview()&&runningDiashow()) stopDiashow(); + if (code==27&&$(".message").length&&$(".sign_in").length==0) closeModal(); + else if (code==27&&visibleInfobox()) { hideInfobox(); e.preventDefault(); } + else if (code==27&&visibleImageview()&&runningDiashow()) stopDiashow(); + else if (code==27&&visibleImageview()&&!runningDiashow()) { showControls(); setURL("a" + content.attr("data-id")); }; + +} + +function getViewLink(photoID) { + + if (location.href.indexOf("index.html")>0) return location.href.replace("index.html" + location.hash, "view.php?p=" + photoID); + else return location.href.replace(location.hash, "view.php?p=" + photoID); + +} + +/* + Ajax Functions + This functions are used to get and process data from the Api. +*/ + +function addAlbum() { + + title = prompt("Please enter a title for this album:", "Untitled"); + closeModal(); + + if (title.length>2&&title.length<31) { + + loadingFadeIn("loading"); + + params = "function=addAlbum&title=" + escape(title); + $.ajax({type: "POST", url: api_path, data: params, success: function(data) { + + if (data==0) loadingFadeIn("error"); + else setURL("a" + data); + + }, error: ajaxError }); + + } else if (title.length>0) loadingFadeIn("error", "Error", "Title to short or too long. Please try another one!"); + +} + +function renameAlbum() { + + oldTitle = headerTitle.html().replace($("#title span").html(), "").replace("", ""); + newTitle = prompt("Please enter a new title for this album:", oldTitle); + albumID = content.attr("data-id"); + + if (albumID!=""&&albumID!=null&&albumID!=undefined&&newTitle.length>2&&newTitle.length<31) { + + loadingFadeIn("loading"); + + params = "function=setAlbumTitle&albumID=" + albumID + "&title=" + encodeURI(newTitle); + $.ajax({type: "POST", url: api_path, data: params, success: function(data) { + + if (data==1) { + headerTitle.html(newTitle + "" + $("#title span").html() + ""); + document.title = "Lychee - " + newTitle; + loadingFadeOut(); + } else loadingFadeIn("error"); + + }, error: ajaxError }); + + } else if (newTitle.length>0) loadingFadeIn("error", "Error", "New title to short or too long. Please try another one!"); + +} + +function renamePhoto(photoID) { + + if (photoID==undefined) { + + // Function called from ImageViewer + oldTitle = headerTitle.html(); + photoID = image_view.attr("data-id"); + + } else oldTitle = ""; + + newTitle = prompt("Please enter a new title for this photo:", oldTitle); + + if (photoID!=""&&photoID!=null&&photoID!=undefined&&newTitle.length>2&&newTitle.length<31) { + + loadingFadeIn("loading"); + + params = "function=setPhotoTitle&photoID=" + photoID + "&title=" + encodeURI(newTitle); + $.ajax({type: "POST", url: api_path, data: params, success: function(data) { + + if (data==1) { + if (oldTitle!="") { + headerTitle.html(newTitle); + document.title = "Lychee - " + newTitle; + } + $(".photo[data-id='" + photoID + "'] .overlay h1").html(newTitle); + loadingFadeOut(); + } else loadingFadeIn("error"); + + }, error: ajaxError }); + + } else if (newTitle.length>0) loadingFadeIn("error", "Error", "New title to short or too long. Please try another one!"); + +} + +function loadAlbums() { + + loadingFadeIn("loading"); + $(".album, .photo").removeClass("contentZoomIn").addClass("contentZoomOut"); + + startTime = new Date().getTime(); + + params = "function=getAlbums"; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + durationTime = (new Date().getTime() - startTime); + if (durationTime>300) waitTime = 0; else waitTime = 300 - durationTime; + + $.timer(waitTime,function(){ + + $("#tools_album, #tools_photo").hide(); + $("#tools_albums").show(); + + content.attr("data-id", ""); + + /* Smart Albums */ + unsortedAlbum = new Object(); + unsortedAlbum.id = 0; + unsortedAlbum.title = "Unsorted"; + unsortedAlbum.sysdate = ""; + unsortedAlbum.unsorted = 1; + + starredAlbum = new Object(); + starredAlbum.id = "f"; + starredAlbum.title = "Starred"; + starredAlbum.sysdate = ""; + starredAlbum.star = 1; + + sharedAlbum = new Object(); + sharedAlbum.id = "s"; + sharedAlbum.title = "Public"; + sharedAlbum.sysdate = ""; + sharedAlbum.public = 1; + + content.html("").append(buildDivider("Smart Albums") + buildAlbum(unsortedAlbum) + buildAlbum(starredAlbum) + buildAlbum(sharedAlbum)); + + if (data!=false) { + + /* Albums */ + albums = ""; + $.each(data, function() { albums += buildAlbum(this); }); + content.append(buildDivider("Albums") + albums); + + $(".album, .photo").removeClass("contentZoomOut").addClass("contentZoomIn"); + + } + + document.title = "Lychee"; + headerTitle.html("Albums").removeClass("editable"); + + loadSmartAlbums(); + + }); + + }, error: ajaxError }); + +} + +function loadSmartAlbums() { + + params = "function=getSmartInfo"; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + $(".album[data-id='0'] img:nth-child(1)").attr("src", data.unsortThumb2); + $(".album[data-id='0'] img:nth-child(2)").attr("src", data.unsortThumb1); + $(".album[data-id='0'] img:nth-child(3)").attr("src", data.unsortThumb0); + $(".album[data-id='0'] .overlay a").html(data.unsortNum + " photos"); + + $(".album[data-id='s'] img:nth-child(1)").attr("src", data.publicThumb2); + $(".album[data-id='s'] img:nth-child(2)").attr("src", data.publicThumb1); + $(".album[data-id='s'] img:nth-child(3)").attr("src", data.publicThumb0); + $(".album[data-id='s'] .overlay a").html(data.publicNum + " photos"); + + $(".album[data-id='f'] img:nth-child(1)").attr("src", data.starredThumb2); + $(".album[data-id='f'] img:nth-child(2)").attr("src", data.starredThumb1); + $(".album[data-id='f'] img:nth-child(3)").attr("src", data.starredThumb0); + $(".album[data-id='f'] .overlay a").html(data.starredNum + " photos"); + + loadingFadeOut(); + + }, error: ajaxError }); + +} + +function loadPhotos(albumID, refresh) { + + // If refresh is true the function will only refresh the content and not change the toolbar buttons either the title + + if (!refresh) { + loadingFadeIn("loading"); + if (visibleImageview()) hideImageview(); + $(".album, .photo").removeClass("contentZoomIn").addClass("contentZoomOut"); + $(".divider").removeClass("fadeIn").addClass("fadeOut"); + } + + startTime = new Date().getTime(); + + params = "function=getPhotos&albumID=" + albumID; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + durationTime = (new Date().getTime() - startTime); + if (durationTime>300) waitTime = 0; else if (refresh) waitTime = 0; else waitTime = 300 - durationTime; + + $.timer(waitTime,function(){ + + content.attr("data-id", albumID); + + photos = ""; + $.each(data, function() { photos += buildPhoto(this); }); + content.html("").append(photos); + + if (!refresh) { + + $(".album, .photo").removeClass("contentZoomOut").addClass("contentZoomIn"); + $("#tools_albums, #tools_photo").hide(); + $("#tools_album").show(); + + loadAlbumInfo(albumID); + + } + + }); + + }, error: ajaxError }); + +} + +function loadAlbumInfo(albumID) { + + if (albumID=="f"||albumID=="s"||albumID==0) { + + params = "function=getSmartInfo"; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + switch (albumID) { + case "f": + document.title = "Lychee - Starred"; + headerTitle.html("Starred - " + data.starredNum + " photos"); + $("#button_edit_album, #button_trash_album, .button_divider").hide(); + break; + case "s": + document.title = "Lychee - Public"; + headerTitle.html("Public - " + data.publicNum + " photos"); + $("#button_edit_album, #button_trash_album .button_divider").hide(); + break; + case "0": + document.title = "Lychee - Unsorted"; + headerTitle.html("Unsorted - " + data.unsortNum + " photos"); + $("#button_edit_album").hide(); + $("#button_trash_album, .button_divider").show(); + break; + } + + loadingFadeOut(); + + }, error: ajaxError }); + + } else { + + params = "function=getAlbumInfo&albumID=" + albumID; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + $("#button_edit_album, #button_trash_album, .button_divider").show(); + + if (!data.title) data.title = "Untitled"; + document.title = "Lychee - " + data.title; + headerTitle.html(data.title + " - " + data.num + " photos").addClass("editable"); + + loadingFadeOut(); + + }, error: ajaxError }); + + } + +} + +function loadPhotoInfo(photoID) { + + loadingFadeIn("loading"); + + params = "function=getPhotoInfo&photoID=" + photoID; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + if (!data.title) data.title = "Untitled"; + + document.title = "Lychee - " + data.title; + headerTitle.html(data.title).addClass("editable"); + + $("#button_star a").removeClass("icon-star-empty icon-star"); + if (data.star=="1") { + $("#button_star a").addClass("icon-star"); + $("#button_star").attr("title", "Unstar Photo"); + } else { + $("#button_star a").addClass("icon-star-empty"); + $("#button_star").attr("title", "Star Photo"); + } + + if (data.public=="1") { + $("#button_share a").addClass("active"); + $("#button_share").attr("title", "Make Photo Private"); + } else { + $("#button_share a").removeClass("active"); + $("#button_share").attr("title", "Share Photo"); + } + + image_view.attr("data-id", photoID); + if (visibleControls()) image_view.html("").append("
"); + else image_view.html("").append("
"); + image_view.removeClass("fadeOut").addClass("fadeIn").show(); + + if (!visibleControls()) hideControls(true); + + infobox.html(buildInfobox(data)).show(); + + $.timer(300,function(){ content.show(); }); + + loadingFadeOut(); + + }, error: ajaxError }); + +} + +function setPhotoStar() { + + loadingFadeIn("loading"); + + photoID = image_view.attr("data-id"); + + params = "function=setPhotoStar&photoID=" + photoID; + $.ajax({type: "POST", url: api_path, data: params, success: function(data) { + + if (data==1) { + + if ($("#button_star a.icon-star-empty").length) { + $("#button_star a").removeClass("icon-star-empty icon-star").addClass("icon-star"); + $("#button_star").attr("title", "Unstar Photo"); + } else { + $("#button_star a").removeClass("icon-star-empty icon-star").addClass("icon-star-empty"); + $("#button_star").attr("title", "Star Photo"); + } + + loadPhotos(content.attr("data-id"), true); + loadingFadeOut(); + + } else loadingFadeIn("error"); + + }, error: ajaxError }); + +} + +function setPhotoPublic(e) { + + loadingFadeIn("loading"); + + photoID = image_view.attr("data-id"); + + params = "function=setPhotoPublic&photoID=" + photoID + "&url=" + getViewLink(photoID); + $.ajax({type: "POST", url: api_path, data: params, success: function(data) { + + if (data==1) { + + if ($("#button_share a.active").length) { + $("#button_share a").removeClass("active"); + $("#button_share").attr("title", "Make Private"); + } else { + $("#button_share a").addClass("active"); + $("#button_share").attr("title", "Share Photo"); + showContextMenuShare(photoID, e.pageX, e.pageY); + } + + loadPhotos(content.attr("data-id"), true); + loadingFadeOut(); + + } else loadingFadeIn("error"); + + }, error: ajaxError }); + +} + +function setPhotoDescription() { + + description = prompt("Please enter a description for this photo:", ""); + photoID = image_view.attr("data-id"); + + if (description.length>0&&description.length<160) { + + loadingFadeIn("loading"); + + params = "function=setPhotoDescription&photoID=" + photoID + "&description=" + escape(description); + $.ajax({type: "POST", url: api_path, data: params, success: function(data) { + + if (data==0) loadingFadeIn("error"); + else loadPhotoInfo(photoID); + + }, error: ajaxError }); + + } else if (description.length>0) loadingFadeIn("error", "Error", "Description to short or too long. Please try another one!"); + +} + +function loadDeleteAlbum(albumID, delAll) { + + loadingFadeIn("loading"); + + params = "function=deleteAlbum&albumID=" + albumID + "&delAll=" + delAll; + $.ajax({type: "POST", url: api_path, data: params, success: function(data) { + + if (data==1) setURL(""); + else loadingFadeIn("error"); + + }, error: ajaxError }); + +} + +function loadDeletePhoto(photoID) { + + loadingFadeIn("loading"); + + params = "function=deletePhoto&photoID=" + photoID; + $.ajax({type: "POST", url: api_path, data: params, success: function(data) { + + if (data==1) { + hidePhoto(photoID); + setURL("a" + content.attr("data-id")); + loadingFadeOut(); + } + else loadingFadeIn("error"); + + }, error: ajaxError }); + +} + +function loadSharePhoto(service, photoID) { + + loadingFadeIn("loading"); + + params = "function=sharePhoto&photoID=" + photoID + "&url=" + getViewLink(photoID); + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + switch (service) { + case 0: + link = data.twitter; + break; + case 1: + link = data.facebook; + break; + case 2: + link = data.tumblr; + break; + case 3: + link = data.pinterest; + break; + case 4: + link = data.mail; + break; + case 5: + link = "copy"; + modal = buildModal("Copy Link", "You can use this link to share your image with other people: ", ["Close"], [""]); + $("body").append(modal); + $(".copylink").click(); + break; + case 6: + link = "copy"; + modal = buildModal("Copy Shortlink", "You can use this link to share your image with other people: ", ["Close"], [""]); + $("body").append(modal); + $(".copylink").click(); + break; + default: + link = ""; + break; + } + + if (link=="copy") loadingFadeOut(); + else if (link.length>5) { + location.href = link; + loadingFadeOut(); + } else loadingFadeIn("error"); + + }, error: ajaxError }); + +} + +function getAlbumArchive() { + + albumID = content.attr("data-id"); + if (location.href.indexOf("index.html")>0) link = location.href.replace(location.hash, "").replace("index.html", "php/api.php?function=getAlbumArchive&albumID=" + albumID); + else link = location.href.replace(location.hash, "") + "php/api.php?function=getAlbumArchive&albumID=" + albumID; + location.href = link; + +} + +function loadMovePhoto(photoID, albumID) { + + if (albumID>=0) { + + loadingFadeIn("loading"); + + params = "function=movePhoto&photoID=" + photoID + "&albumID=" + albumID; + $.ajax({type: "POST", url: api_path, data: params, success: function(data) { + + if (data==1) { + hidePhoto(photoID); + setURL("a" + content.attr("data-id")); + loadingFadeOut(); + } else loadingFadeIn("error"); + + }, error: ajaxError }); + + } + +} + +function loadPreviousPhoto() { + + albumID = content.attr("data-id"); + photoID = image_view.attr("data-id"); + + params = "function=previousPhoto&photoID=" + photoID + "&albumID=" + albumID; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + if (data!=false) setURL("a" + albumID + "p" + data.id); + + }, error: ajaxError }); + +} + +function loadNextPhoto() { + + albumID = content.attr("data-id"); + photoID = image_view.attr("data-id"); + + params = "function=nextPhoto&photoID=" + photoID + "&albumID=" + albumID; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + if (data) setURL("a" + albumID + "p" + data.id); + + }, error: ajaxError }); + +} + +function search(term) { + + clearTimeout($(window).data("timeout")); + $(window).data("timeout", setTimeout(function() { + + if ($("#search").val().length<=2) { + + $(".divider").removeClass("fadeIn").addClass("fadeOut"); + loadAlbums(); + + } else { + + $(".album, .photo").removeClass("contentZoomIn").addClass("contentZoomOut"); + $(".divider").removeClass("fadeIn").addClass("fadeOut"); + + startTime = new Date().getTime(); + + params = "function=search&term=" + term; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + console.log(data); + albums = ""; + if (data.albums!=undefined&&data.albums!=null) $.each(data.albums, function() { albums += buildAlbum(this); }); + + photos = ""; + if (data.photos!=undefined&&data.photos!=null) $.each(data.photos, function() { photos += buildPhoto(this); }); + + durationTime = (new Date().getTime() - startTime); + if (durationTime>300) waitTime = 0; else waitTime = 300 - durationTime; + + $.timer(waitTime,function(){ + + if (albums==""&&photos=="") code = ""; + else if (albums=="") code = buildDivider("Photos")+photos; + else if (photos=="") code = buildDivider("Albums")+albums; + else code = buildDivider("Photos")+photos+buildDivider("Albums")+albums; + + content.html("").append(code); + + $(".album, .photo").removeClass("contentZoomOut").addClass("contentZoomIn"); + + }); + + }, error: ajaxError }); + + } + + }, 250)); + +} + +/* + Error Function + This function is called when an ajax-request fails. +*/ + +function ajaxError(jqXHR, textStatus, errorThrown) { + console.log(jqXHR); + console.log(textStatus); + console.log(errorThrown); + loadingFadeIn("error", textStatus, errorThrown); +} \ No newline at end of file diff --git a/js/main.js b/js/main.js new file mode 100755 index 0000000..0f3cbf9 --- /dev/null +++ b/js/main.js @@ -0,0 +1,113 @@ +/** + * @name main.js + * @author Philipp Maurer + * @author Tobias Reich + * @copyright 2012 by Philipp Maurer, Tobias Reich + */ + +var header = $("header"), + headerTitle = $("#title"), + content = $("#content"), + image_view = $("#image_view"), + loading = $("#loading"), + infobox = $("#infobox"), + api_path = "php/api.php"; + +$(document).ready(function(){ + + /* Login */ + $("#password").live("keyup", function() { + if ($(this).val().length>0) $(this).removeClass("error"); + }); + + /* Add Dialog */ + $(".button_add").live("click", function() { $("body").append(buildAddModal) }); + $("#add_album").live("click", addAlbum); + $("#add_photo").live("click", function() { $("#auswahl").html(""); $("#upload_files").click() }); + + /* Toolbar Buttons */ + $("#button_signout").live("click", function() { + modal = buildModal("Sign Out", "Are you sure you want to leave and log out?", ["Sign out", "Stay here"], ["logout();", ""]); + $("body").append(modal); + }); + $("#button_download").live("click", function() { + link = $("#image_view #image").css("background-image").replace(/"/g,"").replace(/url\(|\)$/ig, ""); + window.open(link,"_newtab"); + }); + $("#button_move").live("click", function(e) { + showContextMenuMove(image_view.attr("data-id"), e.pageX, e.pageY); + }); + $("#button_trash_album").live("click", function() { + if (content.attr("data-id")=="0") deleteUnsorted(); + else deleteAlbum(); + }); + $("#button_trash").live("click", function() { deletePhoto() }); + $("#button_edit_album").live("click", function() { renameAlbum() }); + $("#button_edit").live("click", function() { renamePhoto() }); + $("#button_info").live("click", function() { showInfobox() }); + $("#button_archive").live("click", function() { getAlbumArchive() }); + + /* Rename Album/Photo via Titlebar */ + $("#title.editable").live("click", function() { + if (visibleImageview()) renamePhoto(); else renameAlbum(); + }); + + /* Context Menu */ + $(".photo").live("contextmenu", function(e) { + e.preventDefault(); + showContextMenuPhoto($(this).attr("data-id"), e.pageX, e.pageY); + }); + $(".contextmenu_bg").live("click", closeContextMenu); + + /* Star/Share Photo */ + $("#button_star").live("click", setPhotoStar); + $("#button_share").live("click", function(e) { + if ($("#button_share a.active").length) showContextMenuShare(image_view.attr("data-id"), e.pageX, e.pageY); + else setPhotoPublic(e); + }); + $(".copylink").live("click", function() { $(this).select() }); + + /* Upload */ + $("#upload_files").live("change", function() { + closeModal(); + handleFiles(this.files); + $("#upload_button").click(); + }); + + /* Search */ + $("#search").live("keyup", function() { search($(this).val()) }); + + /* Nav Forward */ + $(".album").live("click", function() { setURL("a" + $(this).attr("data-id")) }); + $(".photo").live("click", function() { setURL("a" + content.attr("data-id") + "p" + $(this).attr("data-id")) }); + + /* Nav Back */ + $("#button_back_home").live("click", function() { setURL("") }); + $("#button_back").live("click", function() { setURL("a" + content.attr("data-id")) }); + + /* Close Modal */ + $(".message a.close").live("click", closeModal); + + /* Image View */ + $("#image_view a#previous").live("click", loadPreviousPhoto); + $("#image_view a#next").live("click", loadNextPhoto); + + /* Infobox */ + $("#infobox_overlay, #infobox .header a").live("click", function() { hideInfobox() }); + $("#edit_description").live("click", function() { setPhotoDescription() }); + + /* Window */ + $(window).keydown(key); + $(window).bind("popstate", getURL); + $(window).bind("mouseleave", hideControls); + $(window).bind("mouseenter", showControls); + + /* Init */ + if ((BrowserDetect.browser=="Explorer")||(BrowserDetect.browser=="Safari"&&BrowserDetect.version<5)||(BrowserDetect.browser=="Chrome"&&BrowserDetect.version<18)||(BrowserDetect.browser=="Firefox"&&BrowserDetect.version<14)) { + + modal = buildModal("Browser not supported", "You are currently using an outdated or unsupported Browser. This site might not work properly. Please consider to update your Browser!", ["Leave"], ["location.href = 'http://browsehappy.com';"]); + $("body").append(modal); + + } else init(); + +}); \ No newline at end of file diff --git a/js/upload.js b/js/upload.js new file mode 100644 index 0000000..c75cc65 --- /dev/null +++ b/js/upload.js @@ -0,0 +1,102 @@ +/** + * @name upload.js + * @author Philipp Maurer + * @author Tobias Reich + * @copyright 2012 by Philipp Maurer, Tobias Reich + */ + +var global_progress = new Array(), + last_final_progress = 0; + +function handleFiles(files) { + + var i = 0; + var auswahl_div = document.getElementById('auswahl'); + var imageType = /image.*/; + var fileList = files; + + for(i = 0; i < fileList.length; i++) { + var img = document.createElement("img"); + img.height = 0; + img.file = fileList[i]; + img.name = 'pic_'+ i; + img.classList.add("obj"); + auswahl_div.appendChild(img); + } + +} + +function sendFiles(){ + + imgs = document.querySelectorAll(".obj"); + + $(".upload_overlay").remove(); + $("body").append(buildUploadModal()); + + global_progress = new Array(); + last_final_progress = 0; + + for(i = 0; i < imgs.length; i++) { + global_progress[i] = 0; + new FileUpload(i, imgs[i], imgs[i].file); + } + +} + +function changeProgress(i, progress) { + + global_progress[i] = progress; + final_progress = 0; + + for(i = 0; i < global_progress.length; i++) { + final_progress += global_progress[i]; + } + + if (Math.round(final_progress/document.querySelectorAll(".obj").length)%2==0&&Math.round(last_final_progress/document.querySelectorAll(".obj").length)=100) { + + $(".progressbar div").css("width", "100%"); + + $.timer(1000,function(){ + + $(".upload_overlay").removeClass("fadeIn").css("opacity", 0); + $.timer(300,function(){ $(".upload_overlay").remove() }); + + if (content.attr("data-id")=="") setURL("a0"); + else loadPhotos(content.attr("data-id")); + + }); + + } + +} + +function FileUpload(i, img, file) { + + var old_percent = 0, + xhr = new XMLHttpRequest(), + fd = new FormData, + percent = 0; + + this.xhr = xhr; + + this.xhr.upload.addEventListener("progress", function(e) { + if (e.lengthComputable) percent = Math.round((e.loaded * 100) / e.total); + changeProgress(i, percent); + }, false); + + fd.append("File", file); + fd.append("function", "upload"); + if (content.attr("data-id")=="") fd.append("albumID", 0); + else fd.append("albumID", content.attr("data-id")); + + xhr.open("POST", "php/api.php", true); + xhr.overrideMimeType('text/plain; charset=x-user-defined-binary'); + xhr.send(fd); + +} \ No newline at end of file diff --git a/js/view.js b/js/view.js new file mode 100644 index 0000000..eeca97b --- /dev/null +++ b/js/view.js @@ -0,0 +1,69 @@ +/** + * @name view.js + * @author Philipp Maurer + * @author Tobias Reich + * @copyright 2012 by Philipp Maurer, Tobias Reich + */ + +var header = $("header"), + headerTitle = $("#title"), + image_view = $("#image_view"), + api_path = "php/api.php", + infobox = $("#infobox"); + +$(document).ready(function(){ + + /* Infobox */ + $("#infobox_overlay, #infobox .header a").live("click", function() { hideInfobox() }); + $("#button_info").live("click", function() { showInfobox() }); + + /* Download */ + $("#button_download").live("click", function() { + link = $("#image_view #image").css("background-image").replace(/"/g,"").replace(/url\(|\)$/ig, ""); + window.open(link,"_newtab"); + }); + + loadPhotoInfo(gup("p")); + +}); + +function showInfobox() { + + $("body").append("
"); + infobox.css("right", "0px"); + +} + +function hideInfobox() { + + $("#infobox_overlay").remove(); + infobox.css("right", "-320px"); + +} + +function loadPhotoInfo(photoID) { + + params = "function=getPhotoInfo&photoID=" + photoID; + $.ajax({type: "POST", url: api_path, data: params, dataType: "json", success: function(data) { + + if (!data.title) data.title = "Untitled"; + document.title = "Lychee - " + data.title; + headerTitle.html(data.title); + + image_view.attr("data-id", photoID); + image_view.html("").append("
"); + image_view.removeClass("fadeOut").addClass("fadeIn").show(); + + infobox.html(buildInfobox(data)).show(); + + }, error: ajaxError }); + +} + +function ajaxError(jqXHR, textStatus, errorThrown) { + + console.log(jqXHR); + console.log(textStatus); + console.log(errorThrown); + +} \ No newline at end of file diff --git a/lychee.sql b/lychee.sql new file mode 100644 index 0000000..275a37e --- /dev/null +++ b/lychee.sql @@ -0,0 +1,46 @@ +SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + + +CREATE TABLE IF NOT EXISTS `albums` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(50) NOT NULL, + `sysdate` varchar(10) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + +CREATE TABLE IF NOT EXISTS `photos` ( + `id` bigint(14) NOT NULL, + `title` varchar(50) NOT NULL, + `description` varchar(160) NOT NULL, + `url` varchar(100) NOT NULL, + `public` tinyint(1) NOT NULL, + `shortlink` varchar(20) NOT NULL, + `type` varchar(10) NOT NULL, + `width` int(11) NOT NULL, + `height` int(11) NOT NULL, + `size` varchar(10) NOT NULL, + `sysdate` varchar(10) NOT NULL, + `systime` varchar(8) NOT NULL, + `iso` varchar(15) NOT NULL, + `aperture` varchar(10) NOT NULL, + `make` varchar(20) NOT NULL, + `model` varchar(50) NOT NULL, + `shutter` varchar(10) NOT NULL, + `focal` varchar(10) NOT NULL, + `takedate` varchar(10) NOT NULL, + `taketime` varchar(8) NOT NULL, + `star` tinyint(1) NOT NULL, + `album` varchar(30) NOT NULL DEFAULT '0', + `thumbUrl` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/php/api.php b/php/api.php new file mode 100644 index 0000000..ef7a58e --- /dev/null +++ b/php/api.php @@ -0,0 +1,73 @@ + \ No newline at end of file diff --git a/php/array2json.php b/php/array2json.php new file mode 100644 index 0000000..c2f142b --- /dev/null +++ b/php/array2json.php @@ -0,0 +1,43 @@ +$value) { + if(is_array($value)) { //Custom handling for arrays + if($is_list) $parts[] = array2json($value); /* :RECURSION: */ + else $parts[] = '"' . $key . '":' . array2json($value); /* :RECURSION: */ + } else { + $str = ''; + if(!$is_list) $str = '"' . $key . '":'; + + //Custom handling for multiple data types + if(is_numeric($value)) $str .= $value; //Numbers + elseif($value === false) $str .= 'false'; //The booleans + elseif($value === true) $str .= 'true'; + else $str .= '"' . addslashes($value) . '"'; //All other things + // :TODO: Is there any more datatype we should be in the lookout for? (Object?) + + $parts[] = $str; + } + } + $json = implode(',',$parts); + + if($is_list) return '[' . $json . ']';//Return numerical JSON + return '{' . $json . '}';//Return associative JSON +} +?> \ No newline at end of file diff --git a/php/config.php b/php/config.php new file mode 100644 index 0000000..9df8917 --- /dev/null +++ b/php/config.php @@ -0,0 +1,25 @@ + diff --git a/php/functions.php b/php/functions.php new file mode 100644 index 0000000..02201ef --- /dev/null +++ b/php/functions.php @@ -0,0 +1,646 @@ += 1024){$size=round($size/1024,1)." MB";}else{$size=round($size,1)." KB";} + $return['size'] = $size; + $return['date'] = date("d.m.Y",filectime($url)); + $return['time'] = date("H:i:s",filectime($url)); + + echo $exif['FileDateTime']."
".$exif['DateTimeOriginal']; + + // Camera Information + if(isset($exif['ISOSpeedRatings'])){$return['iso']="ISO-".$exif['ISOSpeedRatings'];} + if(isset($exif['COMPUTED']['ApertureFNumber'])){$return['aperture']=$exif['COMPUTED']['ApertureFNumber'];} + if(isset($exif['Make'])){$return['make']=$exif['Make'];} + if(isset($exif['Model'])){$return['model']=$exif['Model'];} + if(isset($exif['ExposureTime'])){$return['shutter']=$exif['ExposureTime']." Sek.";} + if(isset($exif['FocalLength'])){$return['focal']=($exif['FocalLength']/1)." mm";} + if(isset($exif['Software'])){$return['software']=$exif['Software'];} + if(isset($exif['DateTimeOriginal'])) { + $exifDate = explode(" ",$exif['DateTimeOriginal']); + $date = explode(":", $exifDate[0]); $return['takeDate'] = $date[2].".".$date[1].".".$date[0]; + $return['takeTime'] = $exifDate[1]; + } + + }else{ + + $exif = getimagesize($url); + $return['type'] = $exif['mime']; + $return['width'] = $exif[0]; + $return['height'] = $exif[1]; + $size = (filesize($url) / 1024); + if($size >= 1024){$size=round($size/1024,1)." MB";}else{$size=round($size,1)." KB";} + $return['size'] = $size; + $return['date'] = date("d.m.Y",filectime($url)); + $return['time'] = date("H:i:s",filectime($url)); + + } + return $return; +} +function createThumb($photoName, $width = 200, $height = 200) { + global $thumbQuality; + $photoUrl = "../uploads/big/$photoName"; + $newUrl = "../uploads/thumb/$photoName"; + $oldImg = getimagesize($photoUrl); + $type = $oldImg['mime']; + switch($type) { + case "image/jpeg": $sourceImg = imagecreatefromjpeg($photoUrl); break; + case "image/png": $sourceImg = imagecreatefrompng($photoUrl); break; + case "image/gif": $sourceImg = imagecreatefromgif($photoUrl); break; + default: return false; + } + $thumb = imagecreatetruecolor($width, $height); + if($oldImg[0]<$oldImg[1]) { + $newSize = $oldImg[0]; + $startWidth = 0; + $startHeight = $oldImg[1]/2 - $oldImg[0]/2; + } else { + $newSize = $oldImg[1]; + $startWidth = $oldImg[0]/2 - $oldImg[1]/2; + $startHeight = 0; + } + imagecopyresampled($thumb,$sourceImg,0,0,$startWidth,$startHeight,$width,$height,$newSize,$newSize); + switch($type) { + case "image/jpeg": imagejpeg($thumb,$newUrl,$thumbQuality); break; + case "image/png": imagepng($thumb,$newUrl); break; + case "image/gif": imagegif($thumb,$newUrl); break; + default: return false; + } + return true; +} + +// Session Functions +function login($loginUser, $loginPassword) { + global $user, $password; + if(($loginUser == $user) && ($loginPassword == $password)){ + $_SESSION['login'] = true; + return true; + } else { + return false; + } +} +function logout() { + session_destroy(); + return true; +} + +// Album Functions +function addAlbum($title) { + $title = mysql_escape_string($title); + $sysdate = date("d.m.Y"); + $query = "INSERT INTO albums (title, sysdate) VALUES ('$title', '$sysdate');"; + $result = mysql_query($query); + if(!$result) return false; + return mysql_insert_id(); +} +function getAlbums() { + $return = array(array()); + $query = "SELECT id, title, sysdate FROM albums ORDER BY id DESC;"; + $result = mysql_query($query) OR die("Error: $result
".mysql_error()); + $i=0; + while($row = mysql_fetch_object($result)) { + $return[$i]['id'] = $row->id; + $return[$i]['title'] = $row->title; + $return[$i]['sysdate'] = $row->sysdate; + $albumID = $row->id; + $query = "SELECT thumbUrl FROM photos WHERE album = '$albumID' ORDER BY id DESC LIMIT 0, 3;"; + $result2 = mysql_query($query); + $k = 0; + while($row2 = mysql_fetch_object($result2)){ + $return[$i]["thumb$k"] = $row2->thumbUrl; + $k++; + } + if(!isset($return[$i]["thumb0"]))$return[$i]["thumb0"]=""; + if(!isset($return[$i]["thumb1"]))$return[$i]["thumb1"]=""; + if(!isset($return[$i]["thumb2"]))$return[$i]["thumb2"]=""; + $i++; + } + if($i==0) return false; + return $return; +} +function getSmartInfo() { + $return = array(); + $query = "SELECT * FROM photos WHERE album = 0 ORDER BY id DESC;"; + $result = mysql_query($query); + $i = 0; + while($row = mysql_fetch_object($result)) { + if($i<3) $return["unsortThumb$i"] = $row->thumbUrl; + $i++; + } + $return['unsortNum'] = $i; + + $query2 = "SELECT * FROM photos WHERE public = 1 ORDER BY id DESC;"; + $result2 = mysql_query($query2); + $i = 0; + while($row2 = mysql_fetch_object($result2)) { + if($i<3) $return["publicThumb$i"] = $row2->thumbUrl; + $i++; + } + $return['publicNum'] = $i; + + $query3 = "SELECT * FROM photos WHERE star = 1 ORDER BY id DESC;"; + $result3 = mysql_query($query3); + $i = 0; + while($row3 = mysql_fetch_object($result3)) { + if($i<3) $return["starredThumb$i"] = $row3->thumbUrl; + $i++; + } + $return['starredNum'] = $i; + return $return; + +} +function getAlbumInfo($albumID) { + $return = array(); + $query = "SELECT * FROM albums WHERE id = '$albumID';"; + $result = mysql_query($query); + $row = mysql_fetch_object($result); + $return['title'] = $row->title; + $return['date'] = $row->sysdate; + $return['star'] = $row->star; + $return['public'] = $row->public; + $query = "SELECT COUNT(*) AS num FROM photos WHERE album = '$albumID';"; + $result = mysql_query($query); + $row = mysql_fetch_object($result); + $return['num'] = $row->num; + return $return; +} +function setAlbumTitle($albumID, $title) { + $title = mysql_real_escape_string(urldecode($title)); + if(strlen($title)<3||strlen($title)>30) return false; + $query = "UPDATE albums SET title = '$title' WHERE id = '$albumID';"; + $result = mysql_query($query); + if(!$result) return false; + return true; +} +function deleteAlbum($albumID, $delAll) { + if($delAll=="true") { + $query = "SELECT id FROM photos WHERE album = '$albumID';"; + $result = mysql_query($query); + $error = false; + while($row = mysql_fetch_object($result)) { + if(!deletePhoto($row->id)) $error = true; + } + } else { + $query = "UPDATE photos SET album = '0' WHERE album = '$albumID';"; + $result = mysql_query($query); + if(!$result) return false; + } + if($albumID!=0) { + $query = "DELETE FROM albums WHERE id = '$albumID';"; + $result = mysql_query($query); + if(!$result) return false; + } + if($error) return false; + return true; +} +function getAlbumArchive($albumID) { + switch($albumID) { + case 's': + $query = "SELECT * FROM photos WHERE public = '1';"; + $zipTitle = "Public"; + break; + case 'f': + $query = "SELECT * FROM photos WHERE star = '1';"; + $zipTitle = "Starred"; + break; + default: + $query = "SELECT * FROM photos WHERE album = '$albumID';"; + $zipTitle = "Unsorted"; + } + $result = mysql_query($query); + $files = array(); + $i=0; + while($row = mysql_fetch_object($result)) { + $files[$i] = "../".$row->url; + $i++; + } + $query = "SELECT * FROM albums WHERE id = '$albumID';"; + $result = mysql_query($query); + $row = mysql_fetch_object($result); + if($albumID!=0&&is_numeric($albumID))$zipTitle = $row->title; + $filename = "./".$zipTitle.".zip"; + + $zip = new ZipArchive(); + + if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) { + return false; + } + + foreach($files AS $zipFile) { + $newFile = explode("/",$zipFile); + $newFile = array_reverse($newFile); + $zip->addFile($zipFile, $zipTitle."/".$newFile[0]); + } + + $zip->close(); + + header("Content-Type: application/zip"); + header("Content-Disposition: attachment; filename=\"$zipTitle.zip\""); + readfile($filename); + unlink($filename); + + return true; +} + +// Photo Functions +function getPhotos($albumID) { + switch($albumID) { + case "f": $query = "SELECT * FROM photos WHERE star = 1 ORDER BY id DESC;"; + break; + case "s": $query = "SELECT * FROM photos WHERE public = 1 ORDER BY id DESC;"; + break; + default: $query = "SELECT * FROM photos WHERE album = '$albumID' ORDER BY id DESC;"; + } + $result = mysql_query($query); + $return = array(array()); + $i = 0; + while($row = mysql_fetch_array($result)) { + $return[$i] = $row; + $i++; + } + if($i==0) return false; + return $return; +} +function getPhotoInfo($photoID) { + $query = "SELECT * FROM photos WHERE id = '$photoID';"; + $result = mysql_query($query); + $return = mysql_fetch_array($result); + return $return; +} +function downloadPhoto($photoID) { + $query = "SELECT * FROM photos WHERE id = '$photoID';"; + $result = mysql_query($query); + $row = mysql_fetch_object($result); + + $photo = "../".$row->url; + $title = $row->title; + $type = "appcication/zip"; + $filename = "./imageDownload.zip"; + + $zip = new ZipArchive(); + if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) return false; + + $newFile = explode("/",$photo); + $newFile = array_reverse($newFile); + $zip->addFile($photo, $title.$newFile[0]); + $zip->close(); + header("Content-Type: $type"); + header("Content-Disposition: attachment; filename=\"$title.zip\""); + readfile($filename); + unlink($filename); + return true; +} +function countPhotos() { + $query = "SELECT COUNT(*) AS num FROM photos;"; + $result = mysql_query($query); + $row = mysql_fetch_object($result); + return $row->num; +} +function setPhotoPublic($photoID, $url) { + $query = "SELECT public, shortlink FROM photos WHERE id = '$photoID';"; + $row = mysql_fetch_object(mysql_query($query)); + if($row->public == 0){ + $public = 1; + }else{ + $public = 0; + } + if(preg_match('/localhost/', $_SERVER['HTTP_REFERER'])) { + $shortlink = ""; + }else{ + if($row->shortlink==""){ + $shortlink = urlShortner($url); + }else{ + $shortlink = $row->shortlink; + } + } + $query = "UPDATE photos SET public = '$public', shortlink = '$shortlink' WHERE id = '$photoID';"; + $result = mysql_query($query); + if(!$result) return false; + return true; +} +function setPhotoStar($photoID) { + $query = "SELECT star FROM photos WHERE id = '$photoID';"; + $row = mysql_fetch_object(mysql_query($query)); + if($row->star == 0) { + $star = 1; + } else { + $star = 0; + } + $query = "UPDATE photos SET star = '$star' WHERE id = '$photoID';"; + $result = mysql_query($query); + return true; +} +function nextPhoto($photoID, $albumID) { + switch($albumID) { + case 'f': $query = "SELECT * FROM photos WHERE id < '$photoID' AND star = '1' ORDER BY id DESC LIMIT 0, 1;"; + break; + case 's': $query = "SELECT * FROM photos WHERE id < '$photoID' AND public = '1' ORDER BY id DESC LIMIT 0, 1;"; + break; + default: $query = "SELECT * FROM photos WHERE id < '$photoID' AND album = '$albumID' ORDER BY id DESC LIMIT 0, 1;"; + } + $result = mysql_query($query); + $return = mysql_fetch_array($result); + if(!$return || ($return==0)) { + switch($albumID) { + case 'f': $query = "SELECT * FROM photos WHERE star = '1' ORDER BY id DESC LIMIT 0, 1;"; + break; + case 's': $query = "SELECT * FROM photos WHERE public = '1' ORDER BY id DESC LIMIT 0, 1;"; + break; + default: $query = "SELECT * FROM photos WHERE album = '$albumID' ORDER BY id DESC LIMIT 0, 1;"; + } + $result = mysql_query($query); + $return = mysql_fetch_array($result); + } + return $return; +} +function previousPhoto($photoID, $albumID) { + switch($albumID) { + case 'f': $query = "SELECT * FROM photos WHERE id > '$photoID' AND star = '1' LIMIT 0, 1;"; + break; + case 's': $query = "SELECT * FROM photos WHERE id > '$photoID' AND public = '1' LIMIT 0, 1;"; + break; + default: $query = "SELECT * FROM photos WHERE id > '$photoID' AND album = '$albumID' LIMIT 0, 1;"; + } + $result = mysql_query($query); + $return = mysql_fetch_array($result); + if(!$return || ($return==0)) { + switch($albumID) { + case 'f': $query = "SELECT * FROM photos WHERE star = '1' ORDER BY id LIMIT 0, 1;"; + break; + case 's': $query = "SELECT * FROM photos WHERE public = '1' ORDER BY id LIMIT 0, 1;"; + break; + default: $query = "SELECT * FROM photos WHERE album = '$albumID' ORDER BY id LIMIT 0, 1;"; + } + $result = mysql_query($query); + $return = mysql_fetch_array($result); + } + return $return; +} +function movePhoto($photoID, $newAlbum) { + $query = "UPDATE photos SET album = '$newAlbum' WHERE id = '$photoID';"; + $result = mysql_query($query); + if(!$result) return false; + else return true; +} +function setPhotoTitle($photoID, $title) { + $title = mysql_real_escape_string(urldecode($title)); + if(strlen($title)<3||strlen($title)>30) return false; + $query = "UPDATE photos SET title = '$title' WHERE id = '$photoID';"; + $result = mysql_query($query); + if(!$result) return false; + else return true; +} +function setPhotoDescription($photoID, $description) { + $description = mysql_real_escape_string(htmlentities($description)); + if(strlen($description)>160) return false; + $query = "UPDATE photos SET description = '$description' WHERE id = '$photoID';"; + $result = mysql_query($query); + if(!$result) return false; + return true; +} +function deletePhoto($photoID) { + $query = "SELECT * FROM photos WHERE id = '$photoID';"; + $result = mysql_query($query); + if(!$result) return false; + $row = mysql_fetch_object($result); + $unlink1 = unlink("../".$row->url); + $unlink2 = unlink("../".$row->thumbUrl); + if(!$unlink1 || !$unlink2) return false; + $query = "DELETE FROM photos WHERE id = '$photoID';"; + $result = mysql_query($query); + if(!$result) return false; + return true; +} + +// Share Functions +function urlShortner($url) { + global $bitlyUsername, $bitlyApi; + if($bitlyUsername==""||$bitlyApi=="") return false; + $url = urlencode($url); + $bitlyAPI = "http://api.bit.ly/shorten?version=2.0.1&format=xml&longUrl=$url&login=$bitlyUsername&apiKey=$bitlyApi"; + + $data = file_get_contents($bitlyAPI); + + $xml = simplexml_load_string($data); + $shortlink = $xml->results->nodeKeyVal->shortUrl; + return $shortlink; +} +function sharePhoto($photoID, $url) { + $query = "SELECT * FROM photos WHERE id = '$photoID'"; + $result = mysql_query($query); + $row = mysql_fetch_object($result); + + $thumb = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."/../../".$row->thumbUrl; + $title = $row->title; + $description = $row->description; + $shortlink = $row->shortlink; + + $twitterUrl = "https://twitter.com/share?url=".urlencode("$url"); + $facebookUrl = "http://www.facebook.com/sharer.php?u=".urlencode("$url")."&t=".urlencode($title); + $tumblrUrl = "http://www.tumblr.com/share/link?url=".urlencode("$url")."&name=". urlencode($title)."&description=".urlencode($description); + $pinterestUrl = "http://pinterest.com/pin/create/button/?url=".urlencode("$url")."&media=".urlencode($thumb); + $mailUrl = "mailto:?subject=".rawurlencode($title)."&body=".rawurlencode("Hey guy! Check this out: $url"); + + $share = array(); + $share['twitter'] = $twitterUrl; + $share['facebook'] = $facebookUrl; + $share['tumblr'] = $tumblrUrl; + $share['pinterest'] = $pinterestUrl; + $share['mail'] = $mailUrl; + $share['shortlink'] = $shortlink; + + return $share; +} +function facebookHeader($photoID) { + if(!is_numeric($photoID)) return false; + dbConnect(); + $query = "SELECT * FROM photos WHERE id = '$photoID';"; + $result = mysql_query($query); + $row = mysql_fetch_object($result); + + $parseUrl = parse_url("http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); + $thumb = $parseUrl['scheme']."://".$parseUrl['host'].$parseUrl['path']."/../".$row->thumbUrl; + + $return = ''; + $return .= ''; + $return .= ''; + + return $return; +} +function isPhotoPublic($photoID) { + $query = "SELECT * FROM photos WHERE id = '$photoID';"; + $result = mysql_query($query); + $row = mysql_fetch_object($result); + if($row->public == 1) return true; + return false; +} + +// Search Function +function search($term) { + $term = mysql_real_escape_string($term); + + $query = "SELECT * FROM photos WHERE title like '%$term%' OR description like '%$term%';"; + $result = mysql_query($query); + while($row = mysql_fetch_array($result)) { + $return['photos'][] = $row; + } + + $query = "SELECT * FROM albums WHERE title like '%$term%';"; + $result = mysql_query($query); + $i=0; + while($row = mysql_fetch_array($result)) { + $return['albums'][$i] = $row; + + $query = "SELECT thumbUrl FROM photos WHERE album = '".$row['id']."' ORDER BY id DESC LIMIT 0, 3;"; + $result2 = mysql_query($query); + $k = 0; + while($row2 = mysql_fetch_object($result2)){ + $return['albums'][$i]["thumb$k"] = $row2->thumbUrl; + $k++; + } + + } + return $return; +} + +?> diff --git a/view.php b/view.php new file mode 100644 index 0000000..0ca6f7a --- /dev/null +++ b/view.php @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+ + + +
+ + +
+ + +
+ + + + + + + + + \ No newline at end of file