jQuery(function($) {
				
/*

$('#image-trans').coinslider({
	width: 960, // width of slider panel
	height: 320, // height of slider panel
	spw: 7, // squares per width
	sph: 5, // squares per height
	delay: 3000, // delay between images in ms
	sDelay: 30, // delay beetwen squares in ms
	opacity: 0.7, // opacity of title and navigation
	titleSpeed: 500, // speed of title appereance in ms
	effect: '', // random, swirl, rain, straight
	navigation: false, // prev next and buttons
	hoverPause: true // pause on hover							 
});

*/

if($('.ie8').length > 0)
{
	$('body').css('background' ,'url(../images/bg.gif) repeat-x center top');
}

$(".read-more-btn").each(function(i) {

		$(this).toggle(function() {
			$(".expand").eq(i).slideDown(500);
			$(".read-more-btn").eq(i).text("...read less");

		},function() {
			$(".expand").eq(i).slideUp(500);
			$(".read-more-btn").eq(i).text("Read more...");
		});

});

$(".job-menu-btn").each(function(i) {

		$(this).toggle(function() {
			$(".job-menu-contents").eq(i).slideDown(500);

		},function() {
			$(".job-menu-contents").eq(i).slideUp(500);
		});

});


	$(".digest-more-link").toggle(
	function(e) {
		e.preventDefault();
		$('.digest-item').animate({height : '350px'});
		$(".digest-more-link").html('Digest Less');
		$(".digest-more-link").addClass('active');

	}, 
	function(e)
	{
		e.preventDefault();
		$('.digest-item').animate({height : '240px'});
		$(".digest-more-link").html('Digest More');
		$(".digest-more-link").removeClass('active');

	});	
	
	//clear searchfield
	$('#search-entry').click(function () {
		if ($(this).val() == 'Search...') {$(this).val('');} else {$(this).select();}
	});
	
	//back to top
	$(window).scroll(function() {
		if($(this).scrollTop() != 0) {
			$('#toTop').fadeIn();	
		} else {
			$('#toTop').fadeOut();
		}
	});
 
	$('#toTop').click(function() {
		$('body,html').animate({scrollTop:0},800);
	});
	
	//blog sidebar list animate
	$('.widget-container li a').hover(function() { //mouse in
		$(this).stop().animate({ paddingLeft: '20px' }, 400);
	  }, function() { //mouse out
		$(this).stop().animate({ paddingLeft: 0 }, 400);
  	});
	

	
	

	
});//end jquery

$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
});
