
/* effect.js
********************************************************************************


01.Current
02.Anchor Scroll
03.Junction
04.Layout 2
05.Layout 3
06.Corner
07.Roll Over
100.Frame Adjust


********************************************************************************/ 


/*==================================================

01.Current

--------------------------------------------------*/


/*==================================================

02.Anchor Scroll

--------------------------------------------------*/

$(function(){
$("a[href^=#]").click(function() {  
var hash = this.hash;  
if(!hash || hash == "#")  
return false;  
$($.browser.safari ? 'body' : 'html')  
.animate({scrollTop: $(hash).offset().top}, 100, "swing");  
return false;  
})
})


/*==================================================

03.Junction

--------------------------------------------------*/



/*==================================================

04.Layout 2

--------------------------------------------------*/

$(function(){
$("div.layout-2 div.set:nth-child(2n)").addClass("sp-mr000");
})


/*==================================================

05.Layout 3

--------------------------------------------------*/

$(function(){
$("div.layout-3 div.set:nth-child(3n)").addClass("sp-mr000");
})


/*==================================================

06.Corner

--------------------------------------------------*/

$(function(){
$("div.box-inner").corner("round 5px").parent().corner("round 6px")
})


/*==================================================

07.Roll Over

--------------------------------------------------*/
//Home—p
$(function(){
if($("#home").length){
var postfix = "_on";
var controller = $(".mainvisual");
var img = $("#onlineshop");
var src = img.attr("src");
var src_on = src.substr(0, src.lastIndexOf("."))
+ postfix
+ src.substring(src.lastIndexOf("."));
controller.hover(
function() {img.attr("src", src_on);},
function() {img.attr("src", src);}	
);
controller.click(
function() {img.attr("src", src);}
);
}
})

//ˆê”Ê—p
$(function(){
$(".ro").each(function() {
var postfix = "_on";
var img = $(this);
var src = img.attr("src");
var src_on = src.substr(0, src.lastIndexOf("."))
+ postfix
+ src.substring(src.lastIndexOf("."));
img.hover(
function() {img.attr("src", src_on);},
function() {img.attr("src", src);}
);
img.click(
function() {img.attr("src", src);}
);
});
})


/*==================================================

08.Pop Up

--------------------------------------------------*/
$(function(){
$(".popupwindow").popupwindow();
});


/*==================================================

100.Frame Adjust

--------------------------------------------------*/
$(function(){
var mainH=$("#main").height();
var sideH=$("#side").height();
if(!$("#home").length && mainH < sideH){
$("#main").css("height", sideH);
}
})
