(function($){
var height = $.fn.height,
    width  = $.fn.width;

$.fn.extend({
	height: function() {
		if (!this[0]) error();
		if ( this[0] == window )
			if ( ($.browser.mozilla || $.browser.opera) && $(document).width() > self.innerWidth)
				return self.innerHeight - getScrollbarWidth();
			else
				return self.innerHeight ||
					$.boxModel && document.documentElement.clientHeight || 
					document.body.clientHeight;
		
		if ( this[0] == document )
			return Math.max( document.body.scrollHeight, document.body.offsetHeight );
		
		return height.apply(this, arguments);
	},

	width: function() {
		if (!this[0]) error();
		if ( this[0] == window )
			if (($.browser.mozilla || $.browser.opera) && $(document).height() > self.innerHeight)
				return self.innerWidth - getScrollbarWidth();
			else
				return self.innerWidth ||
					$.boxModel && document.documentElement.clientWidth ||
					document.body.clientWidth;

		if ( this[0] == document )
			if ($.browser.mozilla) {
				var scrollLeft = self.pageXOffset;
				self.scrollTo(99999999, self.pageYOffset);
				var scrollWidth = self.pageXOffset;
				self.scrollTo(scrollLeft, self.pageYOffset);
				return document.body.offsetWidth + scrollWidth;
			}
			else 
				return Math.max( document.body.scrollWidth, document.body.offsetWidth );

		return width.apply(this, arguments);
	},

	innerHeight: function() {
		if (!this[0]) error();
		return this[0] == window || this[0] == document ?
			this.height() :
			this.is(':visible') ?
				this[0].offsetHeight - num(this, 'borderTopWidth') - num(this, 'borderBottomWidth') :
				this.height() + num(this, 'paddingTop') + num(this, 'paddingBottom');
	},
	
	innerWidth: function() {
		if (!this[0]) error();
		return this[0] == window || this[0] == document ?
			this.width() :
			this.is(':visible') ?
				this[0].offsetWidth - num(this, 'borderLeftWidth') - num(this, 'borderRightWidth') :
				this.width() + num(this, 'paddingLeft') + num(this, 'paddingRight');
	},

	outerHeight: function(options) {
		if (!this[0]) error();
		options = $.extend({ margin: false }, options || {});
		return this[0] == window || this[0] == document ?
			this.height() :
			this.is(':visible') ?
				this[0].offsetHeight + (options.margin ? (num(this, 'marginTop') + num(this, 'marginBottom')) : 0) :
				this.height() 
					+ num(this,'borderTopWidth') + num(this, 'borderBottomWidth') 
					+ num(this, 'paddingTop') + num(this, 'paddingBottom')
					+ (options.margin ? (num(this, 'marginTop') + num(this, 'marginBottom')) : 0);
	},

	outerWidth: function(options) {
		if (!this[0]) error();
		options = $.extend({ margin: false }, options || {});
		return this[0] == window || this[0] == document ?
			this.width() :
			this.is(':visible') ?
				this[0].offsetWidth + (options.margin ? (num(this, 'marginLeft') + num(this, 'marginRight')) : 0) :
				this.width() 
					+ num(this, 'borderLeftWidth') + num(this, 'borderRightWidth') 
					+ num(this, 'paddingLeft') + num(this, 'paddingRight')
					+ (options.margin ? (num(this, 'marginLeft') + num(this, 'marginRight')) : 0);
	},
	scrollLeft: function(val) {
		if (!this[0]) error();
		if ( val != undefined )
			return this.each(function() {
				if (this == window || this == document)
					window.scrollTo( val, $(window).scrollTop() );
				else
					this.scrollLeft = val;
			});
		if ( this[0] == window || this[0] == document )
			return self.pageXOffset ||
				$.boxModel && document.documentElement.scrollLeft ||
				document.body.scrollLeft;
				
		return this[0].scrollLeft;
	},

	scrollTop: function(val) {
		if (!this[0]) error();
		if ( val != undefined )
			return this.each(function() {
				if (this == window || this == document)
					window.scrollTo( $(window).scrollLeft(), val );
				else
					this.scrollTop = val;
			});
		if ( this[0] == window || this[0] == document )
			return self.pageYOffset ||
				$.boxModel && document.documentElement.scrollTop ||
				document.body.scrollTop;

		return this[0].scrollTop;
	},
	position: function(returnObject) {
		return this.offset({ margin: false, scroll: false, relativeTo: this.offsetParent() }, returnObject);
	}
});

var error = function() { throw "Dimensions: jQuery collection is empty"; };
var num = function(el, prop) { return parseInt($.css(el.jquery?el[0]:el,prop))||0; };
var handleOffsetReturn = function(elem, options, x, y, sl, st) {
	if ( !options.margin ) {
		x -= num(elem, 'marginLeft');
		y -= num(elem, 'marginTop');
	}

	if ( options.border && (($.browser.safari && parseInt($.browser.version) < 520) || $.browser.opera) ) {
		x += num(elem, 'borderLeftWidth');
		y += num(elem, 'borderTopWidth');
	} else if ( !options.border && !(($.browser.safari && parseInt($.browser.version) < 520) || $.browser.opera) ) {
		x -= num(elem, 'borderLeftWidth');
		y -= num(elem, 'borderTopWidth');
	}

	if ( options.padding ) {
		x += num(elem, 'paddingLeft');
		y += num(elem, 'paddingTop');
	}
	
	if ( options.scroll && (!$.browser.opera || elem.offsetLeft != elem.scrollLeft && elem.offsetTop != elem.scrollLeft) ) {
		sl -= elem.scrollLeft;
		st -= elem.scrollTop;
	}

	return options.scroll ? { top: y - st, left: x - sl, scrollTop:  st, scrollLeft: sl }
	                      : { top: y, left: x };
};
var scrollbarWidth = 0;
var getScrollbarWidth = function() {
	if (!scrollbarWidth) {
		var testEl = $('<div>')
				.css({
					width: 100,
					height: 100,
					overflow: 'auto',
					position: 'absolute',
					top: -1000,
					left: -1000
				})
				.appendTo('body');
		scrollbarWidth = 100 - testEl
			.append('<div>')
			.find('div')
				.css({
					width: '100%',
					height: 200
				})
				.width();
		testEl.remove();
	}
	return scrollbarWidth;
};

})(jQuery);











var FLBanner = new Object();

FLBanner.init = function( ) { };

FLBanner.init.prototype = {
	intRand: function( startInt ) {
		if ( !arguments[1] )	var stopInt = startInt;
		else					var stopInt = arguments[1];
		while ( true ) {
			var rand = Math.round( Math.random() * ( stopInt + 1 ) );
			if ( ( rand >= startInt ) && ( rand <= stopInt ) ) return rand;
		}
	},
	
	AddEvent : function ( element, event, codeToAdd ) {
		var EventCode;
		var NewEvent;
		
		try {
			EventCode = eval ( 'element.'+event+'.toString();' );
			EventCode = EventCode.substring( EventCode.indexOf( "{" ) + 1, EventCode.lastIndexOf("}") );
			NewEvent = new Function( EventCode + " " + codeToAdd );
			eval( 'element.'+event+' = NewEvent;' );
		} catch ( err ) {
			eval( 'element.'+event+' = function(){' + codeToAdd + '}' );
		}
	},
	
	createBottomSLider : function ( id, GROUP ) {
		var HTMLcode = 
			'<div class="FlyingLiners" id="'+id+'" style="position: absolute; left: 10px; top: 0px;">' +
				'<div class="title">'+GROUP.text.title+'</div>' +
				'<div class="text">'+GROUP.text.downText+'<a href="'+GROUP.link+'" rel="nofollow">'+GROUP.text.linkText+'</a>'+GROUP.pixel+'</div>' + 
				'<div class="eventer" style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;">' + 
					'<a href="'+GROUP.link+'" rel="nofollow" target="_blank" style="display: block; width: 100%; height: 100%;">&nbsp;</a>' + 
				'</div>' + 
			'</div>';
			
		$(document.body).append( HTMLcode );
	},



	createBottomSlider4_Default : function( GROUP ) {
		var BACKGROUNDS = { 0: 'green.gif', 1: 'orange.gif', 2: 'blue.gif', 3: 'violet.gif' };
		var intWidth = Math.round( document.body.scrollWidth / 4 );
		
		for ( var i = 0; i < 4; i++ ) {
			var id = 'FlyBanner'+this.intRand( 1000, 9999 );
			this.createBottomSLider( id, GROUP[i+1] );
			
			var banner = $('#'+id);
			
			banner
				.css({
					border		: '0px solid #777777',
					background	: 'url("http://flyingliners.com/img_fleecyclouds/lines_colored/'+BACKGROUNDS[i]+'") no-repeat top left',
					width		: '200px',
					left		: i*intWidth + 'px'
				})
				.find( '.title' )
					.css({
						height		: '24px',
						border		: 'none',
						background	: 'none',
						lineHeight	: '24px',
						color		: 'white',
						fontFamily	: 'tahoma',
						fontWeight	: 'bolder',
						fontSize	: '11px',
						padding		: '0px 5px',
						textAlign	: 'center'
					}).end()
				.find( '.text' )
					.css({
						height		: '93px',
						border		: 'none',
						background	: 'none',
						display		: 'none',
						color		: 'black',
						fontFamily	: 'tahoma',
						fontSize	: '11px',
						padding		: '7px'
					}).end()
				.find('.eventer a')
					.css({
						border		: '0px solid #555599',
						background	: '#eeeeff',
						opacity		: '0.0',
						filter		: 'alpha(opacity=1)',
						padding		: '0px',
						margin		: '0px',
						border		: 'none',
						textDecoration: 'none'
					});
		}
		
		$('div.FlyingLiners').each( function() {
			var flyItem = this;
			var _top = 
				parseInt( document.body.clientHeight, 10 ) - 
				parseInt( $(flyItem).outerHeight() ) + 
				parseInt( document.body.scrollTop );
				
			$(flyItem)
				.css( 'top', _top )
				.find( '.eventer' )
					.css( 'height', $(flyItem).outerHeight() )
					.hover(
						function() {
							$(flyItem).find('.text').show();
							
							var _top = parseInt( document.body.clientHeight, 10 ) - 
									   parseInt( $(flyItem).outerHeight() ) + 
									   parseInt( document.body.scrollTop );
							$(flyItem)
								.css( 'top', _top )
								.find('.eventer')
									.css( 'height', $(flyItem).outerHeight() );
						},
						function() {
							$(flyItem).find('.text').hide();
							
							var _top = parseInt( document.body.clientHeight, 10 ) - 
									   parseInt( $(flyItem).outerHeight() ) + 
									   parseInt( document.body.scrollTop );
							$(flyItem)
								.css( 'top', _top )
								.find('.eventer')
									.css( 'height', $(flyItem).outerHeight() );
						}
					);
		});
		
		var ScrollResizeCode = 
		"	$('div.FlyingLiners').each( function() { "+
		"		var _top = parseInt( document.body.clientHeight, 10 ) - "+
		"				   parseInt( $(this).outerHeight() ) + "+
		"				   parseInt( document.body.scrollTop ) + 'px'; "+
		"		$(this).css( 'top', _top );  "+
		"	}); ";
		
		eval( ScrollResizeCode );
		this.AddEvent( document.body, 'onscroll', ScrollResizeCode );
		this.AddEvent( window, 'onscroll', ScrollResizeCode );
		this.AddEvent( document.body, 'onresize', ScrollResizeCode );
		this.AddEvent( window, 'onscroll', ScrollResizeCode );
	}
}

