var isMSIE6 = $.browser.msie && $.browser.version == "6.0";
var isIPad = navigator.userAgent.match(/iPad/i);
var isIPhone = navigator.userAgent.match(/iPhone/i);

$(function() {
/*
if(isMSIE6) {
//pngfix
$('img[src$=png], #content > #topicPath > ol, #content h2, .png').fixPng();
}*/

//subnav
//$('div#gNav > ul').droppy({speed: 200});

// scroll
$('a[href^=#]').click(function() {
var $t = $(this.hash);
if (this.hash.length > 1 && $t.length) {
$.scrollTo($t, 400);
return false;
}
});

//placeholder
$('input.placeholder').each(function() {
if (!$(this).val() || $(this).val() == $(this).attr('title')) {
$(this).val($(this).attr('title')).addClass('empty');
}
}).focus(function() {
if ($(this).val() == $(this).attr('title')) {
$(this).val('').removeClass('empty');
}
}).blur(function() {
if (!$(this).val().length) {
$(this).val($(this).attr('title')).addClass('empty');
}
}).parents('form').submit(function() {
$(this).find('input.placeholder').each(function() {
if ($(this).val() == $(this).attr('title')) {
$(this).val('');
}
});
});

$('#sMovie a.media').empty().media({width:197, height:134, type:'swf'});

//tab
//$('.tab').tab();

// rollover
$('.imgover').each(function() {
var osrc = $(this).attr('src');
var hsrc = osrc.replace(/(\.gif|\.jpg|\.png)/, '_o$1');
$.data(this, 'osrc', osrc);
$.data(this, 'hsrc', hsrc);
$('<img>').attr('src', hsrc);
}).hover(function() {
$(this).attr('src', $.data(this, 'hsrc'));
},function() {
$(this).attr('src', $.data(this, 'osrc'));
});
});


