jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox({
        loadingImage : './modules/movies/templates/images/loadingbox.gif',
        closeImage   : './modules/movies/templates/images/close.png'
      })
    })
	$(document).ready(function() {
    $.facebox.settings.opacity = 0.5
});

$(function() {
			$("ul.trailers").ytplaylist({addThumbs:true, autoPlay: false, holderId: 'ytvideo2'});
		});
		
$(document).ready(function(){
				$('#paging_container1').pajinate({
					items_per_page : 6,
					nav_label_first : 'الأولى',
					nav_label_last : 'الأخيرة',
					nav_label_prev : 'السابق',
					nav_label_next : 'التالي'
				});
			});		
			
$(document).ready(function() {
  $('.sticky').cluetip({
  positionBy:'fixed', 
  sticky: true, 
  closePosition:'title', 
  topOffset: 5, 
  width: 350, 
  arrows: true, 
  cluetipClass:'default',
  closeText:'<img src="./modules/movies/templates/images/close.png" />'});
});
	
	$(document).ready(function(){
	
		// this is where you call siteFeature
		// see the README and the original demo (index.html) for examples on how to customize siteFeature
		$('#preFeature').siteFeature({
	tabsLocation: 'right',
	tabBgImg: '',
	tabBgImgIE6: '',
	txtBoxAnimateInType: 'slideRight',
	txtBoxAnimateOutType: 'slideLeft',
	txtBoxAnimateInHorzType: 'fade',
	txtBoxAnimateOutHorzType: 'blink',
	txtBoxPauseBetweenInOut: 0,
	autoPlay: true,
	autoPlayInterval: 10000
});
	
	}); // end $(document).ready
	
	jQuery(document).ready(function(){
		jQuery('.form-field').each( function () {
		jQuery(this).val(jQuery(this).attr('defaultVal'));
		jQuery(this).css({color:'#777'});
		});
		jQuery('.form-field').focus(function(){
		if ( jQuery(this).val() == jQuery(this).attr('defaultVal') ){
		jQuery(this).val('');
		jQuery(this).css({color:'#777'});
		}
		});
		jQuery('.form-field').blur(function(){
		if (jQuery(this).val() == '' ){
		jQuery(this).val(jQuery(this).attr('defaultVal'));
		jQuery(this).css({color:'#777'});
		}
		});
		});

function m_lookup(inputString) {
				if(inputString.length == 2) {
					// Hide the suggestion box.
						jQuery('#m_suggestions').hide();
				} else {
						jQuery.post("./ajax/m_autosuggest.php", {queryString: ""+inputString+""}, function(data){
							if(data.length >0) {
							jQuery('#m_suggestions').show();
							jQuery('#m_autoSuggestionsList').html(data);
						}
						});
				}
			} 
function a_lookup(inputString) {
				if(inputString.length == 2) {
					// Hide the suggestion box.
						jQuery('#a_suggestions').hide();
				} else {
						jQuery.post("./ajax/a_autosuggest.php", {queryString: ""+inputString+""}, function(data){
							if(data.length >0) {
							jQuery('#a_suggestions').show();
							jQuery('#a_autoSuggestionsList').html(data);
						}
						});
				}
			}
function d_lookup(inputString) {
				if(inputString.length == 2) {
					// Hide the suggestion box.
						jQuery('#d_suggestions').hide();
				} else {
						jQuery.post("./ajax/d_autosuggest.php", {queryString: ""+inputString+""}, function(data){
							if(data.length >0) {
							jQuery('#d_suggestions').show();
							jQuery('#d_autoSuggestionsList').html(data);
						}
						});
				}
			}
