var exposure = 20;
+var input_index = 0;
-function setpic(pic) {
- $("#pic")[0].src = exposure + "/" + pic;
+function setpic() {
+ $("#pic").attr("src", exposure + "/" + files[input_index]);
}
$(function() {
- setpic(files[0]);
+ setpic();
});
+
+Mousetrap.bind('z', function() { $("#pic").toggleClass("fit_view"); });
+Mousetrap.bind('n', function() { input_index ++; setpic(); });
+Mousetrap.bind('p', function() { input_index --; setpic(); });