diff --git a/bookdetail.php b/bookdetail.php
new file mode 100644
index 0000000..b8ac8f6
--- /dev/null
+++ b/bookdetail.php
@@ -0,0 +1,40 @@
+
+ *
+ */
+
+require_once ("config.php");
+require_once ("book.php");
+
+$book = Book::getBookById($_GET["id"]);
+$authors = $book->getAuthors ();
+
+?>
+
\ No newline at end of file
diff --git a/fancybox/blank.gif b/fancybox/blank.gif
new file mode 100644
index 0000000..35d42e8
Binary files /dev/null and b/fancybox/blank.gif differ
diff --git a/fancybox/fancybox_loading.gif b/fancybox/fancybox_loading.gif
new file mode 100644
index 0000000..0158617
Binary files /dev/null and b/fancybox/fancybox_loading.gif differ
diff --git a/fancybox/fancybox_sprite.png b/fancybox/fancybox_sprite.png
new file mode 100644
index 0000000..a1aae1a
Binary files /dev/null and b/fancybox/fancybox_sprite.png differ
diff --git a/fancybox/helpers/fancybox_buttons.png b/fancybox/helpers/fancybox_buttons.png
new file mode 100644
index 0000000..e0e1ea8
Binary files /dev/null and b/fancybox/helpers/fancybox_buttons.png differ
diff --git a/fancybox/helpers/jquery.fancybox-buttons.css b/fancybox/helpers/jquery.fancybox-buttons.css
new file mode 100644
index 0000000..0cff8a3
--- /dev/null
+++ b/fancybox/helpers/jquery.fancybox-buttons.css
@@ -0,0 +1,85 @@
+#fancybox-buttons {
+ position: fixed;
+ left: 0;
+ width: 100%;
+ z-index: 8050;
+}
+
+#fancybox-buttons.top {
+ top: 10px;
+}
+
+#fancybox-buttons.bottom {
+ bottom: 10px;
+}
+
+#fancybox-buttons ul {
+ display: block;
+ width: 170px;
+ height: 30px;
+ margin: 0 auto;
+ padding: 0;
+ list-style: none;
+ background: #111;
+ -webkit-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05);
+ -moz-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05);
+ background: #111 -webkit-gradient(linear,0% 0%,0% 100%,from(rgba(255,255,255,.2)),color-stop(.5,rgba(255,255,255,.15)),color-stop(.5,rgba(255,255,255,.1)),to(rgba(255,255,255,.15)));
+ background: #111 -moz-linear-gradient(top,rgba(255,255,255,.2) 0%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.15) 100%);
+ border-radius: 3px;
+}
+
+#fancybox-buttons ul li {
+ float: left;
+ margin: 0;
+ padding: 0;
+}
+
+#fancybox-buttons a {
+ display: block;
+ width: 30px;
+ height: 30px;
+ text-indent: -9999px;
+ background-image: url('fancybox_buttons.png');
+ background-repeat: no-repeat;
+ outline: none;
+}
+
+#fancybox-buttons a.btnPrev {
+ width: 32px;
+ background-position: 6px 0;
+}
+
+#fancybox-buttons a.btnNext {
+ background-position: -33px 0;
+ border-right: 1px solid #3e3e3e;
+}
+
+#fancybox-buttons a.btnPlay {
+ background-position: 0 -30px;
+}
+
+#fancybox-buttons a.btnPlayOn {
+ background-position: -30px -30px;
+}
+
+#fancybox-buttons a.btnToggle {
+ background-position: 3px -60px;
+ border-left: 1px solid #111;
+ border-right: 1px solid #3e3e3e;
+ width: 35px
+}
+
+#fancybox-buttons a.btnToggleOn {
+ background-position: -27px -60px;
+}
+
+#fancybox-buttons a.btnClose {
+ border-left: 1px solid #111;
+ width: 38px;
+ background-position: -57px 0px;
+}
+
+#fancybox-buttons a.btnDisabled {
+ opacity : 0.5;
+ cursor: default;
+}
\ No newline at end of file
diff --git a/fancybox/helpers/jquery.fancybox-buttons.js b/fancybox/helpers/jquery.fancybox-buttons.js
new file mode 100644
index 0000000..e116e38
--- /dev/null
+++ b/fancybox/helpers/jquery.fancybox-buttons.js
@@ -0,0 +1,115 @@
+ /*!
+ * Buttons helper for fancyBox
+ * version: 1.0.2
+ * @requires fancyBox v2.0 or later
+ *
+ * Usage:
+ * $(".fancybox").fancybox({
+ * buttons: {
+ * position : 'top'
+ * }
+ * });
+ *
+ * Options:
+ * tpl - HTML template
+ * position - 'top' or 'bottom'
+ *
+ */
+(function ($) {
+ //Shortcut for fancyBox object
+ var F = $.fancybox;
+
+ //Add helper object
+ F.helpers.buttons = {
+ tpl: 'The requested content cannot be loaded.
Please try again later.
',
+ closeBtn: '').html(content).find(current.selector);
+
+ } else if (content instanceof $) {
+ if (content.parent().hasClass('fancybox-inner')) {
+ content.parents('.fancybox-wrap').unbind('onReset');
+ }
+
+ content = content.show().detach();
+
+ $(F.wrap).bind('onReset', function () {
+ content.appendTo('body').hide();
+ });
+ }
+
+ if (current.autoSize) {
+ loadingBay = $('
')
+ .appendTo('body')
+ .css({
+ minWidth : getValue(minWidth, 'w'),
+ minHeight : getValue(minHeight, 'h'),
+ maxWidth : getValue(maxWidth, 'w'),
+ maxHeight : getValue(maxHeight, 'h')
+ })
+ .append(content);
+
+ current.width = loadingBay.width();
+ current.height = loadingBay.height();
+
+ // Re-check to fix 1px bug in some browsers
+ loadingBay.width( F.current.width );
+
+ if (loadingBay.height() > current.height) {
+ loadingBay.width(current.width + 1);
+
+ current.width = loadingBay.width();
+ current.height = loadingBay.height();
+ }
+
+ content = loadingBay.contents().detach();
+
+ loadingBay.remove();
+ }
+
+ break;
+
+ case 'image':
+ content = current.tpl.image.replace('{href}', current.href);
+
+ current.aspectRatio = true;
+ break;
+
+ case 'swf':
+ content = current.tpl.swf.replace(/\{width\}/g, current.width).replace(/\{height\}/g, current.height).replace(/\{href\}/g, current.href);
+ break;
+
+ case 'iframe':
+ content = $(current.tpl.iframe.replace('{rnd}', new Date().getTime()) )
+ .attr('scrolling', current.scrolling)
+ .attr('src', current.href);
+
+ current.scrolling = isTouch ? 'scroll' : 'auto';
+
+ break;
+ }
+
+ if (type === 'image' || type === 'swf') {
+ current.autoSize = false;
+ current.scrolling = 'visible';
+ }
+
+ if (type === 'iframe' && current.autoSize) {
+ F.showLoading();
+
+ F._setDimension();
+
+ F.inner.css('overflow', current.scrolling);
+
+ content.bind({
+ onCancel : function() {
+ $(this).unbind();
+
+ F._afterZoomOut();
+ },
+ load : function() {
+ F.hideLoading();
+
+ try {
+ if (this.contentWindow.document.location) {
+ F.current.height = $(this).contents().find('body').height();
+ }
+ } catch (e) {
+ F.current.autoSize = false;
+ }
+
+ F[ F.isOpen ? '_afterZoomIn' : '_beforeShow']();
+ }
+ }).appendTo(F.inner);
+
+ } else {
+ F.inner.append(content);
+
+ F._beforeShow();
+ }
+ },
+
+ _beforeShow : function() {
+ F.coming = null;
+
+ //Give a chance for helpers or callbacks to update elements
+ F.trigger('beforeShow');
+
+ //Set initial dimensions and hide
+ F._setDimension();
+ F.wrap.hide().removeClass('fancybox-tmp');
+
+ F.bindEvents();
+
+ F._preloadImages();
+
+ F.transitions[ F.isOpened ? F.current.nextMethod : F.current.openMethod ]();
+ },
+
+ _setDimension: function () {
+ var wrap = F.wrap,
+ inner = F.inner,
+ current = F.current,
+ viewport = F.getViewport(),
+ margin = current.margin,
+ padding2 = current.padding * 2,
+ width = current.width,
+ height = current.height,
+ maxWidth = current.maxWidth + padding2,
+ maxHeight = current.maxHeight + padding2,
+ minWidth = current.minWidth + padding2,
+ minHeight = current.minHeight + padding2,
+ ratio,
+ height_;
+
+ viewport.w -= (margin[1] + margin[3]);
+ viewport.h -= (margin[0] + margin[2]);
+
+ if (isPercentage(width)) {
+ width = (((viewport.w - padding2) * parseFloat(width)) / 100);
+ }
+
+ if (isPercentage(height)) {
+ height = (((viewport.h - padding2) * parseFloat(height)) / 100);
+ }
+
+ ratio = width / height;
+ width += padding2;
+ height += padding2;
+
+ if (current.fitToView) {
+ maxWidth = Math.min(viewport.w, maxWidth);
+ maxHeight = Math.min(viewport.h, maxHeight);
+ }
+
+ if (current.aspectRatio) {
+ if (width > maxWidth) {
+ width = maxWidth;
+ height = ((width - padding2) / ratio) + padding2;
+ }
+
+ if (height > maxHeight) {
+ height = maxHeight;
+ width = ((height - padding2) * ratio) + padding2;
+ }
+
+ if (width < minWidth) {
+ width = minWidth;
+ height = ((width - padding2) / ratio) + padding2;
+ }
+
+ if (height < minHeight) {
+ height = minHeight;
+ width = ((height - padding2) * ratio) + padding2;
+ }
+
+ } else {
+ width = Math.max(minWidth, Math.min(width, maxWidth));
+ height = Math.max(minHeight, Math.min(height, maxHeight));
+ }
+
+ width = Math.round(width);
+ height = Math.round(height);
+
+ //Reset dimensions
+ $(wrap.add(inner)).width('auto').height('auto');
+
+ inner.width(width - padding2).height(height - padding2);
+ wrap.width(width);
+
+ height_ = wrap.height(); // Real wrap height
+
+ //Fit wrapper inside
+ if (width > maxWidth || height_ > maxHeight) {
+ while ((width > maxWidth || height_ > maxHeight) && width > minWidth && height_ > minHeight) {
+ height = height - 10;
+
+ if (current.aspectRatio) {
+ width = Math.round(((height - padding2) * ratio) + padding2);
+
+ if (width < minWidth) {
+ width = minWidth;
+ height = ((width - padding2) / ratio) + padding2;
+ }
+
+ } else {
+ width = width - 10;
+ }
+
+ inner.width(width - padding2).height(height - padding2);
+ wrap.width(width);
+
+ height_ = wrap.height();
+ }
+ }
+
+ current.dim = {
+ width : getValue(width),
+ height : getValue(height_)
+ };
+
+ current.canGrow = current.autoSize && height > minHeight && height < maxHeight;
+ current.canShrink = false;
+ current.canExpand = false;
+
+ if ((width - padding2) < current.width || (height - padding2) < current.height) {
+ current.canExpand = true;
+
+ } else if ((width > viewport.w || height_ > viewport.h) && width > minWidth && height > minHeight) {
+ current.canShrink = true;
+ }
+
+ F.innerSpace = height_ - padding2 - inner.height();
+ },
+
+ _getPosition: function (onlyAbsolute) {
+ var current = F.current,
+ viewport = F.getViewport(),
+ margin = current.margin,
+ width = F.wrap.width() + margin[1] + margin[3],
+ height = F.wrap.height() + margin[0] + margin[2],
+ rez = {
+ position: 'absolute',
+ top : margin[0] + viewport.y,
+ left : margin[3] + viewport.x
+ };
+
+ if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
+ rez = {
+ position: 'fixed',
+ top : margin[0],
+ left : margin[3]
+ };
+ }
+
+ rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio)));
+ rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * 0.5)));
+
+ return rez;
+ },
+
+ _afterZoomIn: function () {
+ var current = F.current, scrolling = current ? current.scrolling : 'no';
+
+ if (!current) {
+ return;
+ }
+
+ F.isOpen = F.isOpened = true;
+
+ F.wrap.addClass('fancybox-opened');
+
+ F.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));
+
+ F.trigger('afterShow');
+
+ F.update();
+
+ //Assign a click event
+ if (current.closeClick || current.nextClick) {
+ F.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
+ if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
+ F[ current.closeClick ? 'close' : 'next' ]();
+ }
+ });
+ }
+
+ //Create a close button
+ if (current.closeBtn) {
+ $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', F.close);
+ }
+
+ //Create navigation arrows
+ if (current.arrows && F.group.length > 1) {
+ if (current.loop || current.index > 0) {
+ $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
+ }
+
+ if (current.loop || current.index < F.group.length - 1) {
+ $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
+ }
+ }
+
+ if (F.opts.autoPlay && !F.player.isActive) {
+ F.opts.autoPlay = false;
+
+ F.play();
+ }
+ },
+
+ _afterZoomOut: function () {
+ var current = F.current;
+
+ F.wrap.trigger('onReset').remove();
+
+ $.extend(F, {
+ group: {},
+ opts: {},
+ current: null,
+ isActive: false,
+ isOpened: false,
+ isOpen: false,
+ wrap: null,
+ skin: null,
+ outer: null,
+ inner: null
+ });
+
+ F.trigger('afterClose', current);
+ }
+ });
+
+ /*
+ * Default transitions
+ */
+
+ F.transitions = {
+ getOrigPosition: function () {
+ var current = F.current,
+ element = current.element,
+ padding = current.padding,
+ orig = $(current.orig),
+ pos = {},
+ width = 50,
+ height = 50,
+ viewport;
+
+ if (!orig.length && current.isDom && $(element).is(':visible')) {
+ orig = $(element).find('img:first');
+
+ if (!orig.length) {
+ orig = $(element);
+ }
+ }
+
+ if (orig.length) {
+ pos = orig.offset();
+
+ if (orig.is('img')) {
+ width = orig.outerWidth();
+ height = orig.outerHeight();
+ }
+
+ } else {
+ viewport = F.getViewport();
+
+ pos.top = viewport.y + (viewport.h - height) * 0.5;
+ pos.left = viewport.x + (viewport.w - width) * 0.5;
+ }
+
+ pos = {
+ top : getValue(pos.top - padding),
+ left : getValue(pos.left - padding),
+ width : getValue(width + padding * 2),
+ height : getValue(height + padding * 2)
+ };
+
+ return pos;
+ },
+
+ step: function (now, fx) {
+ var prop = fx.prop, value, ratio;
+
+ if (prop === 'width' || prop === 'height') {
+ value = Math.ceil(now - (F.current.padding * 2));
+
+ if (prop === 'height') {
+ ratio = (now - fx.start) / (fx.end - fx.start);
+
+ if (fx.start > fx.end) {
+ ratio = 1 - ratio;
+ }
+
+ value -= F.innerSpace * ratio;
+ }
+
+ F.inner[prop](value);
+ }
+ },
+
+ zoomIn: function () {
+ var wrap = F.wrap,
+ current = F.current,
+ effect = current.openEffect,
+ elastic = effect === 'elastic',
+ dim = current.dim,
+ startPos = $.extend({}, dim, F._getPosition( elastic )),
+ endPos = $.extend({opacity : 1}, startPos);
+
+ //Remove "position" property that breaks older IE
+ delete endPos.position;
+
+ if (elastic) {
+ startPos = this.getOrigPosition();
+
+ if (current.openOpacity) {
+ startPos.opacity = 0;
+ }
+
+ F.outer.add(F.inner).width('auto').height('auto');
+
+ } else if (effect === 'fade') {
+ startPos.opacity = 0;
+ }
+
+ wrap.css(startPos)
+ .show()
+ .animate(endPos, {
+ duration : effect === 'none' ? 0 : current.openSpeed,
+ easing : current.openEasing,
+ step : elastic ? this.step : null,
+ complete : F._afterZoomIn
+ });
+ },
+
+ zoomOut: function () {
+ var wrap = F.wrap,
+ current = F.current,
+ effect = current.openEffect,
+ elastic = effect === 'elastic',
+ endPos = {opacity : 0};
+
+ if (elastic) {
+ if (wrap.css('position') === 'fixed') {
+ wrap.css(F._getPosition(true));
+ }
+
+ endPos = this.getOrigPosition();
+
+ if (current.closeOpacity) {
+ endPos.opacity = 0;
+ }
+ }
+
+ wrap.animate(endPos, {
+ duration : effect === 'none' ? 0 : current.closeSpeed,
+ easing : current.closeEasing,
+ step : elastic ? this.step : null,
+ complete : F._afterZoomOut
+ });
+ },
+
+ changeIn: function () {
+ var wrap = F.wrap,
+ current = F.current,
+ effect = current.nextEffect,
+ elastic = effect === 'elastic',
+ startPos = F._getPosition( elastic ),
+ endPos = { opacity : 1 };
+
+ startPos.opacity = 0;
+
+ if (elastic) {
+ startPos.top = getValue(parseInt(startPos.top, 10) - 200);
+ endPos.top = '+=200px';
+ }
+
+ wrap.css(startPos)
+ .show()
+ .animate(endPos, {
+ duration : effect === 'none' ? 0 : current.nextSpeed,
+ easing : current.nextEasing,
+ complete : F._afterZoomIn
+ });
+ },
+
+ changeOut: function () {
+ var wrap = F.wrap,
+ current = F.current,
+ effect = current.prevEffect,
+ endPos = { opacity : 0 },
+ cleanUp = function () {
+ $(this).trigger('onReset').remove();
+ };
+
+ wrap.removeClass('fancybox-opened');
+
+ if (effect === 'elastic') {
+ endPos.top = '+=200px';
+ }
+
+ wrap.animate(endPos, {
+ duration : effect === 'none' ? 0 : current.prevSpeed,
+ easing : current.prevEasing,
+ complete : cleanUp
+ });
+ }
+ };
+
+ /*
+ * Overlay helper
+ */
+
+ F.helpers.overlay = {
+ overlay: null,
+
+ update: function () {
+ var width, scrollWidth, offsetWidth;
+
+ //Reset width/height so it will not mess
+ this.overlay.width('100%').height('100%');
+
+ if ($.browser.msie || isTouch) {
+ scrollWidth = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
+ offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
+
+ width = scrollWidth < offsetWidth ? W.width() : scrollWidth;
+
+ } else {
+ width = D.width();
+ }
+
+ this.overlay.width(width).height(D.height());
+ },
+
+ beforeShow: function (opts) {
+ if (this.overlay) {
+ return;
+ }
+
+ opts = $.extend(true, {}, F.defaults.helpers.overlay, opts);
+
+ this.overlay = $('
').css(opts.css).appendTo('body');
+
+ if (opts.closeClick) {
+ this.overlay.bind('click.fb', F.close);
+ }
+
+ if (F.current.fixed && !isTouch) {
+ this.overlay.addClass('overlay-fixed');
+
+ } else {
+ this.update();
+
+ this.onUpdate = function () {
+ this.update();
+ };
+ }
+
+ this.overlay.fadeTo(opts.speedIn, opts.opacity);
+ },
+
+ afterClose: function (opts) {
+ if (this.overlay) {
+ this.overlay.fadeOut(opts.speedOut || 0, function () {
+ $(this).remove();
+ });
+ }
+
+ this.overlay = null;
+ }
+ };
+
+ /*
+ * Title helper
+ */
+
+ F.helpers.title = {
+ beforeShow: function (opts) {
+ var title, text = F.current.title;
+
+ if (text) {
+ title = $('
' + text + '
').appendTo('body');
+
+ if (opts.type === 'float') {
+ //This helps for some browsers
+ title.width(title.width());
+
+ title.wrapInner('
');
+
+ //Increase bottom margin so this title will also fit into viewport
+ F.current.margin[2] += Math.abs(parseInt(title.css('margin-bottom'), 10));
+ }
+
+ title.appendTo(opts.type === 'over' ? F.inner : (opts.type === 'outside' ? F.wrap : F.skin));
+ }
+ }
+ };
+
+ // jQuery plugin initialization
+ $.fn.fancybox = function (options) {
+ var that = $(this),
+ selector = this.selector || '',
+ index,
+ run = function(e) {
+ var what = this, idx = index, relType, relVal;
+
+ if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !$(what).is('.fancybox-wrap')) {
+ e.preventDefault();
+
+ relType = options.groupAttr || 'data-fancybox-group';
+ relVal = $(what).attr(relType);
+
+ if (!relVal) {
+ relType = 'rel';
+ relVal = what[ relType ];
+ }
+
+ if (relVal && relVal !== '' && relVal !== 'nofollow') {
+ what = selector.length ? $(selector) : that;
+ what = what.filter('[' + relType + '="' + relVal + '"]');
+ idx = what.index(this);
+ }
+
+ options.index = idx;
+
+ F.open(what, options);
+ }
+ };
+
+ options = options || {};
+ index = options.index || 0;
+
+ if (selector) {
+ D.undelegate(selector, 'click.fb-start').delegate(selector, 'click.fb-start', run);
+
+ } else {
+ that.unbind('click.fb-start').bind('click.fb-start', run);
+ }
+
+ return this;
+ };
+
+ // Test for fixedPosition needs a body at doc ready
+ $(document).ready(function() {
+ F.defaults.fixed = $.support.fixedPosition || (!($.browser.msie && $.browser.version <= 6) && !isTouch);
+ });
+
+}(window, document, jQuery));
\ No newline at end of file
diff --git a/fancybox/jquery.fancybox.pack.js b/fancybox/jquery.fancybox.pack.js
new file mode 100644
index 0000000..6521c21
--- /dev/null
+++ b/fancybox/jquery.fancybox.pack.js
@@ -0,0 +1,35 @@
+/*! fancyBox v2.0.6 fancyapps.com | fancyapps.com/fancybox/#license */
+(function(s,l,d,t){var m=d(s),q=d(l),a=d.fancybox=function(){a.open.apply(this,arguments)},u=!1,k=l.createTouch!==t,o=function(a){return"string"===d.type(a)},n=function(b,c){c&&o(b)&&0
',image:'The requested content cannot be loaded.
Please try again later.
',
+closeBtn:'