if (!Function.prototype.bindAsEventListener) {
	Function.prototype.bindAsEventListener = function() {
		var __method=this,args=arguments,object=args[0];
		return function(event) {var a = args;a[0]=(event || window.event);return __method.apply(object,a);}
	}
}
if (!Math.customRound) {
	Math.customRound = function (number, digits) {
		if (arguments.length == 1) var digits = 2;
		var d = Math.pow(10, digits);
		return parseInt(number * d) / d;
	}
}
if (typeof(IDTVLBP) == "undefined") {
	IDTVLBP = function () {this.initialize.apply(this, arguments);};
	IDTVLBP.prototype = {
		frame: null,
		initialize: function (ds) {
			this.ds = ds;
			this.element = document.getElementById('IDTVP_' + this.ds.id);
			if (!this.element) { alert ('The iDesktop.tv video wall is not not embedded properly!'); return;}
				if (!this.element && document.getElementsByClassName)
				try {
					this.element = document.getElementsByClassName ('idtv_c0f5e11f91')[0];
				} catch(e) {}
			this.element.innerHTML = '<div class="idtv_' + this.ds.id + '"><div class="idtv_tb"></div><div class="idtv_inres"></div><div class="idtv_bb"></div></div>';
			this.elementout = this.element.getElementsByTagName('div')[0];
			this.elementin = this.element.getElementsByTagName('div')[2];
			this.results = new Array();
			if (this.ds.data.error) {
				this.elementin.innerHTML = '<div style="text-align:center">' + this.ds.data.error + '</div>';
			} else {
				if (this.ds.only_public) { // go trough ds.data.results and remove all private videos
					var newdata = new Array();
					for (var i = 0; i < this.ds.data.results.length; i ++)
						if (!this.ds.data.results[i].isprivate)
							newdata.push(this.ds.data.results[i]);
					this.ds.data.results = newdata;
				}
				var jsonArr = this.ds.data.results;
				this.page = 0; this.resc = jsonArr.length;
				this.maxpage = Math.ceil(this.resc/this.ds.pp) ;
				for (var i = 0, n = this.resc; i < n; i ++) {
					if (this.ds.only_public && jsonArr[i].isprivate) continue;
					var nr = document.createElement('div');
					nr.className = 'idtv_res';
					if (i % 2) nr.className += ' alt';
					jsonArr[i].title_esc = jsonArr[i].title.replace(/"/g, "&quot;");// "
					var title = jsonArr[i].title_esc + (this.ds.thumb_show_length?' (' + jsonArr[i].length_seconds + ')':'');
					var t = '<img src="' + jsonArr[i].thumbnail_url + '" alt="' + jsonArr[i].title_esc + '" title="' + title + '" />';
					if (this.ds.thumb_show_title || this.ds.thumb_show_author || this.ds.thumb_show_length || this.ds.thumb_show_rating || this.ds.thumb_show_description) {
						var at = '';
						if (this.ds.thumb_show_title) {
							//at = '<a href="http://www.idesktop.tv/?watch=' + jsonArr[i].id + '" title="' + jsonArr[i].title + '" target="_blank">' + jsonArr[i].title + "</a>";
							at = '<span class="t">' + jsonArr[i].title + "</span>";
						}
						if (this.ds.thumb_show_author) {
							at += '<span class="ah">' + (this.ds.thumb_show_labels?'<span class="lb">Author: </span>':'') + jsonArr[i].author + '</span>';
						}
						if (this.ds.thumb_show_length || this.ds.thumb_show_views) {
							at += '<span class="lv">';
							if (this.ds.thumb_show_length) at += (this.ds.thumb_show_labels?'<span class="lb">Length: </span>':'') +jsonArr[i].length_seconds;
							if (this.ds.thumb_show_length && this.ds.thumb_show_views) at += ' | ';
							if (this.ds.thumb_show_views) at += (this.ds.thumb_show_labels?'<span class="lb">Views: </span>':'') + this.formatCommasInt(jsonArr[i].view_count);
							at += '</span>';
						}
						if (this.ds.thumb_show_rating)
							at += '<span class="r">' + (this.ds.thumb_show_labels?'<span class="lb">Rating: </span>':'') + Math.customRound(jsonArr[i].rating_avg, 1) + "</span>";
						if (this.ds.thumb_show_description) {
							at += '<span class="d">' + jsonArr[i].description + "</span>";
						}
						t = t + '<div class="out" title="' + title + '"><div class="in">' + at + '</div></div>';
					}
					if (this.ds.mark_private && jsonArr[i].isprivate) {
						if (this.ds.thumbnail_text == 'N') {
							nr.innerHTML += t;
							nr.innerHTML += '<div class="private_mark">PRIVATE</div>';
						} else {
							nr.innerHTML += '<div class="private_mark">PRIVATE</div>';
							nr.innerHTML += t;
						}
					}
					else
						nr.innerHTML += t;
					this.elementin.appendChild(nr);
					this.results.push(nr);
					nr.onclick = this.onresclick.bindAsEventListener(this, i);
				}
			}
			var f = document.createElement('iframe');
			f.src = "http://www.idesktop.tv/embed/c0f5e11f91/utr.html?r=" + document.location;
			f.style.cssText = 'width:0;height:0;border:none;';
			f.frameborder = f.frameBorder = f.border = "0";
			this.element.appendChild(f);
		},
		onresclick: function (event,i) {
			var elem = event.target || event.srcElement;
			if (elem.tagName == 'A') return;
			if (this.ds.plpl == "newwin") {
				var loaded = false;
				if (this.frw) {
					try {
						this.frw.Player.playlist.selectItem(i);
						this.frw.Player.playlist.playSelected();
						loaded = true;
					} catch(e) {
						loaded = false;
					}
				}
				if (!loaded)
					this.frw = window.open ('http://'+this.ds.chost+'/embed/'+this.ds.id+'/play.html?vid='+this.ds.data.results[i].id, 'idtvwin', 'width=' + this.ds.plw + ',height=' + this.ds.plh + 'toolbar=no,status=no,scrollbars=no,resize=no');
				return;
			}
			if (!this.frame) {
				this.plclbtn = document.createElement('img');
				this.plclbtn.src = this.ds.clbtnsrc;
				this.plclbtn.onclick = this.closeplr.bindAsEventListener(this);
				this.plclbtn.className = 'idtvp_clbtn';
				this.frameholder = document.createElement('div');
				this.frameholder.id = 'idtvpfh' + this.ds.id;
				this.frame = document.createElement('iframe');
				this.frame.id = 'idtvpf' + this.ds.id;
				this.frame.frameborder = this.frame.frameBorder = this.frame.border = "0";
				try {
					document.body.appendChild(this.frameholder);
					this.ba = true;
				} catch (e) {
					this.elementout.appendChild(this.frameholder);
					this.ba = false;
				}
				this.frameholder.appendChild(this.plclbtn);

			}
			/*this.frameholder.style.top = this.results[i].offsetTop + "px";
			this.frameholder.style.left = this.results[i].offsetLeft + this.results[i].offsetWidth + "px";*/
			var scrlX = (window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft);
		    var scrlY = (window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop);
		    var viewportW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth ;
		    var viewportH = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
		    var element = this.elementout;
			var elFixedX = 0, elFixedY = 0;
		    do {
		    	elFixedY += element.offsetTop  || 0; elFixedX += element.offsetLeft || 0; element = element.offsetParent || element.parentNode;
		    } while (element);
		    var nx = 0, ny =0;
			switch (this.ds.plpl) {
				case "center":
					nx = scrlX + ((viewportW - this.ds.plw) / 2) - elFixedX;
					ny = scrlY + ((viewportH - this.ds.plh) / 2) - elFixedY;
					break;
				case "left":
					nx = this.results[i].offsetLeft - this.ds.plw;
					ny = this.results[i].offsetTop - this.ds.pldelta;
					break;
				case "right":
					nx = this.results[i].offsetLeft + this.results[i].offsetWidth;
					ny = this.results[i].offsetTop - this.ds.pldelta;
					break;
				case "top":
					nx = this.results[i].offsetLeft - this.ds.pldelta;
					ny = this.results[i].offsetTop - this.ds.plh;
					break;
				case "bottom":
					nx = this.results[i].offsetLeft - this.ds.pldelta;
					ny = this.results[i].offsetTop + this.results[i].offsetHeight;
					break;
				default: return;
			}
			if (this.ba) {
				nx += elFixedX; ny += elFixedY;
				if (nx < 0) nx = 0;
				if (ny < 0) ny = 0;
			} else {
				if (this.ds.plpl != "center") { // some checks if top/left it is out of the viewport
					var rx = nx + elFixedX, ry = ny + elFixedY;
					if (rx < 0) nx -= rx;
					if (ry < 0) ny -= ry;
				}
			}
			this.frameholder.style.left = nx + "px";
			this.frameholder.style.top = ny + "px";

			this.frameholder.style.display = 'block';
			var loaded = false;
			try {
				if (this.frame.contentWindow && this.frame.contentWindow.Player) { // detect if script access is allowed
					this.frame.contentWindow.Player.playlist.selectItem(i);
					this.frame.contentWindow.Player.playlist.playSelected();
					loaded = true;
				}
			} catch (e) {};
			if (!loaded) {
				if (this.frame.parentNode == this.frameholder) this.frameholder.removeChild(this.frame);
				this.frame.src = 'http://'+this.ds.chost+'/embed/'+this.ds.id+'/play.html?vid='+this.ds.data.results[i].id;
				this.frameholder.appendChild(this.frame);
			}
		},
		closeplr: function (event) { this.frameholder.style.display='none'; this.frameholder.removeChild(this.frame); },
		nextP: function () { if (this.page < this.maxpage - 1) { this.page ++; this.showRes(); } },
		prevP: function () { if (this.page > 0) { this.page --; this.showRes(); } },
		formatCommasInt: function (val) {
			var s = new String(val);
			var rgx = /(\d+)(\d{3})/;
			while (rgx.test(s)) s = s.replace(rgx, '$1' + ',' + '$2');
			return s;
		}
	}
}

var IDTVLBDataSourcec0f5e11f91 = {
	id: 'c0f5e11f91', chost:'www.idesktop.tv',clbtnsrc:'http://www.idesktop.tv/images/player_icons/close.gif',
	width: 327, height: 102, pp: 1,
	rows: 1, cols: 1,
	plw: 500, plh: 420,
	createP: function () {this.p = new IDTVLBP(this); },
	plpl: 'center',
	only_public:true,mark_private:true,
	thumb_show_title : true, thumb_show_author : false,
	thumb_show_rating : false, thumb_show_views: false,
	thumb_show_length : true, thumb_show_description : false,
	thumb_show_labels : true,
	thumbnail_text: 'R',
	pldelta: 0,
data: {sid:1, loadToCache:false, total: 97, pgs:10, results: [{id:'uelHwf8o7_U',title:'Eminem - Love The Way You Lie ft. Rihanna',author:'EminemVEVO',real_length:'267',length_seconds:'04:27',rating_avg:'4.9',rating_count:'263556',view_count:'75972814',description:'Music video by Eminem performing Love The Way You Lie. &Acirc;&copy; 2010 Aftermath Records',tags:'Love, The, Way, You, Lie, Eminem, Rihanna, Recovery, Megan, Fox, Dominic, Monaghan',thumbnail_url:'http://img.youtube.com/vi/uelHwf8o7_U/default.jpg',upload_time:'1281033009',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/uelHwf8o7_U/responses?v=2',ord:'0',isprivate:'',t:'v'}, {id:'L53gjP-TtGE',title:'Kanye West - POWER',author:'KanyeWestVEVO',real_length:'103',length_seconds:'01:43',rating_avg:'3.5',rating_count:'30908',view_count:'8960470',description:'Music video by Kanye West performing POWER. (C) 2010 Roc-A-Fella Records, LLC',tags:'Kanye, West, POWER, Roc-a-Fella, Records, Hip, Hop',thumbnail_url:'http://img.youtube.com/vi/L53gjP-TtGE/default.jpg',upload_time:'1281049461',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/L53gjP-TtGE/responses?v=2',ord:'1',isprivate:'',t:'v'}, {id:'EGh9zlN6eLo',title:'Lady Gaga with Semi Precious Weapons (Official)',author:'lollapalooza',real_length:'237',length_seconds:'03:57',rating_avg:'2.3',rating_count:'13300',view_count:'7426259',description:'Lady Gaga joins the Semi Precious Weapons on the BMI Stage at Lollapalooza 2010.',tags:'lady, gaga, ladygaga, semi, precious, weapons, lolla, lollapalooza, chicago, 2010, grant, park, bmi, stage, dive, diving',thumbnail_url:'http://img.youtube.com/vi/EGh9zlN6eLo/default.jpg',upload_time:'1281222988',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/EGh9zlN6eLo/responses?v=2',ord:'2',isprivate:'',t:'v'}, {id:'cTl3U6aSd2w',title:'Amazing Roger Federer trickshot on Gillette ad shoot',author:'GilletteVideosUK',real_length:'107',length_seconds:'01:47',rating_avg:'4.8',rating_count:'9871',view_count:'6351097',description:'Federer knocks can off crew member\'s head during a Gillette / British Skin Foundation shoot',tags:'Roger Federer, tennis, WTF, Gillette, ad, atp, US Open, British skin foundation, sensitive skin, Gillette Fusion, Gillette Champion, amazing, tennis trickshot, tennis trick, skill',thumbnail_url:'http://img.youtube.com/vi/cTl3U6aSd2w/default.jpg',upload_time:'1281954507',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/cTl3U6aSd2w/responses?v=2',ord:'3',isprivate:'',t:'v'}, {id:'qdDVtFvJwUc',title:'Justin Bieber - Love Me',author:'JustinBieberVEVO',real_length:'194',length_seconds:'03:14',rating_avg:'3.3',rating_count:'65454',view_count:'6179007',description:'Music video by Justin Bieber performing Love Me. (C) 2010 The Island Def Jam Music Group',tags:'Justin, Bieber, Love, Me, Island, Records, Pop',thumbnail_url:'http://img.youtube.com/vi/qdDVtFvJwUc/default.jpg',upload_time:'1281063143',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/qdDVtFvJwUc/responses?v=2',ord:'4',isprivate:'',t:'v'}, {id:'VKsVSBhSwJg',title:'iTunes Version - Bed Intruder Song',author:'schmoyoho',real_length:'204',length_seconds:'03:24',rating_avg:'4.9',rating_count:'68033',view_count:'6046690',description:'iTunes link: http://itunes.apple.com/us/album/bed-intruder-song/id386478006<br /> <br /> shirts: http://www.districtlines.com/Antoine-Dodson<br /> shirt design / iTunes album art by Shelli Langdale - more of her work here: http://www.oustcat.com<br /> Antoine\'s new sites: http://www.antoine-dodson.com<br /> http://www.facebook.com/pages/Antoine-Dodson/102461723145137?ref=ts<br /> http://www.twitter.com/antoinedodson24<br /> <br /> Auto-Tune the News / Gregory Brothers links:<br /> <br /> http://www.youtube.com/autotunethenews<br /> http://www.twitter.com/autotunethenews<br /> http://www.facebook.com/gregorybrothers<br /> http://www.thegregorybrothers.com<br /> <br /> Lyrics:<br /> <br /> he\'s climbin in your windows<br /> he\'s snatchin your people up<br /> tryna rape em so y\'all need to<br /> hide your kids, hide your wife<br /> hide your kids, hide your wife<br /> hide your kids, hide your wife<br /> and hide your husband<br /> cuz they\'re rapin errbody out here<br /> you don\'t have to come and confess<br /> we\'re lookin for you<br /> we gon find you<br /> we gon find you<br /> so you can run and tell that,<br /> run and tell that<br /> run and tell that, homeboy<br /> home, home, homeboy<br /> <br /> we got your t-shirt<br /> you done left fingerprints and all<br /> you are so dumb<br /> you are really dumb--for real<br /> you are really, really, really, really so dumb<br /> i was attacked by some idiot in the projects<br /> so dumb, so dumb, so dumb, so<br /> <br /> chorus<br /> <br /> bout 5\'9", 5\'10"<br /> coffee complexion, low cut like a caesar<br /> with some little waves in his head<br /> clean cut, very smooth face<br /> seein my sister when i walked in<br /> he had his hands around her neck<br /> first thing was to pull him off of her<br /> and that\'s what i did<br /> <br /> chorus<br /> <br /> well, obviously we have a rapist in Lincoln Park<br /> are you serious, my boy?<br /> i got your t-shirt<br /> i got your scent<br /> i know what shoe size you wear, my boy<br /> so you can run and hide<br /> but we\'re gonna find you, find you<br /> <br /> chorus x2 (with ballet dancers, orchestra, choir, etc.)',tags:'antoine, dodson, kelly, bed, intruder, song, itunes, gregory, brothers, auto, tune, the, news, hide, ya, kids, wife, husband, rapin, everybody, huntsville, ballet, orchestra, choir',thumbnail_url:'http://img.youtube.com/vi/VKsVSBhSwJg/default.jpg',upload_time:'1281200491',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/VKsVSBhSwJg/responses?v=2',ord:'5',isprivate:'',t:'v'}, {id:'pSFyrrhKj1Q',title:'Nicki Minaj - Your Love',author:'NickiMinajAtVEVO',real_length:'246',length_seconds:'04:06',rating_avg:'4.6',rating_count:'15088',view_count:'5533811',description:'Music video by Nicki Minaj performing Your Love. (C) 2010 Cash Money Records Inc.',tags:'Nicki, Minaj, Your, Love, Cash, Money, Hip, Hop',thumbnail_url:'http://img.youtube.com/vi/pSFyrrhKj1Q/default.jpg',upload_time:'1280865698',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/pSFyrrhKj1Q/responses?v=2',ord:'6',isprivate:'',t:'v'}, {id:'TRLSQDCkcaA',title:'Drake - Miss Me ft. Lil Wayne',author:'DrakeVEVO',real_length:'362',length_seconds:'06:02',rating_avg:'4.4',rating_count:'12030',view_count:'5343524',description:'Music video by Drake performing Miss Me. (C) 2010 Young Money Entertainment/Cash Money Records',tags:'Drake, Miss, Me, Cash, Money, Records/Young, Ent./Universal, Rec., Hip, Hop',thumbnail_url:'http://img.youtube.com/vi/TRLSQDCkcaA/default.jpg',upload_time:'1282213345',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/TRLSQDCkcaA/responses?v=2',ord:'7',isprivate:'',t:'v'}, {id:'h_fsM6LBi54',title:'Call of Duty: Black Ops - Multiplayer Teaser',author:'CALLOFDUTY',real_length:'85',length_seconds:'01:25',rating_avg:'4.6',rating_count:'25525',view_count:'5243714',description:'Call of Duty: Black Ops - Multiplayer Teaser.  WATCH IN HD.',tags:'COD, black, ops, call, of, duty, mp, online, live, match, multiplayer, fps, yt:quality=high, video, game, xbox, 360, xbox360, microsoft, playstation3, ps3, playstation, sony, computer, entertainment, scea, soe, pc, steam, activision, treyarch, infinity, ward, modern, warfare, first, person, shooter, new, exclusive, gametrailers, tv, Vietnam, 2010',thumbnail_url:'http://img.youtube.com/vi/h_fsM6LBi54/default.jpg',upload_time:'1281363452',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/h_fsM6LBi54/related?v=2',ord:'8',isprivate:'',t:'v'}, {id:'Dz6gFokvOr0',title:'The World\'s Farthest Basketball Shot',author:'DcuStudios2',real_length:'23',length_seconds:'00:23',rating_avg:'4.8',rating_count:'6864',view_count:'4983653',description:'Evan from The Legendary Shots throws a ball from the top of the Vulcan monument in Birmingham, Alabama. To our knowledge, this is the farthest shot (direct distance from shooter to goal) ever made. Whether it\'s also the longest (horizontal distance) is debatable (Dude Perfect\'s at Kyle Field is about the same length). THANK YOU VULCAN STAFF!<br /> <br /> MEASUREMENTS:<br /> Height: The platform is 134 feet above ground level, and the ball was released from about 6 feet above the platform. The goal was 10 feet high and was placed about 10 feet below the base of the statue, meaning the height from hoop to shooter was 140 feet. <br /> Length: This is harder to tell, but we had a few people pace it off, and they came in at between 50 and 60 paces. The average person\'s pace is about 3 feet, so the length of the shot is about 150-180 feet.<br /> Direct distance: Since height^2 + length^2 = distance^2, the distance from the shooter\'s hand to the hoop is about 205-228 feet.',tags:'highest, longest, farthest, distance, vulcan, cast, iron, landmark, statue, birmingham, alabama, hoover, evan, sellers, greatest, basketball, shot, of, all, time, amazing, trick, dude, perfect, aggie, land, kyle, field, 3rd, deck, airplane, farther, far, high, wow, insane, christmas, legendary, shots, crazy, legend, nbc, yahoo, sports, deadspin, local, good, morning, america, abc, sportscenter, top, ten, 10, week, number, two',thumbnail_url:'http://img.youtube.com/vi/Dz6gFokvOr0/default.jpg',upload_time:'1280692995',comment_count:'0',url:'http://gdata.youtube.com/feeds/api/videos/Dz6gFokvOr0/responses?v=2',ord:'9',isprivate:'',t:'v'}]},
initialize: function () {this.createP()}

};
var IDTVLBDataSourcec0f5e11f91IF = function () {IDTVLBDataSourcec0f5e11f91.initialize.apply(IDTVLBDataSourcec0f5e11f91, []);};
if (document.getElementById('IDTVP_c0f5e11f91'))
	IDTVLBDataSourcec0f5e11f91IF ();
else if (window.addEventListener)
	window.addEventListener("load", IDTVLBDataSourcec0f5e11f91IF, true);
else
	window.attachEvent("onload", IDTVLBDataSourcec0f5e11f91IF);