function mycarousel_initCallback(carousel) {
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });

    jQuery('.jcarousel-scroll select').bind('change', function() {
        carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);
        return false;
    });

    jQuery('#mycarousel-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('#mycarousel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
};




jQuery(document).ready(function() {
    jQuery("#box_jobs").jcarousel({
        scroll: 1,
        initCallback: mycarousel_initCallback,
        buttonNextHTML: null,
        buttonPrevHTML: null
    });

	$('.m_top').hide();
	
	$(".m_jobs").click(function() {
	  $("#jobs").addClass("padding");
	  $("#contact").removeClass("padding");	
	  $('.m_top').show('slow');
	});
	
	$(".m_contact").click(function() {
	  $("#contact").addClass("padding");
	  $("#jobs").removeClass("padding");
	  $('.m_top').show('slow');
	});

	$(".m_top").click(function() {
	  $("#contact").removeClass("padding");
	  $("#jobs").removeClass("padding");
	  $('.m_top').hide('slow');
	});
		
	$("a[rel='portfolio']").colorbox({transition:"none", width:"800px", height:"400px"});

	$('.m_blog a[title]').qtip({
			      position: {
			         corner: {
			            target: 'bottomRight',
			            tooltip: 'topRight'
			         }
			      },
			      style: {
			         name: 'cream',
			         padding: '0px 0px',
			         width: {
			            max: 100,
			            min: 0
			         },
			         tip: true
			      }
			   });
	
});

var animate = {
	'time': 500,
	'randMin': 1000,
	'randMax': 1200
};
