<!--
$(document).ready(function(){


$("label")
	.hover(function(e){
		$("#"+$(this).attr('for')+"").addClass("hover")
	},function(){
		$("#"+$(this).attr('for')+"").removeClass("hover")
})


$(".close")
	.click(function(){
		$(this).closest("div").fadeOut("fast")
		return false;	
	})


$(".dropdown").click(function(){
	$(this).children("ul").show();
})


function select_all(obj) {
	var text_val=eval(obj);text_val.focus();text_val.select();
	if (!document.all) return; // IE only
	r = text_val.createTextRange();
	r.execCommand("copy");
}

$('.autoSelect').click(function() {
	select_all(this)
});


$(".modalsharebig").colorbox({
	// styles
	opacity:.5,
	speed:50,
	overlayClose:false,
	innerWidth:"500px",
	innerHeight:"630px",
	initialWidth:"500px",
	initialHeight:"630px",
	// link
	//open:true,
	iframe:true,
	//href:"form_owner.html",
	//title:"Share"
	onClosed:function(){
		window.location = window.location.toString().substr(0,window.location.toString().length-window.location.hash.toString().length)
	}
});







/* all your jobs page */
$("#jobs li")
	.hover(function(e){
			if($(this).children("a:first-child").text().length>=50){
				var after = "...";
			}
			else{
				var after = "";
			}

		$(this).children("a:first-child")
			.attr("alt",$(this).children("a:first-child").text())
			.text($(this).children("a:first-child").text().substr(0,50)+""+after)
	},function(){
		$(this).children("a:first-child")
			.text($(this).children("a:first-child").attr("alt"))		
})





/* single job view page */

$("#copyURL").hide();


$(".copyURL")
	.click(function(){
		$("#copyURL").show();
	})



/* widgets page */

$("input[name='widgetSize']:radio").change(function() {
	$("#shareWidgetSample").attr("src","/img/sharewidget-embed-"+$(this).val()+".png");
});





/* TIP MY TOOL! */


$("*[title]")
	.hover(function(e){
		var offset = $(this).offset();
		this.t = this.title;
		this.title = "";
		$("#tooltip").remove();
		$("body").append("<div id='tooltip'>"+this.t+"</div>");

		var center = ($(this).outerWidth() - $("#tooltip").outerWidth())/2;
		var left = 0;
		var right = ($(this).outerWidth() - $("#tooltip").outerWidth());


		if(offset.left < $("#tooltip").outerWidth()/2){
			align = left;
		}

		else{
			align = center;
		}
		

		$("#tooltip")
			.css("top",(offset.top - $("#tooltip").outerHeight() - 15) + "px")
			.css("left",(offset.left + align) + "px")
			.css("opacity","0")
			.animate({
				opacity: .9,
				top: '+=10'
			}, 200);
	},function(){
		this.title = this.t;
		this.t = "";
		$("#tooltip")
			.animate({
				opacity: 0,
				top: '-=10'
			}, 100, function(){$(this).remove();});
})





});
-->

