// JavaScript Document

(function($){

	$(document).ready(function(){

		// set year in copyrights.
		$('#footer .copy').html('All Rights Reserved, Copyright &copy;'+ (new Date().getFullYear() || '2009') +' The Master WARABEYA NICHIYO CO., LTD.');
		
		$('#header .fontsize li').hover( function (){ $(this).addClass("over"); },function (){ $(this).removeClass("over"); });
		
		$('#header .fontsize .size01').click(function (){ setActiveStyleSheet('small'); return false; });
		$('#header .fontsize .size02').click(function (){ setActiveStyleSheet('middle'); return false; });
		$('#header .fontsize .size03').click(function (){ setActiveStyleSheet('large'); return false; });
		
		$('#bread .printbutton').hover( function (){ $(this).addClass("over"); },function (){ $(this).removeClass("over"); });
		$('#bread .printbutton').click( function (){ print();return false; });
		
		$('a.popup').click(
			function(){
				window.open(this.href,'popup',' status=no, toolbar=no, location=no, menubar=no, scrollbars=yes, resizable=yes, height=640, width=840');return false;
			}
		);

		/*
		$('a[href$=".pdf"],a[href$=".PDF"]').addClass("pdf");
		$('a.pdf:has(img)').removeClass('pdf');
		$('<span class="mediaicon"><img src="/common/icon_pdf.png" alt="" /></span>').appendTo('a.pdf');
		
		var newshtml = $('.news_block').attr("title");
		$('.news_block').inc({selector: '#content .newslist ul', url: newshtml});
		*/
		
		//$('.heightline').flatHeights();

		/* var sets = [], temp = [];
		$('.content_index_box02 .column_box .wrap01').each(function(i) {
			temp.push(this);
			if (i % 2 == 1) {
				sets.push(temp);
				temp = [];
			}
		});
		if (temp.length) sets.push(temp);
		$.each(sets, function() {
			$(this).flatHeights();
		}); */
		
	});

})(jQuery);

(function(){ /*Use Object Detection to detect IE6*/ var m = document.uniqueID /*IE*/ && document.compatMode /*>=IE6*/ && !window.XMLHttpRequest /*<=IE6*/ && document.execCommand ; try{ if(!!m){ m("BackgroundImageCache", false, true) /* = IE6 only */ } }catch(oh){}; })(); 


