SyntaxHighlighter.config.clipboardSwf = '/assets/syntaxhighlighter_2.1.364/scripts/clipboard.swf';
SyntaxHighlighter.all();

/*
DD_roundies.addRule('#mainMenu li a', '8px');
DD_roundies.addRule('.article h2 a', '10px 0');
DD_roundies.addRule('.info', '0 0 10px 10px');
DD_roundies.addRule('.infoArticle', '0 0 10px 10px');
DD_roundies.addRule('.sideItem', '10px 0');
DD_roundies.addRule('.sideItem h3', '10px 0');

DD_roundies.addRule('#comments', '10px');
DD_roundies.addRule('#comments .jot-row', '5px');
DD_roundies.addRule('#comments .jot-row-alt', '5px');

DD_roundies.addRule('.formRow', '5px');
DD_roundies.addRule('.formRowTextarea', '5px');
DD_roundies.addRule('.formRow input', '5px');
DD_roundies.addRule('.formRowTextarea textarea', '5px');

//RSS Icon
DD_roundies.addRule('.rssWrp', '10%');
DD_roundies.addRule('.rssDot', '100%');
DD_roundies.addRule('.firstLineOut', '200%');
DD_roundies.addRule('.firstLineIn', '200%');
DD_roundies.addRule('.secondLineOut', '200%');
DD_roundies.addRule('.secondLineIn', '200%');
*/

//RSS Icon
DD_roundies.addRule('.rssWrp', '10%');
DD_roundies.addRule('.rssDot', '100%');
DD_roundies.addRule('.firstLineOut', '200%');
DD_roundies.addRule('.firstLineIn', '200%');
DD_roundies.addRule('.secondLineOut', '200%');
DD_roundies.addRule('.secondLineIn', '200%');


$(document).ready(function() {
   
	//setTimeout(function() { $('#rssIcon').animate({top: '-=60'})}, 3000);

	
	/*icon change*/
	/*
	$('#rssIcon').hover(
		function () {
			$(this).animate({top: '+=60'});
		},
		function () {
			$(this).animate({top: '-=60'});
		}
	);
	*/
	/*side item hover highlight*/
	$('.sideItem').hover(
		function () {
			$(this).find('span').addClass('higlightText');
		},
		function () {
			$(this).find('span').removeClass('higlightText');
		}
	);
	
	
	
	/*contact form*/

	$('.formRow input').each(function(){
		
		val = $(this).val();
		$(this).attr("value2",val);
		
	});
	
	$('.formRowTextarea textarea').each(function(){
		
		val = $(this).text();
		$(this).attr("value2",val);
		
	});
	
	
	$('.formRow input').click(function(){
		
		if($(this).attr('value') == $(this).attr('value2')){
			$(this).attr('value','');
		}
		
		idx = $('.formRow input').index(this);
		
		$('.formRow input').each(function(){
			if(idx != $('.formRow input').index(this)){
				if($(this).attr('value') == ''){
					$(this).attr('value', $(this).attr('value2'));
				}
			}
		});	
		
		if($('.formRowTextarea textarea').val() == ''){
			$('.formRowTextarea textarea').val( $('.formRowTextarea textarea').attr('value2') );
		}
	});
	
	$('.formRowTextarea textarea').click(function(){
		if($(this).val() == $(this).attr('value2')){
			$(this).val('');
		}
		
		$('.formRow input').each(function(){
			if($(this).attr('value') == ''){
				$(this).attr('value', $(this).attr('value2'));
			}	
		});
	});
	
	$('.formRowTextarea textarea').focus(function(){
		if($(this).val() == $(this).attr('value2')){
			$(this).val('');
		}
	});
	
	
	//equal height for footer
	equalHeight($('.col'));

});



/*Each article need it's own javascript*/
$(document).ready(function () {
    $('h3.question').click(function() {
        $(this).next().slideToggle();
    }).next().hide();
});



function equalHeight(group) {
    var tallest = 0;
    group.each(function() {
        var thisHeight = $(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}

