$(document).ready(function(){


// external link
$('a[href^="http"]').not('[href*="curlymusic.jp"]').click(function(){
	window.open(this.href, '');
	return false;
});
/* old external link
$('a[rel="external"]').click( function() {
	window.open( $(this).attr('href') );
	return false;
}); */

// its line
$('a[href*="itunes.apple.com"]').each(function(){
	if ($(this).is(":has(img)"))
		$('img', this).addClass('its');
	else
		$(this).addClass('its');
});

// list color
$('.playlist li:even').css('background-color', '#EEECE6');

// search input
$('#header-sub input.text').focus(
		function(){ if($(this).val() == 'SEARCH'){ $(this).val(''); } }
).blur(
		function(){ if($(this).val() == ''){ $(this).val('SEARCH'); } }
);

// rollover
$('#header h1 img').rollover();
$('#header .rss img').rollover();
$('#header ul img').rollover();
$('.pageup img').rollover();  
$('.post-footer-share img').rollover();  
$('.imix img').rollover();
$('#nav-download img').rollover();
$('#footer-menu .box-banner img').rollover();

// scroll
$('.pageup a').click(function(){
		$.scrollTo("#header", 400);
		return false;
});
$("a.scroll").click(function(){
	$.scrollTo($(this).attr('href'), 400);
	return false;
});

// tooltips

$('img.its,a.its').tipsy({gravity: 's'});

/*
$('img.its,a.its').qtip({ 
	content: 'クリックすると iTunes が起動します',
	show: {
		delay: 0,
		effect: 'slide'
	},
	position: {
		corner: {
			target: 'topMiddle',
			tooltip: 'bottomMiddle'
		}
	},
	textAlign: 'center',
	style: {
		name: 'red',
		tip: {
			corner: 'bottomMiddle',
			size: {
				x: 10,
				y : 8
			}
		},
		padding: 4,
		border: {
			width: 1,
			radius: 6,
			color: '#F1281A'
		},
		background: '#F1281A',
		color: '#ffffff'
	}
})
*/

});
