/*
 * Girlfriend
 * presents:
 *
 * Gant, developed for Monolith NYC
 */

(function($, o){

	// create overscroll
	o = $.fn.overscroll = function(options) {
		return this.each(function(){
			o.init($(this), options);
		});
	};
	
	$.extend(o, {
		
		// events handled by overscroll
		events: {
			wheel: "mousewheel DOMMouseScroll",
			start: "select mousedown touchstart",
			drag: "mousemove touchmove",
			end: "mouseup mouseleave touchend",
			scroll: "scroll",
			ignored: "dragstart drag"
		},
		
		// to save a couble bits
		div: "<div/>",
		
		// constants used to tune scrollability and thumbs
		constants: {
			scrollDuration: 800,
			captureThreshold: 4,
			wheelDeltaMod: -18,
			scrollDeltaMod: 5.7,
			thumbThickness: 8,
			thumbOpacity: 0.7,
			boundingBox: 1000000
		},
		
		// main initialization function
		init: function(target, options, data) {
			
			data = {
				sizing: o.getSizing(target)
			};
			
			// gesture detect
			var el = document.createElement('div');
			el.setAttribute('ongesturestart', 'return;');
			if(typeof el.ongesturestart == "function"){
				o.touchEvents = true;
			}
			
			options = $.extend({}, (options || {}));

			target.css({"overflow": "hidden"})
				.bind(o.events.wheel, data, o.wheel)
				.bind(o.events.start, data, o.start)
				.bind(o.events.end, data, o.stop)
				.bind(o.events.ignored, function(){return false;}); // disable proprietary drag handlers
				
			target.bind(o.events.ignored, function(){return false;});
			target.bind(o.events.start, function(){return false;});

			data.target = target;
			
			if( options.scrollBar ) {
				if( options.scrollBar.horizontal ) {
					data.$horizontal = options.scrollBar.horizontal;
					data.$horizontal_track = options.scrollBar.horizontal.parent();
					
					data.$horizontal.bind(o.events.ignored, function(){return false;});
					data.$horizontal.bind(o.events.start, function(){return false;});
					data.$horizontal_track.bind(o.events.ignored, function(){return false;});
					data.$horizontal_track.bind(o.events.start, function(){return false;});
				};

				if( options.scrollBar.vertical ) {
					data.$vertical = options.scrollBar.vertical;
					data.$vertical_track = data.$vertical.parent();
					
					data.$vertical.bind(o.events.ignored, function(){return false;});
					data.$vertical.bind(o.events.start, function(){return false;});
					data.$vertical_track.bind(o.events.ignored, function(){return false;});
					data.$vertical_track.bind(o.events.start, function(){return false;});
				}

				// setup the scrollbars
				if( options.scrollBar.horizontal || options.scrollBar.vertical ) {
					target.bind(o.events.scroll, data, o.scroll);
					o.setupScrollBars(data);
				}	
			}
			
			if( options.scroll ) {
				data.scroll = options.scroll;
			}

			data.options = options;
			
		},
		
		// handles mouse wheel scroll events
		wheel: function(event, delta) {

			if ( event.wheelDelta ) { delta = event.wheelDelta/12000; }
			if ( event.detail     ) { delta = -event.detail/3; }

			// stop animate
			event.data.target.stop(true, true);
			
			if( event.data.$vertical ) {
				/* event.data.target.animate({
					'scrollTop': (event.data.target.scrollTop() + (delta * o.constants.wheelDeltaMod))
				}); */
				
				event.data.target.scrollTop( event.data.target.scrollTop() + (delta * o.constants.wheelDeltaMod) );
			} else {
				/* event.data.target.animate({
					'scrollLeft': (event.data.target.scrollLeft() + (delta * o.constants.wheelDeltaMod))
				}); */
				
				event.data.target.scrollTop( (event.data.target.scrollTop() + (delta * o.constants.wheelDeltaMod)) );
			}
			
			// event.data.target.scrollLeft(event.data.target.scrollLeft() + (delta * o.constants.wheelDeltaMod));
			// event.data.target.scrollTop(event.data.target.scrollTop() + (delta * o.constants.wheelDeltaMod));
			
			return false;
			
		},
		
		// starts the drag operation and binds the mouse move handler
		start: function(event) {
			
			var pageX = o.getPageX(event);
			var pageY = o.getPageY(event);
			
			event.data.target.bind(o.events.drag, event.data, o.drag).stop(true, true);
			
			event.data.position = {};
			event.data.position.x = pageX;
			event.data.position.y = pageY;

			event.data.capture = {};
			
			event.data.isDragging = false;
			
			return false;
			
		},
		
		// updates the current scroll location during a mouse move
		drag: function(event) {
			
			var pageX = o.getPageX(event);
			var pageY = o.getPageY(event);
			
			this.scrollLeft -= (pageX - event.data.position.x);
			this.scrollTop -= (pageY - event.data.position.y);
			event.data.position.x = pageX;
			event.data.position.y = pageY;
			
			if (typeof event.data.capture.index === "undefined" || --event.data.capture.index === 0 ) {
				event.data.isDragging = true;
				event.data.capture = {
					x: pageX,
					y: pageY,
					index: o.constants.captureThreshold
				};
			}

			return true;
		},
		
		// called after a scroll event, moves the thumbs
		// whenever it scrolls ( called 100x in a scroll -- and while its slowing down! )
		scroll: function(event, ml, mt, left, top) {

			left = event.data.target.scrollLeft();
			top = event.data.target.scrollTop();
			
			// update the bars
			// this also handles it when it's slowing down + animating
			if( event.data.$horizontal ) {
				var pX = o.calculatePercentX( left, event.data.sizing.container.scrollWidth );
				event.data.$horizontal.css('left', pX + '%');
			}
			
			// addition for the bars
			if( event.data.$vertical ) {
				var pY = o.calculatePercentY( top, event.data.sizing.container.scrollHeight );
				event.data.$vertical.css('top', pY + '%');
			}
			
			if( event.data.scroll ) {
				event.data.scroll();
			}

		},
		
		// ends the drag operation and unbinds the mouse move handler
		stop: function(event, dx, dy) {
			
			var pageX = o.getPageX(event);
			var pageY = o.getPageY(event);

			if( typeof event.data.position !== "undefined" ) {

				event.data.target.unbind(o.events.drag, o.drag);
				
				if ( event.data.isDragging ) {	
					
					dx = o.constants.scrollDeltaMod * (pageX - event.data.capture.x);
					dy = o.constants.scrollDeltaMod * (pageY - event.data.capture.y);
					
					event.data.target.stop(true, true).animate({
						scrollLeft: this.scrollLeft - dx,
						scrollTop: this.scrollTop - dy
					}, { 
						queue: false, 
						duration: o.constants.scrollDuration, 
						easing: "cubicEaseOut",
						complete: function() {}
					});
					
				}
				
				event.data.capture = event.data.position = undefined;
			}
			
			return !event.data.isDragging;
		},
		
		// gets sizing for the container and thumbs
		getSizing: function(container, sizing) {
		
			sizing = {};
			
			sizing.container = {
				width: container.width(),
				height: container.height()
			};
			
			// set the scroll left to a crazy number (like 1000000000) and then get the max scrollLeft. Duh!
			container.scrollLeft(o.constants.boundingBox).scrollTop(o.constants.boundingBox);
			sizing.container.scrollWidth = container.scrollLeft();
			sizing.container.scrollHeight = container.scrollTop();							
			container.scrollTop(0).scrollLeft(0);
			
			return sizing;
		},
		
		calculatePercentX: function( scrollLeft, scrollWidth ) {
			return ( scrollLeft / scrollWidth ) * 100;
		},
		
		calculatePercentY: function( scrollTop, scrollHeight ) {
			return ( scrollTop / scrollHeight ) * 100;
		},
		
		getPageX: function(event) {
			return ( o.touchEvents ? event.originalEvent.changedTouches[0].pageX : event.pageX );
		},
		
		getPageY: function(event) {
			return ( o.touchEvents ? event.originalEvent.changedTouches[0].pageY : event.pageY );
		},
		
		
		// major
		setupScrollBars: function(data) {

			var mousedown_vertical = false;
			var mousedown_horizontal = false;
			
			if( data.$horizontal ) {
				data.$horizontal.bind(o.events.start, function() {
					mousedown_horizontal = true;
					
					return false;
				});
			}
			
			if( data.$vertical ) {
				data.$vertical.bind(o.events.start, function() {
					mousedown_vertical = true;
					
					return false;
				});	
			}

			$(document).bind('mouseup', function() {
				mousedown_horizontal = false;
				mousedown_vertical = false;
				
				return false;
			});
			
			// this handles scrollbar top,left position.
			$(document).bind('mousemove', function(e) {
				// if( !mousedown ) { return false; }
				
				// manage the bar
				var bar_dimension = 36;
				var compensate_for_bar = bar_dimension/2;

				//////////////////////////////
				
				if( mousedown_horizontal ) {

					if( e.target != data.$horizontal ) { e.offsetX = e.pageX - data.$horizontal_track.offset().left; }
				
					var left = e.offsetX - compensate_for_bar;
					var max = data.$horizontal.parent().width();
					var min = 0;
				
					if( left > max ) {
						left = max;
					} else if( left < min ) {
						left = min;
					}
									
					data.$horizontal.css({ 'left': left + 'px' });
					data.target.scrollLeft( data.sizing.container.scrollWidth * ( left / data.$horizontal.parent().width() ) );
				
				}
				
				//////////////////////////////
				
				if( mousedown_vertical ) {

					if( e.target != data.$vertical ) { e.offsetY = e.pageY - data.$vertical_track.offset().top; }
				
					var top = e.offsetY - compensate_for_bar;
					var max = data.$vertical.parent().height();
					var min = 0;

					if( top > max ) {
						top = max;
					} else if( top < min ) {
						top = min;
					}

					data.$vertical.css({ 'top': top + 'px' });
					data.target.scrollTop( data.sizing.container.scrollHeight * ( top / data.$vertical.parent().height() ) );

				}
				
				//////////////////////////////
			});
		}
	});

	// jQuery adapted Penner animation
	//    created by Jamie Lemon
	$.extend($.easing, {
		
		cubicEaseOut: function(p, n, firstNum, diff) {
			var c = firstNum + diff;
			return c*((p=p/1-1)*p*p + 1) + firstNum;
		}
		
	});

})(jQuery);


