var cc_kaktus_fimm_search_text = '';
var ie6_mode = false;

jQuery(document).ready(function()
{
    Cufon.replace('#navigation > ul > li > a, #content-right h2, #content-text h2', {fontFamily: 'Fedra Sans Std Demi'});
    Cufon.replace('#content-text h1, #slogan h3', {fontFamily: 'Fedra Sans Std Book'});
    Cufon.replace('#slogan h2', {fontFamily: 'Fedra Sans Std Bold'});
    
    jQuery('#search input.submit').attr('value', '');
    jQuery('#search input.text')
        .focus(function()
        {
            if (jQuery(this).attr('value') == jQuery(this).attr('rel'))
            { 
                jQuery(this).attr('value', '');
            }
        })
        .blur(function()
        {
            if (jQuery(this).attr('value') == '')
            {
                jQuery(this).attr('value', jQuery(this).attr('rel'));
            }
        });
       
    jQuery('a[target="_blank"] img').each(function()
    {
        var href = jQuery(this).parent().attr('href');
        
        if (   !href
            || !href.match(/\.(jpe?g|gif|png)$/))
        {
            return;
        }
        
	jQuery(this).parent().addClass('thickbox');
    });
    
    jQuery('#content-text ul, #content-text ol').each(function()
    {
        if (jQuery('body').hasClass('frontpage'))
        {
            return;
        }
        
        if (jQuery(this).attr('class'))
        {
            return;
        }
        
        jQuery(this).addClass('jquery');
        
        jQuery(this).find('li').each(function()
        {
            var html = jQuery(this).html();
            jQuery(this).html('<div class="wrapper">' + html + '</div>');
        });
    });
    
    if (ie6_mode)
    {
        jQuery('img[@src$=".png"]').each(function(i)
        {
            var src = jQuery(this).attr('src');
            src = src.replace(/\.png$/, '.gif');
            jQuery(this).attr('src', src);
        });
    }
});
