var J	=	jQuery.noConflict();
J(function(){
        var $tabmenus = J(".tabs").find("div");
        $tabmenus.mouseover(function(e){
                        if (J(this).is('.tab-selected')){
                                return false;
                        }
                        var src="";
                        src=J(this).find("img").attr("rel")+"_over.jpg";
                        J(this).find("img").attr("src",src);
                        J(this).animate({ top: "0px" }, 200);
        });

        $tabmenus.mouseout(function(e){
                        if (J(this).is('.tab-selected')){
                                return false;
                        }
                        var src="";
                        src=J(this).find("img").attr("rel")+".jpg";
                        J(this).find("img").attr("src",src);
                        J(this).animate({ top: "10px" }, 200);
        });

        $tabmenus.click(function(){
        });
        createHeaderTip('gray');
});
function createHeaderTip(color){
		J.fn.qtip.styles.mystyle = { // Last part is the name of the style
		   width:{ min: 150 },
		   background: 'white',
		   color: 'gray',
		   textAlign: 'center',
		   border: {
			  width: 2,
			  radius: 5,
			  color: color
		   },
		   tip: 'topRight',
		   name: 'light'  //Inherit the rest of the attributes from the preset dark style
		}
		J("#track_order").qtip({
			content: 'Coming Soon ...',
			show: 'mouseover',
			hide: 'mouseout',
			style: 'mystyle',
			position: { adjust: { x: -168, y: 0 } }
		});
		J("#connectED").qtip({
			content: 'Your complete portal for classroom management',
			show: 'mouseover',
			hide: 'mouseout',
			style: 'mystyle',
			position: { adjust: { x: -300, y: 0 } }
			/*api:{
				onShow: function(){
					J(content).css({'color':'red', 'font-family':'arial', 'font-weight' : 'bold'})
				}
			}*/
		});
                J("#twitter").qtip({
			content: 'Follow us on Twitter',
			show: 'mouseover',
			hide: 'mouseout',
			style: 'mystyle',
			position: { adjust: { x: -165, y: 0 } }
		});
		J("#facebook").qtip({
			content: 'Be our fan on Facebook',
			show: 'mouseover',
			hide: 'mouseout',
			style: 'mystyle',
			position: { adjust: { x: -168, y: 0 } }
		});
		J("#youtube").qtip({
			content: 'See our clips on YouTube',
			show: 'mouseover',
			hide: 'mouseout',
			style: 'mystyle',
			position: { adjust: { x: -190, y: 0 } }
		});
		
}

function state_programs(baseurl){
var target	=	baseurl+"state/get_state";
var state	=	J("#state_prg").val().toLowerCase();

	J.ajax({
			type: "POST",
			url: target,
			data: {
					state: state
				  },
					success: function(msg){//alert(msg);
					J("#state_flag_name").html(msg);
					var status = location.href.search(/program/i);
					if(status>0){
						window.location.reload();
					}
			}

		});
}
