jQuery(document).ready(function() {
	
	jQuery('li:first, .job:first, .sidebar .sidebar-wrapper:first').addClass('first');
	jQuery('li:last, .job:last, .sidebar .sidebar-wrapper:last').addClass('last');
	
	jQuery( '#wp-invites-widget-4 p:eq(1), #wp-invites-widget-5 p:eq(1)' ).addClass('success');

	jQuery( 'a.gdt-starrating, a.gdt-classical' ).live( 'click', function(event) {
		jQuery( '#bp-default' ).load( 'index.php' );
	});
	
//	jQuery( '<div class="error" id="invite-code-error">The invitation code you entered is incorrect, invalid, or expired. Please re-enter the code or <a href="/request-an-invitation/">request a new invitation</a>.</div>' ).insertBefore( '.register input[name=invite_code]' );
	
	
	// jQuery('#respond').hide();
	// jQuery('.add-comment, .comment-reply-link, #cancel-comment-reply-link').click(function() {
	// 	if( jQuery(this).not('#cancel-comment-reply-link') && jQuery('#respond').not(':visible') ) {
	// 		jQuery('#respond').toggle('slow');
	// 	}
	//});
});


function browser_name() { 
    var browserName = ""; 

    var ua = navigator.userAgent.toLowerCase(); 
    if ( ua.indexOf( "safari" ) != -1 ) { 
        browserName = "safari"; 
    } 
    if ( ua.indexOf( "msie" ) != -1 ) { 
        browserName = "msie"; 
    }
    return browserName; 
};

function popup(url,width,height) {
  var b_name=browser_name();

  if(b_name=="msie" )
  {
   fw=window.open(url,'Print',"toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,left=0,top=0,width="+width+",height="+height);     
   }
   else
   {
    fw=window.open(url,'Print',"toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,left=200,top=200,width="+width+",height="+height); 
   }
   
   fw.focus();
}