- $('#document-list a').click(function() {
- if (!$(this).hasClass('active')) {
- $('#document-list a').removeClass('active');
- $(this).addClass('active');
- document.location.hash = $(this).attr('data-hash');
- }
- return false;
+ $("#document-list a").click(function(e){
+ e.preventDefault();
+ if($("#presentation-frame").length == 0){
+ $("<iframe id='presentation-frame' width='600' height='500' border='0' src=''>").appendTo($("#document-detail"));
+ }
+ $("#presentation-frame").attr("src", this.href);
+ $('#document-list li').css('background-color', 'white');
+ $('#document-list li a').css('background-color', 'white');
+ $(this).closest('li').css('background-color', '#EEEEEE');
+ $(this).css('background-color', '#EEEEEE');
+ $(this).next('a').css('background-color', '#EEEEEE');
+ $('.download-doc').hide();
+ $(this).next('.download-doc').show();