/*
 * gant.js
 *
 * Girlfriend LLC
 */

var gant = {}; // WOOO!!!

gant.page = {};
gant.data = {};

gant.page.blog = function() {
	var last_clicked;
	
	// $('.gallery-item a').unbind('click').bind('click', function() {
	// 	last_clicked = $(this);
	// 	
	// 	$.facebox({'image': $(this).attr('href')});
	// 	$('#facebox').unbind('click').bind('click', function() {
	// 		var i = last_clicked.parents('dl.gallery-item').index('dl.gallery-item');
	// 		$('dl.gallery-item').eq(i+1).find('a').trigger('click');
	// 	});
	// 	
	// 	return false;
	// });
	
	$('#fancybox-left, #fancybox-right').attr('href', window.location.hash.substr(1));
	
	$('.gallery-item a').unbind('click').attr({
		'rel': 'gant-lightbox',
		'title': ''
	}).fancybox({
		'titleShow': false,
		'overlayColor': '#fff'
	});
}

gant.page.photo_album = function() {		
	$('#photo-album').overscroll(); // that's it!		
};
		
gant.page.in_the_atelier = function() {
	$('#in_the_atelier').overscroll();
};
		
gant.page.brand_history = function() {
	$('#gant #scrollbar .previous').bind('click', function() {
		gant.overscroll.go( $('#gant .content'), 'previous' );
		
		return false;
	});
	
	$('#gant #scrollbar .next').bind('click', function() {
		gant.overscroll.go( $('#gant .content'), 'next' );
		
		return false;
	});
	
	$('#gant .content').overscroll({
		scrollBar: {
			vertical: $('#scrollbar .track .bar')
		}
	});
};

// helper functions
gant.overscroll = {};
gant.overscroll.go = function(elem, mode) {
	var $e = elem;
	
	var scrollTop = $e.scrollTop();
	
	$e.animate({
		'scrollTop': scrollTop + ( mode == 'next' ? 100 : -100 )
	});
}
		
gant.page.contact = function() {
	$('form').validate();
	
	$('a[rel="facebox"]').click(function() {
		var selector = $(this).attr('href');
		
		$.facebox({'div': selector });
		
		$('a[rel="close"]').click(function() {
			$.facebox.close();

			return false;
		});
		
		return false;
	});
};

/*
 * gant.lookbook.js
 *
 * Girlfriend LLC
 */

gant.page.collection = function( preCollection ) {
			
	// this runs a lot.
	// it returns the center 'look'
	var current = -1;
	var imgs_loaded = 0;
	var isPrecollection = ( preCollection != undefined )
	
	var figure_out_center = function(){
		var ret = null;
		
		$('#collection #overscroll .look').each(function(n) {
			var $this = $(this);
			
			var offset = $this.offset();
			var left = offset.left;
			var width = $this.width();
			
			var $window = $(window);
			var window_width = $window.width();
			var center = window_width / 2;
			
			if( left < center && center < left+width ) {				
				
				if( current != n ) {
					current = n;
			
					$('#meta').children().remove();
					$this.find('.info').clone().appendTo( $('#meta') );
				}
				
				var index = ( $this.index('#collection #overscroll .look') + 1 );
				/* if( last_hash != '' && ( imgs_loaded == $('#overscroll img').length ) ) {
				 	 if( !isPrecollection )
						window.location.hash = '#/collection/look/' + index;
					else
						window.location.hash = '#/precollection/look/' + index;  
				} */

				ret = $(this);
			}
		});
		
		return ret;
	};
	
	// not relevant
	// but figure i'd throw it in anyway
	// http://www.thehoodinternet.com/2008/04/webbie-vs-black-moth-super-rainbow.html
	
	// the big boy function
	$('#collection #overscroll').overscroll({
		scrollBar: {
			horizontal: $('#scrollbar .track .bar')
		},
		
		scroll: function() {
			figure_out_center();
		}
	});
	
	// previous
	// next
	$('#collection #scrollbar .previous').bind('click', function() {
		figure_out_center().prev().trigger('dblclick');

		return false;
	});
	
	$('#collection #scrollbar .next').bind('click', function() {
		figure_out_center().next().trigger('dblclick');
		
		return false;
	});
	
	// handle the double click of each element
	$('#collection .look').bind('dblclick', function() {
		$this = $(this);
		
		// if the image is in the center, and double clicked
		// then open the lightbox
		if( $this.get(0) == figure_out_center().get(0) ) {
			var img = $this.find('img').attr('large');
			
			// $.facebox({'image':img});

			$.fancybox(img, {
				showCloseButton: false,
				type: 'image'
			})
		
			return false;
		}
		
		var offset = $this.offset();
		var left = offset.left;
		var width = $this.width();
		
		var $window = $(window);
		var window_width = $window.width();
		var center = window_width / 2;
		
		var $overscroll = $('#collection #overscroll');

		$overscroll.animate({
			'scrollLeft': ( $overscroll.scrollLeft() - ( center - left - ( width / 2 ) ) )
		});
	});
	
	// evaluate
	var look_url;
	if( !isPrecollection )
		look_url = window.location.href.split('/#/collection/look/');
	else
		look_url = window.location.href.split('/#/precollection/look/');
	
	
	if( look_url.length > 1 && look_url[1] != 1 ) {
		
		$('#overscroll img').unbind('load').load(function() {
			imgs_loaded++;
		
			if( imgs_loaded == $('#overscroll img').length ) {
				if( !isPrecollection )
					$('#collection .look').eq( parseInt(look_url[1]) - 501 ).trigger('dblclick');
				else
					$('#collection .look').eq( parseInt(look_url[1]) - 401 ).trigger('dblclick');
			}
		});
		
	} else {
		
		// OH + or + display the first one
		figure_out_center();
		// $('#collection .look').trigger('mousedown');
		// $('#collection .look').eq(0).trigger('click');
		$('#meta').html( $('.look:first .info').html() )
		
	}
			
};
// end collection

/*
 * gant-stores.js
 *
 * Girlfriend LLC
 */

gant.page.stores = function() {
			
	var sort_select = function(selector) {
		var mylist = $(selector);
		var listitems = mylist.children('option').get();
		listitems.sort(function(a, b) {
		   var compA = $(a).text().toUpperCase();
		   var compB = $(b).text().toUpperCase();
		   return (compA < compB) ? -1 : (compA > compB) ? 1 : 0;
		})
		$.each(listitems, function(idx, itm) { mylist.append(itm); });
	};
	
	var parseFeed = function(data) {
		
		var data = $.xml2json(data);
		
		var countries = new Array();
		var stores = {};
		
		// go through items.
		for (var i = data.item.length - 1; i >= 0; i--){
			var item = data.item[i];

			if( !stores[ item.country ] ) { stores[ item.country ] = {}; }
			if( !stores[ item.country ][ item.city ] ) { stores[ item.country ][ item.city ] = new Array(); }
			
			stores[ item.country ][ item.city ].push( item );
		};
		
		// go through the countries.
		for( store in stores ) {
			countries.push( store );
			
			$('#country').append('<option val="' + store + '">' + store + '</option>');
		}
		
		$('#country').bind('change', function() {
			var $this = $(this);
			var val = $this.val();
			
			$('#city').children().remove();
			$('#city').append('<option>-</option>');
			
			for( city in stores[ val ] ) {
				$('#city').append('<option val="' + city + '">' + city + '</option>');
			}
			
			sort_select('#city');
		});
		
		sort_select('#country');
		
		$('#city').bind('change', function() {
			var $this = $(this);
			var city = $this.val();
			
			var $country = $('#country');
			var country = $country.val();
			
			$('#stores-view').children().remove();
			
			for (var i = stores[country][city].length - 1; i >= 0; i--){
				var store = stores[country][city][i];
				
				var $template = $( store_template );
				
				var find_replace = {
					'store-name': store.storename,
					'street-address': store.streetaddress,
					'locality': store.city,
					'region': store.state,
					'postal-code': store.postalcode,
					'country-name': store.country,
					'phone-number': store.phone,
					'website': ( store.web ? '<a href="http://' + store.web + '" target="_blank">Visit Website</a>' : false ),
					'google-map': ( store.gmap ? '<a href="' + store.gmap + '" target="_blank">View Map</a>' : false )
				};
				
				for( find in find_replace ) {
					var val = find_replace[ find ];
					
					if( val != '' ) {
						$template.find( '.' + find ).html( val );
					} else {
						$template.find( '.' + find ).remove();
					}
				}
				
				$('#stores-view').append( $template );
			};
			
		});
		
		var store_template = '<div class="adr store"><div class="store-name"></div><div class="street-address"></div><span class="locality"></span>, <span class="region"></span> <span class="postal-code"></span><div class="country-name"></div><div class="phone-number"></div><div class="website"></div><div class="google-map"></div></div>'

		// save this information
		// gant.data.stores = stores;
	};
	
	$.ajax({
	  url: '/xml/rugger-stores/gant_rugger_stores.xml',
	  success: parseFeed
	});
	
};

