$(".scroll").live("click", function(event){
	//prevent the default action for the click event
	event.preventDefault();
	
	//get the full url - like mysitecom/index.htm#home
	var full_url = this.href;
	
	//split the url by # and get the anchor target name - home in mysitecom/index.htm#home
	var parts = full_url.split("#");
	var trgt = parts[1];
	
	//get the top offset of the target anchor
	var target_offset = $("#"+trgt).offset();
	var target_top = target_offset.top;
	
	//goto that anchor by setting the body scroll top to anchor top
	$('html, body').animate({scrollTop:target_top}, 500);
});


$(document).ready(function(){	
$(".slider").easySlider();

 	
$("#program div ").click(function(){
		$('.selected').removeClass('selected');
		var classul = $(this).attr('class');
		classul =  classul.replace("curs-", "");
		$("."+classul).addClass('selected');	
		return false;
});	

$(".frmbutt").live("click", function(event) {
		alert('Userul sau parola sunt incorecte!');
			$(".frmuser").val("");
			$(".frmpass").val("");	
		return false;
});	

$("#formID").validationEngine({
	ajaxSubmit: true,
	ajaxSubmitFile: "contact.php",
	ajaxSubmitMessage: "Va multumim pentru ca ne urmati in eforturile noastre!",
	success :  false,
	failure : function() {}
})

});

var blank = new Image();
 blank.src = 'http://s1.bodaishin.ro/images/pixel.gif';
 
 $(document).ready(function() {
   var badBrowser = (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
   if (badBrowser) {
     // get all pngs on page
     $('img[src$=.png]').each(function() {
       if (!this.complete) {
         this.onload = function() { fixPng(this) };
       } else {
         fixPng(this);
       }
     });
   }
 });
 
 function fixPng(png) {
   // get src
   var src = png.src;
   // set width and height
   if (!png.style.width) { png.style.width = $(png).width(); }
   if (!png.style.height) { png.style.height = $(png).height(); }
   // replace by blank image
   png.onload = function() { };
   png.src = blank.src;
   // set filter (display original image)
   png.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
 }
