/*==============================================
	New window Module
==============================================*/
$( function() {
	$('a.blank').click(function(){
		window.open( this.href, '_blank' );
		return false;
	});
});

/*==============================================
	Swap image Module
==============================================*/
$(function() {
	var image_cache = new Object();
	$("img.swap").not("[@src*='_ovr.']").each(function(i) {
		var imgsrc = this.src;
		var dot = this.src.lastIndexOf('.');
		var imgsrc_ovr = this.src.substr(0, dot) + '_ovr' + this.src.substr(dot, 4);
		image_cache[this.src] = new Image();
		image_cache[this.src].src = imgsrc_ovr;
		$(this).hover(function() {
			this.src = imgsrc_ovr;
		}, function() {
			this.src = imgsrc;
		});
	});
});

/*==============================================
	Selector Behavior
==============================================*/
$(function() {
	$('div#topicPath ul li:first').css('padding-left', '0');
	$('div#topicPath ul li:last').css('background', 'none');
	$('div.rows:last').css('margin-bottom', '20px');
	$('div.double:last').css('float', 'none');
	$('p.paging:last').css('margin-bottom', '0');
});

/*==============================================
	locatin Behavior
==============================================*/
$(function() {
	$('select.refresh').change(function(){
		location.href = this.options[this.selectedIndex].value
	});
});

