jQuery(document).ready(function($){
	$('#header h4').wrapInner('<span class="translucentSpan"/>').find('br');
	$('#innerPageSidebar .widget li:first-child').addClass('first');
	$('hr').wrap('<div class="hrReplacement"/>');
	
	Cufon.replace($('#header h4 .translucentSpan'), { 
		fontFamily: 'DIN-MediumAlternate'
 	});
 	Cufon.replace($('#identity h4'), { 
		fontFamily: 'DIN-MediumAlternate',
		textShadow: '#f3f3f3 0px 1px 1px'
 	});
 	$('#innerPageSidebar .widget_meta a[title*=RSS]').wrapInner('<span/>').parent().addClass('rss');
 	
 	
 	
 	if(typeof(videoType)!=='undefined'){
	 	if(videoType==='vimeo'){
		 	var videoCode = '<object width="505" height="284">'+
				'<param name="allowfullscreen" value="true" />'+
				'<param name="allowscriptaccess" value="always" />'+
				'<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='+videoID+'&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=c9ff23&amp;fullscreen=1" />'+
				'<embed src="http://vimeo.com/moogaloop.swf?clip_id='+videoID+'&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=c9ff23&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="505" height="284"></embed>'+
			'</object>';
		} else {
			var videoCode = '<object width="505" height="284">'+
				'<param name="movie" value="http://www.youtube.com/v/'+videoID+'&amp;hl=en&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999"/>'+
				'<param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"/>'+
				'<embed src="http://www.youtube.com/v/'+videoID+'&amp;hl=en&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="505" height="284"></embed>'+
			'</object>';
		}
		$('#homePagePlayer').html(videoCode);
	}
});



addComment = {
	moveForm: function (d, f, i, c) {
		var m = this,
		a, h = m.I(d),
		b = m.I(i),
		l = m.I("cancel-comment-reply-link"),
		j = m.I("comment_parent"),
		k = m.I("comment_post_ID");
		if (!h || !b || !l || !j) {
			return
		}
		m.respondId = i;
		c = c || false;
		if (!m.I("wp-temp-form-div")) {
			a = document.createElement("div");
			a.id = "wp-temp-form-div";
			a.style.display = "none";
			b.parentNode.insertBefore(a, b)
		}
		h.parentNode.insertBefore(b, h.nextSibling);
		if (k && c) {
			k.value = c
		}
		j.value = f;
		l.style.display = "";
		l.onclick = function () {
			var n = addComment,
			e = n.I("wp-temp-form-div"),
			o = n.I(n.respondId);
			if (!e || !o) {
				return
			}
			n.I("comment_parent").value = "0";
			e.parentNode.insertBefore(o, e);
			e.parentNode.removeChild(e);
			this.style.display = "none";
			this.onclick = null;
			return false
		};
		try {
			m.I("comment").focus()
		} catch(g) {}
		return false
	},
	I: function (a) {
		return document.getElementById(a)
	}
};