//** Site Logo/ Watermark Script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
//** Available/ usage terms at http://www.dynamicdrive.com
//** v2.0 (April 19th, 09')


var ddsitelogo={
	setting: {orientation:3, visibleduration:20000, fadeduration:[1000, 500]}, //orientation=1|2|3|4, duration=millisec or 0, fadedurations=millisecs
	offsets: {x:10, y:10},//offset of logo relative to window corner
	logoHTML: '<a title="Click here for the WeddingChannel.com Reviews" href="http://local.weddingchannel.com/Wedding-Vendors/weddingchannel/views/details/vendorprofileview.aspx?&ProfileId=203826&MsdVisit=1" target="_blank"><img alt="AAA Award Winning - WeddingChannel.com Reviews" style="border: 0;" width="175px" height="175px" src="http://www.aaaphoto.net/sideimages/knot.jpg" /></a><br /><br /><a title="Click here for Fox 45 Wedding in a Week" href="http://www.foxbaltimore.com/sections/contests/wedding/" target="_blank"><img alt="AAA Award Winning - Fox 45 Wedding in a Week" style="border: 0;" width="175px" height="200px" src="http://www.aaaphoto.net/sideimages/fox45.jpg" /></a><br /><br /><a title="Click here for a Business Review of AAA Photo" href="http://www.bbb.org/greater-maryland/business-reviews/photographers-portrait/aaa-award-winning-photography-in-baltimore-md-24010086#sealclick" target="_blank"><img alt="AAA Award Winning Photography is a BBB Accredited Business. Click for the BBB Business Review of this Photographers" style="border: 0;" src="http://seal-greatermd.bbb.org/seals/blue-seal-250-52-aaaawardwinningphotography-24010086.png" /></a><br /><br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Faaaphoto.net%2F" scrolling="no" frameborder="0" style="height: 62px; width: 100%" allowTransparency="true"></iframe>', //HTML for logo, which is auto wrapped in DIV w/ ID="mysitelogo"

	coord: {},

	keepfixed:function(){
		if (!this.cssfixedsupport){
			var $window=jQuery(window)
			var is1or3=/^[13]$/.test(this.setting.orientation)
			var is1or2=/^[12]$/.test(this.setting.orientation)
			var x=$window.scrollLeft() + (is1or3? this.offsets.x : $window.width()-this.$control.width()-this.offsets.x)
			var y=$window.scrollTop() + (is1or2? this.offsets.y : $window.height()-this.$control.height()-this.offsets.y)
			this.$control.css({left:x+'px', top:y+'px'})
		}
	},

	showlogo:function(){
		var mainobj=ddsitelogo
		this.$control.animate({opacity:1}, this.setting.fadeduration[0])
		if (this.setting.visibleduration>0){
			setTimeout(function(){
				mainobj.$control.stop().animate({opacity:0}, mainobj.setting.fadeduration[1], function(){
					jQuery(window).unbind('scroll.fixed resize.fixed')
				})
			}, this.setting.visibleduration+this.setting.fadeduration[0])
		}
	},
	
	init:function(){
		jQuery(document).ready(function($){
			var mainobj=ddsitelogo
			var iebrws=document.all
			mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode
			if (mainobj.cssfixedsupport){
				mainobj.coord[(/^[13]$/.test(mainobj.setting.orientation))? 'left' : 'right']=mainobj.offsets.x
				mainobj.coord[(/^[12]$/.test(mainobj.setting.orientation))? 'top' : 'bottom']=mainobj.offsets.y
			}
			mainobj.$control=$('<div id="mysitelogo" style="z-index:2;">'+mainobj.logoHTML+'</div>')
				.css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', opacity:0})
				.css(mainobj.coord)
				.appendTo('body')
			if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text
				mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text
			mainobj.keepfixed()
			mainobj.showlogo()
			$(window).bind('scroll.fixed resize.fixed', function(){mainobj.keepfixed()})
		})
	}
}

ddsitelogo.init()

