﻿$(function() {
$('.awd1 a[href=#]').attr('href', 'flashdemo/index.html?KeepThis=true&TB_iframe=true&width=930&height=760').addClass('thickbox');
// Contact Us Form Style
$("#contactUs input[type=text]").addClass('text'); 


//Seach Auto Focus
var searchBoxes = $(".searchTextBox");
var searchBox2 = $("#search1");
var searchBox2Default = "Search...";
searchBoxes.focus(function(e){  
     $(this).addClass("active");  
 });  
 searchBoxes.blur(function(e){  
     $(this).removeClass("active");  
 });  
searchBox2.focus(function(){
	if($(this).attr("value") == searchBox2Default) $(this).attr("value", "");
});
searchBox2.blur(function(){
	if($(this).attr("value") == "") $(this).attr("value", searchBox2Default);
});

$(".tbl_entry tr:even").addClass('odd');

$(".featboxWrapper").scrollable({ 
        vertical:true,  
        size: 2,
        interval: 9000,
        loop: true,  
        prev: '.prev',
        next: '.next',
        speed: 600, 
        navi: ".navi",
        items: ".items"       
});

$(".sideFeatWrapper").scrollable({ 
        vertical:true,  
        size: 1,
        interval: 9000,
        loop: true,  
        prev: '.prev',
        next: '.next',
        speed: 600, 
        navi: ".navi",
        items: ".items"       
});

$(".navi a[href=0]").text('1');
$(".navi a[href=1]").text('2');
$(".navi a[href=2]").text('3');
$(".navi a[href=3]").text('4');


$('#banSlides').before('<div id="banTabs">').cycle({
    fx:     'scrollRight',
    speed:  1000,
    timeout: 4000,
    pager:  '#banTabs',
    pagerAnchorBuilder: function(idx, slide) {
    return '<a href="#">' + slide.title + '</a>';
}});


$('.DOBirth').datepicker({minDate: '-36y', maxDate: '-16y',changeMonth: true,changeYear: true,shortYearCutoff: 50});
$('.vLicense').datepicker({minDate: '-1y', maxDate: '+15y',changeMonth: true,changeYear: true});
$('.passDate').datepicker({minDate: '-19y', maxDate: '+2y',changeMonth: true,changeYear: true});

$(".DOBirth, .vLicense, .passDate").attr("readonly","readonly");


$(".otherInstitute, .otherInsdustry, .otherLang").hide();

$(".industry").live("change",
	function() {
	
        if ($(".industry>option:selected").text()=="أخرى") {
	        $(".otherInsdustry").show();
	        $(".otherInsdustry").focus();
	    }

	    else
	        $(".otherInsdustry").hide();
	}

	);


$(".langs").live("change",
	function() {
	
        if ($(".langs>option:selected").text()=="أخرى") {
	        $(".otherLang").show();
	        $(".otherLang").focus();
	    }

	    else
	        $(".otherLang").hide();
	}

	);


$(".institute").live("change",
	function() {
	
        if ($(".institute>option:selected").text()=="أخرى") {
	        $(".otherInstitute").show();
	        $(".otherInstitute").focus();
	    }

	    else
	        $(".otherInstitute").hide();
	}

	);



$(".passDate").live('mouseover',function(){$(this).datepicker({yearRange: '1975:1994',changeMonth: true,changeYear: true});});






});

<!--//--><![CDATA[//><!--
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
//--><!]]>
$(document).ready(function() {


//alert($(".industry").length);

	});
