Commit 7f6ef750 by Orine Matsui

本番最新をDL

parent 5dc2630a
Showing with 78 additions and 78 deletions
/* header電話番号拡大 */
$(function() {
$('#head_contact li:first-child + *').attr('id','head_contact_tel');
pathname = location.pathname;
if ( pathname.indexOf('/rental') == -1 ) {
$('#head_contact_tel img').hover (
function () {
$('#head_contact_tel img').attr('src', '/common/img/header_freedial_hotton.png');
},function () {
$('#head_contact_tel img').attr('src', '/common/img/header_freedial.png');
}
);
} else {
$('#head_contact_tel img').hover (
function () {
$('#head_contact_tel img').attr('src', '/common/img/header_freedial_hotton_rental.png');
},function () {
$('#head_contact_tel img').attr('src', '/common/img/header_freedial.png');
}
);
}
})
/* site search */
$(function() {
var cx = '012834083069365124613:clp9ogaosg0';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})
/* image rollover */
function smartRollover() {
if (document.getElementsByTagName) {
var images = document.getElementsByTagName("img");
for (var i=0; i < images.length; i++) {
if (images[i].getAttribute("src").match("_off.")) {
images[i].onmouseover = function() {
this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
}
images[i].onmouseout = function() {
this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
}
}
}
}
}
if (window.addEventListener) {
window.addEventListener("load", smartRollover, false);
}
else if (window.attachEvent) {
window.attachEvent("onload", smartRollover);
}
/* smooth scroll */
$(function(){
// #で始まるアンカーをクリックした場合に処理
$('a[href^=#]').click(function() {
var speed = 400;
var href= $(this).attr("href");
var target = $(href == "#" || href == "" ? 'html' : href);
var position = target.offset().top;
$('body,html').animate({scrollTop:position}, speed, 'swing');
//return false;
});
});
/* page top */
$(function() {
$('.page_top').click (function() {
$('html,body').animate({scrollTop:0}, 'slow');
return false;
});
});
/* header電話番号拡大 */
$(function() {
$('#head_contact li:first-child + *').attr('id','head_contact_tel');
pathname = location.pathname;
if ( pathname.indexOf('/rental') == -1 ) {
$('#head_contact_tel img').hover (
function () {
$('#head_contact_tel img').attr('src', '/common/img/header_freedial_hotton.png');
},function () {
$('#head_contact_tel img').attr('src', '/common/img/header_freedial.png');
}
);
} else {
$('#head_contact_tel img').hover (
function () {
$('#head_contact_tel img').attr('src', '/common/img/header_freedial_hotton_rental.png');
},function () {
$('#head_contact_tel img').attr('src', '/common/img/header_freedial.png');
}
);
}
})
/* site search */
$(function() {
var cx = '012834083069365124613:clp9ogaosg0';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})
/* image rollover */
function smartRollover() {
if (document.getElementsByTagName) {
var images = document.getElementsByTagName("img");
for (var i=0; i < images.length; i++) {
if (images[i].getAttribute("src").match("_off.")) {
images[i].onmouseover = function() {
this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
}
images[i].onmouseout = function() {
this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
}
}
}
}
}
if (window.addEventListener) {
window.addEventListener("load", smartRollover, false);
}
else if (window.attachEvent) {
window.attachEvent("onload", smartRollover);
}
/* smooth scroll */
$(function(){
// #で始まるアンカーをクリックした場合に処理
$('a[href^=#]').click(function() {
var speed = 400;
var href= $(this).attr("href");
var target = $(href == "#" || href == "" ? 'html' : href);
var position = target.offset().top;
$('body,html').animate({scrollTop:position}, speed, 'swing');
//return false;
});
});
/* page top */
$(function() {
$('.page_top').click (function() {
$('html,body').animate({scrollTop:0}, 'slow');
return false;
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment