function jQueryEasing(){

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});

};
function jQueryScrollTo(){
/**
 * jQuery.ScrollTo
 * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com
 * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
 * Date: 1/2/2008
 *
 * @projectDescription Easy element scrolling using jQuery.
 * Tested with jQuery 1.2.1. On FF 2.0.0.11, IE 6, Opera 9.22 and Safari 3 beta. on Windows.
 *
 * @author Ariel Flesler
 * @version 1.3
 */
(function($){$.scrollTo=function(target,duration,settings){$($.browser.safari?'body':'html').scrollTo(target,duration,settings)};$.scrollTo.defaults={axis:'y',duration:1};$.fn.scrollTo=function(target,duration,settings){if(typeof duration=='object'){settings=duration;duration=0}settings=$.extend({},$.scrollTo.defaults,settings);if(!duration)duration=settings.speed||settings.duration;settings.queue=settings.queue&&settings.axis.length==2;if(settings.queue)duration=Math.ceil(duration/2);if(typeof settings.offset=='number')settings.offset={left:settings.offset,top:settings.offset};return this.each(function(){var elem=this,$elem=$(elem),t=target,toff,attr={},win=$elem.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(t)){t={top:t,left:t};break}t=$(t,this);case'object':if(t.is||t.style)toff=(t=$(t)).offset()}$.each(settings.axis.split(''),parse);animate(settings.onAfter);function parse(i,axis){var Pos=axis=='x'?'Left':'Top',pos=Pos.toLowerCase(),key='scroll'+Pos,act=elem[key];if(toff){attr[key]=toff[pos]+(win?0:act-$elem.offset()[pos]);if(settings.margin){attr[key]-=parseInt(t.css('margin'+Pos))||0;attr[key]-=parseInt(t.css('border'+Pos+'Width'))||0}if(settings.offset&&settings.offset[pos])attr[key]+=settings.offset[pos]}else{attr[key]=t[pos]}if(/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max(axis));if(!i&&settings.queue){if(act!=attr[key])animate(settings.onAfterFirst);delete attr[key]}};function animate(callback){$elem.animate(attr,duration,settings.easing,function(){if(callback)callback.call(this,$elem,attr,t)})};function max(axis){var el=win?$.browser.opera?document.body:document.documentElement:elem,Dim=axis=='x'?'Width':'Height';return el['scroll'+Dim]-el['client'+Dim]}})}})(jQuery);
};

/*
 * jcommon.js 0.9
 * Copyright (c) 2007 C.M.A. Co.,Ltd.
 *
 * Last Added: 2007-01-15
 *
 */

var ary = location.pathname.split('/');var l=0;var isLinkAry=new Array;for(i=0;i<=ary.length-1;i++){isLinkAry[i]=ary.slice(i,i+1);isLinkAry[i]=isLinkAry[i].join('/')}for(k=i+1;k<=i+ary.length;k++){isLinkAry[k]=ary.slice(0,ary.length-l);isLinkAry[k]=isLinkAry[k].join('/');isLinkAry[k]=isLinkAry[k].replace(/^\//,"");l++}isLinkAry[0]=isLinkAry[0].replace(/\#.*$/,"");var jcommon={preloader:{loadedImages:[],load:function(url){var img=this.loadedImages;var l=img.length;img[l]=new Image();img[l].src=url}},URI:function(path){path=path.replace(/^https[^a-z]*[^\/]*/,"");path=path.replace(/^[^a-z]*/,"");path=path.replace(/index.*$/,"");path=path.replace(/\/$/,"");this.absolutePath=path;this.len=isLinkAry.length;this.isSelfLink=false;while(this.len--){this.isSelfLink=this.isSelfLink||(this.absolutePath==isLinkAry[this.len])}}};

(function(){
	google.load("jquery", "1");
	google.load("swfobject", "2.1");
	google.setOnLoadCallback(function(){
		window.absPath = '/';
		jQueryEasing();
		jQueryScrollTo();
		jQueryRun();
	});
})();

function jQueryRun(){
	

$(function(){

	if(!$('#tvIndex').length){
	//lightbox
	$.getScript('http://www.k-mix.co.jp/shared/js/lightbox.js',function(){
		///lightbox
		$('a[href$=".jpg"]').add('a[href$=".gif"]').lightBox(); 
	});
	}
	
	//リンク画像&#65533;&#65533;Eロールオーバ&#65533;&#65533;Eを設&#23425;E
	$('a img.btn').add('.submitBtn input').add('#globalNav li a img').each(function(){
		this.originalSrc = $(this).attr('src');
		this.rolloverSrc = this.originalSrc.replace(/(\.gif|\.jpg|\.png)/, "_on$1");
		jcommon.preloader.load(this.rolloverSrc);
	}).hover(function(){
		$(this).attr('src',this.rolloverSrc);
	},function(){
		$(this).attr('src',this.originalSrc);
	});

	//現在のペ-ジへのリンク
	 $('#globalNav>li>a,#textNav>a,#localNav>dd>a:not([href^="#"]),#footerGlobalNav>li>a').each(function(){
		var href = new jcommon.URI($(this).attr('href'));
		if (href.isSelfLink) {
			$(this).addClass('current');
			$(this).find('img').each(function(){
				$(this).unbind('mouseenter');
				$(this).unbind('mouseleave');
				this.currentSrc = this.getAttribute('src').replace(/(\.gif|\.jpg|\.png)/, "_cr$1");
				$(this).attr('src',this.currentSrc);
			});
		}
	});

	//外部リンクは別ウインドウを設&#23425;E
	//除外が&#24513;E&#65533;&#65533;なぁE&#65533;&#65533;合&#65533;&#65533;E:notから"])まで削除
	//追加はカンマで続けめEex. :not([href^="除外したいURL"],[href^="除外したいURL2"])
	$('a[href^="http://"]:not([href^="http://www.k-mix.co.jp/"])')
	.add('a[href*="/junction/"]')
	.add('a[href*="/caramelpocket/"]')
	.add('a[href*="/2strike1ball/"]')
	.add('a[href*="/ugo_radi/"]')
	.add('a[href*="/theboom/"]')
	.add('a[href*="/8-8/"]')
	.add('a[href*="/top40/"]')
	.add('a[href*="/cinema_square/"]')
	.add('a[href*="/band/"]')
	.add('a[href*="/yahoo/"]')
	.add('a[href*="/car-life-navi/"]')
	.add('a[href*="/lovelyday/"]')
	.add('a[href*="/hitomaru/"]')
	.add('a[href*="/iff/"]')
	.add('a[href*="/guest/"]')
	.add('a[href*="/bancho/"]')
	.add('a[href*="/soyjoy/"]')
	.add('a[href*="/ski/"]')
	.add('a[href*="/08ccc/"]')
	.add('a[href*="/25th/"]')
	.add('a[href$="disaster/"]')
	.add('a[href*="form/check.php"]')
	.click(function(){
		window.open(this.href, '_blank');
		return false;
	});//.addClass('externalLink');
	$('.externalLink').find('img').parent('a').removeClass('externalLink');
	
	$('a.popup').each(function(){
			this.param = $(this).attr("href");
			this.param = this.param.split('?');
			if(this.param[1]){
				this.param[1] = this.param[1].split('&');
				this.param[1] = this.param[1].join(',');
				this.param[1] = this.param[1]+",menubar=1,scrollbars=1,location=1,resizable=1,status=1";
			}
	}).click(function(){
			if(this.param[1]) window.open(this.param[0], 'popup', this.param[1]);
			else window.open(this.href, '_blank');
			return false;
	});

	//別ウィンドウを設&#23425;E
	//追加はカンマで続けめEex. $('a[href$=".pdf"],a[href$=".asx"]')
	$('a[href$=".pdf"]').click(function(){
		window.open(this.href, '_blank');
		return false;
	})

	//グローバルナビTunerLine
	$('#header #globalNav').each(function(){
		$(this).prepend('<li id="tuneLine">&nbsp;</li>');
	}).find('li a').mouseover(function(){
		this.position = 12 + $(this).find('img').width()/2 + $(this).offset().left - $(this).parents('#globalNav').offset().left;
		$(this).parents('ul').find('li#tuneLine').queue('fx',[]).animate({left:this.position},{duration:1000, easing:'easeOutExpo'});
	}).end().find('li#tuneLine').unbind('mouseenter');

	//するするアニメーション ※要scrollTo.js
	$('a[href^="#"]:not(.tabs a[href^="#"])').each(function(){
		this.target = $(this).attr('href');
	}).click(function(){
		$.scrollTo( this.target, {speed:800} );
		return false;
	});

	//tableのtrにoddとevenを追加
	$('table').each(function(){
		$(this).find('tr:odd').addClass('even');
		$(this).find('tr:even').addClass('odd');
	});
	//ulのliにoddとevenを追加
	$('#mainContent ul#perBox').add('#blogRecentEntry ul#perBox').add('#home ul#pr').add('#bloIndex ul.perBox').each(function(){
		$(this).find('li:odd').addClass('even');
		$(this).find('li:even').addClass('odd');
	});
	
	//n段&#32065;E&#65533;&#65533;
	$('.col3 li:nth-child(3n)').add('.col4 li:nth-child(4n)').addClass('clearMargin');
	
	//:first-child, :last-childをクラスとして追加
	//$(':first-child').addClass('firstChild');
	$('#globalNav li:last-child').add('#mainContent .col2 li:last-child').add('#mainContent .col3 li:last-child').add('#sitIndex #mainContent li:last-child').add('#home .calender tr td:last-child').addClass('lastChild');
	$('#globalNav li:first-child').add('#home .calender tr td:first-child').addClass('first-child');

	//ロールオーチEhover付加
	$('input').add('textarea').add('#localNav dd').add('tbody tr').each(function(){
		$(this).removeClass('hover');
	}).hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover')});
	
	//ローカルナビ
	if(!$('body').is('.program')&&!$('body').is('#comIndex')&&!$('body').is('#mypIndex'))$('#localNav').find('dd:first a.current').removeClass('current');

	//span操&#20289;E
	$('#mainContent h2').add('#mainContent .entry h3').add('#localNav dd a').wrapInner('<span></span>');

	//角丸処&#29697;E
	$('#mainContent .note').add('#mainContent .boxR').add('#mainContent .boxG').add('#mainContent .lineR').add('#mainContent .lineG').prepend('<div class="top"></div>').append('<div class="btm"></div>');

	//RSSって何をフローチE&#65533;&#65533;ングウィンドウで
	$('a[href$="aboutrss.html"]').click(function(){
		this.offset = $(this).offset().top-$(this).height();
		$('body').append('<div id="floatingWrapper"><a class="close" href="">&nbsp;</a></div>').append('<div id="floatingWindow"><iframe id="includeAboutRSS" src="http://www.k-mix.co.jp/aboutrss.html"></iframe><p><a class="close" href=""><img src="http://www.k-mix.co.jp/shared/img/btn/btn_close_window.gif" alt="閉じめE width="58" height="20" class="btn" /></a></p></div>');
		$('#floatingWrapper').css({	height:$('body').height()+'px'});
		$('#floatingWindow').css({top:this.offset+'px'});
		$('body iframe .home').hide();
		$('.close').click(function(){
			$('select').show();
			$('#floatingWrapper').add('#floatingWindow').remove();
			return false;
		});
		return false;
	});

	//タチE
	$('.tabs').each(function(){
		var tabWrapper = $(this);
		var targetTab = location.hash;
		if(location.search != ''){
			targetTab = location.search;
			targetTab = targetTab.replace('?','#');
			$('html,body').scrollTop(0);			
		}
		$(this).find('.tab').hide()
				.parent('div.scrollOuter').hide()
				.find('div.scrollbar').hide();
		if(targetTab == ''||targetTab == '#top'||targetTab == '#content')targetTab = $(this).find('.selected a').attr('href');
		$(targetTab).show()
				.parent('div.scrollOuter').show()
				.find('div.scrollbar').show();
		$(this).find('.tabList a').each(function(){
			$(this).parent().removeClass('selected');
			$(this).filter('[href="'+targetTab+'"]').parent().addClass('selected');
		}).click(function() {
			targetTab = $(this).attr('href');
			tabWrapper.find('.tab').hide()
				.parent('div.scrollOuter').hide()
				.find('div.scrollbar').hide();
			tabWrapper.find('.tabList li').removeClass('selected');
			$(this).parent().addClass('selected');
			$(targetTab).show()
				.parent('div.scrollOuter').show()
				.find('div.scrollbar').show();
			return false;
		});
	});
	
	//Open&Close
	if($('#proIndex').length||$('#proList').length||$('#eveIndex').length||$('#eveList').length){
		$('#mainContent').find('.openClose span').append('<a href="#"><img src="/shared/img/btn/btn_open_bgg.gif" class="btn" alt="開く" /></a>');
		$('.hR').find('img').each(function(){
			$(this).attr('src',$(this).attr('src').replace(/_bgg/, ""));
		});
		
		$('.openClose a').toggle(function(){
			$(this).attr('href','#'+$(this).parents('.openClose').attr('id'));		
			$(this).find('img').attr('src',$(this).find('img').attr('src').replace(/open/, "close"));
			$(this).parents('.openClose').next('.more').show(500);
			$(this).parents('.openClose').next().find('.more').show(500);
		},function(){
			$(this).attr('href','#'+$(this).parents('.openClose').attr('id'));		
			$(this).find('img').attr('src',$(this).find('img').attr('src').replace(/close/, "open"));
			$(this).parents('.openClose').next('.more').hide(500);
			$(this).parents('.openClose').next().find('.more').hide(500);
		}).hover(function(){
			$(this).find('img').attr('src',$(this).find('img').attr('src').replace(/(\.gif)/, "_on$1"));
		},function(){
			$(this).find('img').attr('src',$(this).find('img').attr('src').replace(/_on/, ""));
		}).click(function(){
			$.scrollTo( $(this).attr('href'), {speed:800} );
			return false;
		});

		if(location.hash != '')$(location.hash).find('a').trigger("click");
		/*
		$('a[href*="#p"]').click(function(){
			var path = $(this).attr('href');
			path = path.split('#');
			$('#'+path[1]).find('a').trigger("click");
		});
		*/
	}
	function addCurrent(path){
		path.parents('#header').find('.current').removeClass('current');
		path.addClass('current');
	}
	//cookie
	$.getScript('http://www.k-mix.co.jp/shared/js/cookie.js',function(){
		$('#localMhz img').each(function(){
			if($.cookie('MHzURI') != null){
				$(this).attr('src', $.cookie('MHzURI'));
				//$('#selectMhz>select>option').each(function(){
				//	$(this).removeAttr('selected');
				//	if($(this).val() == '?'+$.cookie('MHzNAME')){
				//		$(this).prop('selected',true);
				//	}
				//});
				addCurrent($(this).parents('#header').find('a[href="?'+$.cookie('MHzNAME')+'"]'));
			}
		});
		//header #localMhz,.mhzNav MHz選択を記録
		$('#selectMhz>select').change(function(){
			target = 'select option:selected';
			this.cr = $(target).val().replace(/^\?/,"");
			this.path = $('#localMhz>img');
			this.uri = this.path.attr('src');
			this.uri = this.uri.replace(/[^\.|_]*\.gif$/,this.cr+'.gif');
			//if((false&&is_iPhone())||location.pathname=='/sp_index.php') this.uri = this.uri.replace(/txt\/txt/,'txt/sp/txt');
			if(is_mobile()){
				this.uri = this.uri.replace(/txt\/txt/,'txt/sp/txt');
			}
			this.path.attr('src', this.uri);
			$.cookie('MHzNAME', this.cr ,{ path:'/'});
			$.cookie('MHzURI', this.uri ,{ path:'/'});
			addCurrent($('#header>.mhzNav>li>a[href="?'+this.cr+'"]'));
			return false;
		});
		$('#header>.mhzNav>li>a').click(function(){
			addCurrent($(this));
			this.cr = $(this).attr('href').replace(/^\?/,"");
			this.path = $('#localMhz>img');
			this.uri = this.path.attr('src');
			this.uri = this.uri.replace(/[^\.|_]*\.gif$/,this.cr+'.gif');
			//if((false&&is_iPhone())||location.pathname=='/sp_index.php') this.uri = this.uri.replace(/txt\/txt/,'txt/sp/txt');
			if(is_mobile()){
				this.uri = this.uri.replace(/txt\/txt/,'txt/sp/txt');
			}
			this.path.attr('src', this.uri);
			$.cookie('MHzNAME', this.cr ,{ path:'/'});
			$.cookie('MHzURI', this.uri ,{ path:'/'});
			return false;
		}).parents('.mhzNav').each(function(){
			for(i=1; i<=5; i++){
				$(this).find('li:nth-child('+i+')').addClass('n'+i);
			}
		});
	});
	
	//TV
	if($('#tvIndex').length&&!is_iPhone()){
		var script = document.createElement("script");
		//orderby=updatedなし
		script.src = "http://gdata.youtube.com/feeds/api/users/kmixshizuoka/uploads?alt=json-in-script&callback=youTubeLoad";
		//orderby=updatedあり
		//script.src = "http://gdata.youtube.com/feeds/api/users/kmixshizuoka/uploads?orderby=updated&alt=json-in-script&callback=youTubeLoad";
		script.type = "text/javascript";
		document.getElementsByTagName("head")[0].appendChild(script);
	}
	
	if($('#eveIndex').length || $('#preIndex').length || $('#proIndex').length || $('#proList').length){
		$('h2[id^=p],h3[id^=p]').each(function(){
			var html = [];
			html.push('<br /><a href="http://twitter.com/share" ');
			html.push('class="twitter-share-button" ');
			html.push('data-url="http://www.k-mix.co.jp'+location.pathname+'#'+$(this).attr('id')+'" ');
			html.push('data-text="'+$(this).text()+' '+$('#'+$(this).attr('id')+'more>h4').text()+'" ');
			html.push('data-count="none" ');
			html.push('data-via="kmixshizuoka" ');
			html.push('data-lang="en">Tweet</a>');
			html.push('<script type="text/javascript" src="http://platform.twitter.com/widgets.js" charset="uft-8"></script>');
			//html.push('<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.k-mix.co.jp'+location.pathname+'#'+$(this).attr('id')+'&amp;layout=button_count&amp;show_faces=false&amp;width=250&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=24" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:250px; height:24px;" allowTransparency="true"></iframe>');
			if($('#preIndex').length){
				$(this).next('div.boxG').children('div.btm').before(html.join(''));
			}else if($('#eveIndex').length){
				$('#'+$(this).attr('id')+'more').after(html.join(''));
			}else{
				$('#'+$(this).attr('id')+'more').children('div.btm').before(html.join(''));
			}
		});
	}
		
	if(is_mobile()&&$('#tvIndex').length){
		$('#tvBox>div.tab>dl.tvLive>dt').each(function(){
			var alt = $(this).find('img').prop('alt');
			$(this).html(alt);
		});
	}
	
});
}

function is_mobile (useragents) {
  var useragents = useragents || [
    'iPhone',         // Apple iPhone
    'iPod',           // Apple iPod touch
    'Android',        // 1.5+ Android
    'dream',          // Pre 1.5 Android
    'CUPCAKE',        // 1.5+ Android
    'blackberry', 	  // Torch
    'webOS',          // Palm Pre Experimental
    'incognito',      // Other iPhone browser
    'webmate'         // Other iPhone browser
  ];
  var pattern = new RegExp(useragents.join('|'), 'i');
  return pattern.test(navigator.userAgent);
}
function is_iPhone () {
  return is_mobile([
    'iPhone',         // Apple iPhone
    'iPod',           // Apple iPod touch
    'iPad',           // Apple iPod touch
    'incognito',      // Other iPhone browser
    'webmate'         // Other iPhone browser
  ]);
}
function is_iPad () {
  return is_mobile([
    'iPad'           // Apple iPod touch
  ]);
}
 