/*
 * gant.friends.js
 *
 * Girlfriend LLC
 */

gant.page.friend = function() {
	
	$('#gant #scrollbar .previous').bind('click', function() {
		var scrollTop = $('#friend .content').scrollTop();
		
		$('#gant .content').animate({
			'scrollTop': scrollTop - 100
		});
		
		return false;
	});
	
	$('#gant #scrollbar .next').bind('click', function() {
		var scrollTop = $('#friend .content').scrollTop();
		
		$('#gant .content').animate({
			'scrollTop': scrollTop + 100
		});
		
		return false;
	});
	
	
	$('#navigation li a').bind('click', function() {
		gant.page.show_friend( $(this).attr('id').substr(7) );
		return false;
	});
	
	// fade in
	$(window).load(function() {
		$('#gant .content,#gant #header').animate({'opacity':1});
		gant.page.show_friend('john');
	});
			
}; // end friend

gant.page.show_friend = function( friend ) {
	$('#navigation li a').removeClass('active');
	$('#friend_' + friend).addClass('active');
	
	var friend = gant.data.friends[ friend ];
	
	var bg = friend.image;
	var content = friend.content;
	var title = friend.title;
	
	var $friend = $('#friend');
	var $content = $friend.find('.content');
	var $title = $friend.find('h1');
	
	var $bg = $('#background');
	
	var $img = $('<img src="' + bg + '" />');
	$img.css({
		'position': 'absolute',
		'top': '0px',
		'left': '0px',
		'opacity': '0'
	});
	$img.bind('load', function() {
		$(this).animate({'opacity':1}, 'fast');
	})
	
	$bg.append( $img );
	$content.html( content );
	$title.html( title );
	
	
	$('#gant .content').overscroll({
		scrollBar: {
			vertical: $('#scrollbar .track .bar')
		}
	});
};

/*
 * friends.js
 *
 * This contains friends data
 */

