jQuery.noConflict();
jQuery(function($) { 

// DROP DOWN MENU
	// http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started
	// http://users.tpg.com.au/j_birch/plugins/superfish/#options
	$("#menu-main").supersubs({ 
			minWidth:    15,   // minimum width of sub-menus in em units 
			maxWidth:    27,   // maximum width of sub-menus in em units 
			extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
							   // due to slight rounding differences and font-family 
		}).superfish({
			dropShadows:    false,
			delay:			300
			
							}); // call supersubs first, then superfish, so that subs are 
                         		// not display:none when measuring. Call before initialising 
                         		// containing tabs for same reason. 

	
	// Scroll to top animation
	$('.scroll-top').click(function(){ 
		$('html, body').animate({scrollTop:0}, 600); return false; 
	});
	
	
	// Hide parent on click (error messages, etc...)
	$('a.hideparent').click(function(){ 
		$(this).parent().fadeOut();
		return false;
	});

	// Lightbox setup
	// Ex: open any link <a href="large.jpg" />...
	$('a[href$="jpg"], a[href$="jpeg"], a[href$="png"], a[href$="gif"]').fancybox();



//	// Default Modal box
//	$(".modal-box").fancybox({
//		'modal' : true
//	});

	// signin box
	$("#signin-link").fancybox({
		
		'hideOnOverlayClick':true
     

	});
	

			// Twitterbar
			// IMPORTANT TWITTER BAR CYCLE WILL NOT WORK WITHOUT AJAX.STOP FUNCTION
		$("#twitterbar").tweet({
			join_text: "auto",
			username: "JobsatEEI",
			count: 3,
			auto_join_text_default: "", 
			auto_join_text_ed: "",
			auto_join_text_ing: "",
			auto_join_text_reply: "",
			auto_join_text_url: "",                      
			loading_text: "Loading tweets bar..."
      
}).ajaxStop(function(){
     $("#twitterbar ul").cycle({ /* add options here */ fx:'fade', speed:400 });
	
			$("#twitterbar a:link").attr("target", "_blank");
	
      });

	
		// Latest Tweets


		$(function(){
      $("#latest-footer-tweets").tweet({
			join_text: "auto",
			username: "JobsatEEI",
			count: 1,
			auto_join_text_default: "we said,", 
			auto_join_text_ed: "we",
			auto_join_text_ing: "we were",
			auto_join_text_reply: "we replied",
			auto_join_text_url: "we were checking out",
			loading_text: "Loading tweets now..."
      }).bind("loaded",function(){$(this).find("a").attr("target","_blank");});
    });


		
	// login modal box


 		
		// slidercontact
		$(document).ready(function() {
							  
  $(document .images).bind("contextmenu",function(e){
        return false;
    });

	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");
	
	});	
	$(".opencontact").click(function(){
		$("div#panel").slideDown("slow");
		$("#toggle a").toggle();
		$('html, body').animate({scrollTop:0}, "fast"); return false; 
	
	});	
	$(".page-item-495").click(function(){
		$("div#panel").slideDown("slow");
		$("#toggle a").toggle();
		$('html, body').animate({scrollTop:0}, "fast"); return false; 
	
	});	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
	});		
	
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});		
		
});
		
	
		
		
}); // end jQuery