var textGroups = {
	CHRISTIAN: {
		text: '<b>Christian Home Based Business</b>',
		linkText: 'See it...',
		downText: 'Christian Home Based Business Use your God-given talents and experience to do something extraordinary for yourself, your family, and your financial future',
		linkInText: 'Click here to get information'
	},
	SDE: {
		text: '<b>Can U Type?</b>',
		linkText: 'See it...',
		downText: 'Simple Data Entry Work Up to <b>$127/day</b>, 147 people needed  <br/><br/>',
		linkInText: 'Click here to get information'
	},
	EHPT: {
		text: '<b>Earn at Home Part Time</b>',
		linkText: 'See it...',
		downText: 'You don\'t have to be an executive to make up to <b>$10,000</b> a month! <br/><br/>',
		linkInText: 'Click here to get information'
	},
	WDT: {
		text: '<b>Your Womens DreamTeam</b>',
		linkText: 'See it...',
		downText: 'Stay-at-Home Moms, make some extra money! <br/><br/>',
		linkInText: 'Click here to get information'
	}	
}

var linksGroups = {
	CHRISTIAN: {DOWN4: 'http://gmbeasypass.com/track.asp?a=390&o=56&c=1&l=27'},
	SDE:	{DOWN4: 'http://gmbdirectroute.com/track.asp?a=390&o=24&c=11&l=3'},
	EHPT:	{DOWN4: 'http://gmbfastpath.com/track.asp?a=390&o=43&c=10&l=6'},
	WDT:	{DOWN4: 'http://gmbdirectroute.com/track.asp?a=390&o=54&c=1&l=1'}
};
	

