/*!
 * jQuery JavaScript
 */

$(function() {
	$(".tweet").tweet({
		join_text: "auto",
		username: "loco898",
		avatar_size: 30,
		count: 4,
		auto_join_text_default: "we said,", 
		auto_join_text_ed: "we",
		auto_join_text_ing: "we were",
		auto_join_text_reply: "we replied",
		auto_join_text_url: "we were checking out",
		loading_text: "loading tweets..."
	});
});

$(function() {
	$('img,input[type=image]').each(function () {
		var ofSrc = $(this).attr('src');
		var ovSrc = ofSrc.replace('_o.', '_ov.');
		$(this).hover(function () {
			$(this).attr('src', ovSrc);
		}, function () {
			$(this).attr('src', ofSrc);
		});
		$(window).unload(function () {
			$(this).attr('src', ofSrc);
		});
	});
});

$(function(){
	$(".priceTb tr:nth-child(odd)").addClass("odd");
});

$(function(){
	$("#contents p.base").css({"margin-top":"10px"	});
	$("#side section:first-child").css({"margin-top":"5px"});
	$("#side section p:last-child").css({"padding":"0"});
	$("#side dt:first-child").css({"border":"none"});
	$(".bn li:nth-child(2)").css({"padding":"15px 0 0 0"});
	$(".bn li:nth-child(5)").css({"padding":"15px 0 0 0"});
});

/*$(function(){
	$("#pg-top").hide();
	$(function(){
		$(window).scroll(function(){
			if ($(this).scrollTop() > 100) {
				$("#pg-top").fadeIn();
			} else {
				$("#pg-top").fadeOut();
			}
		});
		$("#pg-top").click(function(){
			$("body,html").animate({ scrollTop:0 }, 800);
			return false;
		});
	});
});*/

$(function(){
	$("#container a img,#ptop").hover(
		function(){
			$(this).stop().fadeTo("fast",0.5);
		},
		function(){
			$(this).stop().fadeTo("fast",1);
		}
	);
});

$(function(){
	$("a[href^=http]").attr("target","_blank");
});

