jQuery.noConflict();
jQuery(document).ready(function(){
        search = jQuery('.lc-search');
        if (search.length>0) {
                input = search.find('input');
                input.focus(function(){
                        if (input.hasClass('tip')) {
                                input.val('');
                                input.removeClass('tip');
                        }
                });
        }

        imgs = jQuery('.img-menu');
        if (imgs.length>0) {
                imgs = imgs.find('a');
                imgs.mouseenter(function(){
/*                      jQuery(this).find('.im-bc-caption').animate({top:'-30px'}, slow); Didn't work :( */
                        jQuery(this).find('.im-bc-caption').addClass('im-bc-caption-expanded');
                });
                imgs.mouseleave(function(){
                        jQuery(this).find('.im-bc-caption').removeClass('im-bc-caption-expanded');
                });
                imgs.each(function(index){
                        img = jQuery(imgs[index]);
                        img.find('.im-border').remove();
                        img.find('.im-border-con').append('<div class="im-helper"><div class="im-border"></div><div class="im-bc-caption"><span>'+img.find('img').attr('alt')+'</span></div></div>');
                });
        }
        
        prod = jQuery('table.prod-table');
        if (prod.length>0) {
                prod.find('tbody tr:odd').addClass('odd');
        }
        
        imgmenu = jQuery('.img-menu');
        if (imgmenu.length>0) {
                table = imgmenu.find('table');
                pict = imgmenu.find('a');
                pict_length = pict.length;
                for (i=0;i<=pict_length;i++ ) { pict[i] = jQuery(pict[i]); }
                lastw = -1;
                jQuery(window).resize(function(){imgmenu_resize()});
                imgmenu_resize();
        }
});

function imgmenu_resize(){
        w = imgmenu.width();
        w = parseInt(w / pict[0].width());
        if (lastw!=w) {lastw=w;} else return;
        for (i=3;i<=w;i++) { pict[i-1].css('display','block'); }
        for (i=w+1;i<=pict_length;i++) { pict[i-1].css('display','none'); }
}
