
$(function() {

//-- style -----------------------------------------------------------------------------------------------//

	$( 'div#header ul#tel li:last-child' ).addClass( 'last-child' );
	$( 'div#content div.osusume dl:nth-child(4n)' ).addClass( 'none' );
	$( 'div#content dl.delivery-area dd dl:odd' ).addClass( 'odd' );
	$( 'div#content table.delivery tbody tr:odd' ).addClass( 'odd' );
	$( 'div#sidebar div#ranking dl:last-child' ).addClass( 'last-child' );
	$( 'div#group div.category dl dd:last-child' ).addClass( 'last-child' );
	$( 'div#group div.category dl:nth-child(4n)' ).addClass( 'none' );
	$( 'div#content ul#content-order li:last-child' ).addClass( 'last-child' );
	$( 'div#content dl#content-privilege dd:last-child' ).addClass( 'last-child' );
	$( 'div#content div#tab-set div.section table td:odd' ).addClass( 'odd' );
	$( 'div#content div#tab-set div.section' ).hide();
	$( 'div#content div#tab-set div.section:first' ).show();
	$( 'div#content div#tab-set' ).addClass( 'tokyo' );
	$( 'div#recommend-wrapper div#recommend ul li:last-child' ).addClass( 'last-child' );
	$( 'div#content table#form-table tr:last-child' ).addClass( 'last-child' );
	$( 'div#content table#form-table tbody td ol li:first-child' ).addClass( 'first-child' );
	$( 'div#content table#form-table tbody td ol li:last-child' ).addClass( 'last-child' );
	$( 'table.infield tr:first-child' ).addClass( 'first-child' );
	$( 'body.order div#content ul#order-select > li:last-child' ).addClass( 'last-child' );
	$( 'body.order div#content ul#order-select li dl dd ul > li:first-child' ).addClass( 'first-child' );
	$( 'body.order div#content div#order-form-wrapp table tbody > tr:nth-child(2n)' ).addClass( 'odd' );
	$( 'body.order div#content div#order-form-wrapp table tr > th:nth-child(2)' ).addClass( 'name' );
	$( 'body.order div#content div#order-form-wrapp table tr > td:nth-child(2)' ).addClass( 'name' );
	$( 'body.policy div#content dl#privacy dd ul li:last-child' ).addClass( 'last-child' );
	$( 'body.policy div#content ul#immunity li:last-child' ).addClass( 'last-child' );

//-- tab -------------------------------------------------------------------------------------------------//

	$( 'div#content div#tab-set ul li a' ).click( function(){
		var objId = $( this ).attr( 'href' );
		$( '.section' ).hide();
		$( objId ).show();
		var pageId = objId.replace( /#/, '' );
		$( 'div#content div#tab-set' ).attr( 'class', pageId );
		return false;
	});

//-- recommend ------------------------------------------------------------------------------------------//

	$( '#recommend-inner' ).css( 'width',580*$( '#recommend-inner ul' ).size()+'px' );
	$( '#recommend-inner ul:last' ).prependTo( '#recommend-inner' );
	$( '#recommend-inner' ).css( 'margin-left','-580px' );
	$( '#prev' ).click(function(){
		$( '#recommend-inner' ).animate({
			marginLeft : parseInt($( '#recommend-inner' ).css( 'margin-left' ))+580+'px'
		},'slow','swing' , 
		function(){
			$( '#recommend-inner' ).css( 'margin-left','-580px' )
			$( '#recommend-inner ul:last' ).prependTo( '#recommend-inner' );
		});
	});
	$( '#next' ).click(function(){
		$( '#recommend-inner' ).animate({
			marginLeft : parseInt($( '#recommend-inner' ).css( 'margin-left' ))-580+'px'
		},'slow','swing' , 
		function(){
			$( '#recommend-inner' ).css( 'margin-left','-580px' );
			$( '#recommend-inner ul:first' ).appendTo( '#recommend-inner' );
		});
	});
});
