$().ready(function() {
	$("input.label").focus(function() {if ($(this).attr('alt') == $(this).val()) {$(this).val('');}});
	$("input.label").blur(function() {if ($(this).val() == '') {$(this).val($(this).attr('alt'));}});
	$('.focusnow').focus();
	$('a.confirm').click(function() {return confirm($(this).attr('rel'))})
	$('a[rel*=target-blank]').click( function() {
		window.open(this.href);
		return false;
	});
	
	
	$("#newsletter-form #id_email").focus(function() {if ($(this).val() == 'Enter your email') {$(this).val('');}});
	$("#newsletter-form #id_email").blur(function() {if ($(this).val() == '') {$(this).val('Enter your email');}});
	$('#newsletter-form').submit(function() {
		$(this).ajaxSubmit({
			type: 'post', 
			url:'/newsletter/create-subscriber/', 
			success:function(json){
				eval("var r = " + json + ";");
				$('#newsletter-response').html(r.msg);
				if (r.status == 'ok') {
					$('#newsletter-form').hide('slow');
					}
				}
		});
		return false;
	});
	

	if(typeof sIFR == "function"){

		sIFR.replaceElement(named({
			sSelector:".comment-item p.comment", 
			sWmode: 'transparent',
			sFlashSrc:"/site_media/js/sifr/sIFR.swf", 
			sColor:"#000000", 
			sLinkColor:"#434242", 
			sBgColor:"#434242", 
			sHoverColor:"#434242", 
			sFlashVars:"textalign=left&offsetTop=0&tuneHeight=0px"}));
	};
	
	
});