var pixelGroups = {
	CHRISTIAN: {DOWN4: '<img src="http://www.gmbtrack.com/tracki.asp?a=390&o=56&c=1&l=27" width="1" height="1" border="0">'},
	SDE:	{DOWN4: ''},
	EHPT:	{DOWN4: ''},
	WDT:	{DOWN4: ''} 
};



$(document).ready( function() {
	var FlyLinersObject = new FLBanner.init( );
	var GROUP = { 
		1 : { // Christian
			text : {
				title: '<b>Christian Home Based Business</b>',
				linkText: 'See it...',
				downText: 'Christian Home Based Business Use your God-given talents and experience to do something extraordinary for yourself, your family, and your financial future<br><br>',
				linkInText: 'Click here to get information'
			},
			link : 'http://gmbeasypass.com/track.asp?a=390&o=56&c=1&l=27',
			pixel : '<img src="http://www.gmbtrack.com/tracki.asp?a=390&o=56&c=1&l=31" width="1" height="1" border="0">'
		}, 
		2 : { // SDE
			text : {
				title: '<b>Can U Type?</b>',
				linkText: 'See it...',
				downText: 'Simple Data Entry Work Up to <b>$127/day</b>, 147 people needed  <br/><br/>',
				linkInText: 'Click here to get information'
			},
			link : 'http://gmbdirectroute.com/track.asp?a=390&o=24&c=11&l=3',
			pixel: ''
		}, 
		3 : { // scam
			text : {
				title: '<b>Beware&nbsp;of&nbsp;At&nbsp;Home&nbsp;Jobs</b>',
				linkText: 'See it...',
				downText: '98.3%&nbsp;Make&nbsp;Money&nbsp;Sites&nbsp;<br>Are&nbsp;Scams.&nbsp;<br/><br/>Learn&nbsp;3&nbsp;Tested&nbsp;Ways <br/>to <b>Make&nbsp;Money</b>.<br/><br/>',
				linkInText: 'Click here to get information'
			},
			link : 'http://gmbyourchance.com/track.asp?a=390&o=131&c=8&l=1',
			pixel : ''
		},
		4 : { // ehpt
			text : {
				title: '<b>Earn at Home Part Time</b>',
				linkText: 'See it...',
				downText: 'You don\'t have to be an executive to make up to <b>$10,000</b> a month! <br/><br/>',
				linkInText: 'Click here to get information'
			},
			link : 'http://gmbfastpath.com/track.asp?a=390&o=43&c=10&l=6',
			pixel : ''
		}
	}

	FlyLinersObject.createBottomSlider4_Default( GROUP );
});