/*
 * josdesign.at Funktionen (diverse)
 *
 * Copyright (c) 2009 Josef Florian Glatz
 *
 * $ "Keine Konflikte mit anderen Libraries"
 * - Anfahrtsplan INPUT Anpassung
 * - Routenergebniss Styleanpassung A/B (Funktioniert noch nicht!)
 * - NEWS_LATEST itemSmall "." anfügen
 * - NEWS_LATEST Abschneiden von itemSmall subheader
 * - NEWS_LATEST Abschneiden von itemBig
 * - #media Cycle-Fading (emo-picture)
 * - #menu2 ul li a img PULSating Image Untermenü
 **/

	/* --$ Conflictmode */
// jQuery.noConflict();

$(document).ready(function(){



	$('input#fromAddress[type="text"]').focus(function() {
		if(this.value == this.defaultValue){
			this.value = '';
		}
		if(this.value != this.defaultValue){
			this.select();
		}
	});
	
	$('input#fromAddress[type="text"]').blur(function() {
		if ($.trim(this.value == '')){
		this.value = (this.defaultValue ? this.defaultValue : '');
		}
	});
	
	$('div[jsselect=Placemark] table').attr('style', 'margin-top:30px;margin-left:5px;');
	
	$('div.itemSmall a h2').append(".&nbsp;");
	
	$("#uid43 .itemSmall div.subheader").truncate( 120,{
		chars: /\s/,
		trail: [ " ( <a href='#' class='truncate_show' title='Vorschau vergrößern'>...</a> )", "" ]
	});
	
	$("#uid43 .tt_news_list .subheader .bodytext").truncate( 240,{
		chars: /\s/,
		trail: [ " ( <a href='#' class='truncate_show' title='Vorschau vergrößern'>...</a> )", "" ]
	});
	
	$("#uid43 .itemBig .subheader").truncate( 216 );
	
	/*
	$('#col1 ul.tt_news_teaser li a').widthTruncate();
	*/
	
	$('#media').cycle({ 
		fx:    'fade'
	});
	
	$('#menu2 ul li a img').effect("pulsate", { times:100 }, 2000);
	
});
