jQuery.noConflict();

jQuery(function($) {
	//input hint
	if($('input')[0]){
		$('input').hint();
	}
	
	//main menu first/last items
	$('ul#mainMenu li:first a').addClass('firstItem');
	$('ul#mainMenu li:last a').addClass('lastItem');
	
	//front boxes
	$('#frontBoxes .frontBox:first, #frontBoxes .frontBox:last').addClass('highBox');
	
	//front boxes sliders
	if($('#vacancies')[0]){
		$('#vacancies').cycle({
			fx:     'scrollVert',
			timeout: 6000, 
			delay:  -2000,
			next:   '#next1',
    		prev:   '#prev1',
    		rev:	'1',
			cleartypeNoBg: true
		});
	}
	
	if($('#spotlight')[0]){
		$('#spotlight').cycle({
			fx:     'scrollVert',
			timeout: 6000, 
			delay:  -2000,
			next:   '#next2',
    		prev:   '#prev2',
    		rev:	'1',
			cleartypeNoBg: true
		});
	}
	
	var $table = $('#vacanciesList');
	
	//table zebra
	$('tr:odd', $table).addClass('odd');
	
	//table line hover
	$('tr', $table).hover(
		function () {
			$(this).addClass("over");
		},
		function () {
			$(this).removeClass("over");
		}
	).click(function(){
		var href = $('a', this).attr('href');
		document.location.href = href;
	});
	
	//table rounded corners
	$table.append('<div class="lt"></div><div class="rt"></div><div class="rb"></div><div class="lb"></div>');
	
	
	//Homepage list
	var $vacancies = $('#vacancies');
	
	//left box overlay link
	var leftBoxHeight = $('.contactBoxContainer').height();
	$('.contactBoxContainer').children('a.leftBoxLink').css({"height": leftBoxHeight - 15});
	
	var specialBoxHeight = $('.specialBox').height();
	$('.specialBox').children('a.leftBoxLink').css({"height": specialBoxHeight});
	
	$(".contactBoxContainer, .specialBox").hover(
	  function () {
		$(this).addClass("overThis");
	  },
	  function () {
		$(this).removeClass("overThis");
	  }
	);
	
});
