$(document).ready(function(){
		   
/* ------------ Search Form ------------ */  
$("#search_area input[type='text']").live("blur", function(){
	var default_value = 'SEARCH';
	if ($(this).val() == ""){
		$(this).val(default_value);
	}
}).live("focus", function(){
	var default_value = 'SEARCH';
	if ($(this).val() == default_value){
		$(this).val("");
	}
}).val('SEARCH');

/* ----------- Home Intro/Blog -------------- */
$('.BlogFeatureList ul li','body.index .news-col').prepend('<span class="imgframe"></span>');
$('.bodycontent table tr td:first','body.index .intro-col3')
.prepend('<span class="quote quote_before"></span>')
.append('<span class="quote quote_after"></span>');

/* ----------------- Twitter Feed ------------------ */
$('div#twitter_section marquee','body.index,body.content,body.detail').marquee().mouseover(function () {
	$(this).trigger('stop');
}).mouseout(function () {
	$(this).trigger('start');
}).mousemove(function (event) {
	if ($(this).data('drag') == true) {
		this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
	}
}).mousedown(function (event) {
	$(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
}).mouseup(function () {
	$(this).data('drag', false);
});

/* ---------- Add Relevant Classes to Lists ------ */
if($.browser.msie && $.browser.version < 9){
	$('#main ul li:nth-child(odd),#main ol li:nth-child(odd)').addClass('odd');
	$('#main table tr:nth-child(even)').addClass('even');
}

/* ------------------ <HR> ----------- */
$('hr').wrap('<div class="hr"></div>');
$('div.hr hr').hide();

/* ------------------ Sitemap ----------- */
$('<div class="pageTitle">Sitemap</div>').insertBefore('#SiteMap');	

/* -------------------- Photogallery --------------- */
$('div.myslides').each(function(){

	var $this = $(this);
	var slidesHeight = $this.height();
	var newHeight = slidesHeight - 10;

	$this.css('height', newHeight);

});


});
