sIFR.useDomLoaded = true;
sIFR.useStyleCheck = true;
sIFR.forceTextTransform = true;

var vistasans = { src: '/wp-content/themes/innovize/flash/VistaSansMedItalic.swf' };

sIFR.activate(vistasans);

sIFR.replace(vistasans, { 
    selector: 'h1.title', 
    css: '.sIFR-root { color: #FFFFFF; text-align: right; letter-spacing: -1 }',
    wmode: 'transparent' 
});
sIFR.replace(vistasans, { 
    selector: '#homeRotator li p', 
    css: '.sIFR-root { color: #FFFFFF; font-size: 18px; }',
    wmode: 'transparent' 
});
sIFR.replace(vistasans, { 
    selector: '#siteIntro h2', 
    css: '.sIFR-root { color: #000000; font-size: 24px; }',
    wmode: 'transparent' 
});

$(document).ready(function() {
    
    var archives = $('ul.archives').remove();
    $('li.pagetitle_news').append(archives)
    if($('.menu.newsMenu').length) {
        $('li.pagetitle_news').addClass('current_page_ancestor').find('a').addClass('current_page_ancestor current');
    }
    
    $('input[type=text], textarea').focus(function() {
        $(this).siblings('label').fadeOut(200);
    });
    $('input[type=text], textarea').blur(function() {
        if(/^\s*$/.test($(this).attr('value'))) {
            $(this).siblings('label').fadeIn(300);
        }
    });
    $('label').click(function() {
        $(this).fadeOut(200);
        $(this).siblings('input[type=text], textarea').focus();
    });
    // check inputs on page load for default content
    $('input[type=text]').each(function() {
        if($(this).attr('value') != '') {
            $(this).siblings('label').hide();
        }
    });
    
    $('label').each(function() { 
        $(this).append($(this).siblings('span.reqtxt, span.emailreqtxt'));
    });
    $('.cf-sb input[type=text], #loginbtn').attr('value', '');
    
    var userAgent = navigator.userAgent.toLowerCase();
    if(/msie/.test(userAgent) && !/opera/.test(userAgent) && (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1] == '6.0') {
        $.ifixpng('/images/pixel.gif');
        $('#imagecorner, #nav .menu').ifixpng();
    }
    
});