gant.data.friends = {
	'john': {
		'title': 'John: Lead singer of U.S. Royalty',
		'content': '<p>John is one part of Washington D.C. based alternative rock band U.S. Royalty. The band formed in 2007 and has been rapidly growing in popularity since their initial tours of the D.C. and Baltimore region. John&#39;s got that effortless cool that embodies American heritage sportswear. He&#39;s also a pretty nice guy.</p><p>I know you&#39;re an East Coast boy John. Where exactly are you from?<br />- Southern Maryland is where I grew up and my grandparents have a farm in West Virginia. My family is pretty involved in history, I always thought if I didn&#39;t do music I&#39;d be a history professor.</p><p>Do you have a musical family?<br />- Yeah, my dad played in a band growing up around Maryland. When I was in seventh grade and my brother in fifth grade he got me a drum set for Christmas and I got him a bass guitar. [John laughs] So we started out as a bassist and a drummer.</p><p>U.S. Royalty is based in Washington D.C. How&#39;s that going?<br />- D.C. is a cool city but it&#39;s small. You can only play there so many times. We&#39;ll play there once a month and then hit other places. We started playing New York, just at a party or jumping on a show with somebody else. It just takes time to build it up and get people out.</p><p>What other cities are you hitting?<br />- Chicago&#39;s been great. Miami, kind of a fluke thing there, but it has proved to be one of our favorites. Chris, our manager, got us a gig during Art Basel for Vice Magazine. The reception was totally unexpected because it&#39;s more of a club scene there at the moment.</p><p>You seem to get around a bit?<br />- Yeah, my brother and I kind of put off more traveling plans to focus on the band. But growing up, travel was a big family thing. I remember when I was 13, Mum and Dad took us on a two-week tour of the West: Montana, Wyoming and Idaho. Seems crazy now, driving around with the family on these mountain roads and not being able to find a motel, and a broken-down car with 3 kids. At the time, I was just thinking where&#39;s the next rock hill I can climb or pool I can swim in. We&#39;d always stop for the landmarks and battlefields. My family has a respect for history and both of my grandfathers were active in WWII.</p><p>What&#39;s it like traveling with the band?<br />- Band traveling, it&#39;s mainly about getting from A to B. Getting as much sleep as possible and still being sort of on time. But I remember, we went down to the South by Southwest festival (SXSW) last year and had some time, so we booked a random show in Kentucky. We rode bikes and painted a little with my cousin who lives there. In Nashville, we found a studio that we could rent by the day for 50 bucks. We tried to sleep there; the owner didn&#39;t like that too much! We started paying a tour manager after a while. He&#39;s also a friend who is not in the band which brings a nice balance to things, especially when we have our petty arguments [John laughs]. Kinda nice having that external element.</p><p>Are U.S. Royalty into supporting other bands? There&#39;s a trading system going on with bands in supporting up and-coming talent, right?<br />- Yeah, we like to support bands because we go from town to town and are kind of riding coat-tails. We&#39;re pretty lucky because we&#39;ve been really compatible with the bands we have supported in the past; that&#39;s important. I think it&#39;s pretty rad to support the up-and-coming talent.</p><p>I&#39;d imagine riding on coat-tails is half the fun?<br />- [John laughs] Totally. We played at the 9:30 club with The Bravery in D.C. We set it up the same day. I&#39;d hung out with the bassist a few times. He called me when they arrived in D.C. that afternoon and the other supporting band had their van stolen in Philly the night before. We ended up opening for them in front of a full house of about 1200 people. We didn&#39;t even use any of our own equipment because we did a block party at 6pm, packed our gear up and ran over.</p><p>How do you get inspired?<br />- I&#39;ll tend to read. Whether it be magazines or books. I am into short stories at the moment. H.P. Lovecraft has been interesting. Also, revisiting stories I read as a child, like Washington Irving&#39;s &quot;Rip Van Winkle.&quot; Also I find Hemingway, Tolstoy, and artbooks on the hard-edge movement in art in the &#39;50s and &#39;60s to be inspirational reads.</p><p>Finally, what&#39;s on repeat on your iPod at the moment?<br />- A lot of &#39;70s punk: MC5, Death, guys that were really ahead of their time. Some newer groups like Local Natives (LA), SEAS (D.C. Band) and Wild Nothing (VA). Also a lot of Swedish groups like Air France, Studio and El Perro Del Mar. Always Fleetwood Mac and Bruce Springsteen.</p><p>CHECK OUT U.S. ROYALTY: <a href="http://www.usroyaltymusic.com" target="_blank">WWW.USROYALTYMUSIC.COM</a></p>',
		'image': '/gantrugger/images/friends/john.jpg'
	}, 
	
	'hugh': {
		'title': 'Hugh Mackie: Triumph History',
		'content': '<p>Hugh Mackie is known as the gentleman responsible for the second coming of Triumph motorcycles around the &#39;80s in the New York region. It was then he bought up the majority of Triumph motorcycles around the northern East Coast and began his workshop: 6th Street Specials.</p><p>How did Triumph first start out?<br />- Post WWII Europe was a mess and Britain realized the only way to turn the economy around was to export. The motto was &#39;Export or Die&#39;, generating employment, GDP and getting the country back on its feet. So, when all the G.I.s were coming back to the States they were bringing tons of British stuff back.</p><p>What were guys riding in the US at that time?<br />- At that time, the guys had a limited choice of, perhaps, Harleys and Indians. In Europe, from both a civilian and military perspective, they were riding Triumphs and BSA motorcycles. A lot of the G.I.s brought the bikes back to the US.<br />The US market was the biggest market right after the war. This is, of course, pre-Honda, Suzuki and Kawasaki. Japan had just been totaled.<br />From the &#39;50s the popularity of Triumph kept growing and growing until Triumph became the biggest manufacturer in the world. Predominantly, selling over here in the US and Australia.</p><p>How was Triumph different from the Harleys and Indians?<br />- Triumphs were very different from what Harley or Indian made. They were light, fast and sporty motorcycles that were good for the terrain over here. America really didn&#39;t have a whole load of roads at that point. Most post-war riding was off-road.<br />Triumphs were great for all terrain. Desert racing on the west coast and giant hill climbs in the Midwest. On the east coast there were a lot of motocross and scrambling races.<br />Everybody was buying them, competing and winning, which ultimately led to more sales.</p><p>What contributed to Triumph&#39;s downfall?<br />- By the time you got to the &#39;70s in Britain the political climate had gone completely conservative and the factories wouldn&#39;t reinvest in tooling, update and modernize. Britain went into a depression. All the huge companies like Triumph and BSA went belly up.<br />At the same time, Japan had got back on their feet. The reinvestment in Japan was heavy from Europe and the US, building new infrastructure. Japan got to the point where they could come over here, take a product back to Japan and manufacture it ten times better. Including the Triumph motorcycle. Japanese manufacturers took the Triumph 650, put disc brakes on, an electric starter and all the modern conveniences. The British industry never modernized the range. They got complacent.</p><p>How could the Japanese do this at an affordable level?<br />- The Japanese bikes were subsidized to get a solid marketshare. People were looking at a 1969 Honda: 4-cylinder, disc brakes and an electric starter. Every bell and whistle you need and it was cheaper than a Triumph Bonneville that had none of those things.<br />Mentality changed and the leaders of the pack had Hondas. Honda started making a wide product range, 50cc and 125cc bikes. Honda understood brand loyalty and the Brits didn&#39;t. If you&#39;re 16 and you get on a 50cc, likelihood has it you&#39;re going to step up the Honda range.</p><p>When did Triumph make its come-back?<br />- Well, the &#39;60s were great Triumph bikes. Made from great metal and still successful in racing into the 80&#39;s and a lot of people started to dig them out their garages again. Reliving their youth.<br />- A resurgence started then and when I came to New York, I noticed everybody had a Triumph tucked away in the garage and only used the Harley. We went around, purchased these Triumphs and fixed them up. It started a scene around the cafes in the East Village. We got a map, put a hundred mile radius circle around NYC and put adverts in all the local papers for Triumphs.</p><p>How did it turn out?<br />- [Hugh laughs] I ended up with a whole business going and I&#39;ve been at the current location since &#39;86. The club scene really took off in the 80&#39;s in New York with huge mega-nightclubs: The Palladium, Area and Danceteria. It was the beginning of door people that were &#39;god.&#39; All that crap. But you could pull up to the club on a Triumph and get to walk straight in!</p><p>We also interviewed Triumph Specialist Neil Fenton (see opposite page). Didn&#39;t you sell him his first Triumph?<br />- Yeah, about 12 years ago. Guys like Neil are going to the next level and making them custom. This shop is just about servicing Triumphs.</p><p>How can Triumph&#39;s impact on motorcycle manufacturing be seen today?<br />- Motorcycles have gone a full circle and now every company makes a modern version of an old Triumph. Ducati makes an air-cooled V-twin. The new Bonneville is a copy of the old. Every manufacturer got rid of that wrapped-up race bike look. The &#39;80s and &#39;90s thing was multicylinder race replicas. Now, every one of those companies makes what we call &#39;naked bikes&#39;. The basic motorcycle is getting back to what it was in the &#39;60s.</p><p>6TH STREET SPECIALS 703 EAST 6TH STREET NEW YORK NY 10009</p>',
		'image': '/gantrugger/images/friends/hugh.jpg'
	},
	'neil': {
		'title': 'Neil Fenton: Triumph Recycled - the new<br />vintage movement',
		'content': '<p>As I stepped out of the subway at Morgan Avenue in Brooklyn and walked along Johnson Avenue to Neil&#39;s shop, the perfect white snow had turned into a dirty sludge. I ducked under his garage door and Neil greeted me with a smile and those trademark glasses.<br />In his hand he had a Gant advert. He threw it in front of me across the table and lit a cigarette. It was himself, Neil Fenton, modeling in the Gant campaign five years or so back.<br />Since his Gant days he turned to customizing Triumphs. Representing the new generation of passionate mechanics that are artists in their own right. He shares a workshop with a small group of like-minded guys on Johnson Avenue in Brooklyn and was sold his first Triumph by none other than Mr. Hugh Mackie (see opposite page).</p><p>How have classic Triumphs gained such a cult status?<br />- Before the Japanese took over the market the Triumph was the most sold bike. I think more were shipped here than stayed in England. They&#39;re easy to work with and parts are readily available. The original sports bike. People were also making Café racers out of the Triumphs.</p><p>People like Steve McQueen really seemed to push the brand to the next level. Why did Triumph have that allure?<br />- They were fast and light mainly. Don&#39;t get me wrong, there are other cool English bikes, but the parts for Triumphs are so available. I&#39;ve customized everything on a Triumph; hand-made gas tanks to frames and handlebars.</p><p>We use a 1971 Triumph in our fall campaign. What a machine!<br />- [Pulls out an iPhone picture] Yeah, I know that bike. John, who&#39;s part of the co-op that is our shop, rebuilt that bike twice.</p><p>Small world! How come Triumphs are such great city bikes?<br />- Triumphs are small and we tend to keep the handlebars small so you can fly between the traffic across the Williamsburg Bridge [Neil laughs]. They never get stolen really too. More joy-ridden for a week or two then you find them somewhere down by the Projects.</p><p>Do you work with the new (&#39;80s onwards) Triumphs?<br />- The Speed Triple is a really fun bike. There&#39;s a movement beginning in customizing the new ones now; making new frames and popping up the engine for dirt track racing.</p><p>Are there other customization trends going on?<br />- People are really into choppers again. Ten years ago, there were not too many Triumphs for sale and everyone made choppers out of them. There&#39;s always a reaction to the previous movement and eventually, I&#39;m sure people will want to restore the chopper Triumphs back again.</p><p>Why choppers?<br />- Motorcycle shows mainly.</p><p>Are you devaluing a bike by customizing it?<br />- It depends. If I build a chopper and add a hard-tail section by welding it on, yeah. You can take it apart again, it just takes a lot of work to cut off all the welds. A lot of my bikes have had 3 lives; the appearance and everything is reversible.</p><p>What is your process when designing customizations?<br />- I look through a lot of my old race bike magazines and books. Hugh had this old book of boys racing BSAs that I liked. I copy inspirations from here and there. Kind of what fashion does; buy it, copy it, sell it!</p><p>Seems like there are no boundaries with customization?<br />- Yeah, all us boys are friends but we&#39;re competing for sure. Trying to outdo each other and you know everyone is judging it. Kind of like surfing or skating, we all have our different styles. Mine is dirt track racing because of my BMX background. My first bike was a &#39;65 Vespa.</p><p>Where do you buy your bikes?<br />- A lot from CraigsList. Got one a couple of years ago from a guy in New Jersey. He refused to sell it to the two people before me because he didn&#39;t like them. I mean, if it&#39;s got original parts and matching numbers, I&#39;m not going to hack it apart.</p><p>NEIL FENTON IS MISTER TINKER <a href="http://www.mistertinker.blogspot.com" target="_blank">HTTP://MISTERTINKER.BLOGSPOT.COM</a></p>',
		'image': '/gantrugger/images/friends/neil.jpg'
	}
};

/*
 * Facebox (for jQuery)
 * version: 1.2 (05/05/2008)
 * @requires jQuery v1.2 or later
 *
 * Examples at http://famspam.com/facebox/
 *
 * Licensed under the MIT:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Copyright 2007, 2008 Chris Wanstrath [ chris@ozmm.org ]
 *
 * Usage:
 *
 *  jQuery(document).ready(function() {
 *    jQuery('a[rel*=facebox]').facebox()
 *  })
 *
 *  <a href="#terms" rel="facebox">Terms</a>
 *    Loads the #terms div in the box
 *
 *  <a href="terms.html" rel="facebox">Terms</a>
 *    Loads the terms.html page in the box
 *
 *  <a href="terms.png" rel="facebox">Terms</a>
 *    Loads the terms.png image in the box
 *
 *
 *  You can also use it programmatically:
 *
 *    jQuery.facebox('some html')
 *    jQuery.facebox('some html', 'my-groovy-style')
 *
 *  The above will open a facebox with "some html" as the content.
 *
 *    jQuery.facebox(function($) {
 *      $.get('blah.html', function(data) { $.facebox(data) })
 *    })
 *
 *  The above will show a loading screen before the passed function is called,
 *  allowing for a better ajaxy experience.
 *
 *  The facebox function can also display an ajax page, an image, or the contents of a div:
 *
 *    jQuery.facebox({ ajax: 'remote.html' })
 *    jQuery.facebox({ ajax: 'remote.html' }, 'my-groovy-style')
 *    jQuery.facebox({ image: 'stairs.jpg' })
 *    jQuery.facebox({ image: 'stairs.jpg' }, 'my-groovy-style')
 *    jQuery.facebox({ div: '#box' })
 *    jQuery.facebox({ div: '#box' }, 'my-groovy-style')
 *
 *  Want to close the facebox?  Trigger the 'close.facebox' document event:
 *
 *    jQuery(document).trigger('close.facebox')
 *
 *  Facebox also has a bunch of other hooks:
 *
 *    loading.facebox
 *    beforeReveal.facebox
 *    reveal.facebox (aliased as 'afterReveal.facebox')
 *    init.facebox
 *    afterClose.facebox
 *
 *  Simply bind a function to any of these hooks:
 *
 *   $(document).bind('reveal.facebox', function() { ...stuff to do after the facebox and contents are revealed... })
 *
 */
