/*
 * yuga.js 0.7.1 - 優雅なWeb制作のためのJS
 *
 * Copyright (c) 2009 Kyosuke Nakamura (kyosuke.jp)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Since:     2006-10-30
 * Modified:  2009-01-27
 *
 * jQuery 1.3.1
 * ThickBox 3.1
 */

/*
 * [使用方法] XHTMLのhead要素内で次のように読み込みます。
 
<link rel="stylesheet" href="css/thickbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/thickbox.js"></script>
<script type="text/javascript" src="js/yuga.js" charset="utf-8"></script>

 */

(function($) {

	$(function() {
		$.yuga.selflink();
		$.yuga.rollover();
		//$.yuga.externalLink();
		$.yuga.thickbox();
		$.yuga.scroll();
		$.yuga.tab();
		//$.yuga.stripe();
		//$.yuga.css3class();
	});

	//---------------------------------------------------------------------

	$.yuga = {
		// URIを解析したオブジェクトを返すfunction
		Uri: function(path){
			var self = this;
			this.originalPath = path;
			//絶対パスを取得
			this.absolutePath = (function(){
				var e = document.createElement('span');
				e.innerHTML = '<a href="' + path + '" />';
				return e.firstChild.href;
			})();
			//絶対パスを分解
			var fields = {'schema' : 2, 'username' : 5, 'password' : 6, 'host' : 7, 'path' : 9, 'query' : 10, 'fragment' : 11};
			var r = /^((\w+):)?(\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/.exec(this.absolutePath);
			for (var field in fields) {
				this[field] = r[fields[field]];
			}
			this.querys = {};
			if(this.query){
				$.each(self.query.split('&'), function(){
					var a = this.split('=');
					if (a.length == 2) self.querys[a[0]] = a[1];
				});
			}
		},
		//現在のページと親ディレクトリへのリンク
		selflink: function (options) {
			var c = $.extend({
				selfLinkAreaSelector:'body',
				selfLinkClass:'current',
				parentsLinkClass:'parentsLink',
				postfix: '_cr',
				changeImgSelf:false,
				changeImgParents:false
			}, options);
			$(c.selfLinkAreaSelector+((c.selfLinkAreaSelector)?' ':'')+'a[href]').each(function(){
				var href = new $.yuga.Uri(this.getAttribute('href'));
				var setImgFlg = false;
				if ((href.absolutePath == location.href) && !href.fragment) {
					//同じ文書にリンク
					$(this).addClass(c.selfLinkClass);
					setImgFlg = c.changeImgSelf;
				} else if (0 <= location.href.search(href.absolutePath)) {
					//親ディレクトリリンク
					$(this).addClass(c.parentsLinkClass);
					setImgFlg = c.changeImgParents;
				}
				if (setImgFlg){
					//img要素が含まれていたら現在用画像（_cr）に設定
					$(this).find('img').each(function(){
						this.originalSrc = $(this).attr('src');
						this.currentSrc = this.originalSrc.replace(new RegExp('('+c.postfix+')?(\.gif|\.jpg|\.png)$'), c.postfix+"$2");
						$(this).attr('src',this.currentSrc);
					});
				}
			});
		},
		//ロールオーバー
		rollover: function(options) {
			var c = $.extend({
				hoverSelector: '.over, .allover img',
				groupSelector: '.overgroup',
				postfix: '_on'
			}, options);
			//ロールオーバーするノードの初期化
			var rolloverImgs = $(c.hoverSelector).filter(isNotCurrent);
			rolloverImgs.each(function(){
				this.originalSrc = $(this).attr('src');
				this.rolloverSrc = this.originalSrc.replace(new RegExp('('+c.postfix+')?(\.gif|\.jpg|\.png)$'), c.postfix+"$2");
				this.rolloverImg = new Image;
				this.rolloverImg.src = this.rolloverSrc;
			});
			//グループ内のimg要素を指定するセレクタ生成
			var groupingImgs = $(c.groupSelector).find('img').filter(isRolloverImg);

			//通常ロールオーバー
			rolloverImgs.not(groupingImgs).hover(function(){
				$(this).attr('src',this.rolloverSrc);
			},function(){
				$(this).attr('src',this.originalSrc);
			});
			//グループ化されたロールオーバー
			$(c.groupSelector).hover(function(){
				$(this).find('img').filter(isRolloverImg).each(function(){
					$(this).attr('src',this.rolloverSrc);
				});
			},function(){
				$(this).find('img').filter(isRolloverImg).each(function(){
					$(this).attr('src',this.originalSrc);
				});
			});
			//フィルタ用function
			function isNotCurrent(i){
				return Boolean(!this.currentSrc);
			}
			function isRolloverImg(i){
				return Boolean(this.rolloverSrc);
			}

		},
		//外部リンクは別ウインドウを設定
		externalLink: function(options) {
			var c = $.extend({
				windowOpen:true,
				externalClass: 'externalLink',
				addIconSrc: ''
			}, options);
			var uri = new $.yuga.Uri(location.href);
			var e = $('a[href^="http://"]').not('a[href^="' + uri.schema + '://' + uri.host + '/' + '"]');
			if (c.windowOpen) {
				e.click(function(){
					window.open(this.href, '_blank');
					return false;
				});
			}
			if (c.addIconSrc) e.not(':has(img)').after($('<img src="'+c.addIconSrc+'" class="externalIcon" />'));
			e.addClass(c.externalClass);
		},
		//画像へ直リンクするとthickboxで表示(thickbox.js利用)
		thickbox: function() {
			try {
				tb_init('a[href$=".jpg"]:not(.thickbox, a[href*="?"]), a[href$=".gif"][href!="?"]:not(.thickbox, a[href*="?"]), a[href$=".png"][href!="?"]:not(.thickbox, a[href*="?"])');
			} catch(e) {
			}	
		},
		//ページ内リンクはするするスクロール
		scroll: function(options) {
			//ドキュメントのスクロールを制御するオブジェクト
			var scroller = (function() {
				var c = $.extend({
					easing:100,
					step:30,
					fps:60,
					fragment:''
				}, options);
				c.ms = Math.floor(1000/c.fps);
				var timerId;
				var param = {
					stepCount:0,
					startY:0,
					endY:0,
					lastY:0
				};
				//スクロール中に実行されるfunction
				function move() {
					if (param.stepCount == c.step) {
						//スクロール終了時
						setFragment(param.hrefdata.absolutePath);
						window.scrollTo(getCurrentX(), param.endY);
					} else if (param.lastY == getCurrentY()) {
						//通常スクロール時
						param.stepCount++;
						window.scrollTo(getCurrentX(), getEasingY());
						param.lastY = getEasingY();
						timerId = setTimeout(move, c.ms); 
					} else {
						//キャンセル発生
						if (getCurrentY()+getViewportHeight() == getDocumentHeight()) {
							//画面下のためスクロール終了
							setFragment(param.hrefdata.absolutePath);
						}
					}
				}
				function setFragment(path){
					location.href = path
				}
				function getCurrentY() {
					return document.body.scrollTop  || document.documentElement.scrollTop;
				}
				function getCurrentX() {
					return document.body.scrollLeft  || document.documentElement.scrollLeft;
				}
				function getDocumentHeight(){
					return document.documentElement.scrollHeight || document.body.scrollHeight;
				}
				function getViewportHeight(){
					return (!$.browser.safari && !$.browser.opera) ? document.documentElement.clientHeight || document.body.clientHeight || document.body.scrollHeight : window.innerHeight;
				}
				function getEasingY() {
					return Math.floor(getEasing(param.startY, param.endY, param.stepCount, c.step, c.easing));
				}
				function getEasing(start, end, stepCount, step, easing) {
					var s = stepCount / step;
					return (end - start) * (s + easing / (100 * Math.PI) * Math.sin(Math.PI * s)) + start;
				}
				return {
					set: function(options) {
						this.stop();
						if (options.startY == undefined) options.startY = getCurrentY();
						param = $.extend(param, options);
						param.lastY = param.startY;
						timerId = setTimeout(move, c.ms); 
					},
					stop: function(){
						clearTimeout(timerId);
						param.stepCount = 0;
					}
				};
			})();
			$('a[href^=#], area[href^=#]').not('a[href=#], area[href=#]').each(function(){
				this.hrefdata = new $.yuga.Uri(this.getAttribute('href'));
			}).click(function(){
				var target = $('#'+this.hrefdata.fragment);
				if (target.length == 0) target = $('a[name='+this.hrefdata.fragment+']');
				if (target.length) {
					scroller.set({
						endY: target.offset().top,
						hrefdata: this.hrefdata
					});
					return false;
				}
			});
		},
		//タブ機能
		tab: function(options) {
			var c = $.extend({
				tabNavSelector:'.tabNav',
				activeTabClass:'active'
			}, options);
			$(c.tabNavSelector).each(function(){
				var tabNavList = $(this).find('a[href^=#], area[href^=#]');
				var tabBodyList;
				tabNavList.each(function(){
					this.hrefdata = new $.yuga.Uri(this.getAttribute('href'));
					var selecter = '#'+this.hrefdata.fragment;
					if (tabBodyList) {
						tabBodyList = tabBodyList.add(selecter);
					} else {
						tabBodyList = $(selecter);
					}
					$(this).unbind('click');
					$(this).click(function(){
						tabNavList.removeClass(c.activeTabClass);
						$(this).addClass(c.activeTabClass);
						tabBodyList.hide();
						$(selecter).show();
						return false;
					});
				});
				tabBodyList.hide()
				tabNavList.filter(':first').trigger('click');
			});
		},
		//奇数、偶数を自動追加
		stripe: function(options) {
			var c = $.extend({
				oddClass:'odd',
				evenClass:'even'
			}, options);
			$('ul, ol').each(function(){
				//JSでは0から数えるのでevenとaddを逆に指定
				$(this).children('li:odd').addClass(c.evenClass);
				$(this).children('li:even').addClass(c.oddClass);
			});
			$('table, tbody').each(function(){
				$(this).children('tr:odd').addClass(c.evenClass);
				$(this).children('tr:even').addClass(c.oddClass);
			});
		},
		//css3のクラスを追加
		css3class: function() {
			//:first-child, :last-childをクラスとして追加
			$('body :first-child').addClass('firstChild');
			$('body :last-child').addClass('lastChild');
			//css3の:emptyをクラスとして追加
			$('body :empty').addClass('empty');
		}
	};
})(jQuery);



/*--------------------------------------------------------------------------*
 *  
 *  wordBreak JavaScript Library for Opera & Firefox
 *  
 *  MIT-style license. 
 *  
 *  2008 Kazuma Nishihata 
 *  http://www.to-r.net
 *  
 *--------------------------------------------------------------------------*/


new function(){
	if(window.opera || navigator.userAgent.indexOf("Firefox") != -1){
		var wordBreak = function() {
			var wordBreakClass = "wordBreak";
			var table = document.getElementsByTagName("table");
			for(var i=0,len=table.length ; i<len ; i++){
				var tbClass = table[i].className.split(/\s+/);
				for (var j = 0; j < tbClass.length; j++) {
					if (tbClass[j] == wordBreakClass) {
						recursiveParse(table[i])
					}
				}
			}
		}
		var recursiveParse = function(pNode) {
			var childs = pNode.childNodes;
			for (var i = 0; i < childs.length; i++) {
				var cNode = childs[i];
				if (childs[i].nodeType == 1) {
					recursiveParse(childs[i]);
				}else if(cNode.nodeType == 3) {
					if(cNode.nodeValue.match("[^\n ]")){
						var plTxt = cNode.nodeValue.replace(/\t/g,"")
						var spTxt = plTxt.split("");
						spTxt = spTxt.join(String.fromCharCode(8203));
						var chNode = document.createTextNode(spTxt);
						cNode.parentNode.replaceChild(chNode,cNode)
					}
				}
			}
		}

	}else{
		var wordBreak = function() {
			if( document.styleSheets[0].addRule ){
				document.styleSheets[0].addRule(".wordBreak","word-break:break-all");
			}else if( document.styleSheets[0].insertRule ){
				document.styleSheets[0].insertRule(".wordBreak{word-break:break-all}", document.styleSheets[0].cssRules.length );
			}else{
				return false;
			}
		}
	}
	var addEvent = function(elm,listener,fn){
		try{
			elm.addEventListener(listener,fn,false);
		}catch(e){
			elm.attachEvent("on"+listener,fn);
		}
	}
	addEvent(window,"load",wordBreak);
}


function simple_tooltip(target_items, name){
 $(target_items).each(function(i){
		$("body").append("<div class='"+name+"' id='"+name+i+"'><p>"+$(this).attr('title')+"</p></div>");
		var my_tooltip = $("#"+name+i);
		
		if($(this).attr("title") != "" && $(this).attr("title") != "undefined" ){
		
		$(this).removeAttr("title").mouseover(function(){
					my_tooltip.css({opacity:0.8, display:"none"}).fadeIn(400);
		}).mousemove(function(kmouse){
				var border_top = $(window).scrollTop(); 
				var border_right = $(window).width();
				var left_pos;
				var top_pos;
				var offset = 20;
				if(border_right - (offset *2) >= my_tooltip.width() + kmouse.pageX){
					left_pos = kmouse.pageX+offset;
					} else{
					left_pos = border_right-my_tooltip.width()-offset;
					}
					
				if(border_top + (offset *2)>= kmouse.pageY - my_tooltip.height()){
					top_pos = border_top +offset;
					} else{
					top_pos = kmouse.pageY-my_tooltip.height()-offset;
					}	
				
				
				my_tooltip.css({left:left_pos, top:top_pos});
		}).mouseout(function(){
				my_tooltip.css({left:"-9999px"});				  
		});
		
		}

	});
}

function changeMapImage(imgPath) {
  document.getElementById('cmap').src = imgPath;
}



//追加機能
$(document).ready(function() {
	simple_tooltip("#main a","tooltip");  
	$('td:empty').parent().css('display','none');
	$('th:empty').parent().css('display','none');
	$('p.ttl:empty').parent().parent().css('display','none');
	$('input.searchBtn').hover(function(){
		$(this).css('cursor','pointer'); 
	},function(){
		$(this).css('cursor','default'); 
	});
	$('input.backBtn').hover(function(){
		$(this).css('cursor','pointer'); 
	},function(){
		$(this).css('cursor','default'); 
	});
	$('input.checkBtn').hover(function(){
		$(this).css('cursor','pointer'); 
	},function(){
		$(this).css('cursor','default'); 
	});
	$('input.sendBtn').hover(function(){
		$(this).css('cursor','pointer'); 
	},function(){
		$(this).css('cursor','default'); 
	});
	$('input.deleteBtn').hover(function(){
		$(this).css('cursor','pointer'); 
	},function(){
		$(this).css('cursor','default'); 
	});
	$('input.goformBtn').hover(function(){
		$(this).css('cursor','pointer'); 
	},function(){
		$(this).css('cursor','default'); 
	});
	$('input.printBtn').hover(function(){
		$(this).css('cursor','pointer'); 
	},function(){
		$(this).css('cursor','default'); 
	});
	
	$('p.KD-107H').replaceWith('<p class="ttl">平机 W1000</p>');
	$('p.KD-117H').replaceWith('<p class="ttl">平机 W1100</p>');
	$('p.KD-127H').replaceWith('<p class="ttl">平机 W1200</p>');
	$('p.KD-147H').replaceWith('<p class="ttl">平机 W1400</p>');
	$('p.KD-167H').replaceWith('<p class="ttl">平机 W1600</p>');
	$('p.KD-107').replaceWith('<p class="ttl">片袖机 W1000</p>');
	$('p.KD-117').replaceWith('<p class="ttl">片袖机 W1100</p>');
	$('p.KD-127').replaceWith('<p class="ttl">片袖机 W1200</p>');
	$('p.BZD-107').replaceWith('<p class="ttl">片袖机 ラッチ付き W1000</p>');
	$('p.KD-147W').replaceWith('<p class="ttl">両袖机 W1400</p>');
	$('p.KD-167W').replaceWith('<p class="ttl">両袖机 W1600</p>');
	$('p.DW-087').replaceWith('<p class="ttl">ワークデスク W800</p>');
	$('p.DW-107').replaceWith('<p class="ttl">ワークデスク W1000</p>');
	$('p.YD-1470').replaceWith('<p class="ttl">オペレーションデスク</p>');
	$('p.YD-1270').replaceWith('<p class="ttl">パーソナルデスク</p>');
	$('p.CZD-3B').replaceWith('<p class="ttl">3段ワゴン ダークグレー</p>');
	$('p.YD-745').replaceWith('<p class="ttl">サイドワゴン</p>');
	$('p.KD-047-3').replaceWith('<p class="ttl">3段脇机</p>');
	$('p.KD-047-2').replaceWith('<p class="ttl">2段脇机</p>');
	$('p.ND-043A').replaceWith('<p class="ttl">訳あり！3段ワゴン</p>');
	$('p.CZD-3').replaceWith('<p class="ttl">3段インサイドワゴン</p>');
	$('p.ICAD-3W').replaceWith('<p class="ttl">3段スリムワゴン</p>');
	$('p.AM-1000').replaceWith('<p class="ttl">アミューズ1000</p>');
	$('p.BN-114').replaceWith('<p class="ttl">バナーレ</p>');
	$('p.DL-111').replaceWith('<p class="ttl">ドルチェ</p>');
	$('p.FL-101').replaceWith('<p class="ttl">FLEX</p>');
	$('p.TI-114').replaceWith('<p class="ttl">ティラーレ</p>');
	$('p.UN-100').replaceWith('<p class="ttl">ウナセディア</p>');
	$('p.AC-95').replaceWith('<p class="ttl">アクト</p>');
	$('p.FI-200').replaceWith('<p class="ttl">FIT</p>');
	$('p.EL-001').replaceWith('<p class="ttl">エレガンテ</p>');
	$('p.PT-002').replaceWith('<p class="ttl">プロチームTW</p>');
	$('p.ST-001').replaceWith('<p class="ttl">グレッジョ</p>');
	$('p.MO-002').replaceWith('<p class="ttl">モノトーン</p>');
	$('p.CO-002B').replaceWith('<p class="ttl">折りたたみイス\nベーシック</p>');
	$('p.CO-001').replaceWith('<p class="ttl">折りたたみ椅子</p>');
	$('p.KN-300').replaceWith('<p class="ttl">カンファレンス</p>');
	$('p.DJ-590-A').replaceWith('<p class="ttl">ダジェンダ</p>');
	$('p.GR-400').replaceWith('<p class="ttl">グランデ</p>');
	$('p.SOU-01-01').replaceWith('<p class="ttl">スチール引違い×スチール引違い書庫セット</p>');
	$('p.SOU-01').replaceWith('<p class="ttl">スチール引違い書庫</p>');
	$('p.SOU-01-02').replaceWith('<p class="ttl">ガラス引違い×スチール引違い書庫セット</p>');
	$('p.SOU-02').replaceWith('<p class="ttl">ガラス引違い書庫</p>');
	$('p.SOU-04-04').replaceWith('<p class="ttl">オープン×オープン書庫セット</p>');
	$('p.SOU-04').replaceWith('<p class="ttl">オープン書庫</p>');
	$('p.SOU-03-03').replaceWith('<p class="ttl">両開き×両開き書庫セット</p>');
	$('p.SOU-03').replaceWith('<p class="ttl">両開き書庫</p>');
	$('p.SOU-03-R').replaceWith('<p class="ttl">両開き×3段ラテラル書庫セット</p>');
	$('p.L-11').replaceWith('<p class="ttl">3段ラテラル書庫</p>');
	$('p.SO-33GSB').replaceWith('<p class="ttl">スチール3×3書庫セット</p>');
	$('p.pn0712').replaceWith('<p class="ttl">パーテーション H1200×W700</p>');
	$('p.pn0812').replaceWith('<p class="ttl">パーテーション H1200×W800</p>');
	$('p.pn1012').replaceWith('<p class="ttl">パーテーション H1200×W1000</p>');
	$('p.pn1212').replaceWith('<p class="ttl">パーテーション H1200×W1200</p>');
	$('p.pn0616').replaceWith('<p class="ttl">パーテーション H1600×W600</p>');
	$('p.pn0816').replaceWith('<p class="ttl">パーテーション H1600×W800</p>');
	$('p.pn0916').replaceWith('<p class="ttl">パーテーション H1600×W900</p>');
	$('p.pn1216').replaceWith('<p class="ttl">パーテーション H1600×W1200</p>');
	$('p.pn0618').replaceWith('<p class="ttl">パーテーション H1800×W600</p>');
	$('p.pn0918').replaceWith('<p class="ttl">パーテーション H1800×W900</p>');
	$('p.pn1218').replaceWith('<p class="ttl">パーテーション H1800×W1200</p>');
	$('p.NT3C').replaceWith('<p class="ttl">三つ折衝立</p>');
	$('p.pw0712').replaceWith('<p class="ttl">木目調パーテーション H1200×W700</p>');
	$('p.pw1012').replaceWith('<p class="ttl">木目調パーテーション H1200×W1000</p>');
	$('p.pw1212').replaceWith('<p class="ttl">木目調パーテーション H1200×W1200</p>');
	$('p.pw0616').replaceWith('<p class="ttl">木目調パーテーション H1600×W600</p>');
	$('p.pw0916').replaceWith('<p class="ttl">木目調パーテーション H1600×W900</p>');
	$('p.pw1216').replaceWith('<p class="ttl">木目調パーテーション H1600×W1200</p>');
	$('p.pw0618').replaceWith('<p class="ttl">木目調パーテーション H1800×W600</p>');
	$('p.pw0918').replaceWith('<p class="ttl">木目調パーテーション H1800×W900</p>');
	$('p.pw1218').replaceWith('<p class="ttl">木目調パーテーション H1800×W1200</p>');
	$('p.KL-3').replaceWith('<p class="ttl">カグクロ3人用ロッカー</p>');
	$('p.KL-4').replaceWith('<p class="ttl">カグクロ4人用ロッカー</p>');
	$('p.KL-6').replaceWith('<p class="ttl">カグクロ6人用ロッカー</p>');
	$('p.KL-8').replaceWith('<p class="ttl">カグクロ8人用ロッカー</p>');
	$('p.KL-12').replaceWith('<p class="ttl">カグクロ12人用ロッカー</p>');
	$('p.LK12JN-NG').replaceWith('<p class="ttl">ナイキ1人用ロッカー</p>');
	$('p.LK2JN-NG').replaceWith('<p class="ttl">ナイキ2人用ロッカー</p>');
	$('p.LK3JN-NG').replaceWith('<p class="ttl">ナイキ3人用ロッカー</p>');
	$('p.LK4JN-NG').replaceWith('<p class="ttl">ナイキ4人用ロッカー</p>');
	$('p.LK6N-NG').replaceWith('<p class="ttl">ナイキ6人用ロッカー</p>');
	$('p.LK8N-NG').replaceWith('<p class="ttl">ナイキ8人用ロッカー</p>');
	$('p.LK12-NG').replaceWith('<p class="ttl">ナイキ12人用ロッカー</p>');
	$('p.SLK-1S').replaceWith('<p class="ttl">生興1人用ロッカー</p>');
	$('p.SLK-2').replaceWith('<p class="ttl">生興2人用ロッカー</p>');
	$('p.SLK-3').replaceWith('<p class="ttl">生興3人用ロッカー</p>');
	$('p.SLK-4').replaceWith('<p class="ttl">生興4人用ロッカー</p>');
	$('p.SLK-6').replaceWith('<p class="ttl">生興6人用ロッカー</p>');
	$('p.SLK-8').replaceWith('<p class="ttl">生興8人用ロッカー</p>');
	$('p.SLK-12').replaceWith('<p class="ttl">生興12人用ロッカー</p>');
	$('p.LKD-1S').replaceWith('<p class="ttl">ダイヤルキー式1人用ロッカー</p>');
	$('p.LKD-2').replaceWith('<p class="ttl">ダイヤル式2人用ロッカー</p>');
	$('p.LKD-3').replaceWith('<p class="ttl">ダイヤル式3人用ロッカー</p>');
	$('p.LKD-4').replaceWith('<p class="ttl">ダイヤル式4人用ロッカー</p>');
	$('p.LKD-6').replaceWith('<p class="ttl">ダイヤル式6人用ロッカー</p>');
	$('p.LKD-8').replaceWith('<p class="ttl">ダイヤル式8人用ロッカー</p>');
	$('p.LKD-9').replaceWith('<p class="ttl">ダイヤル式9人用ロッカー</p>');
	$('p.LKD-12').replaceWith('<p class="ttl">ダイヤル式12人用ロッカー</p>');
	$('p.WR-1290').replaceWith('<p class="ttl">両面脚付ホワイトボード 両面無地 W1200</p>');
	$('p.WS-1290').replaceWith('<p class="ttl">両面脚付ホワイトボード 月予定／無地 W1200</p>');
	$('p.WR-1890').replaceWith('<p class="ttl">両面脚付ホワイトボード 両面無地 W1800</p>');
	$('p.WS-1890').replaceWith('<p class="ttl">両面脚付ホワイトボード 月予定／無地 W1800</p>');
	$('p.WK-1290').replaceWith('<p class="ttl">壁掛ホワイトボード 無地 W1200</p>');
	$('p.WSK-1290').replaceWith('<p class="ttl">壁掛ホワイトボード 月予定 W1200</p>');
	$('p.WK-1890').replaceWith('<p class="ttl">壁掛ホワイトボード 無地 W1800</p>');
	$('p.WSK-1890').replaceWith('<p class="ttl">壁掛ホワイトボード 月予定 W1800</p>');
	$('p.WSK-3560').replaceWith('<p class="ttl">壁掛ホワイトボード 行動予定表 W350</p>');
	$('p.KT-0998').replaceWith('<p class="ttl">ハイカウンター W900</p>');
	$('p.KT-1298').replaceWith('<p class="ttl">ハイカウンター W1200</p>');
	$('p.KT-1598').replaceWith('<p class="ttl">ハイカウンター W1500</p>');
	$('p.COH-09UCG').replaceWith('<p class="ttl">生興ハイカウンター W880</p>');
	$('p.COH-12UCG').replaceWith('<p class="ttl">生興ハイカウンター W1200</p>');
	$('p.COH-15UCG').replaceWith('<p class="ttl">生興ハイカウンター W1500</p>');
	$('p.COH-18UCG').replaceWith('<p class="ttl">生興ハイカウンター W1760</p>');
	$('p.KT-1270').replaceWith('<p class="ttl">ローカウンター W1200</p>');
	$('p.KT-1870').replaceWith('<p class="ttl">ローカウンター W1800</p>');
	$('p.COL-12TCG').replaceWith('<p class="ttl">生興ローカウンター W1200</p>');
	$('p.COL-15TCG').replaceWith('<p class="ttl">生興ローカウンター W1500</p>');
	$('p.COL-18TCG').replaceWith('<p class="ttl">生興ローカウンター W1760</p>');
	$('p.YZ-1275').replaceWith('<p class="ttl">ミーティングテーブル W1200×D750</p>');
	$('p.YZ-1575').replaceWith('<p class="ttl">ミーティングテーブル W1500×D750</p>');
	$('p.YZ-1875').replaceWith('<p class="ttl">ミーティングテーブル W1800×D750</p>');
	$('p.YZ-1890').replaceWith('<p class="ttl">ミーティングテーブル W1800×D900</p>');
	$('p.YZ-2112').replaceWith('<p class="ttl">ミーティングテーブル W2100×D1200</p>');
	$('p.YZ-2412').replaceWith('<p class="ttl">ミーティングテーブル W2400×D1200</p>');
	$('p.IUTS-1275').replaceWith('<p class="ttl">ミーティングテーブル シャープ W1200×D750</p>');
	$('p.IUTS-1575').replaceWith('<p class="ttl">ミーティングテーブル シャープ W1500×D750</p>');
	$('p.IUTS-1875').replaceWith('<p class="ttl">ミーティングテーブル シャープ W1800×D750</p>');
	$('p.IUTS-1890').replaceWith('<p class="ttl">ミーティングテーブル シャープ W1800×D900</p>');
	$('p.IKS-1545').replaceWith('<p class="ttl">スタッキングテーブル W1500×D450</p>');
	$('p.IKS-1560').replaceWith('<p class="ttl">スタッキングテーブル W1500×D600</p>');
	$('p.IKS-1845').replaceWith('<p class="ttl">スタッキングテーブル W1800×D450</p>');
	$('p.IKS-1860').replaceWith('<p class="ttl">スタッキングテーブル W1800×D600</p>');
	$('p.NTH-1890').replaceWith('<p class="ttl">高級会議テーブル W1800×D900</p>');
	$('p.NTH-2412').replaceWith('<p class="ttl">高級会議テーブル W2400×D1200</p>');
	$('p.NTH-3612').replaceWith('<p class="ttl">高級会議テーブル W3600×D1200</p>');
	$('p.KN-1845').replaceWith('<p class="ttl">折りたたみテーブル ベーシック W1800×D450</p>');
	$('p.KN-1860').replaceWith('<p class="ttl">折りたたみテーブル ベーシック W1800×D600</p>');
	$('p.IKH-1545').replaceWith('<p class="ttl">折りたたみテーブル W1500×D450</p>');
	$('p.IKH-1560').replaceWith('<p class="ttl">折りたたみテーブル W1500×D600</p>');
	$('p.IKH-1845').replaceWith('<p class="ttl">折りたたみテーブル W1800×D450</p>');
	$('p.IKH-1860').replaceWith('<p class="ttl">折りたたみテーブル W1800×D600</p>');
	$('p.IUTS-2112').replaceWith('<p class="ttl">フリーアドレステーブル W2100×D1200</p>');
	$('p.IUTS-2412').replaceWith('<p class="ttl">フリーアドレステーブル W2400×D1200</p>');
	$('p.IUTS-3612').replaceWith('<p class="ttl">フリーアドレステーブル W3600×D1200</p>');
	$('p.IUTS-750M').replaceWith('<p class="ttl">ラウンジ丸テーブル</p>');
	$('p.IUTS-750K').replaceWith('<p class="ttl">ラウンジ角テーブル</p>');
	$('p.MGK1680').replaceWith('<p class="ttl">マネージメントデスク</p>');
	$('p.MGK-G').replaceWith('<p class="ttl">役員用書庫</p>');
	$('p.MGK-L').replaceWith('<p class="ttl">役員用ロッカー</p>');
	$('p.ok0004').replaceWith('<p class="ttl">高級革張り応接セット</p>');
	$('p.SSFE').replaceWith('<p class="ttl">指紋照合式耐火金庫 19.5L</p>');
	$('p.D30-1').replaceWith('<p class="ttl">ダイヤル式耐火金庫 17L</p>');
	$('p.DW30-1').replaceWith('<p class="ttl">キー式耐火金庫 17L</p>');
	$('p.DW34-4').replaceWith('<p class="ttl">キー式耐火金庫 19L</p>');
	$('p.MEK34-4').replaceWith('<p class="ttl">テンキー式耐火金庫 19L</p>');
	$('p.DT68-DX').replaceWith('<p class="ttl">ダイヤル式耐火金庫 49L</p>');
	$('p.MEK68-DX').replaceWith('<p class="ttl">テンキー式耐火金庫 49L</p>');
	$('p.LO6330-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W875×D300</p>');
	$('p.LO6340-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W875×D400</p>');
	$('p.LO6345-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W875×D450</p>');
	$('p.LO6360-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W875×D600</p>');
	$('p.LO6430-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1200×D300</p>');
	$('p.LO6440-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1200×D400</p>');
	$('p.LO6445-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1200×D450</p>');
	$('p.LO6460-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1200×D600</p>');
	$('p.LO6530-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1500×D300</p>');
	$('p.LO6540-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1500×D400</p>');
	$('p.LO6545-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1500×D450</p>');
	$('p.LO6560-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1500×D600</p>');
	$('p.LO6630-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1800×D300</p>');
	$('p.LO6640-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1800×D400</p>');
	$('p.LO6645-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1800×D450</p>');
	$('p.LO6660-5').replaceWith('<p class="ttl">軽量ラック 開放棚 W1800×D600</p>');
	$('p.LK-633-5').replaceWith('<p class="ttl">中軽量ラック 150kg W955×D320</p>');
	$('p.LK-634-5').replaceWith('<p class="ttl">中軽量ラック 150kg W955×D470</p>');
	$('p.LK-636-5').replaceWith('<p class="ttl">中軽量ラック 150kg W955×D620</p>');
	$('p.LK-643-5').replaceWith('<p class="ttl">中軽量ラック 150kg W1280×D320</p>');
	$('p.LK-644-5').replaceWith('<p class="ttl">中軽量ラック 150kg W1280×D470</p>');
	$('p.LK-646-5').replaceWith('<p class="ttl">中軽量ラック 150kg W1280×D620</p>');
	$('p.LK-653-5').replaceWith('<p class="ttl">中軽量ラック 150kg W1580×D320</p>');
	$('p.LK-654-5').replaceWith('<p class="ttl">中軽量ラック 150kg W1580×D470</p>');
	$('p.LK-656-5').replaceWith('<p class="ttl">中軽量ラック 150kg W1580×D620</p>');
	$('p.LK-663-5').replaceWith('<p class="ttl">中軽量ラック 150kg W1880×D320</p>');
	$('p.LK-664-5').replaceWith('<p class="ttl">中軽量ラック 150kg W1880×D470</p>');
	$('p.LK-666-5').replaceWith('<p class="ttl">中軽量ラック 150kg W1880×D620</p>');
	$('p.LM-633-5').replaceWith('<p class="ttl">中軽量ラック 200kg W935×D320</p>');
	$('p.LM-634-5').replaceWith('<p class="ttl">中軽量ラック 200kg W935×D470</p>');
	$('p.LM-636-5').replaceWith('<p class="ttl">中軽量ラック 200kg W935×D620</p>');
	$('p.LM-643-5').replaceWith('<p class="ttl">中軽量ラック 200kg W1235×D320</p>');
	$('p.LM-644-5').replaceWith('<p class="ttl">中軽量ラック 200kg W1235×D470</p>');
	$('p.LM-646-5').replaceWith('<p class="ttl">中軽量ラック 200kg W1235×D620</p>');
	$('p.LM-653-5').replaceWith('<p class="ttl">中軽量ラック 200kg W1535×D320</p>');
	$('p.LM-654-5').replaceWith('<p class="ttl">中軽量ラック 200kg W1535×D470</p>');
	$('p.LM-656-5').replaceWith('<p class="ttl">中軽量ラック 200kg W1535×D620</p>');
	$('p.LM-663-5').replaceWith('<p class="ttl">中軽量ラック 200kg W1835×D320</p>');
	$('p.LM-664-5').replaceWith('<p class="ttl">中軽量ラック 200kg W1835×D470</p>');
	$('p.LM-666-5').replaceWith('<p class="ttl">中軽量ラック 200kg W1835×D620</p>');	
	$('p.RG45-07H').replaceWith('<p class="ttl">両開き書庫 ニューグレー H750</p>');
	$('p.RG45-07K').replaceWith('<p class="ttl">オープン書庫 ニューグレー H750</p>');
	$('p.RG45-07S').replaceWith('<p class="ttl">スチール引戸書庫 ニューグレー H750</p>');
	$('p.RG45-307S').replaceWith('<p class="ttl">スチール3枚引戸書庫 ニューグレー H750</p>');
	$('p.RG45-10H').replaceWith('<p class="ttl">両開き書庫 ニューグレー H1050</p>');
	$('p.RG45-310D').replaceWith('<p class="ttl">3段ラテラルキャビネット ニューグレー H1050</p>');
	$('p.RG45-410D').replaceWith('<p class="ttl">4段ラテラルキャビネット ニューグレー H1050</p>');
	$('p.RG45-10S').replaceWith('<p class="ttl">スチール引戸書庫 ニューグレー H1050</p>');
	$('p.RG45-310S').replaceWith('<p class="ttl">スチール3枚引戸書庫 ニューグレー H1050</p>');
	$('p.RG45-10K').replaceWith('<p class="ttl">オープン書庫 ニューグレー H1050</p>');
	$('p.RG45-N10C39').replaceWith('<p class="ttl">プラスチックキャビネットＡ ニューグレー H1050</p>');
	$('p.RG45-N10C48C').replaceWith('<p class="ttl">プラスチックキャビネットＢ ニューグレー H1050</p>');
	$('p.RG45-N10C49').replaceWith('<p class="ttl">プラスチックキャビネットＣ ニューグレー H1050</p>');
	$('p.RG45-N10C59').replaceWith('<p class="ttl">プラスチックキャビネットＤ ニューグレー H1050</p>');
	$('p.RG45-N10C69').replaceWith('<p class="ttl">プラスチックキャビネットＥ ニューグレー H1050</p>');
	$('p.RG45-18H').replaceWith('<p class="ttl">両開き書庫 ニューグレー H1800</p>');
	$('p.RG45-18K').replaceWith('<p class="ttl">オープン書庫 ニューグレー H1800</p>');
	$('p.RG45-21H').replaceWith('<p class="ttl">両開き書庫 ニューグレー H2100</p>');
	$('p.RG45-21K').replaceWith('<p class="ttl">オープン書庫 ニューグレー H2100</p>');
	$('p.RW45-07H').replaceWith('<p class="ttl">両開き書庫 ホワイト H750</p>');
	$('p.RW45-07K').replaceWith('<p class="ttl">オープン書庫 ホワイト H750</p>');
	$('p.RW45-07S').replaceWith('<p class="ttl">スチール引戸書庫 ホワイト H750</p>');
	$('p.RW45-307S').replaceWith('<p class="ttl">スチール3枚引戸書庫 ホワイト H750</p>');
	$('p.RW45-10H').replaceWith('<p class="ttl">両開き書庫 ホワイト H1050</p>');
	$('p.RW45-310D').replaceWith('<p class="ttl">3段ラテラルキャビネット ホワイト H1050</p>');
	$('p.RW45-410D').replaceWith('<p class="ttl">4段ラテラルキャビネット ホワイト H1050</p>');
	$('p.RW45-10S').replaceWith('<p class="ttl">スチール引戸書庫 ホワイト H1050</p>');
	$('p.RW45-310S').replaceWith('<p class="ttl">スチール3枚引戸書庫 ホワイト H1050</p>');
	$('p.RW45-10K').replaceWith('<p class="ttl">オープン書庫 ホワイト H1050</p>');
	$('p.RW45-N10C39').replaceWith('<p class="ttl">プラスチックキャビネットＡ ホワイト H1050</p>');
	$('p.RW45-N10C48C').replaceWith('<p class="ttl">プラスチックキャビネットＢ ホワイト H1050</p>');
	$('p.RW45-N10C49').replaceWith('<p class="ttl">プラスチックキャビネットＣ ホワイト H1050</p>');
	$('p.RW45-N10C59').replaceWith('<p class="ttl">プラスチックキャビネットＤ ホワイト H1050</p>');
	$('p.RW45-N10C69').replaceWith('<p class="ttl">プラスチックキャビネットＥ ホワイト H1050</p>');
	$('p.RW45-18H').replaceWith('<p class="ttl">両開き書庫 ホワイト H1800</p>');
	$('p.RW45-18K').replaceWith('<p class="ttl">オープン書庫 ホワイト H1800</p>');
	$('p.RW45-21H').replaceWith('<p class="ttl">両開き書庫 ホワイト H2100</p>');
	$('p.RW45-21K').replaceWith('<p class="ttl">オープン書庫 ホワイト H2100</p>');
	$('p.OF-100').replaceWith('<p class="ttl">オフィット</p>');
	$('p.PT-110V').replaceWith('<p class="ttl">パスチェ</p>');
	$('p.SB-6').replaceWith('<p class="ttl">シューズボックス 3列2段6人用</p>');
	$('p.SB-12').replaceWith('<p class="ttl">シューズボックス 6列2段12人用</p>');
	$('p.SBN-12').replaceWith('<p class="ttl">シューズボックス 4列3段12人用</p>');
	$('p.SBN-16').replaceWith('<p class="ttl">シューズボックス 4列4段16人用</p>');
	$('p.SBN-20').replaceWith('<p class="ttl">シューズボックス 4列5段20人用</p>');
	$('p.SBN-24').replaceWith('<p class="ttl">シューズボックス 4列6段24人用</p>');
	$('p.SBN-L12').replaceWith('<p class="ttl">シューズボックス 4列3段12人用 長靴対応</p>');
	$('p.SBN-L16').replaceWith('<p class="ttl">シューズボックス 4列4段16人用 長靴対応</p>');
	$('p.SBN-3').replaceWith('<p class="ttl">シューズボックス 3段12人用 縦仕切り無し</p>');
	$('p.SBN-4').replaceWith('<p class="ttl">シューズボックス 4段16人用 縦仕切り無し</p>');
	$('p.SBN-5').replaceWith('<p class="ttl">シューズボックス 5段20人用 縦仕切り無し</p>');
	$('p.SBN-6').replaceWith('<p class="ttl">シューズボックス 6段24人用 縦仕切り無し</p>');
	$('p.HL-9').replaceWith('<p class="ttl">シューズボックス 3列3段9人用 収納庫タイプ</p>');
	$('p.HL-18').replaceWith('<p class="ttl">シューズボックス 6列3段18人用 収納庫タイプ</p>');
	$('p.SBN-12N').replaceWith('<p class="ttl">シューズボックス 4列3段12人用 収納庫タイプ</p>');
	$('p.SBN-16N').replaceWith('<p class="ttl">シューズボックス 4列4段16人用 収納庫タイプ</p>');
	$('p.SBN-20N').replaceWith('<p class="ttl">シューズボックス 4列5段20人用 収納庫タイプ</p>');
	$('p.SBN-24N').replaceWith('<p class="ttl">シューズボックス 4列6段24人用 収納庫タイプ</p>');
	$('p.HKS-1545').replaceWith('<p class="ttl">スタッキングテーブル シャープ W1500×D450</p>');
	$('p.HKS-1560').replaceWith('<p class="ttl">スタッキングテーブル シャープ W1500×D600</p>');
	$('p.HKS-1845').replaceWith('<p class="ttl">スタッキングテーブル シャープ W1800×D450</p>');
	$('p.HKS-1860').replaceWith('<p class="ttl">スタッキングテーブル シャープ W1800×D600</p>');
	$('p.TJ-K107').replaceWith('<p class="ttl">弘益 片袖机 W1000</p>');
	$('p.EO-100').replaceWith('<p class="ttl">エコノミーチェア</p>');
	$('p.AM-001').replaceWith('<p class="ttl">エアロメッシュ</p>');
	$('p.FA-001').replaceWith('<p class="ttl">フリーアーム</p>');
	$('p.EM-001').replaceWith('<p class="ttl">アイメッシュ</p>');
	
	

	


});




/*
 Copyright (c) 2009-2011 Petr Vostrel (http://petr.vostrel.cz/)
 Dual licensed under the MIT (MIT-LICENSE.txt)
 and GPL (GPL-LICENSE.txt) licenses.

 jQuery Reel
 http://jquery.vostrel.cz/reel
 Version: 1.1.3
 Updated: 2011-05-08

 Requires jQuery 1.4.2 or higher
*/
jQuery.reel||function(h,kb,ja,p){function A(j){return h.reel.instances.length?h.reel.instances.first().data(j):null}function lb(j){return h.reel.instances.push(j[0])&&j}function mb(j){return(h.reel.instances=h.reel.instances.not("#"+j.attr(M)))&&j}function ka(j){return nb&&"data:image/gif;base64,R0lGODlh"+j}function ob(j){return"<"+j+"/>"}function la(j){return"."+j}function ma(j){return"http://code.vostrel.cz/"+j}function na(j){return"url("+j+")"}function H(j){return+j.toFixed(4)}function V(j,a,u){return N(j,
Ma(a,u))}function pb(j){function a(){h.fn[this]||(h.fn[this]=function(){return this})}h.each(j,a)}function oa(j,a){return v(j)*(a?-1:1)}function W(j){return j.originalEvent.touches[0]}h.reel={version:"1.1.3",def:{footage:6,frame:1,frames:36,hint:"",horizontal:true,hotspot:p,indicator:0,klass:"",loops:true,reversed:p,spacing:0,stitched:0,suffix:"-reel",tooltip:"",area:p,brake:0.5,clickfree:false,cw:false,delay:-1,directional:false,draggable:true,entry:p,graph:p,image:p,images:[],inversed:false,laziness:6,
monitor:p,opening:0,orbital:0,path:"",preloader:4,rebound:0.5,revolution:p,row:1,rows:0,speed:0,step:p,steps:p,tempo:36,timeout:2,throwable:true,vertical:false,wheelable:true}};h.fn.reel=function(j){var a=h.extend({},h.reel.def,j);j=function(g){var r=[];g.filter(qb).each(function(){var c=h(this),d=a.images.length&&a.images||a.image||c.attr(Na),t=X(c.css(Oa)),m=X(c.css(Pa));!d||d==Qa||!t||!m||r.push(c)});g.filter(Ra+la(w)).each(function(){r.push(h(this))});return h(r)}(this);var u=[];a.reversed&&(a.cw=
true);a.tooltip&&(a.hint=a.tooltip);a.hotspot&&(a.area=a.hotspot);j.each(function(){var g=h(this),r=g.data(),c=function(f,b){r[f]=b;g.trigger("store",[f,b]);return b},d=function(f){var b=r[f];g.trigger("recall",[f,b]);return b},t={setup:function(f){if(g.hasClass(w))return m.call(f);var b=g.attr(Na),e=c(M,g.attr(M)||g.attr(M,w+"-"+ +new Date).attr(M)),i=g.attr("style"),k=a.images,l=a.stitched,n=a.loops,s={x:X(g.css(Oa)),y:X(g.css(Pa))},x=c(Sa,a.orbital&&a.footage||a.rows<=1&&k.length||a.frames),pa=
l?1:Ta(x/a.footage),O={display:"block",width:s.x,height:s.y};e="#"+e+a.suffix;var Ua=g.attr("class"),qa={position:"relative",width:s.x,height:s.y};qa=h(P,{id:e.substr(1),"class":Ua+ra+rb,css:qa});O=g.wrap(qa).attr({"class":w}).css(O).bind(t);u.push(lb(O)[0]);c(Va,k.length&&k.length||a.image||b.replace(/^(.*)\.(jpg|jpeg|png|gif)$/,"$1"+a.suffix+".$2"));c(Wa,Ua);c(y,a.frame);c(Xa,a.spacing);c(B,s);c(o,0);c(sa,a.steps||a.frames);c(Y,a.revolution||l/2||s.x*2);c(ta,pa);c(Z,1/(x-(n&&!l?0:1)));c(sb,1/N(x,
d(sa)));c(ua,l);c(Ya,l-(n?0:s.x));c($,e);c(E,c(va,a.speed)<0);c(I,0);c(J,a.vertical);c(z,(a.row-1)/(a.rows-1));c(aa,oa(1,!a.cw&&!l));c(Q,false);c(Za,a.brake);c(wa,!!a.orbital);c(C,a.tempo/(h.reel.lazy?a.laziness:1));c(ba,0);c($a,{src:b,style:i||Qa});D.bind(F,t.tick);m.call(f);g.trigger("start")},teardown:function(f){g.unbind(q).unbind(t);var b=g.data("events"),e=g.clone().attr(g.data($a)).css({background:"transparent"}).removeClass(w).addClass(d(Wa));for(var i in b)h.each(b[i],function(k,l){e.bind(i+
"."+l.namespace,l.handler,l.data)});h("img:"+xa,g.parent()).remove();mb(g);h(d($)).before(e).detach();ca();D.unbind(F,t.tick).unbind(F,t.opening_tick);da.unbind(ya).unbind(za);m.call(f)},start:function(){var f=d(B),b=d(Sa),e=N(b,d(sa));e=c(o,1/e*((a.step||a.frame)-1));c(y,e*b+1);g.attr("id");b=g.parent();e=h(P,{"class":tb,css:{position:ea,left:0,top:0,width:f.x,height:f.y,background:Aa,opacity:0}}).appendTo(b);e=c(ab,h(a.area||e));if(h.reel.touchy){g.css({WebkitUserSelect:"none",WebkitBackgroundSize:a.images.length?
"auto":d(ua)&&d(ua)+"px "+f.y+"px"||f.x*a.footage+"px "+f.y*d(ta)*(a.rows||1)*(a.directional?2:1)+"px"});e.bind(ub,function(i){g.trigger("down",[W(i).clientX,W(i).clientY,true])}).bind(vb,function(i){g.trigger("slide",[W(i).clientX,W(i).clientY,true]);return!(a.rows>1||a.orbital||d(Q))}).bind(wb,function(){g.trigger("up",[true]);return false}).bind(xb,function(){g.trigger("up",[true]);return false})}else e.css({cursor:"url("+bb+"), "+Ba}).bind(yb,function(i,k){g.trigger("wheel",[k]);return false}).bind(zb,
function(){g.trigger("play")}).bind(a.clickfree?Ab:Bb,function(i){g.trigger("down",[i.clientX,i.clientY]);return false}).bind(a.clickfree?Cb:"",function(){g.trigger("up");return false}).disableTextSelect();a.hint&&e.attr(Db,a.hint);a.monitor&&b.append(Ca=h(P,{"class":Eb,css:{position:ea,left:0,top:0}}))||(Ca=h());a.indicator&&b.append(cb("x"));a.rows>1&&a.indicator&&b.append(cb("y"));g.trigger("preload")},preload:function(f){var b=d(B),e=g.parent(),i=d(Va),k=a.images,l=!k.length?[i]:[].concat(k),
n=g[0];n.frames=l.length;n.preloaded=0;g.trigger("stop");for(e.append(Da=h(P,{"class":Fb,css:{position:ea,left:0,top:b.y-a.preloader,height:a.preloader,overflow:xa,backgroundColor:Aa}}));l.length;){var s=a.path+l.shift(),x=h(new Image).hide().bind("load"+q,function(){n.preloaded++;h(this).unbind(q);Da.css({width:1/n.frames*n.preloaded*b.x});if(n.frames==n.preloaded){Da.remove();k.length||g.css({backgroundImage:na(a.path+i)});g.attr({src:Gb}).trigger(a.rows>1&&!a.stitched?"rowChange":"frameChange").trigger("loaded").trigger("opening");
m.call(f)}});e.append(x);setTimeout(function(pa,O){return function(){pa.attr({src:O})}}(x,s),0)}},tick:function(f){var b=d(I);if(R){var e=H(b-d(Za)/A(C)*R);b=!(b*e<=0||b<v(e))&&c(I,b>v(d(va))?e:(R=G=0))}Ca.text(d(a.monitor));b&&R++;G&&G++;db(0);Ea=true;if(G&&!b)return m.call(f);if(d(fa))return m.call(f,K());e=d(aa)*oa(1,d(E));var i=(d(Fa)?b:v(d(va))+b)/A(C);b=d(o);e=c(o,b-i*e);m.call(f);e!=b&&g.trigger("fractionChange")},opening:function(){var f=a.entry||a.speed,b=d(o),e=a.opening;c(o,b-f*a.opening);
c(ba,e*A(C));D.bind(F,t.opening_tick)},opening_tick:function(f){var b=(a.entry||a.speed)/A(C)*(a.cw?-1:1),e=d(o);c(o,H(e+b));b=c(ba,d(ba)-1);g.trigger("fractionChange");m.call(f);if(!(b>1)){D.unbind(F,t.opening_tick);Hb()}},play:function(f){var b=c(Ga,true);c(Fa,!b);eb();m.call(f)},pause:function(f){c(Ga,false);K();m.call(f)},stop:function(f){var b=c(Fa,true);c(Ga,!b);m.call(f)},down:function(f,b,e,i){if(a.draggable){c(fa,d(y));c(I,0);ga=ha(b,e,d(o),d(Y),d(z));K();ca();if(!i){da.css({cursor:na(Ib)+
", "+Ba}).bind(za,function(k){g.trigger("slide",[k.clientX,k.clientY]);m.call(k);return false});a.clickfree||da.bind(ya,function(k){g.trigger("up");m.call(k)})}}m.call(f)},up:function(f,b){if(!a.draggable)return m.call(f);c(fa,false);c(Q,false);var e=c(I,!a.throwable?0:v(S[0]+S[1])/60);R=e?1:0;e?eb():K();ca();!b&&da.unbind(ya).unbind(za)&&d(ab).css({cursor:na(bb)+", "+Ba});m.call(f)},slide:function(f,b,e){if(a.draggable&&Ea){Ea=false;K();var i={x:b-ga.x,y:e-ga.y};if(v(i.x)>0||v(i.y)>0){ga={x:b,y:e};
var k=d(Y),l=d(fb),n=d(J),s=c(o,gb(n?e-l.y:b-l.x,d(Ha),k,d(Ia),d(Ja),d(aa)));c(Q,d(Q)||d(y)!=d(fa));(i=db(n?i.y:i.x||0))&&c(E,i<0);if(a.orbital&&d(wa)){c(J,v(e-l.y)>v(b-l.x));l=ha(b,e,s,k,d(z))}if(a.rows>1){i=d(B).y;n=d(hb);var x=-n*i;c(z,H(h.reel.math.envelope(e-l.y,n,i,x,x+i,-1)))}!(s%1)&&!a.loops&&ha(b,e,s,k,d(z));g.trigger("fractionChange")}}m.call(f)},wheel:function(f,b){if(!a.wheelable)return m.call(f);var e=Ta(Jb(v(b))/2);e=oa(e,b>0);b=0.2*d(Y);ha(p,p,d(o),b,d(z));c(o,gb(e,d(Ha),b,d(Ia),d(Ja),
d(aa)));e&&c(E,e<0);c(I,0);K();m.call(f);g.trigger("fractionChange");return false},fractionChange:function(f,b){b=!b?d(o):c(o,b);b=a.loops?b-T(b):V(0,1,b);b=c(o,H(b));var e=d(y),i=c(y,1+T(b/d(Z))),k=a.orbital;c(wa,!!k&&(i<=k||i>=a.footage-k+2));if(!a.loops&&a.rebound){!G&&!(b%1)?Ka++:(Ka=0);Ka>=a.rebound*1E3/A(C)&&c(E,!d(E))}k=d(B);var l=(d(J)?k.y:k.x)-a.indicator;b=V(0,l,U(h.reel.math.interpolate(b,-1,l+2)));b=!a.cw||a.stitched?b:l-b;h(la(La+".x"),d($)).css(d(J)?{left:0,top:b}:{left:b,top:k.y-a.indicator});
if(a.rows>1){b=d(B).y-a.indicator;b=V(0,b,U(h.reel.math.interpolate(d(z),-1,b+2)));h(la(La+".y"),d($)).css({top:b})}if(i==e&&i!=1)return m.call(f);g.trigger(a.rows>1?"rowChange":"frameChange");m.call(f)},rowChange:function(f,b){var e=T(d(o)/d(Z))+1;b=c(z,V(0,1,H(b!=p?(b-1)/(a.rows-1):d(z))));c(y,e+(a.rows<=1?0:U(b*(a.rows-1))*a.frames));m.call(f);g.trigger("frameChange")},frameChange:function(f,b){var e=!b?d(o):c(o,H(d(Z)*(b-1)));b=c(y,U(b?b:d(y)));var i=a.images,k=a.footage,l=d(B),n=a.horizontal;
if(d(J)){b=a.inversed?k+1-b:b;b+=k}if(i.length)g.attr({src:a.path+i[b-1]});else{if(a.stitched)i=[-U(e*d(Ya))+L,0+L];else{e=b%k-1;e=e<0?k-1:e;k=T((b-0.1)/k);k+=a.rows>1?0:d(E)?0:d(ta);b=d(Xa);k=k*((n?l.y:l.x)+b);l=e*((n?l.x:l.y)+b);i=i.length?[0,0]:n?[-l+L,-k+L]:[-k+L,-l+L]}g.css({backgroundPosition:i.join(ra)})}m.call(f)}},m=function(f){ib||delete this;return f},G,R=0,eb=function(){return G=0},K=function(){clearTimeout(jb);D.unbind(F,t.opening_tick);g.trigger("play");return G=-a.timeout*A(C)},jb,
Hb=function(){jb=setTimeout(function(){g.trigger("play")},a.delay*1E3||0)},Ca,Da,cb=function(f){return h(P,{"class":[La,f].join(ra),css:{width:a.indicator,height:a.indicator,overflow:xa,top:d(B).y-a.indicator,left:0,position:ea,backgroundColor:Aa}})},Ka=0,ga={x:0,y:0},db=function(f){return S.push(f)&&S.shift()&&f},ca=function(){return S=[0,0]},S=ca(),gb=a.graph||h.reel.math[a.loops?"hatch":"envelope"],ha=function(f,b,e,i,k){c(Ha,e);c(hb,k);c(Ia,a.loops?0:-e*i);c(Ja,a.loops?i:i-e*i);return f&&c(fb,
{x:f,y:b})||p},Ea=true,da=h.browser.opera?D:h.unique(D.add(kb.top.document));t.setup()});ia=ia||function g(){var r=+new Date,c=A(C);if(c){D.trigger(F);h.reel.cost=(+new Date+h.reel.cost-r)/2;return ia=setTimeout(g,N(4,1E3/c-h.reel.cost))}else return ia=p}();return h(u)};h.reel.math={envelope:function(j,a,u,g,r,c){return a+N(g,Ma(r,-j*c))/u},hatch:function(j,a,u,g,r,c){j=(j<g?r:0)+j%r;j=a+-j*c/u;return j-T(j)},interpolate:function(j,a,u){return a+j*(u-a)}};h.reel.touchy=/iphone|ipod|ipad|android/i.test(navigator.userAgent);
h.reel.lazy=/iphone|ipod|android/i.test(navigator.userAgent);h.reel.instances=h();h.reel.cost=0;h.reel.leader=A;pb("mousewheel disableTextSelect enableTextSelect".split(/ /));var D=h(ja);ja=+h.browser.version.split(".").slice(0,2).join(".");var ib=h.browser.msie,nb=!(ib&&ja<8),Ba="ew-resize",ia,w="jquery-reel",rb=w+"-overlay",La=w+"-indicator",Fb=w+"-preloader",Eb=w+"-monitor",tb=w+"-interface",Gb=ka("CAAIAIAAAAAAAAAAACH5BAEAAAAALAAAAAAIAAgAAAIHhI+py+1dAAA7")||ma("blank.gif"),bb=ka("EAAQAJECAAAAAP///////wAAACH5BAEAAAIALAAAAAAQABAAQAI3lC8AeBDvgosQxQtne7yvLWGStVBelXBKqDJpNzLKq3xWBlU2nUs4C/O8cCvU0EfZGUwt19FYAAA7")||
ma("jquery.reel.cursor-drag.gif"),Ib=ka("EAAQAJECAAAAAP///////wAAACH5BAEAAAIALAAAAAAQABAAQAIslI95EB3MHECxNjBVdE/5b2zcRV1QBabqhwltq41St4hj5konmVioZ6OtEgUAOw==")||ma("jquery.reel.cursor-drag-down.gif"),U=Math.round,T=Math.floor,Ta=Math.ceil,Ma=Math.min,N=Math.max,v=Math.abs,Jb=Math.sqrt,X=parseInt,ab="area",$a="backup",E="backwards",Z="bit",Za="brake",wa="center",Wa="classes",fa="clicked",fb="clicked_location",Ha="clicked_on",hb="clicked_row",aa="cwish",B="dimensions",o="fraction",y="frame",Sa="frames",
Ja="hi",xa="hidden",Va="image",ba="opening_ticks",Ia="lo",Ga="playing",Q="reeling",Y="revolution",z="row",ta="rows",Xa="spacing",va="speed",$="stage",sa="steps",ua="stitched",Ya="stitched_travel",Fa="stopped",C="tempo",I="velocity",J="vertical",sb="wheel_step",q=".reel",zb="dblclick"+q,Bb="mousedown"+q,Ab="mouseenter"+q,Cb="mouseleave"+q,za="mousemove"+q,ya="mouseup"+q,yb="mousewheel"+q,F="tick"+q,xb="touchcancel"+q,wb="touchend"+q,ub="touchstart"+q,vb="touchmove"+q,Qa="",ra=" ",ea="absolute",Ra=
"div",P=ob(Ra),Pa="height",Aa="#000",M="id",qb="img",L="px",Na="src",Db="title",Oa="width"}(jQuery,window,document);



/**
 * .disableTextSelect - Disable Text Select Plugin
 *
 * Version: 1.1
 * Updated: 2007-11-28
 *
 * Used to stop users from selecting text
 *
 * Copyright (c) 2007 James Dempster (letssurf@gmail.com, http://www.jdempster.com/category/jquery/disabletextselect/)
 *
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 **/
(function(a){if(a.browser.mozilla){a.fn.disableTextSelect=function(){return this.each(function(){a(this).css({MozUserSelect:"none"})})};a.fn.enableTextSelect=function(){return this.each(function(){a(this).css({MozUserSelect:""})})}}else if(a.browser.msie){a.fn.disableTextSelect=function(){return this.each(function(){a(this).bind("selectstart.disableTextSelect",function(){return false})})};a.fn.enableTextSelect=function(){return this.each(function(){a(this).unbind("selectstart.disableTextSelect")})}}else{a.fn.disableTextSelect=
function(){return this.each(function(){a(this).bind("mousedown.disableTextSelect",function(){return false})})};a.fn.enableTextSelect=function(){return this.each(function(){a(this).unbind("mousedown.disableTextSelect")})}}})(jQuery);




/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * Version: 3.0.2
 * 
 * Requires: 1.2.2+
 */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);



