(function($) {
$.fn.easySlider = function(options){
// default configuration properties
var defaults = {
prevId: 'prevBtn',
prevText: 'Previous',
nextId: 'nextBtn',
nextText: 'Next',
controlsShow: true,
controlsBefore: '',
controlsAfter: '',
controlsFade: true,
firstId: 'firstBtn',
firstText: 'First',
firstShow: false,
lastId: 'lastBtn',
lastText: 'Last',
lastShow: false,
vertical: false,
speed: 2,
auto: false,
pause: 4000,
continuous: false,
numeric: false,
numericId: 'controls'
};
var options = $.extend(defaults, options);
this.each(function() {
var obj = $(this);
var s = $("li", obj).length;
var w = $("li", obj).width();
var h = $("li", obj).height();
var clickable = true;
obj.width(w);
obj.height(h);
obj.css("overflow","hidden");
var ts = s-1;
var t = 0;
$("ul", obj).css('width',s*w);
if(options.continuous){
$("ul", obj).prepend($("ul li:last-child", obj).clone().css("margin-left","-"+ w +"px"));
$("ul", obj).append($("ul li:nth-child(2)", obj).clone());
$("ul", obj).css('width',(s+1)*w);
};
if(!options.vertical) $("li", obj).css('float','left');
if(options.controlsShow){
var html = options.controlsBefore;
if(options.numeric){
html += '
';
} else {
if(options.firstShow) html += ''+ options.firstText +'';
html += ' '+ options.prevText +'';
html += ' '+ options.nextText +'';
if(options.lastShow) html += ' '+ options.lastText +'';
};
html += options.controlsAfter;
$(obj).after(html);
};
if(options.numeric){
for(var i=0;i'+ (i+1) +'')
.appendTo($("#"+ options.numericId))
.click(function(){
animate($("a",$(this)).attr('rel'),true);
});
};
} else {
$("a","#"+options.nextId).click(function(){
animate("next",true);
});
$("a","#"+options.prevId).click(function(){
animate("prev",true);
});
$("a","#"+options.firstId).click(function(){
animate("first",true);
});
$("a","#"+options.lastId).click(function(){
animate("last",true);
});
};
function setCurrent(i){
i = parseInt(i)+1;
$("li", "#" + options.numericId).removeClass("current");
$("li#" + options.numericId + i).addClass("current");
};
function adjust(){
if(t>ts) t=0;
if(t<0) t=ts;
if(!options.vertical) {
$("ul",obj).css("margin-left",(t*w*-1));
} else {
$("ul",obj).css("margin-left",(t*h*-1));
}
clickable = true;
if(options.numeric) setCurrent(t);
};
function animate(dir,clicked){
if (clickable){
clickable = false;
var ot = t;
switch(dir){
case "next":
t = (ot>=ts) ? (options.continuous ? t+1 : ts) : t+1;
break;
case "prev":
t = (t<=0) ? (options.continuous ? t-1 : 0) : t-1;
break;
case "first":
t = 0;
break;
case "last":
t = ts;
break;
default:
t = dir;
break;
};
var diff = Math.abs(ot-t);
var speed = diff*options.speed;
if(!options.vertical) {
p = (t*w*-1);
$("ul",obj).animate(
{ marginLeft: p },
{ queue:false, duration:speed, complete:adjust }
);
} else {
p = (t*h*-1);
$("ul",obj).animate(
{ marginTop: p },
{ queue:false, duration:speed, complete:adjust }
);
};
if(!options.continuous && options.controlsFade){
if(t==ts){
$("a","#"+options.nextId).hide();
$("a","#"+options.lastId).hide();
} else {
$("a","#"+options.nextId).show();
$("a","#"+options.lastId).show();
};
if(t==0){
$("a","#"+options.prevId).hide();
$("a","#"+options.firstId).hide();
} else {
$("a","#"+options.prevId).show();
$("a","#"+options.firstId).show();
};
};
if(clicked) clearTimeout(timeout);
if(options.auto && dir=="next" && !clicked){;
timeout = setTimeout(function(){
animate("next",false);
},diff*options.speed+options.pause);
};
};
};
// init
var timeout;
if(options.auto){;
timeout = setTimeout(function(){
animate("next",false);
},options.pause);
};
if(options.numeric) setCurrent(0);
if(!options.continuous && options.controlsFade){
$("a","#"+options.prevId).hide();
$("a","#"+options.firstId).hide();
};
});
};
})(jQuery);
$(document).ready(function(){
$("#slider").easySlider({
auto: true,
continuous: true,
numeric: true
});
});
window.addEvent('load', function() {
new JCaption('img.caption');
});
var hwdms_live_site = "";
jQuery(document).ready(function(){
jQuery("#featuredslider-637 > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 4000, true);
});
jQuery(document).ready(function($){
//Full Caption Sliding (Hidden to Visible)
$('.boxgrid.captionfull').hover(function(){
$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:60});
}, function() {
$(".cover", this).stop().animate({top:'-128px'},{queue:false,duration:160});
});
});
window.addEvent('load', function() {
new JCaption('img.caption');
});
var hwdms_live_site = "";
window.addEvent('domready', function() {
SqueezeBox.initialize({});
SqueezeBox.assign($$('a.modal'), {
parse: 'rel'
});
});
(function($){ window.addEvent('domready',function(){this.Slider246 = new DJImageSlider({id: '246', slider_type: 2, slide_size: 735, visible_slides: 1, show_buttons: 1, show_arrows: 1, preload: 300},{auto: 1, transition: Fx.Transitions.linear, duration: 600, delay: 3600})}); })(document.id);
(function($){ window.addEvent('domready',function(){this.Slider427 = new DJImageSlider({id: '427', slider_type: 2, slide_size: 650, visible_slides: 1, show_buttons: 1, show_arrows: 1, preload: 800},{auto: 1, transition: Fx.Transitions.linear, duration: 600, delay: 3600})}); })(document.id);
jQuery(function($){
$('.marquee').marquee();
$('.rwsjquerymarque').marquee({
//speed in milliseconds of the marquee
speed: 60000,
//gap in pixels between the tickers
gap: 10,
//gap in pixels between the tickers
delayBeforeStart: 0,
//'left' or 'right'
direction: 'right',
//true or false - should the marquee be duplicated to show an effect of continues flow
duplicated: true,
//on hover pause the marquee - using jQuery plugin https://github.com/tobia/Pause
pauseOnHover: true
});
//pause and resume links
$('.pause').click(function(e){
e.preventDefault();
$('.rwsjquerymarque').trigger('pause');
});
$('.resume').click(function(e){
e.preventDefault();
$('.rwsjquerymarque').trigger('resume');
});
//toggle
$('.toggle').hover(function(e){
$('.rwsjquerymarque').trigger('pause');
},function(){
$('.rwsjquerymarque').trigger('resume');
})
.click(function(e){
e.preventDefault();
})
});
Date.prototype.stdTimezoneOffset = function() {
var jan = new Date(this.getFullYear(), 0, 1);
var jul = new Date(this.getFullYear(), 6, 1);
return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());
};
Date.prototype.dst = function() {
return this.getTimezoneOffset() < this.stdTimezoneOffset();
};
function ISO8601Local524(date) {
// handles years from 0000 to 9999 only
var offset524 = date.getTimezoneOffset();
var offsetSign524 = "-";
if (offset524 <= 0) {
offsetSign524 = "+";
offset524 = -offset524;
};
var offsetHours524 = Math.floor(offset524 / 60);
var offsetMinutes524 = offset524 - offsetHours524 * 60;
return ("000" + date.getFullYear()).slice(-4) +
"-" + ("0" + (date.getMonth() + 1)).slice(-2) +
"-" + ("0" + date.getDate()).slice(-2) +
"T" + ("0" + date.getHours()).slice(-2) +
":" + ("0" + date.getMinutes()).slice(-2) +
":" + ("0" + date.getSeconds()).slice(-2) +
"," + ("00" + date.getMilliseconds()).slice(-3) +
offsetSign524 + ("0" + offsetHours524).slice(-2) +
":" + ("0" + offsetMinutes524).slice(-2);
};
(function(a){a.fn.marquee=function(b){return this.each(function(){var j=a.extend({},a.fn.marquee.defaults,b),i=a(this),g,h,d,f;j=a.extend({},j,i.data());j.gap=j.duplicated?j.gap:0;i.wrapInner('');var e=i.find(".js-marquee").css({"margin-right":j.gap,"float":"left"});if(j.duplicated){e.clone().appendTo(i)}i.wrapInner('');f=i.find(".js-marquee:first").width()+j.gap;g=i.find(".js-marquee-wrapper");h=i.width();j.speed=((parseInt(f,10)+parseInt(h,10))/parseInt(h,10))*j.speed;if(j.duplicated){j.speed=j.speed/2}var c=function(){if(!j.duplicated){g.css("margin-left",j.direction=="left"?h:"-"+f+"px");d={"margin-left":j.direction=="left"?"-"+f+"px":h}}else{g.css("margin-left",j.direction=="left"?0:"-"+f+"px");d={"margin-left":j.direction=="left"?"-"+f+"px":0}}i.trigger("beforeStarting");g.animate(d,j.speed,"linear",function(){i.trigger("finished");c()})};i.on("pause",function(){g.pause()});i.on("resume",function(){g.resume()});if(j.pauseOnHover){i.hover(function(){if(a.fn.pause){g.pause()}},function(){if(a.fn.resume){g.resume()}})}setTimeout(c,j.delayBeforeStart)})};a.fn.marquee.defaults={speed:5000,gap:20,delayBeforeStart:0,direction:"left",duplicated:false,pauseOnHover:false}})(jQuery);
jQuery(document).ready(function($){
$("input[name$='type']").click(function(){
var value = $(this).val();
if(value=='Individual') {
$("#Individual_box").show();
$("#Company_box").hide();
}
else if(value=='Company') {
$("#Company_box").show();
$("#Individual_box").hide();
}
});
$("#Individual_box").show();
$("#Company_box").hide();
});
$(document).ready(function() {
//Default Action
$(".tab_content").hide(); //Hide all content
$("ul.tabs li:first").addClass("active").show(); //Activate first tab
$(".tab_content:first").show(); //Show first tab content
//On Click Event
$("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
$(".tab_content").hide(); //Hide all tab content
var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active content
return false;
});
});
$(document).ready(function() {
$().UItoTop({ easingType: 'easeOutQuart' });
});
$(function() {
$("#scroller_roll3").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll4").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll5").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll6").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll7").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll8").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll9").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll10").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll11").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll12").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
$("#scroller_roll13").scroller_roll({
title_show: 'disable',//enable disable
time_interval: '30',
window_background_color: "none",
window_padding: '1',
border_size: '0',
border_color: '#0099CC',
images_width: '193',
images_height: '125',
images_margin: '5',
title_size: '12',
title_color: 'black',
show_count: '4'
});
});
function CheckArabicOnly(field)
{
var sNewVal = "";
var sFieldVal = field.value;
for(var i = 0; i < sFieldVal.length; i++) {
var ch = sFieldVal.charAt(i);;
var c = ch.charCodeAt(0);
if(c < 1536 || c > 1791) {
// Discard
}
else {
sNewVal = field.value;
}
}
field.value = sNewVal;
}
function checkheadsearch()
{
var form = document.searchheadpage;
if(form.searchword.value == "")
{
alert("Please Enter Arabic searchword");
form.searchword.focus();
return false;
}
}