// JavaScript Document

//For jquery.js

//ページ内画像拡大表示

$(function lightBoxEffect() {
	$("div#main div.item a").lightBox({
	txtImage: "※写真はイメージです。実際のご注文時とは花の種類・本数が異なる場合があります。"
	});
});


//ページ上部へのスクロール
$(function scrollToTop() {
        $('.to_top a').click(function () {
            $(this).blur();
            $('html,body').animate({ scrollTop: 0 }, 'slow');
            return false;
        });
});


//ヘッダナビロールオーバーの制御
function eventRollover() {
	var image_cache = new Object();
	$(".rollover a img").not("[@src*='_on.']").each(function(i) {
		var imgsrc = this.src;
		var dot = this.src.lastIndexOf('.');
		var imgsrc_on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
		image_cache[this.src] = new Image();
		image_cache[this.src].src = imgsrc_on;
		$(this).hover(
			function() { this.src = imgsrc_on; },
			function() { this.src = imgsrc; }
		);
	});
}
$(document).ready(function(){
	eventRollover();
});


//ポップアップウィンドウ制御

$(function() {

	$('a.window-contact').click(function(){
		window.open(this.href,'new','scrollbars=yes,width=680,height=600').focus();
		return false;
	});
	$('a.window-order').click(function(){
		window.open(this.href,'new','scrollbars=yes,width=680,height=600').focus();
		return false;
	});
	$('a.window-map').click(function(){
		window.open(this.href,'new','scrollbars=yes,width=680,height=700').focus();
		return false;
	});

});


//ナビのプルダウンメニュー制御

$(document).ready(function() {
	$('ul.pulldown').droppy({speed: 100});
});


//ボックス要素の高さ揃える
//jquery.flatheights.js

$(function() {
    $('div#main div.item h3').flatHeights();//ショッピングの商品タイトル
    $('div#main div.item li.number').flatHeights();//ショッピングの商品番号
    $('div#main div.item li.price').flatHeights();//ショッピングの商品価格
    $('div#main div.item li.size').flatHeights();//ショッピングの商品サイズ
    $('body#order-index div#main div#contents01 ol p.text').flatHeights();//オーダーの流れ
});







