if (!jp) var jp = {}; if (!jp.feedforce) jp.feedforce = {}; if (!jp.feedforce.cf) jp.feedforce.cf = {}; if (!jp.feedforce.cf.smartphone) jp.feedforce.cf.smartphone = {}; jp.feedforce.cf.smartphone.transfer = { smartPhoneURL: 'http://sp.recruit-dc.co.jp/', anchorWithBlank: true, regExpSmartPhone: ['iPhone;', 'iPod;', 'Android'], appendWhenInsert: false, isSmartPhone: function () { var ua = navigator.userAgent; for (var i in this.regExpSmartPhone) { if (ua.match(new RegExp(this.regExpSmartPhone[i]))) { return true; } } return false; }, buildAnchor: function (str) { var anchorTag = document.createElement('a'); anchorTag.href = this.smartPhoneURL; anchorTag.innerHTML = str; if (this.anchorWithBlank) { anchorTag.blank = '_blank'; } return anchorTag; }, insertLinkIfSmartPhone: function (str, targetID) { if (this.isSmartPhone()) { var target = document.getElementById(targetID); if (target != null) { if (!this.appendWhenInsert) { while (target.firstChild) { target.removeChild(target.firstChild); } } target.appendChild(this.buildAnchor(str)); } } }, changeVisibleIfSmartPhone: function (targetID) { if (this.isSmartPhone()) { var target = document.getElementById(targetID); if (target != null) { target.style.display = 'block'; } } } }; 

