
$(document).ready(function(){
	
	//// Tweets
	$(".tweet").tweet({
		username: twituser,
		count: twititems,
		template: '<div class="tweet_time">{time}</div><div class="divider2h"></div>{text}<div class="tweet_action">{reply_action}<img src="/img/bullet1.png">{retweet_action}<img src="/img/bullet1.png">{favorite_action}</div>',
		loading_text: "Loading tweets..."/*,
		callback: function(){$('#tweetscont').jScrollPane({verticalDragMinHeight:15,verticalDragMaxHeight:15})}*/
	});
	
	$(".blocklink1").click(function(){
		var link = $(this).find(".noclick").filter(":first").attr("href") || "";
		if(link!=""){document.location.href = link;}
	});
	
	// No default action on click
  $(".noclick").live("click", function(event){
	  event.preventDefault();
	});
  
  
  // No bubbling
  $(".nobubble").click(function(event){
  	event.stopPropagation();
	});

	
});




//////////////////////////////////// HighSlide

hs.graphicsDir = '/inc/highslide/graphics/';
hs.outlineType = 'drop-shadow';
hs.wrapperClassName = 'draggable-header';
hs.showCredits = false;
hs.expandDuration = 0;
hs.restoreDuration = 0;
hs.transitions = ['expand', 'crossfade'];
//hs.dimmingOpacity = 0.7;
hs.dimmingOpacity = 0;
hs.dimmingDuration = 0;

function hsgroupctrls(groupname,showthumbs){
	if(showthumbs == true){
		hs.addSlideshow({
			slideshowGroup: groupname,
			interval: 5000,
			repeat: false,
			useControls: true,
			fixedControls: 'fit',
			overlayOptions: {
				opacity: .75,
				position: 'bottom center',
				hideOnMouseOut: true
			},
				thumbstrip: {
					position: 'above',
					mode: 'horizontal',
					relativeTo: 'expander'
				}
		});
	}else{
		hs.addSlideshow({
			slideshowGroup: groupname,
			interval: 5000,
			repeat: false,
			useControls: true,
			fixedControls: 'fit',
			overlayOptions: {
				opacity: .75,
				position: 'bottom center',
				hideOnMouseOut: true
			}
		});
	}
}

function hsresize() {
   var obj = window.parent.hs;
   if(obj){
   		var exp = obj.getExpander();
   		if (exp) exp.reflow();
   }
}

function re(cels) {
	document.location.href=cels;	
}