(function($) {
  $.facebox = function(data, klass) {
    $.facebox.loading()

    if (data.ajax) fillFaceboxFromAjax(data.ajax, klass)
    else if (data.image) fillFaceboxFromImage(data.image, klass)
    else if (data.div) fillFaceboxFromHref(data.div, klass)
    else if ($.isFunction(data)) data.call($)
    else $.facebox.reveal(data, klass)
  }

  /*
   * Public, $.facebox methods
   */

  $.extend($.facebox, {
    settings: {
      opacity      : 0.8,
      overlay      : true,
      loadingImage : 'images/loading.gif',
      closeImage   : 'closelabel.gif',
      imageTypes   : [ 'png', 'jpg', 'jpeg', 'gif' ],
      faceboxHtml  : '\
    <div id="facebox" style="display:none;"> \
      <div class="popup"> \
        <table> \
          <tbody id="facebox-tbody"> \
            <tr> \
              <td class="body"> \
                <div class="content"> \
                </div> \
              </td> \
            </tr> \
          </tbody> \
        </table> \
      </div> \
    </div>'
    },

    loading: function() {
      init()
      if ($('#facebox .loading').length == 1) return true
      showOverlay()

      $('#facebox .content').empty()
      $('#facebox .body').children().hide().end().
        append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>');


			

      $('#facebox').css({
        // top:	getPageScroll()[1] + (getPageHeight() / 10),
        // left:	$(window).width() / 2 - 205
      }).show();

			$('#facebox_overlay').addClass('facebox_overlay_loading');

      $(document).bind('keydown.facebox', function(e) {
        if (e.keyCode == 27) $.facebox.close()
        return true
      })
      $(document).trigger('loading.facebox')
    },

    reveal: function(data, klass) {
      $(document).trigger('beforeReveal.facebox')
      if (klass) $('#facebox .content').addClass(klass)
      $('#facebox .content').append(data)
      $('#facebox .loading').remove();
			$('#facebox_overlay').removeClass('facebox_overlay_loading');
      $('#facebox .body').children().fadeIn('normal')

			$('#facebox').css('top', $(window).height() / 2 - ( $('#facebox table').height() / 2 ) );
      $('#facebox').css('left', $(window).width() / 2 - ($('#facebox table').width() / 2))

      $(document).trigger('reveal.facebox').trigger('afterReveal.facebox')
    },

    close: function() {
      $(document).trigger('close.facebox')
      return false
    }
  })

  /*
   * Public, $.fn methods
   */

  $.fn.facebox = function(settings) {
    if ($(this).length == 0) return

    init(settings)

    function clickHandler() {
      $.facebox.loading(true)

      // support for rel="facebox.inline_popup" syntax, to add a class
      // also supports deprecated "facebox[.inline_popup]" syntax
      var klass = this.rel.match(/facebox\[?\.(\w+)\]?/)
      if (klass) klass = klass[1]

      fillFaceboxFromHref(this.href, klass)
      return false
    }

    return this.bind('click.facebox', clickHandler)
  }

  /*
   * Private methods
   */

  // called one time to setup facebox on this page
  function init(settings) {
    if ($.facebox.settings.inited) return true
    else $.facebox.settings.inited = true

    $(document).trigger('init.facebox')
    makeCompatible()

    var imageTypes = $.facebox.settings.imageTypes.join('|')
    $.facebox.settings.imageTypesRegexp = new RegExp('\.(' + imageTypes + ')$', 'i')

    if (settings) $.extend($.facebox.settings, settings)
    $('body').append($.facebox.settings.faceboxHtml)

    var preload = [ new Image(), new Image() ]
    preload[0].src = $.facebox.settings.closeImage
    preload[1].src = $.facebox.settings.loadingImage

    $('#facebox').find('.b:first, .bl').each(function() {
      preload.push(new Image())
      preload.slice(-1).src = $(this).css('background-image').replace(/url\((.+)\)/, '$1')
    })

    $('#facebox .close').click($.facebox.close)
    $('#facebox .close_image').attr('src', $.facebox.settings.closeImage)
  }

  // getPageScroll() by quirksmode.com
  function getPageScroll() {
    var xScroll, yScroll;
    if (self.pageYOffset) {
      yScroll = self.pageYOffset;
      xScroll = self.pageXOffset;
    } else if (document.documentElement && document.documentElement.scrollTop) {	 // Explorer 6 Strict
      yScroll = document.documentElement.scrollTop;
      xScroll = document.documentElement.scrollLeft;
    } else if (document.body) {// all other Explorers
      yScroll = document.body.scrollTop;
      xScroll = document.body.scrollLeft;
    }
    return new Array(xScroll,yScroll)
  }

  // Adapted from getPageSize() by quirksmode.com
  function getPageHeight() {
    var windowHeight
    if (self.innerHeight) {	// all except Explorer
      windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
      windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
      windowHeight = document.body.clientHeight;
    }
    return windowHeight
  }

  // Backwards compatibility
  function makeCompatible() {
    var $s = $.facebox.settings

    $s.loadingImage = $s.loading_image || $s.loadingImage
    $s.closeImage = $s.close_image || $s.closeImage
    $s.imageTypes = $s.image_types || $s.imageTypes
    $s.faceboxHtml = $s.facebox_html || $s.faceboxHtml
  }

  // Figures out what you want to display and displays it
  // formats are:
  //     div: #id
  //   image: blah.extension
  //    ajax: anything else
  function fillFaceboxFromHref(href, klass) {
    // div
    if (href.match(/#/)) {
      var url    = window.location.href.split('#')[0]
      var target = href.replace(url,'')
      if (target == '#') return
      $.facebox.reveal($(target).html(), klass)

    // image
    } else if (href.match($.facebox.settings.imageTypesRegexp)) {
      fillFaceboxFromImage(href, klass)
    // ajax
    } else {
      fillFaceboxFromAjax(href, klass)
    }
  }

  function fillFaceboxFromImage(href, klass) {
    var image = new Image()
    image.onload = function() {
      $.facebox.reveal('<div class="image"><img src="' + image.src + '" /></div>', klass)
    }
    image.src = href
  }

  function fillFaceboxFromAjax(href, klass) {
    $.get(href, function(data) { $.facebox.reveal(data, klass) })
  }

  function skipOverlay() {
    return $.facebox.settings.overlay == false || $.facebox.settings.opacity === null
  }

  function showOverlay() {
    if (skipOverlay()) return

    if ($('#facebox_overlay').length == 0)
      $("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')

    $('#facebox_overlay').hide().addClass("facebox_overlayBG")
      .css('opacity', $.facebox.settings.opacity)
      .click(function() { $(document).trigger('close.facebox') })
      .fadeIn(200)
    return false
  }

  function hideOverlay() {
    if (skipOverlay()) return

    $('#facebox_overlay').fadeOut(200, function(){
      $("#facebox_overlay").removeClass("facebox_overlayBG")
      $("#facebox_overlay").addClass("facebox_hide")
      $("#facebox_overlay").remove()
    })

    return false
  }

  /*
   * Bindings
   */

  $(document).bind('close.facebox', function() {
    $(document).unbind('keydown.facebox')
    $('#facebox').fadeOut(function() {
      $('#facebox .content').removeClass().addClass('content')
      hideOverlay()
      $('#facebox .loading').remove()
      $(document).trigger('afterClose.facebox')
    })
  })

})(jQuery);

$(document).bind('afterReveal.facebox', function() {
	var faceboxImg = $('#facebox .image img');

	if(faceboxImg.length) {
    var availableHeight = $(window).height() - 40;
    var imageHeight = faceboxImg.height();
    if(imageHeight > availableHeight) {
			$('#facebox').css('top', ($(window).scrollTop() + 10) + 'px');
			faceboxImg.height(availableHeight + 'px');
		}
	}
});


//
/*
 * jQuery validation plug-in 1.7
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2008 JÃ¶rn Zaefferer
 *
 * $Id: jquery.validate.js 6403 2009-06-17 14:27:16Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(7($){$.H($.2L,{17:7(d){l(!6.F){d&&d.2q&&2T.1z&&1z.52("3y 3p, 4L\'t 17, 64 3y");8}p c=$.19(6[0],\'v\');l(c){8 c}c=2w $.v(d,6[0]);$.19(6[0],\'v\',c);l(c.q.3x){6.3s("1w, 3i").1o(".4E").3e(7(){c.3b=w});l(c.q.35){6.3s("1w, 3i").1o(":2s").3e(7(){c.1Z=6})}6.2s(7(b){l(c.q.2q)b.5J();7 1T(){l(c.q.35){l(c.1Z){p a=$("<1w 1V=\'5r\'/>").1s("u",c.1Z.u).33(c.1Z.Z).51(c.U)}c.q.35.V(c,c.U);l(c.1Z){a.3D()}8 N}8 w}l(c.3b){c.3b=N;8 1T()}l(c.L()){l(c.1b){c.1l=w;8 N}8 1T()}12{c.2l();8 N}})}8 c},J:7(){l($(6[0]).2W(\'L\')){8 6.17().L()}12{p b=w;p a=$(6[0].L).17();6.P(7(){b&=a.I(6)});8 b}},4D:7(c){p d={},$I=6;$.P(c.1I(/\\s/),7(a,b){d[b]=$I.1s(b);$I.6d(b)});8 d},1i:7(h,k){p f=6[0];l(h){p i=$.19(f.L,\'v\').q;p d=i.1i;p c=$.v.36(f);23(h){1e"1d":$.H(c,$.v.1X(k));d[f.u]=c;l(k.G)i.G[f.u]=$.H(i.G[f.u],k.G);31;1e"3D":l(!k){T d[f.u];8 c}p e={};$.P(k.1I(/\\s/),7(a,b){e[b]=c[b];T c[b]});8 e}}p g=$.v.41($.H({},$.v.3Y(f),$.v.3V(f),$.v.3T(f),$.v.36(f)),f);l(g.15){p j=g.15;T g.15;g=$.H({15:j},g)}8 g}});$.H($.5p[":"],{5n:7(a){8!$.1p(""+a.Z)},5g:7(a){8!!$.1p(""+a.Z)},5f:7(a){8!a.4h}});$.v=7(b,a){6.q=$.H(w,{},$.v.3d,b);6.U=a;6.3I()};$.v.W=7(c,b){l(R.F==1)8 7(){p a=$.3F(R);a.4V(c);8 $.v.W.1Q(6,a)};l(R.F>2&&b.2c!=3B){b=$.3F(R).4Q(1)}l(b.2c!=3B){b=[b]}$.P(b,7(i,n){c=c.1u(2w 3t("\\\\{"+i+"\\\\}","g"),n)});8 c};$.H($.v,{3d:{G:{},2a:{},1i:{},1c:"3r",28:"J",2F:"4P",2l:w,3o:$([]),2D:$([]),3x:w,3l:[],3k:N,4O:7(a){6.3U=a;l(6.q.4K&&!6.4J){6.q.1K&&6.q.1K.V(6,a,6.q.1c,6.q.28);6.1M(a).2A()}},4C:7(a){l(!6.1E(a)&&(a.u 11 6.1a||!6.K(a))){6.I(a)}},6c:7(a){l(a.u 11 6.1a||a==6.4A){6.I(a)}},68:7(a){l(a.u 11 6.1a)6.I(a);12 l(a.4x.u 11 6.1a)6.I(a.4x)},39:7(a,c,b){$(a).22(c).2v(b)},1K:7(a,c,b){$(a).2v(c).22(b)}},63:7(a){$.H($.v.3d,a)},G:{15:"61 4r 2W 15.",1q:"M 2O 6 4r.",1J:"M O a J 1J 5X.",1B:"M O a J 5W.",1A:"M O a J 1A.",2j:"M O a J 1A (5Q).",1G:"M O a J 1G.",1P:"M O 5O 1P.",2f:"M O a J 5L 5I 1G.",2o:"M O 47 5F Z 5B.",43:"M O a Z 5z a J 5x.",18:$.v.W("M O 3K 5v 2X {0} 2V."),1y:$.v.W("M O 5t 5s {0} 2V."),2i:$.v.W("M O a Z 3W {0} 3O {1} 2V 5o."),2r:$.v.W("M O a Z 3W {0} 3O {1}."),1C:$.v.W("M O a Z 5j 2X 46 3M 3L {0}."),1t:$.v.W("M O a Z 5d 2X 46 3M 3L {0}.")},3J:N,5a:{3I:7(){6.24=$(6.q.2D);6.4t=6.24.F&&6.24||$(6.U);6.2x=$(6.q.3o).1d(6.q.2D);6.1a={};6.54={};6.1b=0;6.1h={};6.1f={};6.21();p f=(6.2a={});$.P(6.q.2a,7(d,c){$.P(c.1I(/\\s/),7(a,b){f[b]=d})});p e=6.q.1i;$.P(e,7(b,a){e[b]=$.v.1X(a)});7 2N(a){p b=$.19(6[0].L,"v"),3c="4W"+a.1V.1u(/^17/,"");b.q[3c]&&b.q[3c].V(b,6[0])}$(6.U).2K(":3E, :4U, :4T, 2e, 4S","2d 2J 4R",2N).2K(":3C, :3A, 2e, 3z","3e",2N);l(6.q.3w)$(6.U).2I("1f-L.17",6.q.3w)},L:7(){6.3v();$.H(6.1a,6.1v);6.1f=$.H({},6.1v);l(!6.J())$(6.U).3u("1f-L",[6]);6.1m();8 6.J()},3v:7(){6.2H();Q(p i=0,14=(6.2b=6.14());14[i];i++){6.29(14[i])}8 6.J()},I:7(a){a=6.2G(a);6.4A=a;6.2P(a);6.2b=$(a);p b=6.29(a);l(b){T 6.1f[a.u]}12{6.1f[a.u]=w}l(!6.3q()){6.13=6.13.1d(6.2x)}6.1m();8 b},1m:7(b){l(b){$.H(6.1v,b);6.S=[];Q(p c 11 b){6.S.27({1j:b[c],I:6.26(c)[0]})}6.1n=$.3n(6.1n,7(a){8!(a.u 11 b)})}6.q.1m?6.q.1m.V(6,6.1v,6.S):6.3m()},2S:7(){l($.2L.2S)$(6.U).2S();6.1a={};6.2H();6.2Q();6.14().2v(6.q.1c)},3q:7(){8 6.2k(6.1f)},2k:7(a){p b=0;Q(p i 11 a)b++;8 b},2Q:7(){6.2C(6.13).2A()},J:7(){8 6.3j()==0},3j:7(){8 6.S.F},2l:7(){l(6.q.2l){3Q{$(6.3h()||6.S.F&&6.S[0].I||[]).1o(":4N").3g().4M("2d")}3f(e){}}},3h:7(){p a=6.3U;8 a&&$.3n(6.S,7(n){8 n.I.u==a.u}).F==1&&a},14:7(){p a=6,2B={};8 $([]).1d(6.U.14).1o(":1w").1L(":2s, :21, :4I, [4H]").1L(6.q.3l).1o(7(){!6.u&&a.q.2q&&2T.1z&&1z.3r("%o 4G 3K u 4F",6);l(6.u 11 2B||!a.2k($(6).1i()))8 N;2B[6.u]=w;8 w})},2G:7(a){8 $(a)[0]},2z:7(){8 $(6.q.2F+"."+6.q.1c,6.4t)},21:7(){6.1n=[];6.S=[];6.1v={};6.1k=$([]);6.13=$([]);6.2b=$([])},2H:7(){6.21();6.13=6.2z().1d(6.2x)},2P:7(a){6.21();6.13=6.1M(a)},29:7(d){d=6.2G(d);l(6.1E(d)){d=6.26(d.u)[0]}p a=$(d).1i();p c=N;Q(Y 11 a){p b={Y:Y,2n:a[Y]};3Q{p f=$.v.1N[Y].V(6,d.Z.1u(/\\r/g,""),d,b.2n);l(f=="1S-1Y"){c=w;6g}c=N;l(f=="1h"){6.13=6.13.1L(6.1M(d));8}l(!f){6.4B(d,b);8 N}}3f(e){6.q.2q&&2T.1z&&1z.6f("6e 6b 6a 69 I "+d.4z+", 29 47 \'"+b.Y+"\' Y",e);67 e;}}l(c)8;l(6.2k(a))6.1n.27(d);8 w},4y:7(a,b){l(!$.1H)8;p c=6.q.3a?$(a).1H()[6.q.3a]:$(a).1H();8 c&&c.G&&c.G[b]},4w:7(a,b){p m=6.q.G[a];8 m&&(m.2c==4v?m:m[b])},4u:7(){Q(p i=0;i<R.F;i++){l(R[i]!==20)8 R[i]}8 20},2u:7(a,b){8 6.4u(6.4w(a.u,b),6.4y(a,b),!6.q.3k&&a.62||20,$.v.G[b],"<4s>60: 5Z 1j 5Y Q "+a.u+"</4s>")},4B:7(b,a){p c=6.2u(b,a.Y),37=/\\$?\\{(\\d+)\\}/g;l(1g c=="7"){c=c.V(6,a.2n,b)}12 l(37.16(c)){c=1F.W(c.1u(37,\'{$1}\'),a.2n)}6.S.27({1j:c,I:b});6.1v[b.u]=c;6.1a[b.u]=c},2C:7(a){l(6.q.2t)a=a.1d(a.4q(6.q.2t));8 a},3m:7(){Q(p i=0;6.S[i];i++){p a=6.S[i];6.q.39&&6.q.39.V(6,a.I,6.q.1c,6.q.28);6.2E(a.I,a.1j)}l(6.S.F){6.1k=6.1k.1d(6.2x)}l(6.q.1x){Q(p i=0;6.1n[i];i++){6.2E(6.1n[i])}}l(6.q.1K){Q(p i=0,14=6.4p();14[i];i++){6.q.1K.V(6,14[i],6.q.1c,6.q.28)}}6.13=6.13.1L(6.1k);6.2Q();6.2C(6.1k).4o()},4p:7(){8 6.2b.1L(6.4n())},4n:7(){8 $(6.S).4m(7(){8 6.I})},2E:7(a,c){p b=6.1M(a);l(b.F){b.2v().22(6.q.1c);b.1s("4l")&&b.4k(c)}12{b=$("<"+6.q.2F+"/>").1s({"Q":6.34(a),4l:w}).22(6.q.1c).4k(c||"");l(6.q.2t){b=b.2A().4o().5V("<"+6.q.2t+"/>").4q()}l(!6.24.5S(b).F)6.q.4j?6.q.4j(b,$(a)):b.5R(a)}l(!c&&6.q.1x){b.3E("");1g 6.q.1x=="1D"?b.22(6.q.1x):6.q.1x(b)}6.1k=6.1k.1d(b)},1M:7(a){p b=6.34(a);8 6.2z().1o(7(){8 $(6).1s(\'Q\')==b})},34:7(a){8 6.2a[a.u]||(6.1E(a)?a.u:a.4z||a.u)},1E:7(a){8/3C|3A/i.16(a.1V)},26:7(d){p c=6.U;8 $(4i.5P(d)).4m(7(a,b){8 b.L==c&&b.u==d&&b||4g})},1O:7(a,b){23(b.4f.4e()){1e\'2e\':8 $("3z:3p",b).F;1e\'1w\':l(6.1E(b))8 6.26(b.u).1o(\':4h\').F}8 a.F},4d:7(b,a){8 6.32[1g b]?6.32[1g b](b,a):w},32:{"5N":7(b,a){8 b},"1D":7(b,a){8!!$(b,a.L).F},"7":7(b,a){8 b(a)}},K:7(a){8!$.v.1N.15.V(6,$.1p(a.Z),a)&&"1S-1Y"},4c:7(a){l(!6.1h[a.u]){6.1b++;6.1h[a.u]=w}},4b:7(a,b){6.1b--;l(6.1b<0)6.1b=0;T 6.1h[a.u];l(b&&6.1b==0&&6.1l&&6.L()){$(6.U).2s();6.1l=N}12 l(!b&&6.1b==0&&6.1l){$(6.U).3u("1f-L",[6]);6.1l=N}},2h:7(a){8 $.19(a,"2h")||$.19(a,"2h",{2M:4g,J:w,1j:6.2u(a,"1q")})}},1R:{15:{15:w},1J:{1J:w},1B:{1B:w},1A:{1A:w},2j:{2j:w},4a:{4a:w},1G:{1G:w},49:{49:w},1P:{1P:w},2f:{2f:w}},48:7(a,b){a.2c==4v?6.1R[a]=b:$.H(6.1R,a)},3V:7(b){p a={};p c=$(b).1s(\'5H\');c&&$.P(c.1I(\' \'),7(){l(6 11 $.v.1R){$.H(a,$.v.1R[6])}});8 a},3T:7(c){p a={};p d=$(c);Q(Y 11 $.v.1N){p b=d.1s(Y);l(b){a[Y]=b}}l(a.18&&/-1|5G|5C/.16(a.18)){T a.18}8 a},3Y:7(a){l(!$.1H)8{};p b=$.19(a.L,\'v\').q.3a;8 b?$(a).1H()[b]:$(a).1H()},36:7(b){p a={};p c=$.19(b.L,\'v\');l(c.q.1i){a=$.v.1X(c.q.1i[b.u])||{}}8 a},41:7(d,e){$.P(d,7(c,b){l(b===N){T d[c];8}l(b.2R||b.2p){p a=w;23(1g b.2p){1e"1D":a=!!$(b.2p,e.L).F;31;1e"7":a=b.2p.V(e,e);31}l(a){d[c]=b.2R!==20?b.2R:w}12{T d[c]}}});$.P(d,7(a,b){d[a]=$.44(b)?b(e):b});$.P([\'1y\',\'18\',\'1t\',\'1C\'],7(){l(d[6]){d[6]=2Z(d[6])}});$.P([\'2i\',\'2r\'],7(){l(d[6]){d[6]=[2Z(d[6][0]),2Z(d[6][1])]}});l($.v.3J){l(d.1t&&d.1C){d.2r=[d.1t,d.1C];T d.1t;T d.1C}l(d.1y&&d.18){d.2i=[d.1y,d.18];T d.1y;T d.18}}l(d.G){T d.G}8 d},1X:7(a){l(1g a=="1D"){p b={};$.P(a.1I(/\\s/),7(){b[6]=w});a=b}8 a},5A:7(c,a,b){$.v.1N[c]=a;$.v.G[c]=b!=20?b:$.v.G[c];l(a.F<3){$.v.48(c,$.v.1X(c))}},1N:{15:7(c,d,a){l(!6.4d(a,d))8"1S-1Y";23(d.4f.4e()){1e\'2e\':p b=$(d).33();8 b&&b.F>0;1e\'1w\':l(6.1E(d))8 6.1O(c,d)>0;5y:8 $.1p(c).F>0}},1q:7(f,h,j){l(6.K(h))8"1S-1Y";p g=6.2h(h);l(!6.q.G[h.u])6.q.G[h.u]={};g.40=6.q.G[h.u].1q;6.q.G[h.u].1q=g.1j;j=1g j=="1D"&&{1B:j}||j;l(g.2M!==f){g.2M=f;p k=6;6.4c(h);p i={};i[h.u]=f;$.2U($.H(w,{1B:j,3Z:"2Y",3X:"17"+h.u,5w:"5u",19:i,1x:7(d){k.q.G[h.u].1q=g.40;p b=d===w;l(b){p e=k.1l;k.2P(h);k.1l=e;k.1n.27(h);k.1m()}12{p a={};p c=(g.1j=d||k.2u(h,"1q"));a[h.u]=$.44(c)?c(f):c;k.1m(a)}g.J=b;k.4b(h,b)}},j));8"1h"}12 l(6.1h[h.u]){8"1h"}8 g.J},1y:7(b,c,a){8 6.K(c)||6.1O($.1p(b),c)>=a},18:7(b,c,a){8 6.K(c)||6.1O($.1p(b),c)<=a},2i:7(b,d,a){p c=6.1O($.1p(b),d);8 6.K(d)||(c>=a[0]&&c<=a[1])},1t:7(b,c,a){8 6.K(c)||b>=a},1C:7(b,c,a){8 6.K(c)||b<=a},2r:7(b,c,a){8 6.K(c)||(b>=a[0]&&b<=a[1])},1J:7(a,b){8 6.K(b)||/^((([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^X`{\\|}~]|[\\E-\\B\\C-\\x\\A-\\y])+(\\.([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^X`{\\|}~]|[\\E-\\B\\C-\\x\\A-\\y])+)*)|((\\3S)((((\\2m|\\1W)*(\\30\\3R))?(\\2m|\\1W)+)?(([\\3P-\\5q\\45\\42\\5D-\\5E\\3N]|\\5m|[\\5l-\\5k]|[\\5i-\\5K]|[\\E-\\B\\C-\\x\\A-\\y])|(\\\\([\\3P-\\1W\\45\\42\\30-\\3N]|[\\E-\\B\\C-\\x\\A-\\y]))))*(((\\2m|\\1W)*(\\30\\3R))?(\\2m|\\1W)+)?(\\3S)))@((([a-z]|\\d|[\\E-\\B\\C-\\x\\A-\\y])|(([a-z]|\\d|[\\E-\\B\\C-\\x\\A-\\y])([a-z]|\\d|-|\\.|X|~|[\\E-\\B\\C-\\x\\A-\\y])*([a-z]|\\d|[\\E-\\B\\C-\\x\\A-\\y])))\\.)+(([a-z]|[\\E-\\B\\C-\\x\\A-\\y])|(([a-z]|[\\E-\\B\\C-\\x\\A-\\y])([a-z]|\\d|-|\\.|X|~|[\\E-\\B\\C-\\x\\A-\\y])*([a-z]|[\\E-\\B\\C-\\x\\A-\\y])))\\.?$/i.16(a)},1B:7(a,b){8 6.K(b)||/^(5h?|5M):\\/\\/(((([a-z]|\\d|-|\\.|X|~|[\\E-\\B\\C-\\x\\A-\\y])|(%[\\1U-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\E-\\B\\C-\\x\\A-\\y])|(([a-z]|\\d|[\\E-\\B\\C-\\x\\A-\\y])([a-z]|\\d|-|\\.|X|~|[\\E-\\B\\C-\\x\\A-\\y])*([a-z]|\\d|[\\E-\\B\\C-\\x\\A-\\y])))\\.)+(([a-z]|[\\E-\\B\\C-\\x\\A-\\y])|(([a-z]|[\\E-\\B\\C-\\x\\A-\\y])([a-z]|\\d|-|\\.|X|~|[\\E-\\B\\C-\\x\\A-\\y])*([a-z]|[\\E-\\B\\C-\\x\\A-\\y])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|X|~|[\\E-\\B\\C-\\x\\A-\\y])|(%[\\1U-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|X|~|[\\E-\\B\\C-\\x\\A-\\y])|(%[\\1U-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|X|~|[\\E-\\B\\C-\\x\\A-\\y])|(%[\\1U-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)|[\\5e-\\5T]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|X|~|[\\E-\\B\\C-\\x\\A-\\y])|(%[\\1U-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.16(a)},1A:7(a,b){8 6.K(b)||!/5U|5c/.16(2w 5b(a))},2j:7(a,b){8 6.K(b)||/^\\d{4}[\\/-]\\d{1,2}[\\/-]\\d{1,2}$/.16(a)},1G:7(a,b){8 6.K(b)||/^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$/.16(a)},1P:7(a,b){8 6.K(b)||/^\\d+$/.16(a)},2f:7(b,e){l(6.K(e))8"1S-1Y";l(/[^0-9-]+/.16(b))8 N;p a=0,d=0,2g=N;b=b.1u(/\\D/g,"");Q(p n=b.F-1;n>=0;n--){p c=b.59(n);p d=58(c,10);l(2g){l((d*=2)>9)d-=9}a+=d;2g=!2g}8(a%10)==0},43:7(b,c,a){a=1g a=="1D"?a.1u(/,/g,\'|\'):"57|56?g|55";8 6.K(c)||b.65(2w 3t(".("+a+")$","i"))},2o:7(c,d,a){p b=$(a).66(".17-2o").2I("3H.17-2o",7(){$(d).J()});8 c==b.33()}}});$.W=$.v.W})(1F);(7($){p c=$.2U;p d={};$.2U=7(a){a=$.H(a,$.H({},$.53,a));p b=a.3X;l(a.3Z=="2Y"){l(d[b]){d[b].2Y()}8(d[b]=c.1Q(6,R))}8 c.1Q(6,R)}})(1F);(7($){l(!1F.1r.38.2d&&!1F.1r.38.2J&&4i.3G){$.P({3g:\'2d\',3H:\'2J\'},7(b,a){$.1r.38[a]={50:7(){6.3G(b,2y,w)},4Z:7(){6.4Y(b,2y,w)},2y:7(e){R[0]=$.1r.2O(e);R[0].1V=a;8 $.1r.1T.1Q(6,R)}};7 2y(e){e=$.1r.2O(e);e.1V=a;8 $.1r.1T.V(6,e)}})};$.H($.2L,{2K:7(d,e,c){8 6.2I(e,7(a){p b=$(a.4X);l(b.2W(d)){8 c.1Q(b,R)}})}})})(1F);',62,389,'||||||this|function|return|||||||||||||if||||var|settings||||name|validator|true|uFDCF|uFFEF||uFDF0|uD7FF|uF900||u00A0|length|messages|extend|element|valid|optional|form|Please|false|enter|each|for|arguments|errorList|delete|currentForm|call|format|_|method|value||in|else|toHide|elements|required|test|validate|maxlength|data|submitted|pendingRequest|errorClass|add|case|invalid|typeof|pending|rules|message|toShow|formSubmitted|showErrors|successList|filter|trim|remote|event|attr|min|replace|errorMap|input|success|minlength|console|date|url|max|string|checkable|jQuery|number|metadata|split|email|unhighlight|not|errorsFor|methods|getLength|digits|apply|classRuleSettings|dependency|handle|da|type|x09|normalizeRule|mismatch|submitButton|undefined|reset|addClass|switch|labelContainer||findByName|push|validClass|check|groups|currentElements|constructor|focusin|select|creditcard|bEven|previousValue|rangelength|dateISO|objectLength|focusInvalid|x20|parameters|equalTo|depends|debug|range|submit|wrapper|defaultMessage|removeClass|new|containers|handler|errors|hide|rulesCache|addWrapper|errorLabelContainer|showLabel|errorElement|clean|prepareForm|bind|focusout|validateDelegate|fn|old|delegate|fix|prepareElement|hideErrors|param|resetForm|window|ajax|characters|is|than|abort|Number|x0d|break|dependTypes|val|idOrName|submitHandler|staticRules|theregex|special|highlight|meta|cancelSubmit|eventType|defaults|click|catch|focus|findLastActive|button|size|ignoreTitle|ignore|defaultShowErrors|grep|errorContainer|selected|numberOfInvalids|error|find|RegExp|triggerHandler|checkForm|invalidHandler|onsubmit|nothing|option|checkbox|Array|radio|remove|text|makeArray|addEventListener|blur|init|autoCreateRanges|no|to|equal|x7f|and|x01|try|x0a|x22|attributeRules|lastActive|classRules|between|port|metadataRules|mode|originalMessage|normalizeRules|x0c|accept|isFunction|x0b|or|the|addClassRules|numberDE|dateDE|stopRequest|startRequest|depend|toLowerCase|nodeName|null|checked|document|errorPlacement|html|generated|map|invalidElements|show|validElements|parent|field|strong|errorContext|findDefined|String|customMessage|parentNode|customMetaMessage|id|lastElement|formatAndAdd|onfocusout|removeAttrs|cancel|assigned|has|disabled|image|blockFocusCleanup|focusCleanup|can|trigger|visible|onfocusin|label|slice|keyup|textarea|file|password|unshift|on|target|removeEventListener|teardown|setup|appendTo|warn|ajaxSettings|valueCache|gif|jpe|png|parseInt|charAt|prototype|Date|NaN|greater|uE000|unchecked|filled|https|x5d|less|x5b|x23|x21|blank|long|expr|x08|hidden|least|at|json|more|dataType|extension|default|with|addMethod|again|524288|x0e|x1f|same|2147483647|class|card|preventDefault|x7e|credit|ftp|boolean|only|getElementsByName|ISO|insertAfter|append|uF8FF|Invalid|wrap|URL|address|defined|No|Warning|This|title|setDefaults|returning|match|unbind|throw|onclick|checking|when|occured|onkeyup|removeAttr|exception|log|continue'.split('|'),0,{}))

/*
 ### jQuery XML to JSON Plugin v1.0 - 2008-07-01 ###
 * http://www.fyneworks.com/ - diego@fyneworks.com
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 ###
 Website: http://www.fyneworks.com/jquery/xml-to-json/
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';5(10.M)(w($){$.N({11:w(j,k){5(!j)t{};w B(d,e){5(!d)t y;6 f=\'\',2=y,E=y;6 g=d.x,12=l(d.O||d.P);6 h=d.v||d.F||\'\';5(d.G){5(d.G.7>0){$.Q(d.G,w(n,a){6 b=a.x,u=l(a.O||a.P);6 c=a.v||a.F||\'\';5(b==8){t}z 5(b==3||b==4||!u){5(c.13(/^\\s+$/)){t};f+=c.H(/^\\s+/,\'\').H(/\\s+$/,\'\')}z{2=2||{};5(2[u]){5(!2[u].7)2[u]=p(2[u]);2[u][2[u].7]=B(a,R);2[u].7=2[u].7}z{2[u]=B(a)}}})}};5(d.I){5(d.I.7>0){E={};2=2||{};$.Q(d.I,w(a,b){6 c=l(b.14),C=b.15;E[c]=C;5(2[c]){5(!2[c].7)2[c]=p(2[c]);2[c][2[c].7]=C;2[c].7=2[c].7}z{2[c]=C}})}};5(2){2=$.N((f!=\'\'?A J(f):{}),2||{});f=(2.v)?(D(2.v)==\'16\'?2.v:[2.v||\'\']).17([f]):f;5(f)2.v=f;f=\'\'};6 i=2||f;5(k){5(f)i={};f=i.v||f||\'\';5(f)i.v=f;5(!e)i=p(i)};t i};6 l=w(s){t J(s||\'\').H(/-/g,"18")};6 m=w(s){t(D s=="19")||J((s&&D s=="K")?s:\'\').1a(/^((-)?([0-9]*)((\\.{0,1})([0-9]+))?$)/)};6 p=w(o){5(!o.7)o=[o];o.7=o.7;t o};5(D j==\'K\')j=$.S(j);5(!j.x)t;5(j.x==3||j.x==4)t j.F;6 q=(j.x==9)?j.1b:j;6 r=B(q,R);j=y;q=y;t r},S:w(a){6 b;T{6 c=($.U.V)?A 1c("1d.1e"):A 1f();c.1g=W}X(e){Y A L("Z 1h 1i 1j 1k 1l")};T{5($.U.V)b=(c.1m(a))?c:W;z b=c.1n(a,"v/1o")}X(e){Y A L("L 1p Z K")};t b}})})(M);',62,88,'||obj|||if|var|length||||||||||||||||||||||return|cnn|text|function|nodeType|null|else|new|parseXML|atv|typeof|att|nodeValue|childNodes|replace|attributes|String|string|Error|jQuery|extend|localName|nodeName|each|true|text2xml|try|browser|msie|false|catch|throw|XML|window|xml2json|nn|match|name|value|object|concat|_|number|test|documentElement|ActiveXObject|Microsoft|XMLDOM|DOMParser|async|Parser|could|not|be|instantiated|loadXML|parseFromString|xml|parsing'.split('|'),0,{}))
