source: extensions/Juza/js/juzascript.js @ 4514

Last change on this file since 4514 was 4514, checked in by vdigital, 14 years ago

[Update] For Juza - Juza Theme Configuration Menu is working at 80% at least

  • Exception management (png/JPG mixed extensions support) not tested

Pendings:

  • Menubar
  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1$().ready(function() {
2  $('div.illustration').each(function() {
3    $(this).addClass('maxIllustration');
4  });
5  $('div.illustration a img').each(function() {
6    $src = $(this).addClass('bigImg').attr('alt');
7                $medium = $('#ix-cat .Cat-'+$src).eq(0).attr('title');
8                $title = $('#ix-cat .Cat-'+$src).eq(0).attr('alt');
9                $(this).attr('src', $medium).attr('title', $title);
10  });
11        $('.thumbnailCategories li').addClass('Juza-cat');
12        $('.description li').removeClass('Juza-cat');
13  $nav = $('#content .navigationBar').html();
14        if ($nav == null) $nav = '';
15        $('#content .navigationBar').hide(); 
16        $('div.titrePage h2').after('<div id="Juza-Thumbs"></div>'+$nav); 
17  $reltag = $('#menubar #mbTags').html();
18        if ($reltag == null) $reltag = '';
19        $reltag = '<div id="relTag">' + $reltag + '</div>';
20        $('#copyright').before('<div id="jquery_local_img">' + $reltag + '</div>');
21  $('span.wrap2 a img').click(function() {
22    $href = $(this).parent('a').attr('href');
23    $alt = $(this).attr('alt');
24    $(this).parent('h3 a').attr('href', '#Juza-Thumbs');
25    $temp = $href.substr($href.indexOf('/')+1);
26    $temp = $temp.substr(0,$temp.indexOf('/'));
27    $title = $('#ix-desc .Thumb-'+$temp).attr('title');
28    $src = $('#ix-desc .Medium-'+$temp).attr('title');
29    $('#jquery_local_img').fadeOut("slow").replaceWith('<div id="jquery_local_img"><img usemap="#picturetop" title="'+$title+'" alt="'+$alt+'" src="'+$src+'"/><map name="picturetop"><area href="#" coords="0,0,1024,300" shape="rect" title="Index"/><area href="'+$href+'" coords="0,301,1024,600" shape="rect" title="'+$title+'"/></map><br/>'+ $title +' - <a href="#Juza-Thumbs"><em>Index</em></a>' + $reltag + '</div>').fadeIn("slow");
30          $(this).hover(function() { },function() {
31            $(this).parent('h3 a').eq(0).attr('href', $href);
32          });
33});
34
35        if ($reltag == '') $('#jquery_local_img').hide();
36  $('.thumbnailCategory .description h3 a').each(function() {
37    $cat_url = $(this).attr('href');
38    $cat_tree = $('#menubar #mbCategories dd ul li a[href="'+$cat_url+'"]').next('.menuInfoCatByChild').next().html();
39    if ($cat_tree == null) $cat_tree = '';
40    $(this).parent('h3').eq(0).next('.text').after('<ul>'+$cat_tree+'</ul>');
41  }); 
42});
Note: See TracBrowser for help on using the repository browser.