$(function(){

    $("input[type=text]").focus(function() {
        if($(this).val() == $(this).attr('defaultValue'))
            $(this).val('');
    }).blur(function() {
        if(jQuery.trim($(this).val()) == "") {
            $(this).val($(this).attr('defaultValue'));
        }
    });

	$('div#bottomContents input[type=submit]').hover(
	function(){
		$(this).css({'color':'#000000','background':'transparent url(/getfile.php/1085518.817.xyrspawswy/subscribeOn.gif) no-repeat scroll left 1px'})
		},
	function(){
		$(this).css({'color':'#ffffff','background':'transparent url(/getfile.php/1085520.817.bstuwpwxfs/subscribeOff.gif) no-repeat scroll left 1px'});
		});

	$('div#secondary-contents div#secondaryFirstContents input[type=submit]').hover(
	function(){
		$(this).css({'text-decoration':'underline'})
		},
	function(){
		$(this).css({'text-decoration':'none'});
		});



    $('div.topicDescription').hover(
	function(){
		$('div.topicDescription p').css('color','#E6412E')},
	function(){
		$('div.topicDescription p').css('color','#58585A');}
		);
	$('div.topicDescription').hover(
	function(){
		$(this).css('cursor','pointer')},
	function(){
		$(this).css('cursor','default');}
		);
	$('div.topicDescription').hover(
	function(){
		$('div.topicDescription p a').css({'color':'#EF887C','text-decoration':'underline'})},
	function(){
		$('div.topicDescription p a').css({'color':'#9C9D9F','text-decoration':'none'});}
		);
/*
	$('div.topicDescription').hover(
	function(){
		$('div#topics img').fadeTo("normal",0.7)},
	function(){
		$('div#topics img').fadeTo("normal",1);}
		);
*/

	$('div.newsSection p a').hover(
	function(){
		$(this).find('span').css({'color':'#E6412E','text-decoration':'underline'})},
	function(){
		$(this).find('span').css('color','#ffffff');}
		);
	$('div.newsItem').hover(
	function(){
		$(this).find('span').css({'color':'#E6412E'})},
	function(){
		$(this).find('span').css('color','#ffffff');}
		);
	$('div.topicDescription').hover(
	function(){
		$(this).find('span').css({'color':'#EF887C','text-decoration':'underline'})},
	function(){
		$(this).find('span').css('color','#ffffff');}
		);
	$('#secondaryFirstContents a.more').hover(
	function(){
		$(this).find('span').css({'color':'#2795B7','text-decoration':'underline'})},
	function(){
		$(this).find('span').css('color','#E2E5E6');}
		);
	$('body.frontpage #secondaryFirstContents a.more').hover(
	function(){
		$(this).find('span').css({'color':'#2795B7','text-decoration':'underline'})},
	function(){
		$(this).find('span').css('color','#ffffff');}
		);
	$('div#secondary-contents div.newsSection ul.viewpost li a').hover(
	function(){
		$(this).find('span').css({'color':'#E6412E','text-decoration':'underline'})},
	function(){
		$(this).find('span').css('color','#ffffff');}
		);


	$('#secondary-contents #secondaryFirstContents p a').hover(
	function(){
		$(this).parent('p').next('p').css('color','#EF887C')},
	function(){
		$(this).parent('p').next('p').css('color','#9C9D9F');
		});
	$('.newsSection .postlist p a').hover(
	function(){
		$(this).parent('p').prev('p.date').css('color','#EF887C')},
	function(){
		$(this).parent('p').prev('p.date').css('color','#9C9D9F');
		});
	$('div#secondary-contents>div.newsSection p a').hover(
	function(){
		$(this).parent('p').next('p.date').css('color','#EF887C')},
	function(){
		$(this).parent('p').next('p.date').css('color','#9C9D9F');
		});
	$('div.reverse div.newsSection p a').hover(
	function(){
		$(this).parent('p').prev('p.date').css('color','#EF887C')},
	function(){
		$(this).parent('p').prev('p.date').css('color','#9C9D9F');
		});


	$('div.item').hover(
	function(){
		$(this).css('background-color','#E6412E')
		},
	function(){
		$(this).css('background-color','transparent');
	});
	$('div.item').hover(
	function(){
		$(this).find('p').css('color','#ffffff')
		},
	function(){
		$(this).find('p').css('color','#000000');
	});

	$('#container h1').after('<p class="odddivider">---</p>');
});