$(document).ready(function(){ 

$('#srch-butt a').click(function() {  $('.srch-box').toggle("slide");     });    
	$(".socila-icon_ li,.nav-lnks ul li,.color-chng li,.rightlnks li").hover(function() { // Mouse over
		$(this)
			.stop().fadeTo(500, 1)
			.siblings().stop().fadeTo(500, 0.2);
			
		
	}, function() { // Mouse out
		$(this)
			.stop().fadeTo(500, 1)
			.siblings().stop().fadeTo(500, 1);
			
	});
		/**/
	$('.socila-icon_ li a[title]').qtip({
      position: {
         corner: {
            target: 'bottomMiddle',
            tooltip: 'topMiddle'
         }
      },
   style: { 
      width: 140,
      padding: 2,
      background: '#000',
      color: '#fff',
      textAlign: 'center',
      border: {
         width: 2,
         radius: 3,
         color: '#000'
      },
         tip: true
      }
   });
	

 /**/
 	$('.color-chng li a[title]').qtip({
      position: {
         corner: {
            target: 'topMiddle',
            tooltip: 'bottomLeft'
         }
      },
   style: { 
      width: 130,
      padding: 2,
      background: '#4e324b',
      color: '#a3819f',
      textAlign: 'center',
      border: {
         width: 2,
         radius: 3,
         color: '#4e324b'
      },
         tip: true
      }
   });
/**/
 	$('.des-coprt[title]').qtip({
      position: {
         corner: {
            target: 'topMiddle',
            tooltip: 'bottomLeft'
         }
      },
   style: { 
      width: 300,
      padding: 2,
      background: '#111',
      color: '#fff',
      textAlign: 'center',
      border: {
         width: 2,
         radius: 3,
         color: '#111'
      },
         tip: true
      }
   });
/**/
  $(function($) {
    /* initiate plugin */
    $("div.holder1").jPages({
      containerID: "text_",
      perPage:1,
	  animation: "bounceIn",
	  pause: '8000'

    });
  });
  /**/
});


/***/
$(function() { $("#statbox").organicTabs({ "speed": 200   }); });
/******/
$(document).ready(function() {
	
	
	$("#topnav li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
	
	$("#topnav li").each(function() { //For each list item...
		var linkText = $(this).find("a").html(); //Find the text inside of the a tag
		$(this).find("span").show().html(linkText); //Add the text in the span tag
	}); 
	
	$("#topnav li").hover(function() {	//On hover...
		$(this).find("span").stop().animate({ 
			marginTop: "-40" //Find the span tag and move it up 40 pixels
		}, 350);
	} , function() { //On hover out...
		$(this).find("span").stop().animate({
			marginTop: "0" //Move the span back to its original state (0px)
		}, 650);
	});
/**/
    var nav = $('#top-bar');
    
    $(window).scroll(function () {
        if ($(this).scrollTop() > 125) {
            nav.addClass("fixd-top");
        } else {
            nav.removeClass("fixd-top");
        }
    });
	
	
});

/**/
$(document).ready(function() {
	$("#open").click(function(){
		$("div.login-box").slideDown("slow");
	});	
	$("#close").click(function(){
		$("div.login-box").slideUp("slow");	
	});		
	$("#toggle b").click(function () {
		$("#toggle b").toggle();
	});		
		
});
/***/
			var scrollSpeed = 60; 		// Speed in milliseconds
			var step = 1; 				// How many pixels to move per step
			var current = 0;			// The current pixel row
			var imageWidth = 1024;		// Background image width
			var headerWidth = 280;		// How wide the header is.
			
			//The pixel row where to start a new loop
			var restartPosition = -(imageWidth - headerWidth);
			
			function scrollBg(){
				//Go to next pixel row.
				current -= step;
				
				//If at the end of the image, then go to the top.
				if (current == restartPosition){
					current = 0;
				}
				
				//Set the CSS of the header.
				$('#hd').css("background-position",current+"px 0");
			}
			
			//Calls the scrolling function repeatedly
			var init = setInterval("scrollBg()", scrollSpeed);